/* Design system "bloqy" (tokens of the brand book): coral marks only what matters – the primary action, the
   active item, the focus; greys carry the surface. Plus Jakarta Sans for the interface, JetBrains Mono for paths
   and code, both served locally (assets/fonts). */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); }

:root {
    --bg: #F7F7F8;
    --surface: #FFFFFF;
    --surface-raised: #FFFFFF;
    --surface-sunken: #EEEFF1;
    --surface-2: #EEEFF1;
    --text: #14161B;
    --muted: #50545D;
    --subtle: #6E727C;
    --border: #DFE1E5;
    --border-strong: #8C909A;
    --primary: #D63F17;
    --primary-hover: #C2380F;
    --primary-text: #FFFFFF;
    --secondary: #EEEFF1;
    --secondary-hover: #DFE1E5;
    --on-secondary: #14161B;
    --accent: #D63F17;
    --accent-soft: #FFF4F0;
    --accent-text: #AE3110;
    --focus-ring: #F2552C;
    --danger: #B42318;
    --info: #1D4ED8;
    --success-bg: #E8F4EE;
    --success-text: #1F7A50;
    --error-bg: #FDECEA;
    --error-text: #B42318;
    --warning: #8A5A00;
    --sidebar: #FFFFFF;
    --sidebar-text: #50545D;
    --toolbar: #FFFFFF;
    --toolbar-text: #14161B;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-raised: 0 12px 32px rgba(20, 22, 27, .14), 0 2px 6px rgba(20, 22, 27, .06);
    --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-family: var(--font-sans);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F1115;
        --surface: #181A20;
        --surface-raised: #1F2128;
        --surface-sunken: #0B0C10;
        --surface-2: #24262C;
        --text: #F3F4F6;
        --muted: #A3A7B0;
        --subtle: #8A8F99;
        --border: #2A2D35;
        --border-strong: #6E737E;
        --primary: #F2552C;
        --primary-hover: #FF6B45;
        --primary-text: #14161B;
        --secondary: #24262C;
        --secondary-hover: #2E3139;
        --on-secondary: #F3F4F6;
        --accent: #F2552C;
        --accent-soft: #2A1610;
        --accent-text: #FF9B7A;
        --focus-ring: #FF6B45;
        --danger: #F97066;
        --info: #60A5FA;
        --success-bg: #12301F;
        --success-text: #4ADE80;
        --error-bg: #3A1714;
        --error-text: #F97066;
        --warning: #FBBF24;
        --sidebar: #181A20;
        --sidebar-text: #A3A7B0;
        --toolbar: #181A20;
        --toolbar-text: #F3F4F6;
        --shadow-raised: 0 12px 32px rgba(0, 0, 0, .5);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; font-size: 14px; word-spacing: .06em; }
code, kbd, pre, samp { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
a { color: var(--accent-text); }
h1 { font-size: 1.5rem; line-height: 1.33; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 1rem; }
h2 { font-size: 1.125rem; line-height: 1.45; font-weight: 700; margin: 0 0 .5rem; }
h2 small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.muted { color: var(--muted); }
.warning { color: var(--warning); }

.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); border-right: 1px solid var(--border); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1rem; }
.sidebar .brand { display: inline-flex; color: var(--text); text-decoration: none; padding: 0 .4rem; }
.sidebar .brand svg { height: 30px; width: auto; display: block; }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.sidebar ul a { display: block; color: var(--sidebar-text); text-decoration: none; padding: .45rem .6rem; border-radius: var(--radius-sm); font-weight: 500; }
.sidebar ul a:hover, .sidebar ul a:focus-visible { background: var(--secondary); color: var(--text); }
.content { padding: 1.2rem clamp(1rem, 3vw, 2rem); width: 100%; min-width: 0; }

@media (max-width: 760px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .sidebar ul { display: flex; flex-wrap: wrap; }
    .nav-user { margin-top: 0; margin-left: auto; padding-top: 0; border-top: 0; }
    .nav-user-menu { left: auto; width: 14rem; bottom: auto; top: calc(100% + .35rem); }
    .nav-goto { flex: 1 1 100%; }
}

/* Page header: title left, the page actions (button small-button, small forms) right next to each other. */
.page-header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-header h1 { margin: 0 auto 0 0; padding-right: .5rem; }
.page-header > form, .page-header bloqy-confirm > form { display: inline-flex; margin: 0; }
.toolbar { display: flex; gap: .5rem; align-items: center; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; font: inherit; font-weight: 600; line-height: 1.43; padding: .45rem 1rem; border-radius: var(--radius); border: 1px solid transparent; background: var(--secondary); color: var(--on-secondary); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.button:hover { background: var(--secondary-hover); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.button.ghost { background: none; color: var(--muted); }
.button.ghost:hover { background: var(--secondary); color: var(--text); }
.button.danger, .button-danger { background: none; color: var(--danger); border-color: var(--danger); }
.button.danger:hover, .button-danger:hover { background: var(--error-bg); }
.button.small-button, .small-button.button { min-height: 32px; padding: .3rem .75rem; font-size: .8125rem; border-radius: var(--radius-sm); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--danger); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr.inactive td { color: var(--muted); }
td.actions { text-align: right; white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }

.badge { display: inline-block; font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); vertical-align: middle; margin-left: .35rem; }
.status { font-size: .8rem; padding: .1rem .5rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }
.status-published { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
.status-in_review { color: var(--warning); }

.flash { padding: .7rem 1rem; border-radius: 6px; margin: 0 0 1rem; }
.flash-success { background: var(--success-bg); color: var(--success-text); }
.flash-error { background: var(--error-bg); color: var(--error-text); }

.form { display: grid; gap: 1rem; max-width: 640px; }
.blocked-list { display: grid; gap: 1rem; }
.blocked-list table { width: 100%; }
.form label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.form label.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.form small { font-weight: 400; color: var(--muted); }
/* Einstellungen → Rollen: switches per group, areas. */
.role-form.card { max-width: 60rem; padding: 1.25rem 1.5rem 1.5rem; }
.role-form > fieldset:first-of-type { margin-top: 0; padding-top: 0; }
.role-form > fieldset:first-of-type::before { display: none; }
.role-form fieldset[hidden] { display: none; }
.form.role-form label.switch { display: flex; align-items: center; gap: .55rem; width: fit-content; font-weight: 400; font-size: .875rem; }
.role-form .role-rights { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.role-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; }
.form .role-kind { position: relative; display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 400; }
.role-kind input { position: absolute; opacity: 0; pointer-events: none; }
.role-kind .icon { width: 18px; height: 18px; color: var(--muted); }
.role-kind strong { font-weight: 600; font-size: .9rem; }
.role-kind:hover { border-color: var(--border-strong); }
.role-kind:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-kind:has(input:checked) .icon { color: var(--accent-text); }
.role-kind:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.role-perm-group { display: grid; gap: .5rem; }
.role-perm-group > header { display: flex; align-items: center; gap: .6rem; }
.role-perm-group h3 { margin: 0; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.role-count { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.role-perm-group > header .switch { margin-left: auto; }
.role-rights { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .35rem 1rem; padding: .6rem .75rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface-sunken) 50%, var(--surface)); }
.role-blocks { display: grid; gap: 1rem; }
.role-blocks[hidden] { display: none; }
.role-none { margin: 0; font-size: .875rem; color: var(--muted); }
.role-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.role-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-sunken); color: var(--text); font-size: .8125rem; text-decoration: none; }
.role-chip:hover { background: var(--accent-soft); color: var(--accent-text); }
.role-chip .icon { width: 13px; height: 13px; color: var(--muted); }
.roles-table td:first-child a { color: inherit; font-weight: 600; text-decoration: none; }
.roles-table td:first-child a:hover { color: var(--accent-text); }
.roles-table .muted { color: var(--muted); }
.form .role-rights label.checkbox { font-size: .875rem; }
.role-scoped { display: inline-flex; color: var(--muted); }
.role-scoped .icon { width: 14px; height: 14px; }
/* <bloqy-password> (password-field.js, same script as in the setup wizard). */
.password-fields { display: grid; gap: .3rem; }
.password-fields label { margin-top: .7rem; }
.password-fields label:first-child { margin-top: 0; }
.password-label { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.password-input { position: relative; display: flex; }
.password-input input { flex: 1; min-width: 0; padding-right: 2.5rem; }
.password-input .icon-button { position: absolute; right: .2rem; top: 50%; transform: translateY(-50%); }
.password-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.password-strength i { height: 4px; border-radius: 2px; background: var(--border); }
.password-strength[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.password-strength[data-level="2"] i:nth-child(-n+2) { background: var(--warning); }
.password-strength[data-level="3"] i:nth-child(-n+3), .password-strength[data-level="4"] i { background: var(--success-text); }
.password-match.is-match { color: var(--success-text); }
.password-match.is-mismatch { color: var(--danger); }
.form input:not([type="checkbox"]), .form select, .form textarea { font: inherit; font-weight: 400; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 100%; }
.form input:disabled { opacity: .65; }
.form legend { font-weight: 600; padding: 0; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-actions { display: flex; gap: 1rem; align-items: center; }
.field-error { color: var(--error-text); font-weight: 400; margin: 0; font-size: .85rem; }
.prefixed { display: flex; align-items: stretch; }
.prefixed > span { padding: .5rem .6rem; border: 1px solid var(--border); border-right: 0; border-radius: 6px 0 0 6px; color: var(--muted); font-weight: 400; background: var(--bg); }
.prefixed input { border-radius: 0 6px 6px 0 !important; }

body.auth { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.auth-box { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-raised); }
.auth-box .brand { margin: 0 0 1.5rem; color: var(--text); }
.auth-box .brand svg { height: 36px; width: auto; display: block; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notice { background: var(--surface); border: 1px solid var(--border); padding: .6rem .9rem; border-radius: 6px; }
/* A setting that is on but has no effect (e.g. table sorting with merged cells): yellow like other missing states. */
.table-sort-warning { background: #fef3c7; border-color: #fcd34d; color: #78350f; }

.pathbar { display: flex; gap: .5rem; align-items: stretch; margin-bottom: 1rem; }
.pathbar input, .breadcrumb { flex: 1; min-width: 0; font: inherit; font-family: var(--font-mono); padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
/* Without JavaScript the input is always visible; <bloqy-pathbar> switches between breadcrumb and input. */
.breadcrumb { display: none; align-items: center; flex-wrap: wrap; cursor: text; }
bloqy-pathbar:defined:not([editing]) .breadcrumb { display: flex; }
bloqy-pathbar:defined:not([editing]) .pathbar input { display: none; }
.breadcrumb a { text-decoration: none; padding: 0 .1rem; border-radius: 3px; }
.breadcrumb a:hover { background: var(--bg); text-decoration: underline; }

.explorer td { padding-top: .45rem; padding-bottom: .45rem; }
.explorer tbody tr:hover { background: var(--bg); }
.entry { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--text); font-weight: 500; }
a.entry:hover { color: var(--primary); }
bloqy-pathbar:defined:not([editing]) .pathbar button { display: none; }

/* Icons: Minimal Icons by Alex Stoica (CC0 1.0), stored in bloqy/assets/icons, inlined as SVG. */
.icon { width: 14px; height: 14px; flex: none; display: inline-block; vertical-align: middle; }
.icon.muted { color: var(--muted); }
.icon.folder { color: #d9a01b; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.icon-button:hover, .icon-button:focus-visible { color: var(--primary); border-color: var(--border); background: var(--surface); }
.icon-button.danger:hover, .icon-button.danger:focus-visible { color: var(--danger); }
/* Only wrappers (confirm, form) become inline blocks; icon buttons keep their flex centering. */
td.actions > bloqy-confirm, td.actions form { display: inline-block; vertical-align: middle; }
td.actions > * + * { margin-left: .15rem; }
.icon-button { vertical-align: middle; }

.state { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px; cursor: help; }
.state .icon { width: 11px; height: 11px; }
.state-online { color: #16a34a; background: color-mix(in srgb, #16a34a 14%, transparent); }
.state-offline { color: #dc2626; background: color-mix(in srgb, #dc2626 12%, transparent); }
.state-scheduled { color: #d97706; background: color-mix(in srgb, #d97706 14%, transparent); }
.state-expired { color: #dc2626; background: color-mix(in srgb, #dc2626 12%, transparent); }
.state-unsynced { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }

.module-group { margin-bottom: 2rem; }
.module { margin-bottom: .75rem; }
.module summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.module code, .variant code { font-size: .8rem; color: var(--muted); }
.variant { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .75rem; }
.variant p { margin: 0 0 .5rem; }
.small { font-size: .85rem; }
.preview { width: 100%; height: 260px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

/* Forms */
.form.wide { max-width: 900px; }
textarea.code { font-family: var(--font-mono); font-size: .8rem; }
.type-logos { --type-color: #0d9488; } .type-team { --type-color: #16a34a; } .type-faq { --type-color: #ca8a04; }
.type-gallery { --type-color: #ea580c; } .type-contact { --type-color: #dc2626; } .type-video { --type-color: #db2777; }
.type-map { --type-color: #9333ea; } .type-teasers { --type-color: #4f46e5; } .type-process { --type-color: #65a30d; }
.type-html { --type-color: #6b7280; }
.kind-stylesheet { --type-color: #0f766e; }
.choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.choices label.checkbox { font-weight: 400; }
.danger-zone { margin-top: 2rem; border-color: var(--danger); }
.danger-button { border-color: var(--danger); color: var(--danger); }
.danger-button:hover { background: var(--danger); color: #fff; }

/* Code editor (<bloqy-code-editor>) */
bloqy-code-editor { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; min-height: 0; }
/* Until the script has set up the editor: the plain textarea keeps the place of the editor, invisible (no flash of a small text box). */
bloqy-code-editor:not(:defined) > textarea { flex: 1; width: 100%; min-height: 24rem; visibility: hidden; }
.code-toolbar { display: flex; align-items: center; gap: .35rem; padding: .4rem .5rem; border-bottom: 1px solid var(--border); background: var(--bg); flex-wrap: wrap; }
.code-search-input { font: inherit; font-size: .85rem; padding: .3rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 14rem; }
.code-search-count { font-size: .8rem; color: var(--muted); min-width: 3.5rem; }
.code-button { padding: .25rem .6rem; font-size: .85rem; }
.code-status { flex: 1; text-align: right; font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-status.is-error { color: var(--error-text); white-space: normal; }
.code-body { display: flex; flex: 1; min-height: 24rem; position: relative; }
/* Textarea and coloured layer must place every character identically, otherwise the caret drifts away from the
   visible text along a line (Windows with scaling/zoom): one font for both, character width a whole pixel
   (JetBrains Mono: 0.6 em → 13.333 px = 8 px), no ligatures, no kerning, no synthetic bold/italic. */
.code-gutter, .code-layer, .code-input { font-family: "JetBrains Mono", ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.3333px; line-height: var(--code-line, 20px); tab-size: 4; font-weight: 400; font-style: normal; letter-spacing: 0; word-spacing: 0; font-kerning: none; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; font-synthesis: none; text-rendering: optimizeSpeed; }
.code-layer * { font: inherit; letter-spacing: inherit; }
.code-gutter { flex: none; overflow: hidden; padding: 10px 0; background: var(--bg); border-right: 1px solid var(--border); color: var(--muted); text-align: right; user-select: none; min-width: 3.25rem; }
.code-gutter div { padding: 0 .6rem 0 .5rem; height: var(--code-line, 20px); }
.code-gutter .is-error { background: var(--error-bg); color: var(--error-text); font-weight: 700; }
.code-area { position: relative; flex: 1; overflow: hidden; }
.code-layer { position: absolute; inset: 0; margin: 0; padding: 10px 12px; white-space: pre; color: transparent; pointer-events: none; }
.code-layer mark { background: rgba(245, 158, 11, .35); color: transparent; border-radius: 2px; }
.code-layer mark.is-current { background: rgba(245, 158, 11, .85); outline: 1px solid #b45309; }
.code-layer { z-index: 0; }
.code-layer .code-error-line { position: absolute; left: 0; right: 0; z-index: -1; height: var(--code-line, 20px); background: var(--error-bg); }

/* Syntax colours (code-highlight.js): the text of the textarea is transparent, the layer behind shows it. */
bloqy-code-editor {
    --tk-comment: #6a737d; --tk-tag: #22863a; --tk-attr: #6f42c1; --tk-string: #032f62; --tk-number: #005cc5;
    --tk-keyword: #d73a49; --tk-variable: #e36209; --tk-selector: #6f42c1; --tk-function: #005cc5; --tk-entity: #b08800;
    --tk-tpl-var: #be185d; --tk-tpl-var-bg: rgba(236, 72, 153, .1); --tk-tpl-block: #7c3aed; --tk-tpl-block-bg: rgba(124, 58, 237, .12);
    --tk-bloqy: #0f766e; --tk-bloqy-bg: rgba(20, 184, 166, .14);
}
@media (prefers-color-scheme: dark) {
    bloqy-code-editor {
        --tk-comment: #8b949e; --tk-tag: #7ee787; --tk-attr: #d2a8ff; --tk-string: #a5d6ff; --tk-number: #79c0ff;
        --tk-keyword: #ff7b72; --tk-variable: #ffa657; --tk-selector: #d2a8ff; --tk-function: #79c0ff; --tk-entity: #e3b341;
        --tk-tpl-var: #f472b6; --tk-tpl-var-bg: rgba(244, 114, 182, .14); --tk-tpl-block: #c4b5fd; --tk-tpl-block-bg: rgba(167, 139, 250, .18);
        --tk-bloqy: #5eead4; --tk-bloqy-bg: rgba(45, 212, 191, .14);
    }
}
bloqy-code-editor.is-highlighted .code-input { color: transparent; }
bloqy-code-editor.is-highlighted .code-input::selection { color: transparent; background: color-mix(in srgb, var(--accent) 28%, transparent); }
bloqy-code-editor.is-highlighted .code-layer { color: var(--text); }
bloqy-code-editor.is-highlighted .code-layer mark { color: inherit; }
.tk-comment { color: var(--tk-comment); }
.tk-tag { color: var(--tk-tag); }
.tk-attr { color: var(--tk-attr); }
.tk-string { color: var(--tk-string); }
.tk-number { color: var(--tk-number); }
.tk-keyword { color: var(--tk-keyword); }
.tk-variable { color: var(--tk-variable); }
.tk-selector { color: var(--tk-selector); }
.tk-function { color: var(--tk-function); }
.tk-entity { color: var(--tk-entity); }
.tk-tpl-var { color: var(--tk-tpl-var); background: var(--tk-tpl-var-bg); border-radius: 3px; }
.tk-tpl-block { color: var(--tk-tpl-block); background: var(--tk-tpl-block-bg); border-radius: 3px; }
.tk-bloqy { color: var(--tk-bloqy); background: var(--tk-bloqy-bg); border-radius: 3px; }
.code-input { position: relative; display: block; width: 100%; height: 100%; min-height: 24rem; margin: 0; padding: 10px 12px; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); white-space: pre; overflow: auto; caret-color: var(--primary); scrollbar-width: thin; }

/* Theme page */
.theme-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; align-items: start; }
.theme-files { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; }
.theme-files ul { list-style: none; margin: 0 0 .75rem; padding: 0; }
.theme-files li a { display: block; padding: .35rem .5rem; border-radius: 5px; text-decoration: none; color: var(--text); font-family: var(--font-mono); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.theme-files li a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-text); }
.theme-files form { display: grid; gap: .35rem; margin-top: .5rem; }
.theme-files input { font: inherit; font-size: .85rem; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.theme-editor { display: grid; gap: .5rem; min-width: 0; }
.theme-editor bloqy-code-editor { height: calc(100vh - 14rem); }
.theme-file-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.theme-file-actions form { display: flex; gap: .35rem; align-items: center; }
.theme-file-actions input { font: inherit; font-size: .85rem; padding: .3rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
@media (max-width: 900px) { .theme-layout { grid-template-columns: 1fr; } }
.new-folder { position: relative; }
.new-folder summary { list-style: none; }
.new-folder summary::-webkit-details-marker { display: none; }
.new-folder form { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 5; display: flex; gap: .35rem; padding: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.new-folder input:not([type=checkbox], [type=radio]) { font: inherit; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); width: 14rem; }
.new-folder form.stack { flex-direction: column; align-items: stretch; width: min(24rem, calc(100vw - 2rem)); }
.new-folder form.stack input:not([type=checkbox], [type=radio]), .new-folder form.stack select { width: 100%; }
.new-folder .font-weights { display: grid; grid-template-columns: repeat(5, auto); gap: .25rem .75rem; justify-content: start; }
.files-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .75rem .5rem .35rem; }
.module-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .75rem; }
.module-actions form, form.inline { display: inline-flex; gap: .35rem; align-items: center; }
.module-actions input, .module-actions select { font: inherit; font-size: .85rem; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.variant-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; }
.variant-main { display: grid; gap: .75rem; min-width: 0; }
.variant-main h2 { margin: 1rem 0 0; font-size: 1.05rem; }
.variant-main bloqy-code-editor { height: 22rem; }
.variant-main bloqy-code-editor .code-body, .variant-main bloqy-code-editor .code-input { min-height: 0; }
.variant-side { position: sticky; top: 1rem; display: grid; gap: .5rem; }
.variant-side .preview { height: 320px; }
.field-set { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: grid; gap: .6rem; margin: 0; }
.field-set legend { font-weight: 600; padding: 0; }
.field-set label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.field-set label.checkbox { display: flex; font-weight: 400; }
.field-set label.inline { display: inline-flex; margin-right: .75rem; }
.field-set input:not([type="checkbox"]) { font: inherit; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.advanced { border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; background: var(--surface); }
.advanced summary { cursor: pointer; font-weight: 600; }
.advanced bloqy-code-editor { height: 14rem; margin-bottom: .75rem; }
.form.wide bloqy-code-editor { height: 14rem; }
@media (max-width: 1100px) { .variant-grid { grid-template-columns: 1fr; } .variant-side { position: static; } }

/* Menu editor */
.menu-name { display: grid; gap: .25rem; max-width: 24rem; margin-bottom: 1rem; font-weight: 600; }
.menu-name input { font: inherit; font-weight: 400; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.menu-list .menu-list { margin: .4rem 0 0 1.75rem; padding-left: .75rem; border-left: 2px solid var(--border); }
.menu-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.menu-row input[type="text"], .menu-row input:not([type]), .menu-row select { font: inherit; font-size: .9rem; padding: .3rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.menu-row .menu-label { flex: 1 1 10rem; font-weight: 600; }
.menu-row select { max-width: 18rem; }
.menu-row .menu-anchor { width: 7rem; }
.menu-buttons { display: flex; gap: .15rem; margin-left: auto; }
.menu-actions { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; }
.menu-actions .icon { width: 14px; height: 14px; vertical-align: -.15em; }
.theme-files li a[aria-current="true"] .muted { color: inherit; opacity: .75; }
.menu-tree { position: relative; }
.menu-handle { cursor: grab; touch-action: none; }
bloqy-menu-editor.is-sorting, bloqy-menu-editor.is-sorting * { cursor: grabbing !important; user-select: none; }
.menu-item.is-dragging > .menu-row { opacity: .45; }
.menu-drop-indicator { position: absolute; height: 3px; border-radius: 2px; background: var(--primary); pointer-events: none; }

/* JavaScript management */
.explorer .center { text-align: center; }
.explorer tr.is-inactive td { opacity: .55; }
.explorer .toggle { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted, #6b7280); cursor: pointer; }
.explorer .toggle.is-on { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.explorer .toggle .icon { width: 14px; height: 14px; }
.explorer td form { display: inline; }
.badge { display: inline-block; margin-left: .4rem; padding: 0 .4rem; border-radius: 4px; font-size: .75rem; background: var(--border); }
.upload-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
bloqy-dropzone { display: block; position: relative; border-radius: var(--radius); outline: 2px dashed transparent; outline-offset: 4px; transition: outline-color .15s; }
bloqy-dropzone.is-dragover { outline-color: transparent; }
.script-layout { grid-template-columns: minmax(0, 1fr) 20rem; }
.script-settings .stack { display: grid; gap: .6rem; }
.script-settings fieldset { display: grid; gap: .3rem; }
.script-settings .indent { margin-left: 1.4rem; }
.script-settings select, .script-settings input[type=number] { display: block; width: 100%; margin-top: .2rem; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; word-break: break-all; }
.inline-form { display: flex; gap: .4rem; align-items: center; }

/* Settings */
.settings-form { display: grid; gap: 1rem; }
.settings-form .panel, .settings-favicon { display: grid; gap: .6rem; }
.settings-form .panel h2, .settings-favicon h2 { margin: 0; font-size: 1.05rem; }
.settings-form label:not(.checkbox) { display: grid; gap: .25rem; font-weight: 600; }
.settings-form input:not([type=checkbox]):not([type=radio]), .settings-form select { font: inherit; font-weight: 400; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); max-width: 36rem; }
.settings-form fieldset { display: grid; gap: .3rem; }
.settings-form p { margin: 0; }
.title-preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; max-width: 36rem; }
.settings-actions { position: sticky; bottom: 0; padding: .75rem 0; background: var(--bg); }
.favicon-preview { display: flex; align-items: center; gap: .5rem; }
.text-success { color: #15803d; }
.text-danger { color: #b91c1c; }
.danger-text { color: #b91c1c; }

/* Media */
.media-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; margin-bottom: 1rem; }
.media-bar bloqy-pathbar { flex: 1 1 20rem; }
.media-bar .pathbar { margin-bottom: 0; }
.media-search { display: flex; gap: .35rem; }
.media-search input, .media-search select { font: inherit; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.view-switch { display: flex; gap: .15rem; }
.view-switch a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-text); }
.media-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .75rem; }
.media-card a { display: grid; gap: .25rem; padding: .4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; height: 100%; }
.media-card a:hover, .media-card a:focus-visible { border-color: var(--primary); }
.media-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; background: repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 5px; overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: contain; }
.media-folder .media-thumb { background: var(--bg); }
.media-folder .media-thumb .icon { width: 2.5rem; height: 2.5rem; }
.media-name { font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-ext { font-weight: 700; font-size: 1.1rem; color: var(--muted, #6b7280); }
.media-ext.large { font-size: 2.5rem; text-align: center; padding: 3rem 0; }
.media-mini { width: 2rem; height: 2rem; object-fit: cover; border-radius: 3px; vertical-align: middle; margin-right: .4rem; }
.badge.warn { background: #fef3c7; color: #92400e; }
.media-detail { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1rem; align-items: start; }
.media-side { display: grid; gap: 1rem; }
.media-preview video, .media-preview audio { width: 100%; }
bloqy-focus-picker { position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
bloqy-focus-picker img { display: block; max-width: 100%; max-height: 70vh; cursor: crosshair; }
.focus-marker { position: absolute; width: 1.5rem; height: 1.5rem; margin: -.75rem 0 0 -.75rem; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--primary), 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: .3rem .75rem; margin: 0; }
.meta-list dt { font-weight: 600; }
.meta-list dd { margin: 0; word-break: break-all; }
@media (max-width: 900px) { .media-detail { grid-template-columns: 1fr; } }

/* Media picker dialog (shared with the editor) */
.image-preview { position: relative; margin-bottom: .4rem; }
.image-preview img { display: block; width: 100%; max-height: 12rem; object-fit: contain; background: repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 5px; cursor: crosshair; }
.focus-dot { position: absolute; width: 1rem; height: 1rem; margin: -.5rem 0 0 -.5rem; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); pointer-events: none; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-text); text-decoration: underline; cursor: pointer; font: inherit; }
.media-picker { width: min(64rem, 94vw); max-height: 88vh; padding: 0; border: 0; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: grid; grid-template-rows: auto auto 1fr auto auto; }
.media-picker:not([open]) { display: none; }
.media-picker::backdrop { background: rgba(15, 23, 42, .55); }
.media-picker.is-dragover { outline: 3px dashed var(--accent); outline-offset: -8px; }
.picker-header { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid #e5e7eb; }
.picker-header h2 { margin: 0 auto 0 0; font-size: 1.05rem; }
.picker-toolbar { display: flex; gap: .5rem; align-items: center; padding: .5rem 1rem; }
.picker-new-folder:not([hidden]) { display: inline-flex; gap: .35rem; align-items: center; }
.picker-toolbar > .button { flex: none; }
.picker-crumbs { flex: 1; font-family: var(--font-mono); font-size: .85rem; }
.picker-toolbar input { font: inherit; padding: .35rem .5rem; border: 1px solid #d1d5db; border-radius: 6px; }
.picker-grid { list-style: none; margin: 0; padding: .5rem 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; overflow-y: auto; min-height: 12rem; }
.picker-item { display: grid; gap: .2rem; width: 100%; padding: .35rem; border: 1px solid #e5e7eb; border-radius: 7px; background: #fff; text-align: left; cursor: pointer; font: inherit; }
.picker-item:hover, .picker-item:focus-visible { border-color: var(--accent); }
.picker-item.is-current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.picker-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; background: repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 4px; overflow: hidden; font-size: 1.6rem; }
.picker-item.is-folder .picker-thumb { background: #f3f4f6; }
.picker-thumb img { width: 100%; height: 100%; object-fit: contain; }
.picker-ext { font-weight: 700; color: #6b7280; font-size: 1rem; }
.picker-name { font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-info { font-size: .72rem; color: #6b7280; }
.picker-status, .picker-hint { margin: 0; padding: .25rem 1rem; font-size: .85rem; color: #6b7280; }
.picker-hint { padding-bottom: .75rem; }

bloqy-media-input { display: grid; gap: .4rem; }
bloqy-page-input { display: block; }
.media-input { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.media-input-preview { flex: none; width: 3.2rem; height: 2.4rem; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-sunken); }
/* Path of the file with the folder icon inside (like the media fields of the editor). */
.media-path { position: relative; display: flex; flex: 1; min-width: 0; }
.media-path input { flex: 1; min-width: 0; padding-right: 2.2rem; font-family: var(--font-mono, ui-monospace, monospace); font-size: .8125rem; }
.media-path .icon-button { position: absolute; right: .2rem; top: 50%; transform: translateY(-50%); width: 1.8rem; height: 1.8rem; border: 0; background: transparent; color: var(--muted); }
.media-path .icon-button:hover, .media-path .icon-button:focus-visible { color: var(--text); background: var(--surface-sunken); }
.media-input-icon { display: inline-flex; }
.page-fields { display: grid; gap: .75rem; }
.page-field { display: grid; gap: .25rem; }
.page-field .field-label { font-weight: 600; }
.page-field .required { color: #b91c1c; }
.assets-field { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .75rem; }

/* Field builder */
.field-type-name { display: grid; gap: .25rem; max-width: 24rem; font-weight: 600; margin-bottom: .75rem; }
.field-rows { display: grid; gap: .4rem; margin-bottom: .75rem; }
.field-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.field-row input, .field-row select, bloqy-field-builder input, bloqy-field-builder select { font: inherit; font-size: .88rem; padding: .3rem .45rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.field-row input:first-child { width: 9rem; font-family: var(--font-mono); }
.field-row-buttons { display: flex; gap: .15rem; margin-left: auto; }
bloqy-field-builder .code-input { width: 100%; font-family: var(--font-mono); font-size: .8rem; }

/* Navigation icons */
.sidebar ul a { display: flex; align-items: center; gap: .6rem; }
.sidebar .nav-icon { flex: none; width: 1.05rem; height: 1.05rem; opacity: .75; }
.sidebar ul a:hover .nav-icon, .sidebar ul a[aria-current="page"] .nav-icon { opacity: 1; }
.sidebar ul a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.weights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; margin: .5rem 0 1rem; }
.weights-grid input { max-width: 7rem; }
.search-test { display: grid; gap: .75rem; padding-left: 1.2rem; }
.search-test mark { background: #fef08a; }
.translations { margin-top: 1.5rem; display: grid; gap: .75rem; }
.translation-row { display: grid; gap: .5rem; }
/* Lines only between the languages, never above the first. */
.translation-row + .translation-row { border-top: 1px solid var(--border); padding-top: .75rem; }
.translation-row h3 { margin: 0; font-size: 1rem; }
.inline-form.wrap { flex-wrap: wrap; }
.translation-row .icon { width: 1rem; height: 1rem; vertical-align: -.15em; color: #15803d; }
.build-error { white-space: pre-wrap; background: #fef2f2; color: #991b1b; padding: .5rem; border-radius: 6px; max-height: 16rem; overflow: auto; }

/* Navigation groups */
.sidebar .nav-group { display: grid; gap: .15rem; }
.sidebar .nav-heading { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: .35rem 0 .1rem; padding: .2rem .6rem; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-text); opacity: .55; cursor: pointer; text-align: left; }
.sidebar .nav-heading:hover, .sidebar .nav-heading:focus-visible { opacity: .9; background: var(--secondary); }
.sidebar .nav-chevron { width: .8rem; height: .8rem; transition: transform .15s; }
.sidebar .nav-group.is-closed .nav-chevron { transform: rotate(-90deg); }
.sidebar .nav-group.is-closed > ul { display: none; }
/* Quick search "Gehe zu …" (Strg+K) at the top of the navigation. */
.nav-goto { position: relative; display: block; }
.nav-goto label { display: flex; align-items: center; gap: .45rem; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); }
.nav-goto label:focus-within { border-color: var(--primary); color: var(--text); }
/* The label is the field: the input inside has no frame of its own (beats the general field rule). */
.nav-goto input, .nav-goto input:focus { flex: 1; min-width: 0; height: auto; margin: 0; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; font: inherit; font-size: .85rem; color: var(--text); outline: none; }
.nav-goto input::-webkit-search-cancel-button { display: none; }
.nav-goto-results { position: absolute; left: 0; top: calc(100% + .3rem); z-index: 60; width: max(100%, 22rem); max-height: 70vh; overflow-y: auto; padding: .35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-raised, var(--surface)); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.nav-goto-results a { display: grid; grid-template-columns: 1.05rem 1fr; column-gap: .55rem; align-items: center; padding: .4rem .5rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.nav-goto-results a .nav-icon { grid-row: span 2; width: 1.05rem; height: 1.05rem; opacity: .75; }
.nav-goto-results a span { font-weight: 600; font-size: .85rem; }
.nav-goto-results a small { grid-column: 2; color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-goto-results a:hover, .nav-goto-results a.is-active { background: var(--accent-soft); }
.nav-goto-group { margin: .4rem .5rem .15rem; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-goto-empty { margin: .4rem .5rem; color: var(--muted); font-size: .85rem; }
.nav-goto.is-floating { position: fixed; top: 12vh; left: 50%; z-index: 1000; width: min(34rem, calc(100vw - 2rem)); transform: translateX(-50%); box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .35); border-radius: var(--radius); }
.nav-goto.is-floating label { background: var(--surface-raised, var(--surface)); padding: .6rem .8rem; }
.nav-goto.is-floating .nav-goto-results { width: 100%; }
/* Pages of Tools and Entwicklung with an explorer of their own: path of the area above the title. */
.area-path { margin: 0 0 .35rem; font-size: .8rem; color: var(--muted); }
.area-path a { color: inherit; }
/* Account at the bottom of the navigation: initials, name and role; opens a menu upwards (Mein Konto, Abmelden). */
.nav-user { position: relative; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--border); font-size: .85rem; }
.nav-user summary { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: var(--radius-sm); cursor: pointer; list-style: none; }
.nav-user summary::-webkit-details-marker { display: none; }
.nav-user summary:hover, .nav-user[open] summary { background: var(--secondary); }
.nav-user-avatar { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.nav-user-who { display: grid; min-width: 0; line-height: 1.25; }
.nav-user-who b { overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-who small { overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.nav-user .nav-chevron { flex: none; width: .8rem; height: .8rem; margin-left: auto; color: var(--muted); transition: transform .15s; }
.nav-user[open] .nav-chevron { transform: rotate(180deg); }
.nav-user-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + .35rem); z-index: 60; display: grid; gap: .1rem; padding: .35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-raised, var(--surface)); box-shadow: var(--shadow-raised, 0 12px 32px rgba(15, 23, 42, .18)); }
.nav-user-menu form { margin: 0; padding-top: .25rem; border-top: 1px solid var(--border); }
.nav-user-menu a, .nav-user-menu button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .45rem .6rem; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: .875rem; text-align: left; text-decoration: none; cursor: pointer; }
.nav-user-menu a:hover, .nav-user-menu a:focus-visible, .nav-user-menu button:hover, .nav-user-menu button:focus-visible, .nav-user-menu a[aria-current="page"] { background: var(--accent-soft); }
.nav-user-menu .nav-icon { flex: none; width: 1.05rem; height: 1.05rem; opacity: .75; }

/* Base module comparison */
.base-change-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.base-change-head h2 { margin: 0; font-size: 1rem; }
.base-change-head form { margin-left: auto; display: flex; gap: .4rem; }
.diff { max-height: 28rem; overflow: auto; font-size: .8rem; line-height: 1.45; background: #f9fafb; border: 1px solid var(--border); border-radius: 6px; padding: .5rem 0; }
.diff span { display: block; padding: 0 .75rem; white-space: pre; }
.diff .diff-add { background: #dcfce7; }
.diff .diff-del { background: #fee2e2; }

/* Tabs as a segmented control: grey bar, the current tab is a white button inside it. */
nav.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; max-width: 100%; padding: 3px; margin: 0 0 1rem; border-radius: var(--radius); background: var(--surface-sunken); }
nav.tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .9rem; border-radius: calc(var(--radius) - 3px); color: var(--muted); font-size: .875rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s; }
nav.tabs a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 50%, transparent); }
nav.tabs a[aria-current="page"] { background: var(--surface-raised); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--border), 0 1px 3px rgba(20, 22, 27, .08); }
nav.tabs a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.tabs-count { min-width: 1.4rem; padding: .05rem .4rem; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 600; line-height: 1.4; text-align: center; font-variant-numeric: tabular-nums; }
nav.tabs a[aria-current="page"] .tabs-count { background: var(--surface-sunken); color: var(--text); }
.tabs-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.tabs-row > nav.tabs { margin: 0; }
/* Buttons as tabs (e.g. footer "Gestalten mit: HTML | Editor"). */
nav.tabs button { padding: .4rem .9rem; border: 0; border-radius: calc(var(--radius) - 3px); background: none; color: var(--muted); font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; }
nav.tabs button:hover { color: var(--text); }
nav.tabs button[aria-current="page"] { background: var(--surface-raised); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--border), 0 1px 3px rgba(20, 22, 27, .08); }
.footer-mode { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.footer-mode > nav.tabs { margin: 0; }
/* Search next to the tabs: a grey box like the tab bar; "new" button at the right end of the row. */
.tabs-search { display: inline-flex; align-items: center; align-self: stretch; gap: .45rem; width: min(16rem, 100%); padding: 0 .8rem; border-radius: var(--radius); background: var(--surface-sunken); color: var(--muted); cursor: text; }
.tabs-search:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.tabs-search .icon { flex: none; width: 15px; height: 15px; }
/* Beats the global control style (body :is(input …) with !important). */
body label.tabs-search input[type="search"] { flex: 1; min-width: 0; padding: .45rem 0 !important; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; font: 400 .875rem/1.4 var(--font-sans) !important; }
.tabs-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.tabs-new { position: relative; }
/* "?" in the page header: a popover with help (e.g. the variables of PHP snippets). */
.help-popover { position: relative; margin-left: auto; }
/* Completions of the code editor (functions of PHP snippets). */
.code-suggestions { position: absolute; z-index: 20; min-width: 18rem; max-width: 34rem; max-height: 16rem; overflow-y: auto; margin: 0; padding: .25rem; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: var(--shadow-raised); font-size: .8125rem; }
.code-suggestions li { display: flex; gap: .75rem; justify-content: space-between; padding: .3rem .5rem; border-radius: 4px; cursor: pointer; }
.code-suggestions li span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-suggestions li.is-active { background: var(--accent-soft); }
/* "Testen" below the snippet code. */
.snippet-test { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.snippet-test h2 { margin: 0 0 .5rem; font-size: 1rem; }
.snippet-test-bar { display: flex; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.snippet-test-bar input { width: min(28rem, 100%); }
.snippet-test-preview { width: 100%; min-height: 12rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.snippet-test pre { max-height: 24rem; overflow: auto; padding: .5rem .75rem; border-radius: var(--radius-sm); background: var(--surface-sunken); white-space: pre-wrap; }
.help-popover > summary { list-style: none; cursor: pointer; font-weight: 700; }
.help-popover > summary::-webkit-details-marker { display: none; }
.help-popover-body { max-height: calc(100vh - 8rem); overflow-y: auto; position: absolute; z-index: 30; top: calc(100% + .4rem); right: 0; width: min(36rem, calc(100vw - 2rem)); padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-raised); box-shadow: var(--shadow-raised); }
.help-popover-body h2 { margin: 0 0 .5rem; font-size: 1rem; }
.help-popover-body pre { margin: .5rem 0 0; padding: .5rem .75rem; border-radius: var(--radius-sm); background: var(--surface-sunken); overflow-x: auto; }
.tabs-new > summary { list-style: none; cursor: pointer; }
.tabs-new > summary::-webkit-details-marker { display: none; }
.tabs-new-form { position: absolute; z-index: 10; top: calc(100% + .4rem); right: 0; display: flex; gap: .4rem; padding: .6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-raised); box-shadow: var(--shadow-raised); white-space: nowrap; }
.tabs-new-form input { width: 14rem; }
.list-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .75rem 0 .5rem; }
.list-toolbar form { display: flex; gap: .4rem; align-items: center; margin: 0; }
.list-toolbar details { position: relative; }
.list-toolbar details[open] > form { position: absolute; z-index: 5; top: calc(100% + .3rem); left: 0; right: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .6rem; box-shadow: 0 8px 24px rgba(0,0,0,.12); white-space: nowrap; }
.explorer td.actions { white-space: nowrap; }
.explorer td.actions > form, .explorer td.actions > bloqy-confirm, .explorer td.actions bloqy-confirm > form { display: inline-flex; vertical-align: middle; margin: 0; }
.upload-inline label.button { cursor: pointer; }
.upload-inline label.button:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.list-toolbar .upload-inline { margin-left: auto; }

/* All file lists: the same compact icons (14 px icons in 26 px buttons), never scaled by other rules */
.explorer .icon, .explorer .icon-button .icon { width: 14px; height: 14px; }
.explorer .icon-button, .explorer .toggle { width: 26px; height: 26px; }
.upload-inline { flex-wrap: nowrap; white-space: nowrap; }
.card.module.is-inactive summary strong { opacity: .55; }
.variant-actions { float: right; display: inline-flex; gap: .15rem; }
.variant-actions > *, .variant-actions form { display: inline-flex; margin: 0; }
bloqy-confirm { display: inline-flex; vertical-align: middle; }

/* Toolbar above file lists: small buttons with a leading icon, right-aligned in one row */
.list-toolbar { justify-content: flex-end; flex-wrap: wrap; gap: .35rem; }
.list-toolbar .upload-inline { display: contents; }
.list-toolbar .upload-inline > span { order: -1; margin-right: auto; }
.list-toolbar .button { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; font-size: .82rem; line-height: 1.3; }
.list-toolbar .button .icon { width: 14px; height: 14px; }
.list-toolbar details.new-folder summary { list-style: none; }
.list-toolbar details.new-folder > form { right: 0; left: auto; }
bloqy-dropzone.file-list { min-height: 10rem; }
bloqy-dropzone.is-dragover::after { content: attr(data-drop-label); position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; border: 2px dashed var(--primary); border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 8%, transparent); color: var(--primary); font-weight: 600; pointer-events: none; }

/* Theme variables */
.variables-category { margin: 1.25rem 0; }
.variables-head { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.variables-head .variables-label { font-weight: 600; font-size: 1rem; }
.variables-table input { width: 100%; font: inherit; padding: .3rem .45rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.variables-value bloqy-color-input { display: flex; gap: .35rem; align-items: center; }
.variables-value input[type=color] { width: 2rem; height: 1.9rem; padding: 0; border: 1px solid var(--border); border-radius: 6px; flex: none; }
.list-toolbar input, .list-toolbar select { font: inherit; font-size: .85rem; padding: .3rem .45rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.variables-table { table-layout: fixed; }
.variables-table th:nth-child(1) { width: 22%; } .variables-table th:nth-child(2) { width: 26%; } .variables-table th:nth-child(3) { width: 30%; }
.variables-head .variables-label { border: 1px solid transparent; background: transparent; padding: .2rem .35rem; border-radius: 6px; }
.variables-head .variables-label:hover, .variables-head .variables-label:focus { border-color: var(--border); background: var(--surface); }
.template-includes { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .5rem 0; }
.template-includes form { margin: 0; }
.template-includes .button { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; font-size: .82rem; }
.small-button { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; font-size: .82rem; }

/* System check */
.system-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr)); margin-bottom: 1rem; }
.system-group h2 { margin: 0 0 .5rem; font-size: 1rem; }
.system-table { width: 100%; border-collapse: collapse; }
.system-table td { padding: .3rem .4rem; border-top: 1px solid var(--border); vertical-align: top; }
.system-state { width: 1.5rem; }
.system-table tr.state-ok .system-state { color: #15803d; }
.system-table tr.state-warning .system-state { color: #b45309; }
.system-table tr.state-error .system-state { color: var(--danger); }
.system-table tr.state-info .system-state { color: var(--muted); }
.system-log td { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.system-summary { padding: .6rem 1rem; border-radius: 6px; }
.system-summary.state-ok { background: var(--success-bg); color: var(--success-text); }
.system-summary.state-warning { background: #fef3c7; color: #92400e; }
.system-summary.state-error { background: var(--error-bg); color: var(--error-text); }
.font-family .variables-head code { margin-left: auto; } .font-family select { font: inherit; font-size: .85rem; padding: .2rem .35rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); } .stack { display: grid; gap: .4rem; }
bloqy-add-row { display: block; margin: .4rem 0 0; } bloqy-add-row .button { display: inline-flex; }

/* Save button fixed at the bottom right of long forms */
.sticky-save { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50; display: flex; align-items: center; gap: .6rem; padding: .45rem .45rem .45rem .9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.sticky-save .button { border-radius: 999px; }
.sticky-save-hint { display: none; font-size: .85rem; color: #92400e; }
.sticky-save.is-dirty { border-color: #f59e0b; }
.sticky-save.is-dirty .sticky-save-hint { display: inline; }
.sticky-save:not(.is-dirty):not(.is-saved) { display: none; }
.sticky-save.is-saved { border-color: var(--success-text, #15803d); }
.sticky-save.is-saved .sticky-save-hint { display: inline; color: var(--success-text, #15803d); }
/* On pages with the save button, success messages are shown next to it (admin.js) instead of at the top. */
body:has(form[data-sticky-save]) .flash-success { display: none; }
body:has(.sticky-save) main, body:has(.sticky-save) .content { padding-bottom: 5rem; }
.format-preview { display: inline-block; vertical-align: middle; border: 1.5px solid var(--primary); border-radius: 2px; background: color-mix(in srgb, var(--primary) 12%, transparent); } .formats-table td { vertical-align: middle; }
.style-set-choice { display: inline-flex; align-items: center; gap: .3rem; margin: 0 1rem .35rem 0; } .style-set-choice select { font: inherit; font-size: .8rem; padding: .15rem .3rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }

/* Link picker: tabs for pages and media, page list like a file explorer */
.picker-tabs { display: flex; gap: .25rem; border-bottom: 1px solid #e5e7eb; margin: 0 0 .75rem; }
.picker-tab { padding: .45rem .9rem; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; background: none; font: inherit; cursor: pointer; margin-bottom: -1px; color: inherit; }
.picker-tab[aria-selected="true"] { border-color: #e5e7eb; background: #fff; font-weight: 600; }
.link-picker-list { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow: auto; }
.link-picker-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .45rem .6rem; border: 0; border-bottom: 1px solid #f1f5f9; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.link-picker-item:hover, .link-picker-item:focus-visible { background: #f1f5f9; }
.link-picker-item.is-current { background: #eff6ff; }
.link-picker-item .icon-slot { width: 1.25rem; text-align: center; }
.link-picker-title { flex: 1; }
.link-picker-file { color: #6b7280; font-size: .85em; }
.link-target { display: flex; gap: .35rem; align-items: center; }
.link-target input { flex: 1; min-width: 0; }
.media-picker [hidden] { display: none !important; }
.menu-target { min-width: 16rem; flex: 1; } .menu-target input { width: 100%; }

/* Picker buttons: small with icon; folder button inside the link target field */
.picker-header .picker-button { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; font-size: .82rem; line-height: 1.3; }
.picker-header .picker-button .icon { width: 14px; height: 14px; }
.link-target { position: relative; display: flex; align-items: center; }
.link-target input { width: 100%; padding-right: 2.1rem; }
.link-target .icon-button { position: absolute; right: .2rem; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; background: transparent; }
.link-target .icon-button:hover, .link-target .icon-button:focus-visible { background: rgba(0, 0, 0, .06); }

.link-picker-item .link-picker-file { flex: 0 0 14rem; color: inherit; font-size: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-picker-item .link-picker-title { flex: 1; color: #6b7280; }
.link-picker-state { width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: #9ca3af; }
.link-picker-state.state-online { background: #16a34a; }
.link-picker-state.state-offline, .link-picker-state.state-expired { background: #dc2626; }
.link-picker-state.state-scheduled { background: #f59e0b; }

.sticky-save.is-failed { border-color: var(--danger); }
.sticky-save.is-failed .sticky-save-hint { color: var(--danger); }

/* Upload progress (upload.js) */
.upload-progress { position: fixed; left: 50%; bottom: 1.25rem; z-index: 60; width: min(28rem, calc(100vw - 2rem)); transform: translateX(-50%); padding: .7rem .9rem; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; background: var(--surface, #fff); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-size: .85rem; }
.upload-progress[hidden] { display: none; }
.upload-progress-text { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .45rem; }
.upload-progress-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress-text span { color: #6b7280; white-space: nowrap; }
.upload-progress-bar { height: 6px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.upload-progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.upload-progress.is-failed strong { color: #b91c1c; }

/* Statistics */
.monitor-filter { display: grid; gap: .55rem; margin: 0 0 1rem; padding: .85rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.monitor-group { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.monitor-group-label { min-width: 4.5rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.monitor-group .button[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.monitor-count { margin-left: .2rem; font-variant-numeric: tabular-nums; opacity: .7; }
.monitor-log td { vertical-align: top; }
.monitor-log td.monitor-path { overflow-wrap: anywhere; }
.monitor-log tr.monitor-suspicious td { background: color-mix(in srgb, #f59e0b 14%, transparent); }
.monitor-log tr:is(.monitor-blocked, .monitor-error) td { background: color-mix(in srgb, #dc2626 10%, transparent); }
.monitor-log tr.monitor-missing td { background: color-mix(in srgb, var(--muted) 8%, transparent); }
.stats-filter { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin: 0 0 1rem; padding: .85rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stats-filter label { display: grid; gap: .3rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.stats-filter select, .stats-filter input[type=date] { min-width: 10rem; max-width: 22rem; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); }
.stats-filter label.stats-filter-compare { display: flex; align-items: center; gap: .4rem; align-self: end; padding: .3rem .65rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-sunken); font-size: .8125rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text); cursor: pointer; }
.stats-filter label.stats-filter-compare:has(input:checked) { border-color: var(--primary); background: var(--accent-soft); color: var(--accent-text); }
.stats-filter-range { margin-left: auto; align-self: center; display: grid; justify-items: end; gap: .1rem; font-size: .8125rem; font-weight: 600; color: var(--text); }
.stats-filter-range small { font-size: .72rem; font-weight: 400; color: var(--muted); }
@media (max-width: 700px) { .stats-filter-range { margin-left: 0; justify-items: start; } }
.stats-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.stats-kpi { display: grid; gap: .2rem; align-content: start; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stats-kpi-label { font-size: .78rem; color: var(--muted); }
.stats-kpi strong { font-size: 1.5rem; line-height: 1.2; }
.stats-change { font-size: .8rem; color: var(--muted); }
.stats-change.is-up { color: #15803d; }
.stats-change.is-down { color: var(--danger); }
.stats-live strong::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .4rem; border-radius: 50%; background: #16a34a; vertical-align: middle; }
.stats-live-pages { list-style: none; margin: .2rem 0 0; padding: 0; font-size: .75rem; overflow: hidden; }
.stats-live-pages li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-chart { margin: 1rem 0 1.5rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stats-chart h2, .stats-table h2 { margin: 0 0 .6rem; font-size: .95rem; }
.stats-chart-svg { display: block; width: 100%; height: auto; }
.stats-chart-svg .grid { stroke: var(--border); stroke-width: 1; }
.stats-chart-svg .axis { fill: var(--muted); font-size: 11px; }
.stats-chart-svg .views { fill: color-mix(in srgb, var(--primary) 55%, transparent); }
.stats-chart-svg .views:hover { fill: var(--primary); }
.stats-chart-svg .visitors { fill: none; stroke: #f59e0b; stroke-width: 2.5; }
.stats-legend { display: flex; gap: .4rem; align-items: center; color: var(--muted); margin: .4rem 0 0; }
.stats-legend span { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; }
.stats-legend .legend-views { background: color-mix(in srgb, var(--primary) 55%, transparent); }
.stats-legend .legend-visitors { background: #f59e0b; margin-left: .8rem; }
.stats-chart-svg .spam { fill: color-mix(in srgb, var(--muted) 35%, transparent); }
.stats-legend .legend-spam { background: color-mix(in srgb, var(--muted) 35%, transparent); margin-left: .8rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1rem; }
.stats-wide { grid-column: 1 / -1; }
.stats-goal { color: #b45309; white-space: nowrap; }
.stats-origin { border-top: 1px solid var(--border); font-size: .85rem; }
.stats-origin:first-of-type { border-top: 0; }
.stats-origin > summary, .stats-origin > .stats-label { display: grid; grid-template-columns: 1fr auto 3rem 3.5rem; gap: .5rem; padding: .28rem .3rem; max-width: none; cursor: pointer; }
.stats-origin > .stats-label { cursor: default; }
.stats-origin > summary::-webkit-details-marker { display: none; }
.stats-origin ul, .stats-search ul { list-style: none; margin: 0 0 .4rem; padding: 0 .3rem 0 1.2rem; }
.stats-origin li, .stats-search li { display: flex; justify-content: space-between; gap: .5rem; padding: .15rem 0; color: var(--muted); }
.stats-search > summary, .stats-search-head { display: grid; grid-template-columns: minmax(8rem, 1fr) repeat(5, 5.5rem); gap: .5rem; padding: .3rem; border-top: 1px solid var(--border); font-size: .85rem; cursor: pointer; }
.stats-search-head { cursor: default; border-top: 0; font-weight: 600; color: var(--muted); }
.stats-search > summary::-webkit-details-marker { display: none; }
.stats-search .num { text-align: right; width: auto; }
.stats-search-term { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-trend { display: block; width: 100%; height: 40px; margin: .4rem 0; fill: var(--primary); opacity: .8; }
.stats-table { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.stats-table table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.stats-table td { padding: .28rem .3rem; border-top: 1px solid var(--border); }
.stats-table tr:first-child td { border-top: 0; }
.stats-table .num { text-align: right; white-space: nowrap; width: 1%; }
.stats-label { position: relative; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-label > a, .stats-label > span { position: relative; }
.stats-bar { position: absolute; inset: 3px auto 3px 0; width: 100%; height: calc(100% - 6px); }
.stats-bar rect { fill: color-mix(in srgb, var(--primary) 12%, transparent); }
.stats-origin.stats-missing > summary { grid-template-columns: 1fr auto; }
.stats-table th { padding: .28rem .3rem; font-weight: 600; color: var(--muted); text-align: left; }
.stats-table th.num { text-align: right; }
.stats-table thead + tbody tr:first-child td, .stats-vitals tbody tr th { border-top: 1px solid var(--border); }
.stats-vitals tbody th { font-weight: normal; color: var(--text); text-transform: none; letter-spacing: normal; font-size: .85rem; }
.stats-vitals th, .stats-vitals td { padding-left: .2rem; padding-right: .2rem; }
.stats-vitals thead th { font-size: .75rem; }
.stats-vitals abbr { text-decoration: underline dotted; cursor: help; }
.stats-details td:first-child { overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }
.stats-vital { display: inline-block; padding: 0 .35rem; border-radius: 4px; font-variant-numeric: tabular-nums; }
.stats-vital.is-good { color: #166534; background: #dcfce7; }
.stats-vital.is-improve { color: #92400e; background: #fef3c7; }
.stats-vital.is-poor { color: #991b1b; background: #fee2e2; }
.stats-heatmap-links { justify-content: flex-start; }
.heatmap-toolbar { justify-content: space-between; }
.heatmap-devices { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.heatmap-devices .is-active { color: var(--primary); border-color: var(--primary); }
.heatmap { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #e5e7eb; }
.content:has(bloqy-heatmap) { max-width: none; }
.heatmap-stage { position: relative; margin: 0 auto; overflow: hidden; }
.heatmap-scaled { position: absolute; top: 0; left: 0; width: max-content; transform-origin: 0 0; }
.heatmap-stage iframe { display: block; border: 0; background: #fff; min-height: 400px; }
.heatmap-stage canvas { position: absolute; inset: 0 auto auto 0; pointer-events: none; }
.heatmap-status { padding: .5rem 1rem; margin: 0; }
.geo-job { display: grid; gap: .35rem; max-width: 32rem; }
.regenerate-job { margin: 0 0 1rem; }
.tools .actions form { display: flex; gap: .4rem; justify-content: flex-end; align-items: center; }
.tools .actions select { width: auto; font-size: .8rem; padding: .2rem .4rem; }
.geo-job progress { width: 100%; height: .8rem; accent-color: var(--primary); }
.heatmap-stage canvas.is-interactive { pointer-events: auto; cursor: crosshair; }
.heatmap-tooltip { position: absolute; z-index: 2; padding: .3rem .55rem; border-radius: 6px; background: rgba(17, 24, 39, .92); color: #fff; font-size: .8rem; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.heatmap-tooltip[hidden] { display: none; }
.mapstyles-table textarea { width: 100%; min-width: 24rem; font: .8rem/1.4 ui-monospace, monospace; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.heatmap-legend { display: inline-flex; align-items: center; gap: .5rem; margin: .25rem 0 0; color: var(--muted); }
.heatmap-legend i { display: inline-block; width: 9rem; height: .6rem; border-radius: 999px; background: linear-gradient(90deg, hsl(220, 80%, 52%), hsl(178, 80%, 47%), hsl(135, 80%, 42%)); }
.header-actions { display: inline-flex; gap: .5rem; align-items: center; }
.variant-grid.is-preview-hidden { grid-template-columns: minmax(0, 1fr); }
.variant-grid.is-preview-hidden .variant-side { position: static; }
.variant-grid.is-preview-hidden .variant-side > h2:first-child, .variant-grid.is-preview-hidden .variant-side .preview { display: none; }
.component-code { margin: .5rem 0; }
.component-code > summary { cursor: pointer; }

/* Module overview: header with icon, toolbar with small buttons, variants as cards */
.module > summary { display: flex; align-items: center; gap: .75rem; list-style: none; }
.module > summary::-webkit-details-marker { display: none; }
.module-icon { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background: var(--bg); color: var(--primary); }
.module-icon .icon { width: 16px; height: 16px; }
.module-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .5rem; }
.module-description { flex-basis: 100%; overflow-wrap: anywhere; }
.module-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; margin: .75rem 0 0; padding-top: .75rem; border-top: 1px solid var(--border); }
.module-toolbar form, .module-toolbar bloqy-confirm { display: inline-flex; margin: 0; }
.module-toolbar .new-folder form { flex-wrap: wrap; width: min(26rem, calc(100vw - 2rem)); }
.module-toolbar .new-folder select { font: inherit; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.variant-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: .75rem; margin-top: .75rem; }
.variant-card { display: grid; gap: .4rem; align-content: start; min-width: 0; padding: .6rem .7rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.variant-card.is-inactive { opacity: .6; }
.variant-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.variant-title { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .4rem; }
.variant-title a { color: var(--text); text-decoration: none; }
.variant-title a:hover { text-decoration: underline; }
.variant-title code { flex-basis: 100%; font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variant-card .variant-actions { float: none; flex: none; display: inline-flex; align-items: center; gap: 2px; }
.variant-card .variant-actions form, .variant-card .variant-actions bloqy-confirm { display: inline-flex; margin: 0; }
.variant-styles { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variant-card .preview { width: 100%; height: 200px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

/* Two-factor authentication (Mein Konto) */
.two-factor-account { margin-top: 2rem; }
.two-factor-account h2 { margin: 0; }
.two-factor-account p { margin: 0; }
.two-factor-qr { margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.two-factor-qr svg { display: block; border-radius: 6px; border: 1px solid var(--border); max-width: 100%; height: auto; }
.two-factor-qr figcaption { display: grid; gap: .3rem; }
.two-factor-secret { font-size: 1rem; letter-spacing: .05em; user-select: all; word-break: break-all; }
.two-factor-setup ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.two-factor-codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; }
.two-factor-codes code { font-size: 1rem; user-select: all; }

/* Stil-Sets als aufklappbare Karten wie die Module */
.style-set .module-toolbar { align-items: end; }
.style-set-name { display: grid; gap: .25rem; font-size: .8125rem; font-weight: 600; min-width: 16rem; }
.style-set-note { margin: 0 1rem .75rem; }
.style-set .variables-table { margin-top: .25rem; }

/* Code-Editor: Versionen mit Diff */
.code-versions-button { margin-left: auto; }
.code-versions-button + .code-maximize-button { margin-left: 0; }
.code-maximize-button { margin-left: auto; font-size: 1rem; line-height: 1; padding: .2rem .5rem; }
/* Height can be dragged at the bottom right corner; "Vergrößern" fills the window. */
bloqy-code-editor { resize: vertical; }
bloqy-code-editor.is-maximized { position: fixed; inset: 1rem; z-index: 1000; height: auto !important; max-height: none; resize: none; box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .55), 0 24px 60px rgba(0, 0, 0, .35); }
bloqy-code-editor.is-maximized .code-body { flex: 1; min-height: 0; }
bloqy-code-editor.is-maximized .code-input { min-height: 0 !important; height: 100%; }
html.code-editor-maximized { overflow: hidden; }
.code-versions-dialog { width: min(97vw, 1800px); height: min(94vh, 1100px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); background: var(--surface); color: var(--text); }
.code-versions-dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.code-versions-dialog[open] { display: flex; flex-direction: column; }
.code-versions-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
.code-versions-head h2 { margin: 0; font-size: 1.05rem; }
.code-versions-head .spacer { flex: 1; }
.code-versions-legend { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--muted); }
.code-versions-legend span::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; margin-right: 0.3rem; border-radius: 2px; vertical-align: -1px; }
.code-versions-legend .is-del::before { background: var(--diff-del, #fee2e2); outline: 1px solid #fca5a5; }
.code-versions-legend .is-add::before { background: var(--diff-add, #dcfce7); outline: 1px solid #86efac; }
.code-versions-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 13rem 1fr; }
.code-versions-list { margin: 0; padding: 0.4rem; list-style: none; overflow-y: auto; border-right: 1px solid var(--border); }
.code-versions-list li.muted { padding: 0.6rem; font-size: 0.8125rem; }
.code-versions-list button { display: block; width: 100%; padding: 0.45rem 0.6rem; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; font-size: 0.8125rem; font-variant-numeric: tabular-nums; text-align: left; cursor: pointer; }
.code-versions-list button:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.code-versions-list button.is-active { background: var(--primary); color: #fff; }
.code-diff { overflow: auto; min-width: 0; }
.code-diff-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; }
.code-diff-table thead th { position: sticky; top: 0; z-index: 1; padding: 0.45rem 0.6rem; background: var(--bg); border-bottom: 1px solid var(--border); font-family: system-ui, sans-serif; font-size: 0.8125rem; text-align: left; }
.code-diff-table td { padding: 0 0.6rem; vertical-align: top; white-space: pre-wrap; word-break: break-word; }
.code-diff-table td.ln { width: 3.4rem; padding: 0 0.5rem; color: var(--muted); text-align: right; user-select: none; background: var(--bg); }
.code-diff-table td.code.left { border-right: 1px solid var(--border); }
.code-diff-table tr.is-del td.left, .code-diff-table tr.is-change td.left { background: var(--diff-del, #fee2e2); }
.code-diff-table tr.is-add td.right, .code-diff-table tr.is-change td.right { background: var(--diff-add, #dcfce7); }
.code-diff-table tr.is-del td.ln:first-child, .code-diff-table tr.is-change td.ln:first-child { background: #fecaca; color: #991b1b; }
.code-diff-table tr.is-add td.ln:nth-child(3), .code-diff-table tr.is-change td.ln:nth-child(3) { background: #bbf7d0; color: #166534; }
@media (prefers-color-scheme: dark) {
    .code-versions-dialog { --diff-del: rgba(239, 68, 68, 0.18); --diff-add: rgba(34, 197, 94, 0.18); }
    .code-diff-table tr.is-del td.ln:first-child, .code-diff-table tr.is-change td.ln:first-child { background: rgba(239, 68, 68, 0.3); color: #fecaca; }
    .code-diff-table tr.is-add td.ln:nth-child(3), .code-diff-table tr.is-change td.ln:nth-child(3) { background: rgba(34, 197, 94, 0.3); color: #bbf7d0; }
}
.code-diff-table col.ln-col { width: 3.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .25rem 1rem; }
.flash-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.translation-outdated { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.translation-outdated .icon { width: 14px; height: 14px; }
@media (prefers-color-scheme: dark) { .flash-warning { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .45); color: #fcd34d; } }

/* Navigation counter (pages to review) and the review list */
.sidebar .nav-count { margin-left: auto; min-width: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .7rem; line-height: 1.25rem; text-align: center; font-weight: 600; }
.review-list .actions { white-space: nowrap; }
.review-reject { display: inline-block; position: relative; }
.review-reject summary { list-style: none; }
.review-reject summary::-webkit-details-marker { display: none; }
.review-reject[open] form { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 10; display: grid; gap: .5rem; width: 20rem; padding: .75rem; background: var(--surface, #fff); border: 1px solid var(--border, #ddd); border-radius: .5rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); text-align: left; white-space: normal; }

/* Admin pages inside a modal of the editor (?modal=1): without navigation */
body.is-modal .sidebar, body.is-modal .page-header .button, body.is-modal .skip-link { display: none !important; }
body.is-modal .shell { display: block; }
body.is-modal .content, body.is-modal main { max-width: none; margin: 0; padding: 1rem 1.25rem 5rem; }

/* Module studio (Admin → Module → a module) */
.content:has(bloqy-module-studio) { max-width: none; }
.studio-title { display: flex; align-items: center; gap: .5rem; }
.studio-title .module-icon { display: inline-flex; }
.studio { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.studio-nav { position: sticky; top: 1rem; display: grid; gap: .35rem; max-height: calc(100vh - 2rem); overflow: auto; padding-right: .25rem; }
.studio-nav-title { margin: .75rem 0 .1rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.studio-entry { display: grid; gap: .3rem; padding: .45rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.studio-entry:hover { border-color: var(--primary); }
.studio-entry.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.studio-entry.is-inactive { opacity: .6; }
.studio-module { grid-template-columns: auto 1fr auto; align-items: center; }
.studio-entry-icon { display: inline-flex; color: var(--primary); }
.studio-entry-name { font-weight: 600; font-size: .88rem; display: grid; }
.studio-entry-name small { font-weight: 400; font-size: .75rem; }
.studio-badges .badge { margin-left: 0; margin-right: .25rem; }
.studio-thumb { display: block; height: 84px; overflow: hidden; border-radius: 4px; background: #fff; border: 1px solid var(--border); position: relative; }
.studio-thumb iframe { position: absolute; left: 0; top: 0; width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; }
.studio-new form { display: grid; gap: .35rem; margin-top: .4rem; }
.studio-new input, .studio-new select { font: inherit; font-size: .85rem; padding: .3rem .45rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.studio-main { min-width: 0; }
.studio-workspace { min-width: 0; }
.studio-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.studio-head h2 { margin: 0; font-size: 1.15rem; display: flex; align-items: baseline; gap: .5rem; }
.studio-head-actions { display: inline-flex; gap: .25rem; align-items: center; }
.studio-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin: .5rem 0 1rem; }
.studio-tab { padding: .5rem .85rem; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; margin-bottom: -1px; }
.studio-tab[aria-selected="true"] { color: var(--text); background: var(--surface); border-color: var(--border); }
.studio-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.studio-fieldset::before { display: none; }
.studio-panel { display: grid; gap: .85rem; }
.studio-panel h3 { margin: .5rem 0 0; font-size: .95rem; }
.studio-panel label { font-size: .88rem; }
.studio-general { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: end; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.studio-general label:not(.checkbox) { display: grid; gap: .25rem; font-weight: 600; }
.studio-panel input:not([type=checkbox]):not([type=radio]), .studio-panel select { font: inherit; font-size: .88rem; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.studio-panel > label { display: grid; gap: .25rem; font-weight: 600; }
.set-group h3 { display: flex; align-items: baseline; gap: .5rem; }
.set-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .6rem; margin-top: .4rem; }
.set-card { padding: .55rem .65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: grid; gap: .45rem; align-content: start; }
.set-card:has(.set-card-head input:checked) { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.set-card-head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.set-card-head code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.set-card:not(:has(.set-card-head input:checked)) .set-values { display: none; }
.switch { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; cursor: pointer; }
.switch input, body .switch input[type="checkbox"] { appearance: none; width: 2rem; height: 1.1rem; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.1rem - 4px); height: calc(1.1rem - 4px); border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked, body .switch input[type="checkbox"]:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(.9rem); }
.switch input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.set-values { display: flex; flex-wrap: wrap; gap: .25rem; }
.set-value { position: relative; }
.set-value input { position: absolute; opacity: 0; pointer-events: none; }
.set-value span { display: inline-block; padding: .2rem .5rem; border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; cursor: pointer; background: var(--bg); }
.set-value input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.set-value input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.set-more { margin-top: .4rem; }
.set-more summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.code-tabs { display: flex; gap: .25rem; }
.code-tabs button { font: inherit; font-size: .88rem; font-weight: 600; padding: .35rem .75rem; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--muted); cursor: pointer; }
.code-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); border-color: var(--primary); }
.studio-code { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: .75rem; align-items: start; }
.studio-code:has(.placeholder-bar[hidden]) { grid-template-columns: minmax(0, 1fr); }
.code-panes { min-width: 0; }
.code-panes bloqy-code-editor textarea { min-height: 26rem; }
.placeholder-bar { position: sticky; top: 1rem; display: grid; gap: .2rem; max-height: calc(100vh - 2rem); overflow: auto; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.placeholder-bar p { margin: 0 0 .25rem; }
.placeholder-title { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: .5rem !important; }
.placeholder { font: inherit; font-size: .8rem; text-align: left; padding: .2rem .4rem; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.placeholder:hover, .placeholder:focus-visible { border-color: var(--primary); background: var(--bg); }
.studio-usage { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } .studio-nav { position: static; max-height: none; } .studio-code { grid-template-columns: 1fr; } }

/* Schema builder (fields, settings, slots of modules) */
bloqy-schema-builder { display: grid; gap: .4rem; }
.schema-toolbar { display: flex; justify-content: flex-end; }
.schema-list { display: grid; gap: .35rem; }
.schema-row { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.schema-row.is-dragging { opacity: .45; }
.schema-row.drop-before { box-shadow: 0 -3px 0 var(--primary); }
.schema-row.drop-after { box-shadow: 0 3px 0 var(--primary); }
.schema-main { display: grid; grid-template-columns: .7rem minmax(6rem, 1.2fr) minmax(5rem, 1fr) minmax(6.5rem, 1fr) minmax(4rem, auto) auto; gap: .35rem; align-items: center; padding: .35rem .45rem; }
.schema-main > input, .schema-main > select { width: 100%; min-width: 0; }
.schema-list .schema-list .schema-main { grid-template-columns: .7rem minmax(5rem, 1.2fr) minmax(4rem, 1fr) minmax(6rem, 1fr) minmax(3rem, auto) auto; }
@media (max-width: 700px) { .schema-main { grid-template-columns: .7rem 1fr 1fr; } }
.schema-row input, .schema-row select, .schema-row textarea { font: inherit; font-size: .85rem; padding: .3rem .45rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.schema-grip { width: .7rem; align-self: stretch; cursor: grab; background-image: radial-gradient(var(--muted) 1px, transparent 1.5px); background-size: 5px 5px; opacity: .6; }
.schema-key { font-family: var(--font-mono); }
.schema-default { max-width: 9rem; }
.schema-accepts { display: inline-flex; gap: .6rem; }
.schema-buttons { display: inline-flex; gap: .1rem; margin-left: auto; }
.schema-buttons .icon-button[aria-expanded="true"] { color: var(--primary); }
.schema-details { display: grid; gap: .5rem; padding: .5rem .6rem .65rem 1.5rem; border-top: 1px dashed var(--border); }
.schema-details label { display: grid; gap: .2rem; }
.schema-details textarea { width: 100%; }
.schema-small { max-width: 8rem; }
.schema-types { border: 1px solid var(--border); border-radius: 6px; padding: .4rem .6rem; margin: 0; }
.schema-types p { margin: 0 0 .3rem; }
.schema-type-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .15rem .75rem; }
.schema-type-list label { display: flex; align-items: center; gap: .35rem; }
.schema-nested { padding: .45rem; border: 1px solid var(--border); background: var(--bg); border-radius: 6px; }
.schema-nested > p { margin: 0 0 .35rem; font-weight: 600; }
.schema-actions { display: flex; }
.schema-json { display: grid; gap: .4rem; }
.schema-json textarea { width: 100%; font: .82rem/1.45 ui-monospace, monospace; padding: .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.studio [hidden], bloqy-schema-builder [hidden] { display: none !important; }
.studio-panel input, .studio-panel select, .studio-panel textarea { font-weight: 400; }
/* Fehlende Stile: one card per {{style.x}} without a style set of that name. */
.alias-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .6rem; margin-top: .4rem; }
.alias-card { display: grid; gap: .5rem; align-content: start; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.alias-card.is-unassigned { border-color: color-mix(in srgb, #f59e0b 45%, var(--border)); background: color-mix(in srgb, #f59e0b 14%, var(--surface)); }
.alias-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.alias-head code { font-size: .8rem; overflow-wrap: anywhere; color: var(--text); }
.alias-status { flex: none; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.alias-card.is-unassigned .alias-status { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #92400e; }
.alias-card select, .alias-card input { width: 100%; min-width: 0; }
.alias-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.alias-suggest:empty { display: none; }
.alias-suggest-title { font-size: .72rem; color: var(--muted); margin-right: .15rem; }
.alias-chip { padding: .15rem .55rem; border: 1px dashed var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .75rem; cursor: pointer; }
.alias-chip:hover, .alias-chip:focus-visible { border-style: solid; border-color: var(--primary); color: var(--primary); }
.alias-details { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.alias-details[hidden] { display: none; }
.alias-details label { display: grid; gap: .2rem; font-size: .72rem; font-weight: 600; color: var(--muted); }
.alias-details input, .alias-details select { font-size: .85rem; font-weight: 400; color: var(--text); }

/* Theme → Design-System */
.design-choices { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.design-choice-label { min-width: 6rem; font-weight: 600; font-size: .9rem; }
.design-choice { display: grid; justify-items: center; gap: .35rem; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-weight: 400 !important; min-width: 6.5rem; }
.design-choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.design-choice input { position: absolute; opacity: 0; pointer-events: none; }
.design-sample { width: 3.5rem; height: 2.25rem; background: var(--bg); border: 1px solid var(--border); }
.design-corners-square .design-sample { border-radius: 0; }
.design-corners-soft .design-sample { border-radius: .5rem; }
.design-corners-round .design-sample { border-radius: 1.1rem; }
.design-shadows-flat .design-sample { box-shadow: none; }
.design-shadows-soft .design-sample { box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
.design-shadows-deep .design-sample { box-shadow: 0 14px 30px rgba(15, 23, 42, .28); }
.design-steps { max-width: 32rem; }

/* Projekte → Suchen & Ersetzen */
/* Start folder tree next to the content (Link-Check, Speedcheck) */
.replace-layout { display: grid; grid-template-columns: minmax(14rem, 18rem) 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .replace-layout { grid-template-columns: 1fr; } }
.replace-layout > .replace-tree { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); border: 1px solid var(--border); border-radius: var(--radius); padding: .4rem .3rem; }
/* Tools → Suchen & Ersetzen in the look of the file explorer */
.replace-tree .fm-tree-link { border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.replace-tree .fm-tree-link .icon { width: 14px; height: 14px; flex: none; }
.replace-main { max-height: none; }
.replace-explorer .fm-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.replace-explorer .fm-main { min-height: 0; }
.tool-card { max-width: none; margin-bottom: 1rem; padding: 1.25rem 1.5rem; }
.tool-card.form, .tool-card.tool-running { display: grid; gap: 1rem; }
.tool-card > form { margin: 0; }
.tool-report > h2 { margin: 0 0 .25rem; font-size: 1rem; }
.replace-running { display: grid; gap: .6rem; }
nav.tabs > label { position: relative; display: inline-flex; align-items: center; padding: .4rem .9rem; border-radius: calc(var(--radius) - 3px); color: var(--muted); font-size: .875rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
nav.tabs > label:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 50%, transparent); }
nav.tabs > label:has(input:checked) { background: var(--surface-raised); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--border), 0 1px 3px rgba(20, 22, 27, .08); }
nav.tabs > label:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
nav.tabs > label input { position: absolute; opacity: 0; pointer-events: none; }
.tool-fields { display: grid; gap: 1rem; }
.tool-fields label[hidden] { display: none; }
.tool-fields .tool-field { display: grid; gap: .3rem; }
.tool-fields .tool-field > span { font-size: .9rem; font-weight: 600; color: var(--text); }
.tool-options { display: grid; gap: .5rem; }
.tool-options h3 { margin: 0; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.tool-option-list { display: grid; gap: .45rem; padding: .7rem .85rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface-sunken) 50%, var(--surface)); }
.form .tool-option-list label.checkbox { font-size: .875rem; }
.tool-actions { display: flex; align-items: center; gap: .75rem; }
.tool-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.tool-tile { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.25rem; }
.tool-tile h2 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .95rem; }
.tool-tile h2 .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.tool-tile p { margin: 0 0 .25rem; }
.tool-tile-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: auto 0 0; }
.tool-tile-form select { flex: 1 1 10rem; min-width: 0; }
.replace-submit { display: inline-flex; align-items: center; gap: inherit; }
.replace-submit[hidden] { display: none; }
.replace-running p { margin: 0; }
.replace-running progress { width: 100%; }
.replace-summary { margin: 0; padding: .45rem .9rem; border-bottom: 1px solid var(--border); }
.replace-list { user-select: text; }
.replace-list .replace-col-check { width: 2.2rem; }
.replace-list .replace-col-path { width: 34%; }
.replace-list .replace-col-hits { width: 6rem; font-variant-numeric: tabular-nums; }
.replace-list .replace-col-kind { width: 10rem; }
.replace-list .replace-col-open { width: 3.2rem; padding-right: .5rem; text-align: right; overflow: visible; }
.replace-list .replace-col-open .icon-button { display: inline-grid; width: 1.8rem; height: 1.8rem; }
.page-header:has(~ :is(.replace-explorer, .replace-log)) > h1 { margin-right: auto; }
.replace-toggle { display: flex; align-items: center; gap: .35rem; max-width: 100%; padding: .1rem 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.replace-toggle > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replace-toggle .fm-twisty { position: static; margin: 0; flex: none; }
.replace-toggle .icon { width: 14px; height: 14px; flex: none; color: var(--muted); }
.replace-count { color: var(--muted); font-size: .8rem; }
.replace-kind { font-size: .75rem; color: var(--muted); }
.replace-hits.is-collapsed { display: none; }
.replace-hits > td { padding: 0 .6rem .5rem 2.2rem !important; white-space: normal !important; background: var(--surface-sunken); }
.replace-hits ul { list-style: none; margin: 0; padding: .3rem 0 0; }
.replace-hits li label.checkbox, .replace-hit { display: flex; align-items: baseline; gap: .5rem; padding: .2rem 0; font-size: .8125rem; font-weight: 400; }
.replace-slot { flex: none; min-width: 7rem; color: var(--muted); font-size: .75rem; }
.replace-context { white-space: normal; overflow-wrap: anywhere; }
.replace-context del { background: var(--error-bg); color: var(--error-text); text-decoration: line-through; padding: 0 .15em; border-radius: 3px; }
.replace-context ins { background: var(--success-bg); color: var(--success-text); text-decoration: none; padding: 0 .15em; border-radius: 3px; margin-left: .15em; }
.replace-context mark { background: var(--accent-soft); color: var(--accent-text); padding: 0 .15em; border-radius: 3px; }
.replace-log .fm-list { user-select: text; }
.replace-log .fm-list td { white-space: normal; padding-top: .4rem; padding-bottom: .4rem; }
.replace-log .replace-log-when { width: 11rem; }
.replace-log .replace-log-start { width: 20%; }
.replace-log .replace-log-hits { width: 9rem; }
.replace-log .replace-log-actions { width: 9rem; }
@media (max-width: 900px) {
    .replace-explorer .fm-body { grid-template-columns: minmax(0, 1fr) !important; min-height: 0; }
    .replace-list .replace-col-path, .replace-list .replace-col-kind { display: none; }
}

/* Gestaltung → Navigation (choice cards with schematic pictures) */
.navdesign section { margin-top: 1rem; }
.navdesign h2, section > h2 { font-size: 1rem; margin: 1.5rem 0 .6rem; }
.navdesign > section > label, .navdesign-row label { display: grid; gap: .25rem; margin-bottom: .75rem; font-weight: 600; font-size: .85rem; max-width: 22rem; }
.navdesign label.checkbox { display: flex; align-items: center; gap: .45rem; font-weight: 400; margin: .4rem 0; max-width: none; }
.navdesign-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.navdesign-row label { flex: 1 1 14rem; }
.navdesign-note { padding: .6rem .85rem; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--border); }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.choice-card { position: relative; display: grid; gap: .4rem; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-size: .85rem; text-align: center; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-picture { width: 100%; height: auto; }
.choice-picture .pic-frame { fill: var(--bg, #f8fafc); stroke: var(--border); }
.choice-picture .pic-bar { fill: var(--surface, #fff); stroke: var(--border); }
.choice-picture .pic-shadow { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .15)); }
.choice-picture .pic-accent { fill: var(--accent); }
.choice-picture .pic-ink { fill: var(--muted, #64748b); }
.choice-picture .pic-soft { fill: color-mix(in srgb, var(--accent) 18%, transparent); }
.choice-picture .pic-panel { fill: var(--surface, #fff); stroke: var(--border); }
.choice-picture .pic-dim { fill: rgba(0, 0, 0, .25); }
.choice-picture .pic-arrow { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-extras { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: .25rem 0 .5rem 2.25rem; padding: .5rem .75rem; border: 1px dashed var(--border); border-radius: var(--radius); font-size: .82rem; }
.menu-extras label { display: grid; gap: .2rem; }
.menu-extras label.checkbox { display: flex; align-items: center; gap: .35rem; }
.menu-buttons .icon-button.is-set { color: var(--accent); }
.linkcheck-report td { vertical-align: top; }
.linkcheck-url code { word-break: break-all; font-size: .82rem; }
/* Tools → Suchen & Ersetzen */

/* Einheitliche Eingabefelder und Auswahllisten (Design-System): gleiche Schrift, Höhe, Ecken, Rahmen und Fokus
   wie die Buttons – überall im Admin und im Editor. Kompakte Bereiche (Listen, Tabellen, Baukasten) nutzen die
   kleine Höhe wie .small-button. Häkchen, Optionsfelder, Farbwähler, Datei-Felder und der Code-Editor bleiben. */
:root {
    /* Inputs, text areas and selects: 13 px text, light grey line, square corners (2026-10-04). */
    --control-border: #d3d3d3;
    --control-height: 40px;
    --control-height-small: 32px;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2350545D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
    :root { --control-border: #4a4f58; --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23A3A7B0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
body :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="hidden"], [type="submit"], [type="button"], [type="image"]), select, textarea):not(.code-input, bloqy-code-editor *, .nav-goto *) {
    box-sizing: border-box;
    min-height: 0 !important;
    padding: 0.25rem 0.5rem !important;
    border: 1px solid var(--control-border) !important;
    border-radius: 0 !important;
    background-color: var(--surface) !important;
    color: var(--text) !important;
    font: 400 0.8125rem/1.4 var(--font-sans) !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}
body textarea:not(.code-input, bloqy-code-editor *) { min-height: 5rem !important; line-height: 1.5 !important; }
body :is(input, select, textarea):not(.code-input, bloqy-code-editor *):hover:not(:disabled, :focus) { border-color: var(--text) !important; }
body :is(input, select, textarea):not(.code-input, bloqy-code-editor *):focus { outline: none; border-color: var(--focus-ring) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 22%, transparent); }
body :is(input, select, textarea):disabled { opacity: 0.55; cursor: not-allowed; }
body select:not([multiple], [size]) {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 1.75rem !important;
    background-image: var(--select-arrow) !important;
    background-repeat: no-repeat !important;
    background-position: right 0.45rem center !important;
    background-size: 12px 12px !important;
    cursor: pointer;
}
body input::placeholder, body textarea::placeholder { color: var(--subtle); opacity: 1; }
/* Kompakt: in Listen, Tabellen, Werkzeugleisten und Baukästen wie die kleinen Buttons. */
body :is(.list-toolbar, .menu-row, .menu-extras, .field-row, .schema-row, bloqy-field-builder, .style-set-choice, .font-family, .tools .actions, .module-actions, .studio-new, .variables-table, .editor-toolbar, .inline-form, .replace-form, .new-folder, table, .fm-bar) :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="hidden"]), select):not(.code-input) {
    min-height: 0 !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    border-radius: 0 !important;
    font-size: 0.8125rem !important;
}
body :is(.list-toolbar, .menu-row, .menu-extras, .field-row, .schema-row, bloqy-field-builder, .style-set-choice, .font-family, .tools .actions, .module-actions, .studio-new, .variables-table, .editor-toolbar, .inline-form, .replace-form, .new-folder, table, .fm-bar) select:not([multiple], [size]) { padding-right: 1.75rem !important; background-position: right 0.45rem center !important; }
body input[type="color"] { min-height: var(--control-height-small); padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
body :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--primary); width: 1rem; height: 1rem; }
body input[type="file"] { font: 400 0.8125rem/1.4 var(--font-sans); color: var(--muted); }
body input[type="file"]::file-selector-button { margin-right: 0.6rem; min-height: var(--control-height-small); padding: 0.3rem 0.75rem; border: 0; border-radius: var(--radius-sm); background: var(--secondary); color: var(--on-secondary); font: 600 0.8125rem/1.4 var(--font-sans); cursor: pointer; }
body input[type="file"]::file-selector-button:hover { background: var(--secondary-hover); }
body label.checkbox:has(> input[type="checkbox"]) { align-items: center; }

/* ---------------------------------------------------------------- File manager (<bloqy-file-manager>) */
bloqy-file-manager { display: block; position: relative; }
.fm { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.fm-bar { display: flex; align-items: center; gap: .3rem; padding: .3rem .4rem; border-bottom: 1px solid var(--border); background: var(--surface-raised); min-height: 2.6rem; }
.fm-icon { display: inline-flex; flex: none; }
.fm-icon svg { width: 14px; height: 14px; }
.fm-views .icon-button[aria-pressed="true"], .fm-bar > .icon-button[aria-pressed="true"], .fm-tree-toggle[aria-pressed="true"], .fm-search.is-open .fm-search-toggle { background: var(--accent-soft); color: var(--accent-text); }

/* Path: click next to the folders to type a path */
.fm-crumbs { position: relative; display: flex; align-items: center; min-width: 0; flex: 1 1 auto; align-self: stretch; padding: 0 .15rem; border-radius: var(--radius-sm); font: 600 .8125rem/1.3 var(--font-mono); cursor: text; }
.fm-crumbs:not(.is-editing):hover { background: var(--surface-sunken); }
.fm-crumbs a, .fm-crumb-current { padding: .2rem .25rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; white-space: nowrap; cursor: pointer; }
.fm-crumbs a:hover { background: var(--surface); color: var(--accent-text); }
.fm-crumbs a:last-of-type:not(:has(+ .fm-crumb-current)), .fm-crumb-current { color: var(--accent-text); }
body bloqy-file-manager .fm-crumbs input.fm-path-input:not(.code-input) { width: 100%; font: 600 .8125rem/1.3 var(--font-mono) !important; animation: fm-grow .18s ease-out; }
body bloqy-file-manager .fm-crumbs input.fm-path-input.is-invalid:not(.code-input) { border-color: var(--danger) !important; animation: fm-shake .3s; }
.fm-path-suggest { position: absolute; left: 0; top: calc(100% + .2rem); z-index: 40; min-width: 18rem; margin: 0; padding: .25rem; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: var(--shadow-raised); font: 500 .8125rem/1.3 var(--font-mono); }
.fm-path-suggest li { display: flex; align-items: center; gap: .45rem; padding: .3rem .45rem; border-radius: var(--radius-sm); cursor: pointer; }
.fm-path-suggest li:hover, .fm-path-suggest li.is-active { background: var(--accent-soft); color: var(--accent-text); }
bloqy-file-manager.no-details .fm-details { display: none; }
@keyframes fm-slide-in { from { opacity: 0; transform: translateX(16px); } }
@keyframes fm-grow { from { opacity: .4; transform: scaleX(.96); transform-origin: left; } }
@keyframes fm-shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }

/* Search: an icon, the field and the filters slide open */
.fm-search { display: flex; align-items: center; gap: .3rem; }
.fm-search-fields { display: flex; align-items: center; gap: .3rem; max-width: 0; opacity: 0; visibility: hidden; overflow: hidden; padding: 3px 0; transition: max-width .3s ease, opacity .2s ease, visibility 0s .3s; }
.fm-search.is-open .fm-search-fields { max-width: 46rem; opacity: 1; visibility: visible; padding: 3px; transition: max-width .3s ease, opacity .25s ease .05s, visibility 0s; }
body .fm-search-fields input.fm-filter { width: 13rem; }
/* Content search: button next to the field, result view (status line, flat list with snippets). */
.fm-deep-search { white-space: nowrap; }
.fm-search-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; padding: .5rem .25rem .75rem; }
.fm-search-status { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.fm-search-tools { display: inline-flex; align-items: center; gap: .4rem; margin-left: auto; }
.fm-search-spinner { width: .9rem; height: .9rem; border: 2px solid var(--border); border-top-color: var(--accent, currentColor); border-radius: 50%; animation: fm-spin .8s linear infinite; }
@keyframes fm-spin { to { transform: rotate(360deg); } }
.fm-search-results { user-select: text; }
.fm-search-results .fm-col-name { width: 26%; }
.fm-search-results .fm-col-folder { width: 22%; }
.fm-search-results .fm-col-hits { width: 4.5rem; text-align: right; }
.fm-search-results .fm-col-kind { width: 7.5rem; }
.fm-search-results td.fm-col-snippet, .fm-search-more td { white-space: normal; }
.fm-search-results td { vertical-align: top; padding-top: .45rem; padding-bottom: .45rem; }
.fm-search-results .fm-name { display: inline-flex; align-items: center; gap: .4rem; }
.fm-snippet { color: var(--muted); }
.fm-snippet mark { background: color-mix(in srgb, #f59e0b 30%, transparent); color: var(--text); border-radius: 2px; padding: 0 1px; }
.fm-snippet-slot { font-size: .8em; }
.fm-snippet-more { display: block; margin-top: .2rem; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.fm-search-more ul { margin: 0; padding: .2rem 0 .4rem 1.2rem; display: grid; gap: .25rem; font-size: .85rem; }
.fm-crumb-search { display: inline-flex; align-items: center; gap: .2rem; min-width: 0; overflow: hidden; white-space: nowrap; }
.fm-crumbs:has(.fm-crumb-search) { min-width: 0; overflow: hidden; }
@media (max-width: 700px) {
    .fm-search-results .fm-col-folder, .fm-search-results .fm-col-kind { display: none; }
    .fm-search-results .fm-name { white-space: normal; }
    .fm-search.is-open .fm-search-fields { flex-wrap: wrap; }
}
.fm-views { display: flex; gap: 2px; }
.fm-actions { display: flex; align-items: center; gap: .3rem; }
.fm-more { position: relative; }
.fm-more > summary { list-style: none; cursor: pointer; font-weight: 700; }
.fm-more > summary::-webkit-details-marker { display: none; }
.fm-more-menu { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 30; min-width: 15rem; padding: .3rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: var(--shadow-raised); display: grid; gap: .25rem; }
.fm-more-form { display: grid; gap: .3rem; padding: .4rem; border-top: 1px solid var(--border); }
.fm-menu-item, .fm-menu button { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .35rem .5rem; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: 500 .8125rem/1.3 var(--font-sans); text-align: left; cursor: pointer; }
.fm-menu-item:hover, .fm-menu button:hover:not([disabled]), .fm-menu button:focus-visible { background: var(--accent-soft); color: var(--accent-text); outline: none; }
.fm-menu button[disabled] { opacity: .45; cursor: default; }
.fm-menu button.is-danger { color: var(--danger); }
.fm-menu kbd { margin-left: auto; padding-left: 1rem; color: var(--muted); font: 400 .75rem var(--font-sans); }
.fm-menu hr { margin: .2rem 0; border: 0; border-top: 1px solid var(--border); }
.fm-menu { position: fixed; z-index: 1000; min-width: 13rem; padding: .25rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: var(--shadow-raised); }

.fm-body { display: grid; grid-template-columns: 13rem minmax(0, 1fr) 17rem; min-height: 24rem; }
bloqy-file-manager.no-details .fm-body { grid-template-columns: 13rem minmax(0, 1fr); }
bloqy-file-manager.no-tree .fm-body { grid-template-columns: minmax(0, 1fr) 17rem; }
bloqy-file-manager.no-tree.no-details .fm-body { grid-template-columns: minmax(0, 1fr); }
bloqy-file-manager.no-tree .fm-tree { display: none; }
.fm-tree { display: flex; flex-direction: column; border-right: 1px solid var(--border); padding: .3rem .2rem; overflow: auto; max-height: 78vh; background: var(--surface-sunken); font-size: .8125rem; }
.fm-tree ul { list-style: none; margin: 0; padding: 0; }
.fm-tree ul ul { padding-left: .4rem; }
.fm-tree-row { position: relative; display: flex; align-items: center; padding-left: 1rem; }
.fm-tree-row.fm-tree-root { padding-left: 0; }
.fm-twisty { position: absolute; left: 0; top: 50%; margin-top: -.5rem; width: 1rem; height: 1rem; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .9rem; line-height: 1; transition: transform .15s ease; }
.fm-twisty.is-open { transform: rotate(90deg); }
.fm-tree-link { display: flex; align-items: center; gap: .35rem; min-width: 0; flex: 1; padding: .2rem .35rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.fm-tree-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-tree-link:hover { background: var(--surface); }
.fm-tree-link.is-current { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.fm-tree .fm-trash-link { flex: none; margin-top: auto; padding: .3rem .4rem .1rem; gap: .3rem; color: var(--muted); font-size: .75rem; background: none; }
.fm-tree .fm-trash-link .fm-icon svg { width: 12px; height: 12px; }
.fm-tree .fm-trash-link:hover, .fm-tree .fm-trash-link.is-current { color: var(--accent-text); background: none; }
.fm-tree .is-drop, .fm-crumbs .is-drop, .fm-item.is-drop, .fm-up.is-drop { outline: 2px dashed var(--primary); outline-offset: -2px; background: var(--accent-soft) !important; }

.fm-main { position: relative; min-width: 0; overflow: auto; max-height: 78vh; outline: none; }
.fm-main.is-drop { outline: 2px dashed var(--primary); outline-offset: -4px; background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
.fm-up { display: flex; align-items: center; gap: .35rem; width: 100%; padding: .3rem .6rem; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--muted); cursor: pointer; font: 600 .8125rem var(--font-sans); text-align: left; }
.fm-up:hover { background: var(--surface-sunken); color: var(--text); }
.fm-empty { padding: 2rem 1rem; text-align: center; }
.fm-list { width: 100%; margin: 0; border: 0; border-radius: 0; user-select: none; table-layout: fixed; }
.fm-list th { overflow: hidden; text-overflow: ellipsis; }
.fm-list .fm-col-alt { width: 20%; }
.fm-list .fm-col-size { width: 5.25rem; }
.fm-list .fm-col-modified { width: 9.25rem; }
/* Columns give way to the name when the list gets narrow: alt text, size, then the date. */
.fm-main { container-type: inline-size; }
/* Page of a project area (folder "Einstellungen"): the page takes the place of the list, tree and path stay. */
/* Only the bar of the explorer around the page: file managers on that page (e.g. Navigation) keep their buttons. */
.fm-bar.is-content-bar > .fm-views, .fm-bar.is-content-bar > .fm-search, .fm-bar.is-content-bar > .fm-actions,
.fm-bar.is-content-bar > .icon-button:not(.fm-tree-toggle) { display: none; }
bloqy-file-manager.has-content .fm-main { max-height: none; overflow: visible; padding: 1rem 1.25rem 2rem; }
/* The grey tree column is as long as the page next to it. */
bloqy-file-manager.has-content .fm-tree { max-height: none; overflow: visible; }
.fm-content > .page-header:first-child { margin-top: 0; }
/* Above the frame the title stays "Projekte"; the heading of the area is the smaller one (as in Einstellungen). */
body:not(.is-modal) .fm-content > .page-header h1 { font-size: 1.15rem; }
.fm-content .settings-frame > .fm-bar { display: none; }
@container (max-width: 760px) { .fm-list .fm-col-alt { display: none; } }
@container (max-width: 540px) { .fm-list .fm-col-size { display: none; } }
@container (max-width: 380px) { .fm-list .fm-col-modified { display: none; } }
.fm-list th { padding: .35rem .6rem; white-space: nowrap; font-size: .7rem; }
.fm-list td { padding: .2rem .6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8125rem; }
.fm-list .badge { white-space: nowrap; }
.fm-list tr:last-child td { border-bottom: 0; }
.fm-sort { display: inline-flex; align-items: center; gap: .3rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.fm-sort-dir { font-size: .55rem; color: var(--accent-text); }
.fm-item { cursor: default; }
.fm-list .fm-item:hover td { background: var(--surface-sunken); }
.fm-list .fm-item.is-selected td { background: var(--accent-soft); }
.fm-list .fm-item.is-focus td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.fm-item.is-cut { opacity: .5; }
.fm-item.is-unmanaged .fm-name, .fm-item.is-unmanaged td { color: var(--subtle); }
.fm-item.is-unmanaged :is(img, .fm-icon) { opacity: .45; filter: grayscale(1); }
.fm-lasso { position: absolute; z-index: 5; border: 1px solid var(--primary); border-radius: 2px; background: color-mix(in srgb, var(--primary) 12%, transparent); pointer-events: none; }
.fm-main.is-lassoing { cursor: crosshair; }
.fm-list .fm-entry[draggable="true"] .fm-mini { cursor: grab; }
.fm-entry { display: flex; align-items: center; gap: .45rem; min-width: 0; max-width: 100%; }
/* The name is shortened first; badges always stay whole. */
.fm-list .fm-name { flex: 0 1 auto; min-width: 2.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-badges { display: flex; flex: none; gap: .2rem; }
.fm-badges .badge { flex: none; }
.fm-badges:empty { display: none; }
.fm-tile-badges:empty { display: none; }
.fm-mini { width: 1.6rem; height: 1.6rem; flex: none; object-fit: cover; border-radius: 4px; }
.fm-icon.fm-mini { justify-content: center; align-items: center; }
.fm-icon.fm-mini svg { width: 16px; height: 16px; }
.fm-name { color: var(--text); font-size: .8125rem; font-weight: 600; text-decoration: none; }
.fm-tiles .fm-name { overflow-wrap: anywhere; }
.fm-name:hover { color: var(--accent-text); text-decoration: underline; }
.fm-col-alt { max-width: 16rem; color: var(--muted); }
.fm-row-actions { width: 2.4rem; text-align: right; }
.fm-list td.fm-row-actions, .fm-list th.fm-row-actions { padding: 0 .3rem; overflow: visible; }
.fm-list .fm-row-actions .icon-button { opacity: 0; }
.fm-list .fm-item:hover .fm-row-actions .icon-button, .fm-list .fm-item.is-selected .fm-row-actions .icon-button, .fm-row-actions .icon-button:focus-visible { opacity: 1; }
body .fm-rename { width: min(22rem, 100%); }

.fm-tiles { list-style: none; margin: 0; padding: .4rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .4rem; user-select: none; }
.fm-tiles.fm-tiles-large { grid-template-columns: repeat(auto-fill, minmax(12.75rem, 1fr)); gap: .6rem; }
.fm-tiles-large .fm-icon.fm-tile-thumb svg { width: 54px; height: 54px; }
.fm-tiles > .fm-item { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .3rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.fm-tiles > .fm-item:hover { border-color: var(--border-strong); }
.fm-tiles > .fm-item.is-selected { border-color: var(--primary); background: var(--accent-soft); }
.fm-tiles > .fm-item.is-focus { box-shadow: 0 0 0 2px var(--focus-ring); }
.fm-tile-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
img.fm-tile-thumb { width: 100%; height: 100%; object-fit: contain; }
.fm-icon.fm-tile-thumb svg { width: 36px; height: 36px; }
.fm-ext { font: 700 .8125rem var(--font-mono); color: var(--muted); }
.fm-tiles .fm-name { font-size: .75rem; line-height: 1.3; }
.fm-tile-info, .fm-tile-date { font-size: .7rem; line-height: 1.3; }
.fm-tile-badges { display: flex; flex-wrap: wrap; gap: .2rem; }

.fm-details { animation: fm-slide-in .22s ease-out; border-left: 1px solid var(--border); padding: .6rem; overflow: auto; max-height: 78vh; background: var(--surface-raised); font-size: .8125rem; }
.fm-details h2 { margin: .5rem 0 .2rem; font-size: .9375rem; overflow-wrap: anywhere; }
.fm-details h3 { margin: .8rem 0 .3rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fm-details-preview { display: flex; align-items: center; justify-content: center; min-height: 7rem; border-radius: var(--radius-sm); background: var(--surface-sunken); overflow: hidden; }
.fm-details-preview img, img.fm-details-image { display: block; max-width: 100%; max-height: 12rem; object-fit: contain; }
.fm-details-icon svg, .fm-details-preview .fm-icon svg { width: 40px; height: 40px; }
.fm-stack { gap: .3rem; padding: .4rem; }
.fm-stack img { width: 30%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.fm-details-rows { display: grid; grid-template-columns: auto 1fr; gap: .25rem .6rem; margin: .6rem 0; }
.fm-details-rows dt { color: var(--muted); }
.fm-details-rows dd { margin: 0; overflow-wrap: anywhere; }
.fm-details-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.fm-details-usage ul { margin: 0; padding-left: 1rem; }

.fm-trash-bar { display: flex; justify-content: flex-end; padding: .3rem .4rem; border-bottom: 1px solid var(--border); }
.fm-trash-bar:empty { display: none; }
.fm-trash { border: 0; border-radius: 0; }
.fm-trash td { padding: .25rem .6rem; }
.fm-trash .actions { white-space: nowrap; }
.fm-toast[hidden], .fm-menu[hidden] { display: none !important; }
.fm-toast { position: fixed; left: 50%; bottom: 1.25rem; translate: -50% 0; z-index: 1001; display: flex; align-items: center; gap: .6rem; max-width: min(40rem, calc(100vw - 2rem)); padding: .45rem .45rem .45rem .9rem; border-radius: var(--radius-sm); background: var(--toolbar, #1f2937); color: var(--toolbar-text, #fff); box-shadow: var(--shadow-raised); font-size: .8125rem; }
.fm-toast.is-error { background: var(--danger); color: #fff; }
.fm-toast.is-warn { background: var(--warning); color: #1f2937; }
.fm-toast .small-button { background: rgba(255, 255, 255, .15); color: inherit; border-color: transparent; }
.fm-toast-close { border: 0; background: none; color: inherit; font-size: 1.1rem; cursor: pointer; padding: 0 .3rem; }
.fm-drag-label { position: fixed; top: -100px; left: 0; padding: .3rem .6rem; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font: 600 .8125rem var(--font-sans); }
/* Entries hidden by a filter field (data-filter-list) stay hidden even where a rule sets their display. */
[data-filter-item][hidden], [data-filter-group][hidden] { display: none !important; }
.fm-dialog { width: min(26rem, calc(100vw - 2rem)); padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-raised); color: var(--text); }
.fm-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.fm-dialog h2 { margin: 0 0 .6rem; font-size: 1rem; }
.fm-move-tree { max-height: 55vh; overflow: auto; padding: .2rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .8125rem; }
.fm-move-tree ul { list-style: none; padding-left: .9rem; margin: 0; }
.fm-move-option { display: flex; align-items: center; gap: .4rem; padding: .25rem .35rem; border-radius: var(--radius-sm); cursor: pointer; }
.fm-move-option:has(input:checked) { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.fm-move-option:has(input:disabled) { opacity: .45; cursor: default; }
.fm-dialog-actions { display: flex; justify-content: flex-end; gap: .4rem; margin-top: .8rem; }
.unused-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.unused-bar bloqy-confirm { margin-left: auto; }
.unused-table { width: 100%; margin-bottom: 1.5rem; }
.unused-table .unused-check { width: 2rem; }
.unused-table code { margin-left: .35rem; }
.unused-table .muted.small { margin-left: .35rem; }
.fm-dialog-form { display: grid; gap: .7rem; }
.fm-dialog-form > label:not(.checkbox) { display: grid; gap: .25rem; }
.fm-dialog-form .fm-dialog-actions { margin-top: .2rem; }

@media (max-width: 900px) {
    .fm-body, bloqy-file-manager .fm-body { grid-template-columns: minmax(0, 1fr) !important; }
    .fm-tree { border-right: 0; border-bottom: 1px solid var(--border); max-height: 10rem; }
    .fm-details { border-left: 0; border-top: 1px solid var(--border); }

}

/* ---------------------------------------------------------------- Media file page (like the file manager) */
.media-edit-path { cursor: default; }
.media-edit-path:hover { background: none !important; }
.media-edit-name { padding: .2rem .25rem; color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-edit .fm-crumbs a:last-of-type { color: var(--text); }
.media-edit-body { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; min-height: 32rem; }
.media-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.25rem; background: var(--surface-sunken); min-width: 0; }
.media-stage bloqy-focus-picker img { max-height: 62vh; border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .08); }
.media-stage video, .media-stage audio { width: 100%; max-width: 56rem; }
.media-stage-ext { font: 700 2rem var(--font-mono); color: var(--muted); }
.media-stage-preview img { display: block; max-width: min(100%, 32rem); max-height: 62vh; border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .08); }
.media-edit-side { display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--surface-raised); min-width: 0; }
.media-edit-fields { display: grid; gap: .65rem; padding: .9rem; border-bottom: 1px solid var(--border); }
.media-edit-fields label:not(.checkbox) { display: grid; gap: .25rem; margin: 0; }
.media-edit-fields label > span { font-size: .75rem; font-weight: 600; color: var(--muted); }
.media-edit-section { padding: .75rem .9rem; border-bottom: 1px solid var(--border); font-size: .8125rem; }
.media-edit-section h2 { margin: 0 0 .4rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.media-edit-section .fm-details-rows { margin: 0; }
.media-edit-section ul { margin: 0; }
@media (max-width: 900px) {
    .media-edit-body { grid-template-columns: minmax(0, 1fr); }
    .media-edit-side { border-left: 0; border-top: 1px solid var(--border); }
}
.media-stage { position: relative; }
.media-focus-reset { margin-top: -.5rem; padding: 0; border: 0; background: none; color: var(--muted); font: 400 .75rem/1.4 var(--font-sans); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.media-focus-reset:hover { color: var(--accent-text); }
.media-stage bloqy-focus-picker img[src$=".svg"] { width: min(24rem, 100%); }
.media-usage-summary { margin: 0 0 .5rem; }
.media-usage-filter { width: 100%; margin-bottom: .2rem; }
.media-usage-list { max-height: 24rem; overflow: auto; font-size: .8125rem; }
.media-usage-list section:first-child h3 { margin-top: .3rem; }
.media-usage-list h3 { margin: .7rem 0 .25rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.media-usage-list ul { list-style: none; margin: 0; padding: 0; }
.media-usage-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem 1rem; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.media-usage-list li > :first-child { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.media-usage-list li .muted { margin-left: auto; }
.media-usage-list li .muted { flex: none; font-size: .75rem; }
.fm-ask { width: min(24rem, calc(100vw - 2rem)); }
.fm-ask-text { margin: 0; font-size: .875rem; line-height: 1.5; }
.fm-ask-details { margin: .6rem 0 0; padding-left: 1.1rem; max-height: 10rem; overflow: auto; font: .75rem/1.5 var(--font-mono); color: var(--muted); }
.fm-badges .badge.ok, .fm-tile-badges .badge.ok { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
bloqy-file-manager [hidden] { display: none !important; }
.fm-list .fm-col-title { width: 35%; }
.fm-form { width: min(26rem, calc(100vw - 2rem)); }
.fm-form form { display: grid; gap: .6rem; }
.fm-form h2 { margin: 0 0 .2rem; }
.fm-form-field { display: grid; gap: .25rem; margin: 0; }
.fm-form-field > span:first-child { font-size: .75rem; font-weight: 600; color: var(--muted); }
.fm-form-suffix { display: flex; align-items: center; gap: .35rem; }
.fm-form-suffix input { flex: 1; }
.fm-form-suffix em { font: 400 .8125rem var(--font-mono); color: var(--muted); font-style: normal; }
body bloqy-file-manager input.fm-mono:not(.code-input), body dialog input.fm-mono:not(.code-input) { font-family: var(--font-mono) !important; }
.fm-form-error { margin: 0; color: var(--danger); font-size: .8125rem; }
.fm-context .fm-label:empty { display: none; }

/* ---------------------------------------------------------------- Settings pages in the file manager look */
.settings-body { margin: 0; }
.settings-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: stretch; min-height: 24rem; }
.settings-layout:not(:has(.settings-nav)) { grid-template-columns: minmax(0, 1fr); }
.settings-nav { display: flex; flex-direction: column; gap: 1px; padding: .3rem .2rem; border-right: 1px solid var(--border); background: var(--surface-sunken); font-size: .8125rem; }
.settings-nav a { padding: .35rem .6rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.settings-nav a:hover { background: var(--surface); }
.settings-nav a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.settings-content { padding: 1rem 1.25rem 1.5rem; min-width: 0; }
.settings-section { display: grid; gap: .75rem; max-width: 52rem; }
.settings-section[hidden] { display: none; }
.settings-section h2 { margin: 0 0 .25rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .75rem 1rem; }
.settings-section label:not(.checkbox), .settings-field { display: grid; gap: .25rem; margin: 0; }
.settings-section label:not(.checkbox) > span, .settings-field > span { font-size: .75rem; font-weight: 600; color: var(--muted); }
.settings-section label.checkbox { margin: 0; font-size: .8125rem; }
.settings-section textarea.code { font-family: var(--font-mono) !important; }
.settings-section .field-error { margin: 0; }
@media (max-width: 800px) {
    .settings-layout { grid-template-columns: minmax(0, 1fr); }
    .settings-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); }
}
/* Einstellungen: icons and fields of the settings pages */
.settings-asset { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.settings-asset img { border: 1px solid var(--border); background: var(--surface-sunken); }
.fm-form-heading { margin: .6rem 0 0; font-size: .8125rem; font-weight: 600; }
.fm-form-check { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .8125rem; }

/* ---------------------------------------------------------------- Übersicht (dashboard) */
.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; align-items: start; }
.dash-card { min-width: 0; padding: 1rem 1.15rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgba(20, 22, 27, .04); }
.dash-card.is-alert { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.dash-card.is-alert h2 { color: var(--error-text); }
.dash-wide { grid-column: 1 / -1; }
.dash-head { display: flex; align-items: center; gap: .55rem; min-height: 1.9rem; margin-bottom: .8rem; }
.dash-head h2 { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dash-head h2 a { color: inherit; text-decoration: none; }
.dash-head h2 a:hover { color: var(--text); }
.dash-icon { display: grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); }
.dash-icon svg { width: 1rem; height: 1rem; }
.is-alert .dash-icon { background: var(--error-bg); color: var(--error-text); }
.dash-aside { margin-left: auto; }
.dash-head form.dash-aside { margin-top: 0; margin-bottom: 0; }
.dash-pill { display: inline-flex; align-items: center; width: fit-content; padding: .05rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.dash-pill.up { background: var(--success-bg); color: var(--success-text); }
.dash-pill.down { background: var(--error-bg); color: var(--error-text); }
.dash-pill.warn { background: color-mix(in srgb, var(--warning) 22%, var(--surface)); color: color-mix(in srgb, var(--warning) 45%, var(--text)); }
.dash-pill.neutral { background: var(--surface-sunken); color: var(--muted); }
.dash-dot { display: inline-block; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--border-strong); }
.dash-dot.is-ok { background: #22C55E; }
.dash-dot.is-warn { background: var(--warning); }
.dash-dot.is-danger { background: var(--danger); }
.dash-dot.is-info { background: var(--info); }
.dash-dot.is-accent { background: var(--primary); }
.dash-num { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; font-size: .8125rem; }
.dash-list li { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.dash-bullets li { align-items: baseline; }
.dash-list .icon-button { width: 26px; height: 26px; }
.dash-path { overflow: hidden; min-width: 0; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.dash-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .9rem; }
.dash-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .9rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); }
.dash-foot strong { color: var(--text); }
.dash-scale { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .72rem; color: var(--muted); }
/* Zu erledigen: one row per task, the whole row is the link. */
.dash-rows { margin: 0; padding: 0; list-style: none; }
.dash-rows li + li { border-top: 1px solid var(--border); }
.dash-rows a { display: flex; align-items: center; gap: .65rem; padding: .5rem .35rem; margin: 0 -.35rem; border-radius: var(--radius-sm); color: var(--text); font-size: .8125rem; text-decoration: none; }
.dash-rows a:hover { background: var(--surface-sunken); }
.dash-chevron { margin-left: auto; color: var(--muted); font-size: 1.1rem; line-height: 1; }
/* Statistiken: three figures as tiles, the days as bars (today stands out). */
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.dash-kpis > div { display: grid; gap: .1rem; align-content: start; padding: .6rem .7rem; border-radius: 10px; background: var(--surface-sunken); }
.dash-kpis span:first-child { font-size: .75rem; color: var(--muted); }
.dash-kpis strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.dash-bars { display: block; width: 100%; height: 2.6rem; margin-top: .8rem; }
.dash-bars rect { fill: var(--primary); opacity: .3; }
.dash-bars rect.is-today { opacity: 1; }
/* Formulare and Übersetzungen: a bar per step or language. */
.dash-funnel { display: grid; gap: .55rem; font-size: .8125rem; }
.dash-funnel > div { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; align-items: baseline; }
.dash-funnel strong { font-variant-numeric: tabular-nums; }
.dash-bar { display: block; grid-column: 1 / -1; width: 100%; height: .55rem; border-radius: 99px; overflow: hidden; }
.dash-bar rect { fill: var(--primary); }
.dash-bar .dash-bar-track { fill: var(--surface-sunken); }
.dash-bar .is-view { opacity: .35; }
.dash-bar .is-start { opacity: .65; }
.dash-bar .is-outdated { fill: var(--warning); }
/* bloqy Cloud Backups: one square per day of the last 14 days. */
.dash-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.dash-days i { height: 1.4rem; border-radius: 4px; background: var(--surface-sunken); }
.dash-days i.is-ok { background: #22C55E; }
.dash-days i.is-failed { background: var(--danger); }
/* Speicherplatz: the ring of Tools → Speicherplatz, smaller, with the three largest areas. */
.dash-storage { display: flex; align-items: center; gap: 1.1rem; }
.dash-storage .dash-ring { width: 6.5rem; height: 6.5rem; font-size: .8rem; }
.dash-storage .dash-list { flex: 1; }
/* Sicherheitslücke in PHP: running and needed version side by side. */
.dash-versions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.dash-versions > div { display: grid; }
.dash-versions span { font-size: .75rem; color: var(--muted); }
.dash-versions strong { font-size: 1.3rem; }
.dash-versions .button { margin-left: auto; }
.dash-arrow { color: var(--muted); }
/* Gerade in Bearbeitung and Aktivität: initials in circles. */
.dash-people { display: flex; align-items: center; gap: .8rem; font-size: .84rem; }
.dash-avatars { display: flex; flex: none; }
.dash-avatars .dash-avatar + .dash-avatar { margin-left: -.5rem; }
.dash-avatar { display: inline-grid; place-items: center; flex: none; width: 1.85rem; height: 1.85rem; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: .66rem; font-weight: 800; }
.dash-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-sunken); }
.dash-tabs a { padding: .15rem .65rem; border-radius: 7px; color: var(--muted); font-size: .75rem; font-weight: 600; text-decoration: none; }
.dash-tabs a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.dash-feed { margin: 0; padding: 0; list-style: none; }
.dash-feed li { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--border); font-size: .84rem; }
.dash-feed li:first-child { border-top: 0; padding-top: 0; }
.dash-feed-text { display: grid; min-width: 0; margin-right: auto; }
.dash-feed-text .fm-mono { overflow: hidden; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.dash-when { min-width: 5.5rem; color: var(--muted); font-size: .78rem; text-align: right; white-space: nowrap; }
@media (max-width: 760px) {
    .dash-feed .dash-pill { display: none; }
}
.badge.ok { background: var(--success-bg, #dcfce7); color: var(--success-text, #15803d); }
.badge.error { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
/* Einstellungen → Sicherheit: known security holes of PHP. */
.php-advisories { margin-bottom: 1rem; }
.php-advisories th, .php-advisories td { text-align: left; vertical-align: top; }
.php-advisory-detail p { margin: 0 0 .5rem; }
.php-workarounds { list-style: none; margin: 0 0 .5rem; padding: 0; }
.php-workarounds li { display: flex; align-items: center; gap: .35rem; }
.php-workarounds li.missing { color: var(--danger); }
.php-workarounds .icon { width: 1rem; height: 1rem; }
.design-values { display: grid; grid-template-columns: repeat(3, minmax(7rem, 10rem)); gap: .6rem 1rem; margin-top: .75rem; }
.design-values label { display: grid; gap: .25rem; font-size: .75rem; font-weight: 600; color: var(--muted); }
.design-values label.wide { grid-column: 1 / -1; }
.design-steps { max-width: none; width: auto; }
.design-steps thead td, .design-steps thead th { white-space: nowrap; }
.design-steps input[type=number] { width: 4.5rem; }
.design-steps select { width: 9rem; }
/* Flags of the projects (media library icons/language, Bloqy\Project\Flags) */
img.fm-mini[src*="/icons/language/"] { width: 1.12rem; height: .84rem; margin: .38rem .24rem; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); object-fit: cover; }
img.fm-tile-thumb[src*="/icons/language/"], img.fm-details-image[src*="/icons/language/"] { object-fit: contain; padding: 18%; background: var(--surface-sunken); }
/* Formulare: space between the lists of the projects */
.forms-project + .forms-project { margin-top: 2.5rem; }
.forms-project > h2 { margin: 0 0 .6rem; }

/* Tools → Favicon-Generator */
.favicon-preview { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end; margin: .5rem 0 1rem; }
.favicon-preview figure { margin: 0; display: grid; gap: .35rem; justify-items: start; }
.favicon-preview figcaption { font-size: .75rem; color: var(--muted); }
.favicon-tab-bar { display: flex; align-items: center; gap: .5rem; min-width: 12rem; max-width: 16rem; padding: .45rem .75rem; background: var(--surface); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-size: .8125rem; }
.favicon-tab-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favicon-home { padding: 1rem; background: linear-gradient(135deg, #4b6cb7, #182848); border-radius: var(--radius); }
.favicon-home img { border-radius: 22%; }
.favicon-home figcaption { color: #fff; }
.favicon-files { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; }
.favicon-files a { display: grid; gap: .4rem; justify-items: center; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); color: inherit; text-decoration: none; background: var(--surface); }
.favicon-files a:hover { border-color: var(--border-strong); }
.favicon-file-image { display: grid; place-items: center; width: 4rem; height: 4rem; background: repeating-conic-gradient(var(--surface-sunken) 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.favicon-file-image img { max-width: 100%; max-height: 100%; }
.favicon-files code { font-size: .75rem; word-break: break-all; }

/* Search in the tabs of Module (filters the cards of the tab) */
nav
/* Fields that only apply to one choice (data-show-if in admin.js); "hidden" must win over display rules of labels and grids. */
[data-show-if][hidden] { display: none !important; }

/* Übersetzungsansicht (translations/view.php, translate-view.js) */
.tv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 .8rem; }
.tv-notice:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
bloqy-translate-view [hidden], .sticky-save[hidden] { display: none; }
.tv-counts { display: flex; flex-wrap: wrap; gap: .4rem; margin-right: auto; }
.tv-counts .badge { margin: 0; }
.badge.tv-state-outdated, .badge.tv-state-new { background: #fef3c7; color: #92400e; border-color: transparent; }
.badge.tv-state-machine { background: var(--accent-soft, #fde8e1); color: var(--accent-text, #9a2d10); border-color: transparent; }
.badge.tv-state-checked { background: var(--success-bg, #dcfce7); color: var(--success-text, #15803d); border-color: transparent; }
.tv-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
bloqy-translate-view.has-preview .tv-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 40%); }
.tv-preview { position: sticky; top: 1rem; height: calc(100vh - 2rem); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.tv-preview iframe { width: 100%; height: 100%; border: 0; }
.tv-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tv-head, .tv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: .4rem 1rem; padding: .6rem .9rem; }
.tv-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--border); }
.tv-head > span:first-child { display: none; }
.tv-row { border-bottom: 1px solid var(--border); }
.tv-row:last-child { border-bottom: 0; }
.tv-label { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); }
.tv-source { font-size: .875rem; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.tv-source :is(p, ul, ol, h2, h3, h4, blockquote) { margin: 0 0 .4rem; }
.tv-target textarea, .tv-rich { width: 100%; font: inherit; font-size: .875rem; line-height: 1.5; }
.tv-rich { min-height: 2.2rem; padding: .25rem .5rem; border: 1px solid var(--control-border, #d3d3d3); background: var(--surface-raised, #fff); overflow-wrap: anywhere; }
.tv-rich:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.tv-rich :is(p, ul, ol, h2, h3, h4, blockquote) { margin: 0 0 .4rem; }
.tv-actions { display: flex; flex-direction: column; gap: .3rem; }
.tv-row[data-state="outdated"], .tv-row[data-state="new"] { background: color-mix(in srgb, #fef3c7 35%, transparent); }
.tv-row.is-loading { opacity: .6; }
bloqy-translate-view.is-open-only .tv-row:is([data-state="checked"]) { display: none; }
@media (max-width: 64rem) { .tv-head, .tv-row { grid-template-columns: minmax(0, 1fr) auto; } .tv-source { grid-column: 1 / -1; } bloqy-translate-view.has-preview .tv-layout { grid-template-columns: 1fr; } }

/* Übersetzungs-Matrix (translations/matrix.php) */
.matrix-table td.matrix-cell { white-space: nowrap; }
.matrix-table td.matrix-missing { background: color-mix(in srgb, #fef3c7 30%, transparent); }
.matrix-table .badge { margin-left: 0; }

/* Komponenten-Texte (translations/components.php): equal columns, fields fill them */
/* Übersetzungen → Komponenten: groups to fold open, the table scrolls sideways; key and pinned language stay. */
.components-group { border-top: 1px solid var(--border); padding: .75rem 0; }
.components-group:first-of-type { border-top: 0; }
.components-group > summary { cursor: pointer; }
.components-group > summary h2 { display: inline; margin: 0 0 0 .25rem; }
.components-group[open] > summary { margin-bottom: .75rem; }
.components-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
/* overflow visible: with the hidden overflow of all tables the sticky columns would stick to the table itself. */
.components-table { table-layout: fixed; width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; overflow: visible; border: 0; border-radius: 0; }
.components-table .is-key { width: 11rem; min-width: 11rem; position: sticky; left: 0; z-index: 2; background: var(--surface); }
.components-table [data-lang] { width: 16rem; min-width: 16rem; }
.components-table .is-pinned { position: sticky; left: 11rem; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--border-strong); }
.components-table textarea { width: 100%; min-width: 0; }
[data-pin-language] { min-width: 12rem; }
.media-language { display: grid; gap: .4rem; }

/* Tools → Karten-Stile (5.101) */
.ms-layout { display: grid; grid-template-columns: minmax(22rem, 1fr) minmax(0, 1.3fr); gap: 1rem; align-items: start; }
.ms-controls { display: grid; gap: .75rem; min-width: 0; }
.ms-section { min-width: 0; overflow-x: auto; padding: 1.1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ms-section h2 { font-size: 1rem; margin: 0 0 .75rem; }
.ms-section .grid-2 { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .9rem 1rem; }
.ms-section .ms-marker-image { grid-column: 1 / -1; }
.ms-section .grid-2 > .ms-swatches { align-self: end; margin: 0 0 .55rem; }
.ms-section label:not(.checkbox), .ms-section .settings-field { display: grid; gap: .3rem; margin: 0; font-size: .875rem; font-weight: 600; }
.ms-section .settings-field > span { font-size: .875rem; color: var(--text); }
.ms-section label:not(.checkbox) > input:not([type="range"]):not([type="color"]), .ms-section label:not(.checkbox) > select, .ms-code { width: 100%; font-weight: 400; }
.ms-section input[type="color"] { width: 3rem; height: 2.1rem; padding: 2px; }
.ms-layout input[type="range"] { accent-color: var(--primary); }
.ms-global label:not(.checkbox) { display: flex; align-items: center; gap: .6rem; font-weight: 400; }
.ms-section .explorer { border: 0; border-radius: 0; }
.ms-preview { padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ms-section summary { cursor: pointer; }
.ms-section .inline-heading { display: inline; }
.ms-global { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; margin-bottom: .5rem; }
.ms-groups td, .ms-rules td { vertical-align: middle; }
.ms-groups input[type="range"] { width: 100%; min-width: 4.5rem; max-width: 7rem; }
.ms-color-cell { white-space: nowrap; }
.ms-groups th, .ms-groups td { padding-left: .4rem; padding-right: .4rem; }
.ms-groups input[type="color"] { width: 2.5rem; }
.ms-color-clear { width: 20px; }
.ms-color-clear.is-empty { visibility: hidden; }
.ms-rules input { width: 100%; }
.ms-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ms-suggestion { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: .8125rem; }
.ms-suggestion:hover { border-color: var(--primary); }
.ms-swatches { display: inline-flex; }
.ms-swatch { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid var(--border-strong); margin-left: -.25rem; }
.ms-swatch:first-child { margin-left: 0; }
.ms-code { width: 100%; font-family: var(--font-mono); font-size: .8125rem; }
.ms-preview { position: sticky; top: 1rem; display: grid; gap: .6rem; }
.ms-preview-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ms-preview-bar input { flex: 1 1 12rem; }
.ms-preview iframe { width: 100%; height: min(70vh, 40rem); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-sunken); }
@media (max-width: 960px) { .ms-layout { grid-template-columns: 1fr; } .ms-preview { position: static; order: -1; } }

/* Tools → Speedcheck (5.102) */
.speed-job { display: grid; gap: .5rem; }
.speed-stage { min-height: 1px; }
.speed-frame { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.speed-frame iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; }

.speed-summary, .speed-section { margin-top: 1.25rem; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.speed-section h2, .speed-summary h2 { font-size: 1rem; margin: 0 0 .5rem; }
.speed-total { display: flex; gap: 1rem; align-items: center; }
.speed-score { position: relative; display: inline-grid; place-items: center; flex: none; }
.speed-score svg { width: 100%; height: 100%; }
.speed-score-l { width: 5.5rem; height: 5.5rem; font-size: 1.6rem; }
.speed-score-s { width: 2.6rem; height: 2.6rem; font-size: .8rem; }
.speed-score b { position: absolute; }
.speed-score-track { fill: none; stroke: var(--surface-sunken); stroke-width: 9; }
.speed-score-value { fill: none; stroke: var(--subtle); stroke-width: 9; stroke-linecap: round; }
.speed-score.is-good .speed-score-value { stroke: #16a34a; }
.speed-score.is-medium .speed-score-value { stroke: #f59e0b; }
.speed-score.is-bad .speed-score-value { stroke: #dc2626; }
.speed-score.is-good b { color: #15803d; }
.speed-score.is-medium b { color: #b45309; }
.speed-score.is-bad b { color: #b91c1c; }
.speed-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; margin: 1rem 0 0; }
.speed-values div { padding: .5rem .75rem; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.speed-values dt { font-size: .75rem; color: var(--muted); }
.speed-values dd { margin: .2rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.speed-delta { font-size: .75rem; font-weight: 600; margin-left: .25rem; }
.speed-delta.is-better { color: #15803d; }
.speed-delta.is-worse { color: #b91c1c; }
.speed-advice { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.speed-advice li { padding: .45rem .75rem; background: color-mix(in srgb, #f59e0b 14%, var(--surface)); border-radius: var(--radius-sm); font-size: .875rem; }
.speed-advice li.is-bad { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.speed-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.5rem; }
.speed-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--subtle); }
.speed-dot.is-good { background: #16a34a; }
.speed-dot.is-medium { background: #f59e0b; }
.speed-dot.is-bad { background: #dc2626; }
.legal-status { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .5rem 0 1rem; }
.legal-status dd { margin: 0; overflow-wrap: anywhere; }
.legal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.golive-group { margin-top: 1.75rem; }
.golive-overview { display: grid; gap: 1rem; margin-bottom: .5rem; }
.golive-total { display: flex; align-items: center; gap: 1.25rem; }
.golive-total h2 { margin: 0 0 .35rem; }
.golive-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0; }
.golive-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.golive-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.golive-card { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: inherit; text-decoration: none; }
.golive-card:hover { border-color: var(--subtle); }
.golive-card-text { display: grid; gap: .25rem; min-width: 0; flex: 1; }
.golive-ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.golive-ring svg { width: 100%; height: 100%; }
.golive-ring b { position: absolute; }
.golive-ring-size-l { width: 6rem; height: 6rem; font-size: 1.25rem; }
.golive-ring-size-s { width: 3.2rem; height: 3.2rem; font-size: .75rem; }
.golive-ring circle { fill: none; stroke-width: 10; }
.golive-ring-track { stroke: var(--surface-sunken); }
.golive-ring-ok { stroke: #16a34a; }
.golive-ring-warn { stroke: #f59e0b; }
.golive-ring-bad { stroke: #dc2626; }
.golive-bar { display: block; width: 100%; height: .4rem; border-radius: 999px; overflow: hidden; }
.golive-bar-track { fill: var(--surface-sunken); }
.golive-bar-ok { fill: #16a34a; }
.golive-bar-warn { fill: #f59e0b; }
.golive-bar-bad { fill: #dc2626; }
.golive-group h2 { display: flex; align-items: baseline; gap: .5rem; }
.golive-items { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.golive-items > li { display: flex; align-items: baseline; gap: .75rem; padding: .55rem .75rem; border-radius: var(--radius-sm); background: var(--surface); }
.golive-items > li.is-warn { background: color-mix(in srgb, #f59e0b 14%, var(--surface)); }
.golive-items > li.is-bad { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.golive-items .speed-dot { flex: none; }
.golive-item { display: grid; gap: .15rem; min-width: 0; flex: 1; }
.golive-item-head { display: flex; justify-content: space-between; gap: 1rem; }
.golive-item details { margin-top: .25rem; }
.golive-pages { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .8125rem; display: grid; gap: .2rem; overflow-wrap: anywhere; }

/* Tools → Speicherplatz */
.disk-overview { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem 2.5rem; margin-bottom: 1.5rem; }
.disk-ring { position: relative; display: inline-grid; place-items: center; flex: none; width: 11rem; height: 11rem; font-size: 1.35rem; }
.disk-ring svg { width: 100%; height: 100%; }
.disk-ring b { position: absolute; }
.disk-ring circle { fill: none; stroke-width: 12; }
.disk-ring-track { stroke: var(--surface-sunken); }
.disk-groups { display: grid; gap: 1rem; flex: 1; min-width: min(100%, 20rem); max-width: 34rem; }
.disk-group h2 { display: flex; align-items: baseline; gap: .5rem; margin: 0 0 .4rem; font-size: 1rem; }
.disk-legend { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; font-size: .875rem; }
.disk-legend li { display: grid; grid-template-columns: .75rem 1fr auto 3.5rem; align-items: center; gap: .6rem; }
.disk-legend li > :last-child { text-align: right; }
.disk-legend-size { font-variant-numeric: tabular-nums; }
/* Pointing at an arc of the ring or an entry of the legend highlights both (data-active, set in admin.js). */
.disk-ring circle[data-area], .disk-legend li { transition: opacity .15s, stroke-width .15s, background-color .15s; }
.disk-legend li { margin: 0 -.4rem; padding: .1rem .4rem; border-radius: var(--radius-sm); cursor: default; }
.disk-overview[data-active] .disk-ring circle[data-area]:not(.is-active) { opacity: .3; }
.disk-overview[data-active] .disk-ring circle.is-active { stroke-width: 15; }
.disk-overview[data-active] .disk-legend li:not(.is-active) { opacity: .45; }
.disk-overview .disk-legend li.is-active { background: var(--surface-sunken); font-weight: 600; }
.disk-swatch { width: .75rem; height: .75rem; border-radius: 3px; }
.disk-area-media { stroke: #D63F17; } .disk-swatch-media { background: #D63F17; }
.disk-area-projects { stroke: #EE7A52; } .disk-swatch-projects { background: #EE7A52; }
.disk-area-theme { stroke: #F5AE86; } .disk-swatch-theme { background: #F5AE86; }
.disk-area-config { stroke: #A8380F; } .disk-swatch-config { background: #A8380F; }
.disk-area-other { stroke: #F9D3BE; } .disk-swatch-other { background: #F9D3BE; }
.disk-area-core { stroke: #475569; } .disk-swatch-core { background: #475569; }
.disk-area-cache { stroke: #64748B; } .disk-swatch-cache { background: #64748B; }
.disk-area-logs { stroke: #94A3B8; } .disk-swatch-logs { background: #94A3B8; }
.disk-area-backups { stroke: #CBD5E1; } .disk-swatch-backups { background: #CBD5E1; }
.disk-bar { display: block; width: 100%; height: .4rem; border-radius: 999px; overflow: hidden; }
.disk-bar-track { fill: var(--surface-sunken); }
.disk-bar-fill { fill: var(--accent); }
.disk-section { margin-top: 1.75rem; }
.disk-section > h2 { display: flex; align-items: baseline; gap: .5rem; }
.disk-hints { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.disk-hints > li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .75rem; border-radius: var(--radius-sm); background: var(--surface); }
.disk-hints > li.is-done { opacity: .7; }
.disk-hint { display: grid; gap: .15rem; min-width: 0; flex: 1; }
.disk-hint details { margin-top: .25rem; }
.disk-examples { margin: .35rem 0 0; padding-left: 1.1rem; display: grid; gap: .1rem; max-height: 16rem; overflow: auto; overflow-wrap: anywhere; }
.disk-table { max-width: 48rem; }
.disk-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.disk-cell-bar { width: 40%; }
.disk-path { overflow-wrap: anywhere; }
.disk-tree { margin: 0; padding: 0 0 0 1.1rem; list-style: none; }
.disk-section > .disk-tree { padding-left: 0; max-width: 56rem; }
.disk-tree-row { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(4rem, 12rem) 5.5rem 3.5rem 7rem; align-items: center; gap: .75rem; padding: .3rem .5rem; border-radius: var(--radius-sm); font-size: .875rem; cursor: pointer; }
.disk-tree-row.is-leaf { cursor: default; padding-left: 1.5rem; }
.disk-tree-row:hover { background: var(--surface); }
summary.disk-tree-row { list-style: none; }
summary.disk-tree-row::-webkit-details-marker { display: none; }
.disk-tree-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono, monospace); }
summary.disk-tree-row .disk-tree-name::before { content: "▸"; display: inline-block; width: 1rem; color: var(--subtle); }
details[open] > summary.disk-tree-row .disk-tree-name::before { content: "▾"; }
.disk-tree-size, .disk-tree-share, .disk-tree-files { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.disk-tree-more { padding: .25rem .5rem .25rem 1.5rem; }
@media (max-width: 640px) {
    .disk-tree-row { grid-template-columns: minmax(6rem, 1fr) 5rem 3rem; }
    .disk-tree-bar, .disk-tree-files { display: none; }
    .disk-ring { width: 8rem; height: 8rem; font-size: 1.1rem; }
    .disk-hints > li { flex-wrap: wrap; }
}
.speed-chart { width: 100%; height: auto; max-height: 9rem; }
.speed-chart-grid { stroke: var(--border); stroke-width: 1; }
.speed-chart-line { fill: none; stroke: var(--primary); stroke-width: 2.5; }
.speed-chart-dot { fill: var(--primary); }
.speed-pages td { vertical-align: top; }
.speed-detail { margin: .5rem 0 0; font-size: .8125rem; }
.speed-detail dt { font-weight: 700; margin-top: .4rem; }
.speed-detail dd { margin: 0; }
.speed-scroll { overflow-x: auto; }
.speed-columns > div { min-width: 0; }
.speed-runs { font-size: .8125rem; }

/* Filter buttons by block type (Blöcke → Stile), like the entries of the editor's blocks tab. */
.type-filter { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1rem; }
.type-filter-item { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; }
.type-filter-item .icon { width: 12px; height: 12px; color: var(--muted); }
.type-filter-item:hover { border-color: var(--primary); color: var(--primary); }
.type-filter-item[aria-pressed="true"] { border-color: var(--primary); background: var(--accent-soft); color: var(--accent-text); }
.type-filter-item[aria-pressed="true"] .icon { color: currentColor; }
.is-filtered-out { display: none !important; }

/* Karten-Stile: theme colours as swatches next to the colour fields. */
.ms-swatches { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-left: .35rem; vertical-align: middle; }
.ms-swatch { width: 18px; height: 18px; padding: 0; border: 1px solid rgb(0 0 0 / .15); border-radius: 4px; cursor: pointer; }
.ms-swatch:hover, .ms-swatch:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Style cards of the module studio: name with switch in the first line, placeholder below. */
.set-card-head { display: grid; gap: .15rem; }
.set-card-head .switch { min-width: 0; }
.set-card-head .switch span { overflow-wrap: anywhere; }
.set-card-head code { max-width: none !important; white-space: normal; overflow-wrap: anywhere; padding-left: 2.45rem; font-size: .72rem; }

/* Properties panel of the file managers (pages, media, folders): the properties page in an iframe on the right. */
.fm-panel { position: absolute; inset: 0 0 0 auto; z-index: 20; width: min(40rem, 100%); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgb(0 0 0 / .14); animation: fm-slide-in .2s ease-out; overflow: hidden; }
.fm-panel-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .7rem .8rem; border-bottom: 1px solid var(--border); }
.fm-panel-icon { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: var(--radius-sm); }
.fm-panel-head .fm-icon.fm-panel-icon svg { width: 1.6rem; height: 1.6rem; }
.fm-panel-title { display: grid; min-width: 0; }
.fm-panel-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-panel-title span { font: .75rem/1.4 var(--font-mono, ui-monospace, monospace); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-panel-tabs { display: flex; gap: .2rem; padding: .35rem .6rem; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.fm-panel-tabs button { flex: none; border: 0; background: none; padding: .3rem .6rem; border-radius: var(--radius-sm); font: inherit; font-size: .8125rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.fm-panel-tabs button:hover { color: var(--text); background: var(--surface-sunken); }
.fm-panel-tabs button.is-active { color: var(--text); background: var(--surface-sunken); font-weight: 600; }
.fm-panel-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
bloqy-file-manager.has-panel, bloqy-file-manager.has-panel .fm { min-height: max(36rem, 75vh); }

/* Pages inside the panel (?modal=1&panel=1): no own head, one column. */
body.is-panel .page-header, body.is-panel .media-edit-path { display: none !important; }
body.is-panel .content, body.is-panel main { padding: .8rem 1rem 5rem; }
body.is-panel .media-edit-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
body.is-panel .media-edit-side { border-left: 0; border-top: 1px solid var(--border); }
body.is-panel .folder-role { margin-left: 1.6rem; }
/* The panel in the editor: fixed on the right over the sidebar. */
.fm-panel.is-fixed { position: fixed; inset: 0 0 0 auto; z-index: 1000; border-radius: 0; border-width: 0 0 0 1px; }
/* Tabs of the panel show one section of the page at a time. */
body.is-panel .panel-off { display: none !important; }
/* The active tab shows its section without the frame and heading the tab already names. */
body.is-panel .panel-on { border: 0; padding: 0; margin: 0; }
body.is-panel .panel-on > legend, body.is-panel .panel-on > h2 { display: none; }
/* Media detail sections shown alone in a tab of the panel keep their inner spacing (Informationen, Bilddaten, Verwendet). */
body.is-panel .media-edit-section.panel-on { padding: 1rem 1.1rem; }
body.is-panel .media-edit-section.panel-on .media-usage-list { max-height: none; }
/* A section shown alone in its tab has no line above it: lines only separate areas. */
body.is-panel .panel-on::before { display: none; }
form > fieldset:first-child::before { display: none; }

/* Status of pages as a coloured dot (editor, file manager, selects): green online, amber in review or
   scheduled, red draft or offline. */
.status-dot { display: inline-block; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #9ca3af; }
.status-dot.is-online { background: #22c55e; }
.status-dot.is-offline { background: #ef4444; }
.status-dot.is-review { background: #f59e0b; }
.status-dot.is-changed { background: #f97316; }
.status-dot.is-scheduled { background: #3b82f6; }
.status-dot.is-spacer { background: none; }
.fm-entry > .status-dot { margin-right: .1rem; }
.fm-changes { color: #d97706; display: inline-flex; }
.fm-changes svg { width: .8rem; height: .8rem; }

/* Selects: the opened list in the look of bloqy where the browser supports customizable selects (Chromium 135+);
   other browsers keep their own list. Options may contain a status dot. */
@supports (appearance: base-select) {
    select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
    select:not([multiple]):not([size]) { display: inline-flex; align-items: center; gap: .4rem; }
    select:not([multiple]):not([size])::picker(select) { margin-top: .25rem; padding: .3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 12px 28px rgb(0 0 0 / .14); max-height: min(22rem, 60vh); }
    select:not([multiple]):not([size]) option { display: flex; align-items: center; gap: .5rem; padding: .42rem .65rem; border-radius: var(--radius-sm); font-size: .875rem; }
    select:not([multiple]):not([size]) option:hover, select:not([multiple]):not([size]) option:focus-visible { background: var(--surface-sunken); outline: none; }
    select:not([multiple]):not([size]) option:checked { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
    select:not([multiple]):not([size]) option::checkmark { display: none; }
    select:not([multiple]):not([size]) optgroup { font-size: .75rem; color: var(--muted); }
    select selectedcontent { display: inline-flex; align-items: center; gap: .5rem; }
    select > button { all: unset; display: inline-flex; flex: 1; align-items: center; min-width: 0; }
    /* The arrow as a drawn chevron: the font of the admin has no clean glyph for the default triangle. */
    select:not([multiple]):not([size])::picker-icon { display: none; }
    select:not([multiple]):not([size]) { padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.75 6 6.25l4.5-4.5' fill='none' stroke='%238a8f98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: .7rem auto; }
    select:not([multiple]):not([size]):open { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 6.25 6 1.75l4.5 4.5' fill='none' stroke='%238a8f98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}

/* Google preview of the SEO settings (editor and page properties). */
.seo-preview { display: grid; gap: .1rem; padding: .75rem; margin-bottom: .9rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font-family: Arial, sans-serif; }
.seo-preview-url { color: #202124; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-preview-title { color: #1a0dab; font-size: 18px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-preview-text { color: #4d5156; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* No boxed form groups: a group is a headline with a full-width line above it (also for older fieldsets). */
fieldset { position: relative; min-width: 0; margin: .6rem 0 0; padding: 1.1rem 0 0; border: 0; }
fieldset::before { content: ''; position: absolute; inset: 0 0 auto 0; border-top: 1px solid var(--border); }
fieldset > legend { float: left; width: 100%; margin: 0 0 .7rem; padding: 0; padding-inline: 0; font-weight: 600; font-size: .95rem; }
/* In grid forms the gap already separates the headline from the fields. */
.form fieldset > legend { margin: 0 0 -.4rem; }
fieldset > legend + * { clear: left; }
.form fieldset { display: grid; gap: 1rem; padding: 1.1rem 0 0; border: 0; border-radius: 0; }
.studio-fieldset { padding: 0 !important; margin: 0 !important; }

/* Date picker of bloqy (date-picker.js) for date and date-time fields. */
.date-field { position: relative; display: flex; align-items: stretch; min-width: 0; }
.date-field-text { flex: 1; min-width: 0; padding-right: 2.4rem !important; }
.date-field-button { position: absolute; inset: 0 0 0 auto; width: 2.3rem; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; }
.date-field-button:hover { color: var(--text); }
.date-popover { position: absolute; z-index: 60; top: calc(100% + .3rem); left: 0; width: 17.5rem; padding: .6rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 28px rgb(0 0 0 / .14); font-weight: 400; }
.date-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.date-head strong { font-size: .9rem; }
.date-nav { width: 2rem; height: 2rem; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.date-nav:hover { background: var(--surface-sunken); }
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.date-weekday { padding: .2rem 0; text-align: center; font-size: .7rem; font-weight: 600; color: var(--muted); }
.date-day { aspect-ratio: 1; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: .82rem; cursor: pointer; }
.date-day:hover, .date-day:focus-visible { background: var(--surface-sunken); outline: none; }
.date-day.is-today { box-shadow: inset 0 0 0 1px var(--border-strong); }
.date-day.is-selected { background: var(--primary); color: var(--primary-text, #fff); font-weight: 600; }
.date-time { display: flex; align-items: center; gap: .35rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--border); font-size: .82rem; }
.date-time label { margin-right: auto; color: var(--muted); font-weight: 400; }
.date-time input { width: 3.4rem; padding: .3rem .4rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; text-align: center; }
.date-actions { display: flex; justify-content: space-between; margin-top: .5rem; }
.date-link { border: 0; background: none; padding: .25rem .4rem; border-radius: var(--radius-sm); color: var(--accent-text, var(--primary)); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.date-link:hover { background: var(--surface-sunken); }
.picker-item.is-folder .picker-thumb .icon { width: 2.2rem; height: 2.2rem; color: var(--muted); }

/* Automationen: triggers below the title (same form, one save button), cron address. */
.inline-title .automation-triggers { flex-basis: 100%; margin: .75rem 0 0; }
.automation-schedule, .automation-events { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .5rem; }
.automation-cron-url { word-break: break-all; }
.license-scope { margin-top: 2.5rem; }
/* Licence number: BLQY-XXXX-XXXX-XXXX in a monospace font, the button next to it. */
.license-form .button { height: 2.5rem; }
.license-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; margin-top: 1rem; }
.license-form label { display: grid; gap: .35rem; margin: 0; }
.license-form input { box-sizing: border-box; height: 2.5rem; width: calc(19ch + 1.5rem); font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.license-form input::placeholder { text-transform: none; }

/* Changelog (System → Update) */
.changelog-entry { margin: 0 0 1.5rem; max-width: 52rem; }
.changelog-entry h3 { font-size: 1rem; margin: 0 0 .4rem; }
.changelog-entry h4 { font-size: .875rem; margin: .75rem 0 .25rem; color: var(--muted); font-weight: 600; }
.changelog-entry ul { margin: 0; padding-left: 1.2rem; }
.changelog-entry li { margin: .2rem 0; }

/* Media: data stored in the file */
.media-metadata h3 { margin: .7rem 0 .25rem; font-size: .75rem; font-weight: 600; color: var(--text); }
.media-metadata dd { overflow-wrap: anywhere; }
.media-metadata-raw { margin-top: .7rem; }
.media-metadata-raw summary { cursor: pointer; color: var(--muted); }
.media-metadata-raw dl { max-height: 22rem; overflow: auto; margin-top: .4rem; font-family: var(--font-mono, monospace); font-size: .72rem; }

/* Fields shown only for a value of another field (data-show-if) stay hidden whatever their own display is. */
[data-show-if][hidden] { display: none !important; }

/* Gestaltung → Effekte */
.effect-group { margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.effect-entry { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; margin-bottom: 0.4rem; color: inherit; text-decoration: none; }
.effect-entry .module-title { flex: 1; }
.effect-values input { width: 100%; }
.effect-code bloqy-code-editor { width: 100%; height: calc(100vh - 14rem); min-height: 24rem; }
.effect-form { max-width: none; }
.effect-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.35rem 1rem; }

.effect-new-form { display: grid; gap: 0.6rem; min-width: 18rem; }
.effect-head bloqy-confirm, .effect-head form { display: contents; }
.effect-head h1 { display: flex; align-items: center; gap: 0.5rem; }
.effect-back { width: 32px; height: 32px; color: var(--text); }
.effect-back:hover { color: var(--accent); }
.effect-lead { margin: -0.5rem 0 1rem; max-width: 60rem; }
.effect-set-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.effect-name-row { grid-template-columns: 3fr 1fr; }
.effect-new-setting { max-width: 32rem; }
.effect-setting { border-bottom: 1px solid var(--border); }
.effect-setting summary { display: grid; grid-template-columns: minmax(10rem, 1fr) 3fr auto; align-items: baseline; gap: 0.5rem 1rem; padding: 0.55rem 0; cursor: pointer; list-style: none; }
.effect-setting summary::-webkit-details-marker { display: none; }
.effect-setting summary:hover .effect-setting-name { color: var(--accent); }
.effect-setting-name { font-weight: 600; }
.effect-setting-options { color: var(--muted); font-size: 0.875rem; }
.effect-setting-options code, .effect-setting-key code { font-size: 0.75rem; color: var(--muted); }
.effect-setting-key { white-space: nowrap; }
.effect-setting-body { padding: 0.25rem 0 1rem; }
.effect-setting-remove { align-self: end; padding-bottom: 0.5rem; }
.effect-option-move { white-space: nowrap; }
.effect-options td { vertical-align: middle; }
.effect-classes code { margin-right: 0.25rem; }

/* Effekte: lists as editors see them; entry page with editor panel and preview on top. */
.effect-lists { display: grid; gap: 0.75rem; }
.effect-list { padding: 0.9rem 1.1rem; }
.effect-list-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1rem; margin-bottom: 0.5rem; }
.effect-list-head h2 { margin: 0; font-size: 1rem; }
.effect-list-head h2 code, .effect-entries code, .page-header h1 code { font-size: 0.75em; font-weight: 400; color: var(--muted); }
.effect-list-head h2 a { color: inherit; text-decoration: none; }
.effect-list-head h2 a:hover { color: var(--accent); }
.effect-list-actions { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.effect-list-actions form { display: contents; }
.effect-list-head-fields { grid-template-columns: 2fr 2fr 1fr; }
.effect-list-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.35rem 1rem; }
.effect-list-form:has([name=all_types]:checked) .effect-list-types-wrap { display: none; }
.effect-entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.3rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.effect-entries li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.effect-entries a { color: inherit; font-weight: 600; text-decoration: none; }
.effect-entries a:hover { color: var(--accent); }
.effect-dependents { color: var(--muted); flex-basis: 100%; }
.effect-dependents a { font-weight: 400; color: inherit; text-decoration: underline; }
.effect-preview-dialog { width: min(84rem, calc(100vw - 2rem)); }
.effect-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.effect-preview-head h2 { margin: 0; }
.effect-top { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: 1.5rem; align-items: start; }
.effect-panel h2, .effect-preview-bar h2 { margin: 0 0 0.4rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.effect-panel-box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0.75rem; }
.effect-panel-head { margin: 0 0 0.5rem; font-size: 0.8125rem; font-weight: 700; }
.effect-panel-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; gap: 0.25rem 0.5rem; margin: 0 0 0.5rem; font-size: 0.8125rem; font-weight: 600; }
.effect-panel-row select { font-size: 0.8125rem; min-width: 0; }
.effect-panel-row small { grid-column: 1 / -1; font-weight: 400; }
.effect-preview-bar { display: flex; align-items: center; gap: 1rem; min-height: 2rem; }
.effect-preview-bar .button { margin-left: auto; margin-bottom: 0.4rem; }
.effect-preview { display: block; width: 100%; height: min(70vh, 40rem); min-height: 22rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
@media (max-width: 900px) { .effect-top { grid-template-columns: 1fr; } }

/* Projekt → Einstellungen → Suche: state of the index, rebuild in steps with one bar per part (pages, files). */
.search-status { margin: 0 0 1.25rem; }
.search-status-numbers { margin: 0; font-size: 1.05rem; }
.search-job { display: grid; gap: .45rem; max-width: 46rem; margin: 0 0 1.25rem; }
.search-job-head { margin: 0; }
.search-job-bars { display: flex; gap: 3px; }
.search-job-bar { display: grid; gap: .2rem; min-width: 6rem; flex: 1 1 0; }
.search-job-bar progress { width: 100%; height: .8rem; accent-color: var(--primary); }
.search-job-detail { margin: 0; overflow-wrap: anywhere; }
.search-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem; align-items: start; }
.search-kind { display: grid; gap: .3rem; margin-bottom: .6rem; }
.search-folders { margin-left: 1.6rem; }
.search-folder-list { display: grid; gap: .15rem; max-height: 14rem; overflow: auto; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.search-folder-depth-1 { padding-left: 1rem; }
.search-folder-depth-2 { padding-left: 2rem; }
.search-folder-depth-3, .search-folder-depth-4 { padding-left: 3rem; }
.fm-tree-dot { width: .45rem; height: .45rem; margin-left: .35rem; border-radius: 50%; background: var(--primary); flex: none; }

@media (max-width: 900px) {
    .search-layout { grid-template-columns: minmax(0, 1fr); }
}

/* System → Backup: tabs, parts as a tree of checkboxes, chips of what a backup contains. */
.backup-tabs { margin-bottom: 1.25rem; }
.backup-new { display: grid; gap: .75rem; max-width: 760px; }
.backup-new h2 { margin: 1rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 1rem; }
.backup-new > h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.backup-new dl + h2 { margin-top: .5rem; }
.backup-tree ul { list-style: none; margin: 0; padding: 0 0 0 1.6rem; }
.backup-tree > ul { padding-left: 0; }
.backup-tree li > label.checkbox { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem 0; font-weight: 500; }
.backup-tree li li > label.checkbox { font-weight: 400; }
.backup-tree .icon { width: 1rem; height: 1rem; flex: none; }
.backup-tree code { font-size: .8em; color: var(--muted); }
.backup-tree li { position: relative; }
.backup-tree li > .fm-twisty { left: -1.3rem; top: .5rem; margin-top: 0; }
.backup-cloud > h2 { margin-top: 2rem; }
.backup-cloud details { margin-top: .5rem; }
.backup-cloud-list .number { text-align: right; }
.backup-cloud-list .backup-chips { margin: 0; }
.backup-source { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.backup-source select, .backup-source input { width: auto; flex: 0 1 18rem; min-width: 0; margin: 0; }
.backup-options { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.backup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.backup-list td { vertical-align: top; }
.backup-list .nowrap { white-space: nowrap; }
.backup-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin: .35rem 0 0 1.6rem; }
dd.backup-chips { margin: 0; }
.backup-chip { font-size: .72rem; font-weight: 500; }
.backup-chip.is-partial { background: color-mix(in srgb, #f59e0b 18%, transparent); }
.backup-facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.backup-facts dt { color: var(--muted); font-size: .85rem; }
.backup-facts dd { margin: 0; }
.backup-blocked summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.backup-blocked ul { max-height: 14rem; overflow: auto; margin: .5rem 0 0; padding-left: 1.2rem; }
@media (max-width: 640px) {
    .backup-facts { grid-template-columns: 1fr; gap: .1rem; }
    .backup-facts dd { margin-bottom: .45rem; }
    .backup-list th:nth-child(2), .backup-list td:nth-child(2), .backup-list th:nth-child(3), .backup-list td:nth-child(3), .backup-list th:nth-child(4), .backup-list td:nth-child(4) { display: none; }
    .backup-list .entry { word-break: break-all; }
    .backup-chips { margin-left: 0; }
}

/* Simplified editor (Gast-Redakteur): a slim bar instead of the navigation. */
.shell.is-simple { display: block; }
.simple-bar { display: flex; align-items: center; gap: .5rem; padding: .6rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--surface, var(--bg)); }
.simple-bar .brand { display: flex; align-items: center; }
.simple-bar .brand :is(svg, img) { width: auto; height: 28px; }
.simple-bar .spacer { flex: 1; }
.simple-bar form { display: contents; }
.simple-bar .simple-user { color: var(--muted); font-size: .9rem; }
.shell.is-simple .content { max-width: 60rem; margin: 0 auto; }
.release-start { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.release-start a { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 8px; color: inherit; text-decoration: none; }
.release-start a:hover { background: var(--accent-soft); }
.release-start small { display: block; color: var(--muted); }
.release-table tr.is-gone td { opacity: .6; }
.release-section { margin-top: 2.5rem; }
.invitation-link { display: flex; gap: .5rem; align-items: center; }
.invitation-link input { flex: 1; font-family: var(--mono, monospace); }
/* Einbettungscode in the page properties */
textarea.mono { font-family: var(--font-mono); font-size: .8rem; }
/* Gestaltung → Blöcke: deactivated block types, designs and style sets only with "Deaktivierte anzeigen". */
.tabs-inactive { flex: none; font-size: .85rem; white-space: nowrap; }
#module-list:not(.show-inactive) .is-inactive { display: none; }
/* Theme → Typografie */
.typography-table td, .typography-table th { padding-left: .5rem; padding-right: .5rem; }
.typography-table th[scope="row"] { white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .875rem; color: var(--text); }
.typography-table tr.is-child th[scope="row"] { padding-left: 1.5rem; font-weight: 400; }
.form.wide.typography-form, .typography-form fieldset { max-width: none; }
.typography-table select { width: 100%; min-width: 9.5rem; max-width: 11rem; padding-right: 1.6rem; white-space: nowrap; text-overflow: ellipsis; }
.typo-sample { display: inline-block; max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
.typography-sizes input { width: 7rem; }
.typography-line-height { margin-top: .75rem; }
.typography-line-height input { width: 7rem; }
.typo-scale-wrap { max-width: 100%; overflow-x: auto; }
.typo-scale select { max-width: 9rem; }
.typo-scale input { width: 4.25rem; }
.typo-step { width: 4.25rem; text-align: right; }
.typo-step-name { white-space: nowrap; }
.typo-step:not(:placeholder-shown) { font-weight: 700; }
.typo-card > h2 { margin: 0 0 .75rem; font-size: 1rem; }
.typo-card .typo-fonts-toolbar { margin: 0 0 .75rem; justify-content: flex-start; }
.typo-card .font-family { margin: 0 0 1rem; }
.typo-leading { max-width: 20rem; }
.typo-leading .tool-field { display: grid; gap: .3rem; font-size: .875rem; }
.typo-leading input { width: 6rem; }
/* Theme → Variablen as cards (like the tools) */
.var-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 .75rem; }
.var-card-title { flex: 1 1 14rem; max-width: 24rem; padding: .25rem .4rem; border: 1px solid transparent !important; background: transparent !important; font-size: 1rem !important; font-weight: 600; color: var(--text); }
.var-card-title:hover, .var-card-title:focus { border-color: var(--border) !important; background: var(--surface) !important; }
.var-card-head select { width: auto; }
.var-card .variables-table { margin-bottom: .75rem; }
.var-card > h2 { margin: 0 0 .75rem; font-size: 1rem; }
.var-new { display: grid; grid-template-columns: minmax(12rem, 20rem) minmax(8rem, 12rem) auto; align-items: end; gap: .75rem; max-width: 46rem; }
.var-new .tool-field { display: grid; gap: .3rem; font-size: .875rem; }
.font-new { width: min(34rem, calc(100vw - 2rem)); }
.font-new nav.tabs { margin-bottom: .8rem; }
.font-new-files input[type="file"] { padding: 1.2rem .8rem; border: 1px dashed var(--border-strong, var(--border)); border-radius: var(--radius-sm); background: var(--surface-sunken); }
.font-new-faces { width: 100%; }
.font-new-faces td:first-child { overflow-wrap: anywhere; }
.font-new-google .font-weights { display: flex; flex-wrap: wrap; gap: .2rem .7rem; }
.font-new-upload[hidden], .font-new-google[hidden], .font-new-faces[hidden] { display: none; }
.design-form { display: grid; gap: 0; }
.design-breakpoints input { width: 5rem; }
.design-space-options, .design-effects { margin-bottom: .75rem; max-width: 32rem; }
.design-space-options .tool-field, .design-effects .tool-field { display: grid; gap: .3rem; font-size: .875rem; }
.design-space-options .tool-field select { max-width: 14rem; }
.design-breakpoints th[scope=row] code { text-transform: none; font-size: .875rem; }
.design-form .design-choices + .design-choices { margin-top: .6rem; }
.design-form .design-values { grid-template-columns: repeat(3, minmax(7rem, 11rem)); }
.design-form .design-values input { width: 100%; box-sizing: border-box; }
.design-form .design-values label.wide { max-width: 34rem; }
.style-personality { margin: .25rem 0 1rem; padding: .8rem 1rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface-sunken) 50%, var(--surface)); }
.style-personality h3 { margin: 0 0 .6rem; font-size: .875rem; }
.style-personality h3 + .design-choices { margin-bottom: .2rem; }
.style-personality .design-values + h3 { margin-top: 1rem; }
.style-personality .design-values { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); max-width: 46rem; }
.style-personality .design-values input, .style-personality .design-values select { width: 100%; box-sizing: border-box; }
.style-personality .design-values code { font-weight: 400; }
.colors-table th[scope=row] { white-space: nowrap; }
.colors-table .variables-value { min-width: 12rem; }
.colors-table select { width: auto; }
.color-shades { display: inline-flex; border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
.color-shades > span { width: 1.15rem; height: 1.6rem; }
.color-shades > span[data-shade="500"] { width: 1.6rem; }
.colors-table th[scope=row] { text-transform: none; letter-spacing: normal; font-size: .875rem; font-weight: 600; color: var(--text); }

.color-offers { display: flex; flex-wrap: wrap; gap: .1rem .7rem; font-size: .8125rem; white-space: nowrap; }
.color-contrast { display: inline-block; padding: .1rem .45rem; border-radius: var(--radius-sm); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.color-contrast.is-low { background: #fef3c7; color: #8a5a00; }
.color-suggest { gap: .7rem; }
.color-suggest .tool-field { display: grid; gap: .3rem; font-size: .875rem; max-width: 16rem; }
.color-suggest-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.color-suggest-label { min-width: 9rem; font-size: .875rem; font-weight: 600; }
.color-chips { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .8125rem; color: var(--muted); }
.color-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem .25rem .3rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .8125rem; cursor: pointer; }
.color-chip:hover { border-color: var(--text); }
.color-chip-swatch { width: 1.1rem; height: 1.1rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.color-preview { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; }
.color-preview-page { display: grid; gap: .75rem; align-content: start; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
.color-preview-page h3 { margin: 0; font-size: 1.25rem; }
.color-preview-page p { margin: 0; }
.color-preview-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.color-preview-btn { display: inline-block; padding: .5rem 1rem; border: 2px solid transparent; border-radius: .5rem; font-weight: 600; font-size: .875rem; }
.color-preview-card { padding: .9rem 1rem; border: 1px solid; border-radius: .5rem; }
.color-preview-card p { margin: .3rem 0 0; font-size: .875rem; }
.color-preview-notices { display: grid; gap: .4rem; }
.color-preview-notice { padding: .55rem .8rem; border: 1px solid; border-radius: .4rem; font-size: .8125rem; }
.color-preview-surfaces { display: grid; gap: .5rem; align-content: start; }
.color-preview-surface { display: grid; gap: .15rem; padding: .8rem 1rem; border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); font-size: .875rem; }
@media (max-width: 900px) { .color-preview { grid-template-columns: minmax(0, 1fr); } }
.colors-table td, .colors-table th { white-space: nowrap; }
.colors-table select { min-width: 11.5rem; }
.colors-table input:not([type=color]) { min-width: 7rem; }
bloqy-remove-rows.typo-scale-wrap { display: block; }
.colors-table .variables-value input:not([type=color]) { width: 7.5rem; min-width: 0; }
.colors-table input[name$="[label]"] { width: 8.5rem; }
.colors-table input[name$="[name]"] { width: 8rem; }
.colors-table .color-shades > span { width: .95rem; } .colors-table .color-shades > span[data-shade="500"] { width: 1.3rem; }
.colors-table .color-var { display: block; margin-top: .1rem; font-size: .75rem; font-weight: 400; color: var(--muted); }
.sticky-save .button.is-busy { position: relative; color: transparent; pointer-events: none; }
.sticky-save .button.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: fm-spin .8s linear infinite; }
.sticky-save .button:disabled.is-busy { opacity: 1; }
.design-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .75rem; }
.design-card-head h2 { margin: 0; font-size: 1rem; }
.bp-view { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto 1fr auto auto; background: var(--surface); color: var(--text); overflow: hidden; }
.bp-view-head { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.bp-view-head strong { font-size: 1rem; }
.bp-view-screen { flex: 1; color: var(--muted); font-size: .9rem; }
.bp-view-bands { position: relative; }
.bp-view-band { position: absolute; top: 0; bottom: 0; display: grid; align-content: center; justify-items: center; gap: .3rem; border-right: 1px solid var(--border); background: var(--surface-sunken); overflow: hidden; }
.bp-view-band:nth-child(4n+3) { background: color-mix(in srgb, var(--surface-sunken) 50%, var(--surface)); }
.bp-view-band.is-active { background: var(--accent-soft); }
.bp-view-name { font-size: clamp(1.25rem, 4vw, 3rem); font-weight: 700; font-family: var(--font-mono, monospace); }
.bp-view-range { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.bp-view-handle { position: absolute; top: 0; bottom: 0; width: 15px; margin-left: -7px; cursor: ew-resize; touch-action: none; z-index: 2; }
.bp-view-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 6px; width: 3px; background: var(--text); opacity: .35; }
.bp-view-handle:hover::before, .bp-view-handle:active::before { opacity: .8; }
.bp-view-handle span { position: absolute; top: .75rem; left: 12px; padding: .15rem .45rem; border-radius: var(--radius-sm); background: var(--text); color: var(--surface); font-size: .75rem; white-space: nowrap; }
.bp-view-hint { margin: 0; padding: .6rem 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.bp-view-beyond { padding: 0 1.25rem .8rem; color: var(--muted); font-size: .85rem; }
.bp-view-beyond:empty { display: none; }
.bp-view-band { border-left: 1px solid var(--border); }
.bp-view-band.is-narrow .bp-view-name { font-size: 1rem; writing-mode: vertical-rl; }
.bp-view-band.is-narrow .bp-view-range { display: none; }
.bp-view-handle.is-left span { left: auto; right: 12px; }
.bp-view-zoom { display: inline-flex; align-items: center; gap: .35rem; }
.bp-view-zoom output { min-width: 7.5rem; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.bp-view-zoom .button { min-width: 2rem; justify-content: center; font-size: 1rem; }
.typo-fluid { margin-bottom: .75rem; max-width: 32rem; }
.connection-log { margin-top: .5rem; }
.connection-log pre { max-height: 18rem; overflow: auto; padding: .6rem .75rem; border-radius: 6px; background: var(--surface-2); font-size: .8rem; white-space: pre-wrap; word-break: break-all; }

/* Tools → Postausgang: list of the mails left, the opened mail right (like a mail program). */
.outbox-test { display: flex; gap: .4rem; margin: 0; }
.outbox-test input { width: 16rem; }
.outbox-diagnosis { margin-bottom: 1rem; }
.outbox-diagnosis h2 { margin-top: 0; }
.outbox-dns { display: grid; gap: .35rem; margin: .5rem 0; padding: 0; list-style: none; }
.outbox-dns li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.outbox-dns strong { min-width: 3.5rem; }
.outbox-log { max-height: 18rem; overflow: auto; padding: .6rem; border-radius: var(--radius-sm); background: var(--surface-sunken); font-size: .75rem; white-space: pre-wrap; }
.outbox { display: grid; grid-template-columns: minmax(18rem, 24rem) 1fr; min-height: 70vh; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.outbox-list { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); }
.outbox-search { margin: 0; padding: .6rem; border-bottom: 1px solid var(--border); }
.outbox-search input { width: 100%; }
.outbox-filters { display: flex; flex-wrap: wrap; gap: .25rem; padding: .5rem .6rem; border-bottom: 1px solid var(--border); }
.outbox-filters a { padding: .15rem .55rem; border-radius: 999px; color: var(--muted); font-size: .75rem; font-weight: 600; text-decoration: none; }
.outbox-filters a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.outbox-list ul { flex: 1; margin: 0; padding: 0; overflow-y: auto; max-height: 75vh; list-style: none; }
.outbox-list li + li { border-top: 1px solid var(--border); }
.outbox-list li a { display: flex; gap: .6rem; padding: .6rem .75rem; color: var(--text); text-decoration: none; }
.outbox-list li a:hover { background: var(--surface-sunken); }
.outbox-list li a[aria-current="true"] { background: var(--accent-soft); }
.outbox-list .outbox-dot { margin-top: .4rem; }
.outbox-item { display: grid; min-width: 0; flex: 1; font-size: .8125rem; }
.outbox-row { display: flex; gap: .5rem; justify-content: space-between; min-width: 0; }
.outbox-row strong, .outbox-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outbox-row time { flex: none; color: var(--muted); font-size: .75rem; }
.outbox-empty { padding: .75rem; }
.outbox-dot { display: inline-block; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--border-strong); }
.outbox-dot.is-queued { background: var(--warning); }
.outbox-dot.is-sent, .outbox-dot.is-ok { background: #22C55E; }
.outbox-dot.is-failed { background: var(--danger); }
.outbox-mail { min-width: 0; padding: 1rem 1.25rem; }
.outbox-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; }
.outbox-head h2 { margin: 0; }
.outbox-state { display: inline-flex; align-items: center; gap: .4rem; padding: .1rem .55rem; border-radius: 999px; background: var(--surface-sunken); font-size: .75rem; font-weight: 700; }
.outbox-state.is-failed { background: var(--error-bg); color: var(--error-text); }
.outbox-state.is-sent { background: var(--success-bg); color: var(--success-text); }
.outbox-meta { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .9rem; margin: 0 0 .75rem; font-size: .8125rem; }
.outbox-meta dt { color: var(--muted); }
.outbox-meta dd { margin: 0; overflow-wrap: anywhere; }
.outbox-attachments { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .75rem; padding: 0; list-style: none; }
.outbox-resend { display: flex; gap: .4rem; margin: 0 0 1rem; }
.outbox-resend input { flex: 1; max-width: 26rem; }
.outbox-frame { display: block; width: 100%; height: 60vh; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.outbox-text { max-height: 60vh; overflow: auto; padding: .75rem; border-radius: var(--radius-sm); background: var(--surface-sunken); font-size: .8rem; white-space: pre-wrap; }
.outbox-history { display: grid; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .8125rem; }
.outbox-history li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.outbox-history time { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
    .outbox { grid-template-columns: 1fr; }
    .outbox-list { border-right: 0; border-bottom: 1px solid var(--border); }
    .outbox-list ul { max-height: 40vh; }
}

/* Entwicklung → Daten: data stores of PHP snippets and Automationen. */
.data-add { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1rem; }
.data-add input:not([type="checkbox"]):not([type="file"]) { flex: 1; min-width: 10rem; max-width: 18rem; }
.data-value { display: flex; align-items: flex-start; gap: .4rem; margin: 0; }
.data-value textarea { flex: 1; min-width: 12rem; font-family: var(--font-mono); font-size: .8rem; }
.data-entries td:first-child { width: 1%; white-space: nowrap; }
