/* ── Platform-operator area (/ops) ─────────────────────────────────────────────
   Shell, building blocks and pages of OpsLayout after the owner-approved mockup (17.11.2026), light and dark.
   Everything is scoped under .cx-ops-shell: these files load globally, the tenant app must not see any of it.

   Theme: light by default; dark with data-theme="dark" (chosen in the shell, cookie cx-ops-theme) or, without a
   choice, when the system asks for it. The older pages still use the --ops-* names of the former dark console; they
   are mapped onto the same tokens, so those pages follow the theme until their own package redraws them. */

.cx-ops-shell {
    --ops-bg: #FAF7F2;
    --ops-panel: #FFFFFF;
    --ops-panel-2: #F0ECE4;
    --ops-sand-2: #E8E2D4;
    --ops-field: #F3EFE8;
    --ops-ink: #1C1915;
    --ops-fg2: #4A443C;
    --ops-muted: #6F685D;
    --ops-faint: #A39B8E;
    --ops-hairline: rgba(28, 25, 21, .10);
    --ops-hairline-soft: rgba(28, 25, 21, .05);
    --ops-hairline-strong: rgba(28, 25, 21, .16);
    --ops-field-border: rgba(28, 25, 21, .28);
    --ops-accent: #B8601F;
    --ops-accent-text: #8A4514;
    --ops-accent-btn: #AD5A1C;
    --ops-accent-soft: rgba(184, 96, 31, .10);
    --ops-accent-tint: rgba(184, 96, 31, .14);
    --ops-ok: #2E6B4A;
    --ops-warn: #7A5309;
    --ops-danger: #8A3229;
    --ops-info: #1F4A82;
    --ops-sb-bg: #141B24;
    --ops-sb-bg-2: #1B2430;
    --ops-sb-text: rgba(255, 255, 255, .74);
    --ops-sb-muted: rgba(255, 255, 255, .48);
    --ops-sb-hover: rgba(255, 255, 255, .07);
    --ops-sb-border: rgba(255, 255, 255, .08);
    --ops-sb-active-bg: rgba(184, 96, 31, .22);
    --ops-sb-active-fg: #EBA874;
    --ops-nb-fg: rgba(255, 255, 255, .78);
    --ops-nb-bad-bg: rgba(239, 127, 115, .20);
    --ops-nb-bad-fg: #F5A39A;
    --ops-nb-work-bg: rgba(217, 139, 79, .20);
    --ops-nb-work-fg: #F2B98C;
    --ops-sb-strong: #FFFFFF;
    --ops-logo-ring: #D98B4F;
    --ops-scope-icon: #EBA874;
    --ops-on-accent: #FFFFFF;
    --ops-sb-edge: rgba(0, 0, 0, .3);
    --ops-topbar: rgba(250, 247, 242, .92);
    --ops-scope-bg: #1B2430;
    --ops-scope-fg: #FFFFFF;
    --ops-shadow: 0 1px 2px rgba(28, 25, 21, .06), 0 8px 24px rgba(28, 25, 21, .08);
    --ops-scrim: rgba(28, 25, 21, .36);
    --ops-skel: rgba(28, 25, 21, .07);
    /* Placeholders in the shell (central token of app.css) follow the Ops theme. */
    --cx-placeholder-color: var(--ops-muted);
    --ops-sb-w: 248px;
    --ops-tb-h: 52px;

    color-scheme: light;
}

.cx-ops-shell[data-theme="dark"] {
    --ops-bg: #13110E;
    --ops-panel: #1A1714;
    --ops-panel-2: #221E1A;
    --ops-sand-2: #2A251F;
    --ops-field: #24201B;
    --ops-ink: #EEE9E1;
    --ops-fg2: #C9C1B4;
    --ops-muted: #A39B8E;
    --ops-faint: #7A7266;
    --ops-hairline: rgba(255, 255, 255, .09);
    --ops-hairline-soft: rgba(255, 255, 255, .05);
    --ops-hairline-strong: rgba(255, 255, 255, .15);
    --ops-field-border: rgba(255, 255, 255, .22);
    --ops-accent: #D98B4F;
    --ops-accent-text: #E6A06B;
    --ops-accent-btn: #8A4514;
    --ops-accent-soft: rgba(217, 139, 79, .13);
    --ops-accent-tint: rgba(217, 139, 79, .18);
    --ops-ok: #7FD0A0;
    --ops-warn: #EBC06B;
    --ops-danger: #F59A90;
    --ops-info: #8DBBEA;
    --ops-sb-bg: #0C0B09;
    --ops-sb-bg-2: #110F0D;
    --ops-sb-active-bg: rgba(217, 139, 79, .18);
    --ops-sb-active-fg: #E6A06B;
    --ops-topbar: rgba(19, 17, 14, .92);
    --ops-scope-bg: rgba(235, 168, 116, .14);
    --ops-scope-fg: #F2B98C;
    --ops-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
    --ops-scrim: rgba(0, 0, 0, .55);
    --ops-skel: rgba(255, 255, 255, .07);

    color-scheme: dark;
}

/* Without a choice in the shell: the system decides. Same values as [data-theme="dark"]. */
@media (prefers-color-scheme: dark) {
    .cx-ops-shell:not([data-theme]) {
        --ops-bg: #13110E;
        --ops-panel: #1A1714;
        --ops-panel-2: #221E1A;
        --ops-sand-2: #2A251F;
        --ops-field: #24201B;
        --ops-ink: #EEE9E1;
        --ops-fg2: #C9C1B4;
        --ops-muted: #A39B8E;
        --ops-faint: #7A7266;
        --ops-hairline: rgba(255, 255, 255, .09);
        --ops-hairline-soft: rgba(255, 255, 255, .05);
        --ops-hairline-strong: rgba(255, 255, 255, .15);
        --ops-field-border: rgba(255, 255, 255, .22);
        --ops-accent: #D98B4F;
        --ops-accent-text: #E6A06B;
        --ops-accent-btn: #8A4514;
        --ops-accent-soft: rgba(217, 139, 79, .13);
        --ops-accent-tint: rgba(217, 139, 79, .18);
        --ops-ok: #7FD0A0;
        --ops-warn: #EBC06B;
        --ops-danger: #F59A90;
        --ops-info: #8DBBEA;
        --ops-sb-bg: #0C0B09;
        --ops-sb-bg-2: #110F0D;
        --ops-sb-active-bg: rgba(217, 139, 79, .18);
        --ops-sb-active-fg: #E6A06B;
        --ops-topbar: rgba(19, 17, 14, .92);
        --ops-scope-bg: rgba(235, 168, 116, .14);
        --ops-scope-fg: #F2B98C;
        --ops-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .45);
        --ops-scrim: rgba(0, 0, 0, .55);
        --ops-skel: rgba(255, 255, 255, .07);

        color-scheme: dark;
    }
}

/* ── Shell: sidebar | column (top bar + page) ───────────────────────────────── */

/* app.css sets `html, body { overflow: clip }` (the main app scrolls inside .erp-content), so the shell owns its scroll
   containers: the page column scrolls, the sidebar scrolls its own list. */
.cx-ops-shell {
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-columns: var(--ops-sb-w) minmax(0, 1fr);
    overflow: hidden;
    background: var(--ops-bg);
    color: var(--ops-ink);
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.45;
}

.cx-ops-shell.is-collapsed { --ops-sb-w: 64px; }
.cx-ops-shell ::selection { background: var(--ops-accent-tint); }
.cx-ops-shell .ph { line-height: 1; }

.ops-sb {
    background: linear-gradient(180deg, var(--ops-sb-bg), var(--ops-sb-bg-2));
    color: var(--ops-sb-text);
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--ops-sb-edge);
    z-index: 20;
}

.ops-sb-head { height: var(--ops-tb-h); display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--ops-sb-border); flex-shrink: 0; }
.ops-sb-logo { width: 32px; height: 32px; border-radius: var(--cx-radius-control); display: grid; place-items: center; border: 1.5px solid var(--ops-logo-ring); color: var(--ops-scope-icon); font-size: 18px; flex-shrink: 0; }
.ops-sb-brand { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ops-sb-strong); letter-spacing: -.01em; white-space: nowrap; }
.ops-sb-brand .x { color: var(--ops-sb-active-fg); }
.ops-sb-brand small { display: block; font-family: var(--font-sans); font-weight: 500; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ops-sb-muted); margin-top: -2px; }
.cx-ops-shell .ops-sb-close { display: none; margin-left: auto; }

.ops-sb-nav { flex: 1; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.ops-nav-title { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ops-sb-muted); padding: 12px 10px 4px; white-space: nowrap; }
.ops-sb-nav a { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: var(--cx-radius-control); color: var(--ops-sb-text); font-weight: 500; text-decoration: none; position: relative; margin-bottom: 1px; white-space: nowrap; }
.ops-sb-nav a i { font-size: 18px; width: 20px; text-align: center; flex-shrink: 0; }
.ops-sb-nav a .t { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ops-sb-nav a:hover { background: var(--ops-sb-hover); color: var(--ops-sb-strong); }
.ops-sb-nav a:focus-visible { outline: 2px solid var(--ops-sb-active-fg); outline-offset: -2px; }
.ops-sb-nav a.active { background: var(--ops-sb-active-bg); color: var(--ops-sb-active-fg); font-weight: 600; }
.ops-nb { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--cx-radius-round); display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--ops-nb-fg); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ops-nb.bad { background: var(--ops-nb-bad-bg); color: var(--ops-nb-bad-fg); }
.ops-nb.work { background: var(--ops-nb-work-bg); color: var(--ops-nb-work-fg); }
.cx-ops-shell.is-collapsed .ops-nb { position: absolute; top: 4px; right: 6px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--ops-sb-muted); }
.cx-ops-shell.is-collapsed .ops-nb.bad { background: var(--ops-nb-bad-fg); }
.cx-ops-shell.is-collapsed .ops-nb.work { background: var(--ops-nb-work-fg); }
.ops-sb-nav a.active::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 4px; background: var(--ops-accent); border-radius: 0 var(--cx-radius-control) var(--cx-radius-control) 0; }

.ops-sb-foot { border-top: 1px solid var(--ops-sb-border); padding: 10px 8px; display: flex; align-items: center; gap: 6px; }
.ops-sb-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.ops-sb-who > i { font-size: 26px; color: var(--ops-sb-muted); flex-shrink: 0; }
.ops-sb-who .t { min-width: 0; }
.ops-sb-who b { display: block; color: var(--ops-sb-strong); font-size: 13px; font-weight: 600; }
.ops-sb-who small { display: block; font-size: 11.5px; color: var(--ops-sb-muted); white-space: nowrap; }
.ops-sb .ops-iconbtn { color: var(--ops-sb-text); }
.ops-sb .ops-iconbtn:hover { background: var(--ops-sb-hover); color: var(--ops-sb-strong); border-color: transparent; }

/* Collapsed: symbols only; the names stay for screen readers. */
.cx-ops-shell.is-collapsed .ops-sb-brand,
.cx-ops-shell.is-collapsed .ops-nav-title,
.cx-ops-shell.is-collapsed .ops-sb-nav a .t,
.cx-ops-shell.is-collapsed .ops-sb-who .t  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cx-ops-shell.is-collapsed .ops-sb-head { padding: 0 16px; }
.cx-ops-shell.is-collapsed .ops-sb-nav a { justify-content: center; padding: 8px 0; }
.cx-ops-shell.is-collapsed .ops-nav-title { position: static; width: auto; height: 1px; margin: 8px 10px; padding: 0; background: var(--ops-sb-border); clip: auto; }
.cx-ops-shell.is-collapsed .ops-sb-foot { flex-direction: column; }
.cx-ops-shell.is-collapsed .ops-sb-who { justify-content: center; padding: 0; }
.cx-ops-shell.is-collapsed .ops-sb-toggle i { transform: rotate(180deg); }

.ops-scrim { display: none; }

.ops-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: clip; }
.ops-topbar { position: sticky; top: 0; z-index: 15; height: var(--ops-tb-h); flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: var(--ops-topbar); border-bottom: 1px solid var(--ops-hairline); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cx-ops-shell .ops-menu { display: none; }
.cx-ops-shell .ops-ptitle { display: none; flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-find { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 440px; min-width: 0; height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--cx-radius-control); background: var(--ops-field); color: var(--ops-muted); font: inherit; text-align: left; cursor: pointer; }
.ops-find:hover { border-color: var(--ops-hairline-strong); }
.ops-find:focus-visible { outline: 2px solid var(--ops-accent); outline-offset: 1px; }
.ops-find i { font-size: 16px; color: var(--ops-fg2); }
.ops-find .t { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ops-kbd { font-family: var(--font-mono, ui-monospace, monospace); font-size: 10.5px; padding: 1px 6px; border-radius: var(--cx-radius-control); background: var(--ops-panel-2); color: var(--ops-fg2); border: 1px solid var(--ops-hairline); white-space: nowrap; }

.ops-pal-scrim { position: fixed; inset: 0; background: var(--ops-scrim); z-index: 1500; }
.ops-pal { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); max-height: 72vh; background: var(--ops-panel); color: var(--ops-ink); border-radius: var(--cx-radius-surface); box-shadow: var(--ops-shadow); z-index: 1501; display: flex; flex-direction: column; overflow: hidden; }
.ops-pal[hidden], .ops-pal-scrim[hidden] { display: none; }
.ops-pal-in { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--ops-hairline); }
.ops-pal-in i { font-size: 20px; color: var(--ops-fg2); }
.ops-pal-in input::placeholder { color: var(--cx-placeholder-color); opacity: 1; }
.ops-pal-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ops-ink); font: inherit; font-size: 16px; }
.ops-pal-list { overflow-y: auto; padding: 6px; }
.ops-pal-i { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--cx-radius-control); color: var(--ops-ink); text-decoration: none; cursor: pointer; }
.ops-pal-i i { font-size: 18px; color: var(--ops-fg2); width: 20px; text-align: center; }
.ops-pal-i .t { flex: 1; }
.ops-pal-i.on { background: var(--ops-accent-soft); color: var(--ops-accent-text); }
.ops-pal-i.on i { color: var(--ops-accent-text); }
.ops-pal-i:hover { background: var(--ops-panel-2); color: var(--ops-ink); }
.ops-pal-empty { padding: 16px; color: var(--ops-muted); }
.ops-pal-foot { padding: 9px 16px; border-top: 1px solid var(--ops-hairline); color: var(--ops-muted); font-size: 12px; }

.ops-scope { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--cx-radius-control); background: var(--ops-scope-bg); color: var(--ops-scope-fg); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ops-scope i { color: var(--ops-scope-icon); font-size: 14px; }
.ops-theme .ops-theme-light { display: none; }
.cx-ops-shell[data-theme="dark"] .ops-theme .ops-theme-dark { display: none; }
.cx-ops-shell[data-theme="dark"] .ops-theme .ops-theme-light { display: inline; }
@media (prefers-color-scheme: dark) {
    .cx-ops-shell:not([data-theme]) .ops-theme .ops-theme-dark { display: none; }
    .cx-ops-shell:not([data-theme]) .ops-theme .ops-theme-light { display: inline; }
}

.cx-ops-main { flex: 1; width: 100%; padding: 0 0 40px; }

/* Older pages (PageHeader, toolbars, cards, tables) keep their content until their package: everything placed directly
   in the page that is not one of the new full-width blocks gets the page gutter. */
.cx-ops-main > :not(.ops-head):not(.ops-dash):not(.ops-ws):not(.ops-steps) { margin-left: 24px; margin-right: 24px; }
.cx-ops-main > .cx-page-header { padding: 18px 0 6px; background: transparent; border: 0; box-shadow: none; }
.cx-ops-main .cx-page-header h1 { color: var(--ops-ink); font-family: var(--font-display); font-size: 22px; }
.cx-ops-main .cx-page-header h1 i { color: var(--ops-accent); }
.cx-ops-main .cx-header-subtitle { color: var(--ops-muted); }

/* ── Building blocks ──────────────────────────────────────────────────────────── */

.ops-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ops-iconbtn { width: 32px; height: 32px; border-radius: var(--cx-radius-control); border: 1px solid transparent; background: transparent; color: var(--ops-fg2); display: inline-grid; place-items: center; font-size: 17px; flex-shrink: 0; text-decoration: none; cursor: pointer; }
.ops-iconbtn:hover { background: var(--ops-panel-2); border-color: var(--ops-hairline); color: var(--ops-ink); }
.ops-iconbtn:focus-visible { outline: 2px solid var(--ops-accent); outline-offset: 1px; }
.ops-iconbtn[disabled] { opacity: .5; cursor: default; }
.ops-spin { animation: ops-spin 1s linear infinite; }
@keyframes ops-spin { to { transform: rotate(360deg); } }

.ops-btn { height: 34px; padding: 0 14px; border-radius: var(--cx-radius-control); border: 1px solid var(--ops-hairline-strong); background: var(--ops-panel); color: var(--ops-ink); font: inherit; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; cursor: pointer; text-decoration: none; }
.ops-btn:hover { border-color: var(--ops-fg2); }
.ops-btn:focus-visible { outline: 2px solid var(--ops-accent); outline-offset: 1px; }
.ops-btn.primary { background: var(--ops-accent-btn); border-color: var(--ops-accent-btn); color: var(--ops-on-accent); font-weight: 600; }
.ops-btn.primary:hover { filter: brightness(.92); }
.ops-btn.outline { border-color: var(--ops-accent); color: var(--ops-accent-text); }
.ops-btn.danger { border-color: var(--ops-danger); color: var(--ops-danger); }
.ops-btn[disabled] { opacity: .5; cursor: not-allowed; }

.ops-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: var(--cx-radius-control); background: var(--ops-panel-2); color: var(--ops-fg2); white-space: nowrap; }
.ops-chip.ok { background: color-mix(in srgb, var(--ops-ok) 13%, transparent); color: var(--ops-ok); }
.ops-chip.bad { background: color-mix(in srgb, var(--ops-danger) 12%, transparent); color: var(--ops-danger); }
.ops-chip.warn { background: color-mix(in srgb, var(--ops-warn) 13%, transparent); color: var(--ops-warn); }
.ops-chip.cu { background: var(--ops-accent-soft); color: var(--ops-accent-text); }

.ops-count { min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--cx-radius-round); display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ops-ink); font-variant-numeric: tabular-nums; }
.ops-count.zero { color: var(--ops-muted); }
.ops-count.work { background: var(--ops-accent-soft); color: var(--ops-accent-text); }

.ops-meta { font-weight: 500; color: var(--ops-muted); font-size: 12px; }

/* Page head */
.ops-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 24px 14px; border-bottom: 1px solid var(--ops-hairline); background: var(--ops-bg); }
.ops-head-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1 1 auto; }
.ops-head h1 { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.015em; margin: 0; white-space: nowrap; color: var(--ops-ink); }
.ops-head-sub { color: var(--ops-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ops-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ops-stand { font-size: 12px; color: var(--ops-muted); white-space: nowrap; }

/* States */
.ops-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--ops-fg2); }
.ops-state > i { font-size: 26px; color: var(--ops-faint); }
.ops-state b { color: var(--ops-ink); font-weight: 600; }
.ops-state > span { font-size: 12.5px; color: var(--ops-muted); max-width: 46ch; }
.ops-state .ops-btn { margin-top: 6px; }
.ops-state-error > i { color: var(--ops-danger); }
.ops-state-loading { align-items: stretch; gap: 10px; padding: 16px; }
.ops-skel { display: block; height: 44px; border-radius: var(--cx-radius-control); background: var(--ops-skel); animation: ops-pulse 1.4s ease-in-out infinite; }
.ops-skel:nth-child(3n) { width: 82%; }
@keyframes ops-pulse { 50% { opacity: .55; } }
/* Entry of the older pages' cards and tiles — a short staggered rise. */
@keyframes ops-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Card */
.ops-card { background: var(--ops-panel); border: 1px solid var(--ops-hairline); border-radius: var(--cx-radius-surface); padding: 14px 16px; min-width: 0; }
.ops-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ops-card-head h2 { font-size: 13px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; color: var(--ops-ink); }
.ops-card-head h2 i { font-size: 16px; color: var(--ops-fg2); }
.ops-card-head > :not(h2) { margin-left: auto; }

/* Step bar */
.ops-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; border-bottom: 1px solid var(--ops-hairline); background: var(--ops-panel); overflow-x: auto; scrollbar-width: none; }
.ops-step button { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 0; background: transparent; color: var(--ops-fg2); font: inherit; text-align: left; position: relative; white-space: nowrap; cursor: pointer; }
.ops-step button[disabled] { cursor: default; opacity: .7; }
.ops-step button:not([disabled]):hover { background: var(--ops-panel-2); }
.ops-step-no { width: 24px; height: 24px; border-radius: var(--cx-radius-round); display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--ops-panel-2); border: 1px solid var(--ops-hairline-strong); color: var(--ops-fg2); flex-shrink: 0; }
.ops-step-t b { display: block; font-weight: 600; color: var(--ops-ink); }
.ops-step-t small { display: block; font-size: 11.5px; color: var(--ops-muted); }
.ops-step.on button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--ops-accent); border-radius: var(--cx-radius-control) var(--cx-radius-control) 0 0; }
.ops-step.on .ops-step-no { border-color: var(--ops-accent); color: var(--ops-accent-text); }
.ops-step.done .ops-step-no { background: transparent; border-color: var(--ops-ok); color: var(--ops-ok); }

/* Check list */
.ops-checklist { display: flex; flex-direction: column; border: 1px solid var(--ops-hairline-strong); border-radius: var(--cx-radius-surface); overflow: hidden; background: var(--ops-panel); }
.ops-check { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--ops-hairline-soft); background: transparent; color: var(--ops-ink); font: inherit; text-align: left; cursor: pointer; }
.ops-check:last-child { border-bottom: 0; }
.ops-check:hover { background: var(--ops-panel-2); }
.ops-check:focus-visible { outline: 2px solid var(--ops-accent); outline-offset: -2px; }
.ops-check.on { background: var(--ops-accent-soft); }
.ops-check.off { cursor: default; opacity: .6; }
.ops-check-t b { display: block; font-weight: 600; }
.ops-check-t small { display: block; font-size: 12px; color: var(--ops-muted); margin-top: 1px; }
.ops-check-aside { font-size: 12px; color: var(--ops-muted); white-space: nowrap; }
.ops-cb { width: 16px; height: 16px; margin-top: 2px; border-radius: var(--cx-radius-control); border: 1.5px solid var(--ops-field-border); background: var(--ops-panel); display: inline-grid; place-items: center; }
.ops-cb.on { background: var(--ops-accent-btn); border-color: var(--ops-accent-btn); }
.ops-cb.on::after { content: ""; width: 8px; height: 4px; border: 2px solid var(--ops-on-accent); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }

/* Segment (SegmentedChoice, design standard 47) on the operator ground */
.cx-ops-shell .cxf-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--cx-radius-control); background: var(--ops-field); border: 1px solid var(--ops-hairline); }
.cx-ops-shell .cxf-seg button { border: 1px solid transparent; background: transparent; height: 28px; padding: 0 12px; border-radius: var(--cx-radius-control); font-size: 12.5px; color: var(--ops-fg2); font-weight: 500; white-space: nowrap; }
.cx-ops-shell .cxf-seg button[aria-pressed="true"] { background: var(--ops-panel); border-color: var(--ops-hairline-strong); color: var(--ops-ink); font-weight: 600; box-shadow: 0 1px 2px var(--ops-hairline); }

/* Work surface: filter | list | panel */
.ops-ws { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100dvh - var(--ops-tb-h) - 62px); }
.ops-ws.has-filter { grid-template-columns: 260px minmax(0, 1fr); }
.ops-ws.has-panel { grid-template-columns: minmax(0, 1fr) 380px; }
.ops-ws.has-filter.has-panel { grid-template-columns: 260px minmax(0, 1fr) 380px; }
.ops-ws-filter { background: var(--ops-panel-2); border-right: 1px solid var(--ops-hairline-strong); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ops-ws-list { display: flex; flex-direction: column; min-width: 0; background: var(--ops-panel); }
.ops-ws-panel { background: var(--ops-panel); border-left: 1px solid var(--ops-hairline-strong); min-width: 0; display: flex; flex-direction: column; }
.cx-ops-shell .ops-ws-close { display: none; }

.ops-fitem { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--cx-radius-control); background: transparent; color: var(--ops-ink); font: inherit; text-align: left; position: relative; cursor: pointer; }
.ops-fitem i { font-size: 17px; color: var(--ops-fg2); }
.ops-fitem .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-fitem:hover { background: var(--ops-sand-2); }
.ops-fitem.on { background: var(--ops-accent-tint); color: var(--ops-accent-text); font-weight: 600; }
.ops-fitem.on i { color: var(--ops-accent-text); }
.ops-fitem.on::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 4px; background: var(--ops-accent); border-radius: 0 var(--cx-radius-control) var(--cx-radius-control) 0; }

.ops-row { display: grid; gap: 12px; align-items: center; width: 100%; padding: 11px 16px; border: 0; border-bottom: 1px solid var(--ops-hairline-soft); background: transparent; color: var(--ops-ink); font: inherit; text-align: left; position: relative; cursor: pointer; }
.ops-row:hover, .ops-row.on { background: var(--ops-panel-2); }
.ops-row.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ops-accent); }
.ops-row:focus-visible { outline: 2px solid var(--ops-accent); outline-offset: -2px; }

.ops-panel-title { text-align: center; padding: 14px 16px 12px; }
.ops-panel-title h2 { font-size: 15px; font-weight: 700; margin: 0; color: var(--ops-ink); }
.ops-panel-title small { display: block; font-weight: 500; font-size: 12px; color: var(--ops-muted); margin-top: 2px; }
.ops-panel-primary { padding: 0 16px; display: flex; gap: 8px; margin-bottom: 6px; }
.ops-panel-primary > .ops-btn { flex: 1 1 auto; height: 38px; }
.ops-psec { padding: 0 16px 6px; }
.ops-psec-h { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ops-muted); font-weight: 600; }
.ops-psec-h::before, .ops-psec-h::after { content: ""; flex: 1; height: 1px; background: var(--ops-hairline); }

/* Own dialog */
.ops-scrim-dlg { position: fixed; inset: 0; background: var(--ops-scrim); z-index: 1400; }
.ops-dlg { position: fixed; top: 18vh; left: 50%; transform: translateX(-50%); width: min(460px, calc(100vw - 32px)); background: var(--ops-panel); color: var(--ops-ink); border-radius: var(--cx-radius-surface); box-shadow: var(--ops-shadow); z-index: 1401; padding: 18px 20px; }
.ops-dlg h2 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.ops-dlg-body { color: var(--ops-fg2); font-size: 13.5px; }
.ops-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ── Übersicht ──────────────────────────────────────────────────────────────── */

.ops-dash { padding: 20px 24px 32px; display: flex; flex-direction: column; gap: 22px; max-width: 1600px; }
.ops-h2 { font-size: 13px; font-weight: 700; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; color: var(--ops-ink); }
.ops-h2 i { font-size: 16px; }
.ops-h2.bad { color: var(--ops-danger); }
.ops-att-wrap { display: flex; flex-direction: column; }
.ops-att + .ops-h2 { margin-top: 18px; }
.ops-att { background: var(--ops-panel); border: 1px solid var(--ops-hairline); border-radius: var(--cx-radius-surface); overflow: hidden; }
.ops-att.broken { border-left: 3px solid var(--ops-danger); }
.ops-att-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--ops-hairline-soft); color: var(--ops-ink); text-decoration: none; }
.ops-att-row:last-child { border-bottom: 0; }
.ops-att-row[href]:hover { background: var(--ops-panel-2); color: var(--ops-ink); }
.ops-att-row:not([href]) { grid-template-columns: 30px minmax(0, 1fr); }
.ops-att-row:focus-visible { outline: 2px solid var(--ops-accent); outline-offset: -2px; }
.ops-att-ic { width: 30px; height: 30px; border-radius: var(--cx-radius-control); display: grid; place-items: center; font-size: 17px; background: var(--ops-accent-soft); color: var(--ops-accent-text); }
.ops-att-ic.bad { background: color-mix(in srgb, var(--ops-danger) 12%, transparent); color: var(--ops-danger); }
.ops-att-t { min-width: 0; }
.ops-att-t b { font-weight: 600; }
.ops-att-where { color: var(--ops-muted); font-size: 12.5px; white-space: nowrap; }
.ops-att-go { color: var(--ops-faint); font-size: 16px; }
.ops-calm { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: color-mix(in srgb, var(--ops-ok) 13%, transparent); border-radius: var(--cx-radius-surface); font-weight: 600; }
.ops-calm i { color: var(--ops-ok); font-size: 22px; }

.ops-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--ops-hairline); border-radius: var(--cx-radius-surface); background: var(--ops-panel); }
.ops-kpi { padding: 12px 16px; border-left: 1px solid var(--ops-hairline); min-width: 0; }
.ops-kpi:first-child { border-left: 0; }
.ops-kpi b { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; display: block; font-variant-numeric: tabular-nums; }
.ops-kpi b.bad { color: var(--ops-danger); }
.ops-kpi b.warn { color: var(--ops-warn); }
.ops-kpi b small { font-family: var(--font-sans); font-size: 13px; color: var(--ops-muted); font-weight: 500; }
.ops-kpi > span { color: var(--ops-fg2); font-size: 12.5px; }
.ops-kpi > span a { color: inherit; text-decoration: none; }
.ops-kpi > span a:hover { text-decoration: underline; }
.ops-kpi-spark { margin-top: 6px; }
/* The end dot sits on the edge of the drawing (x = 100): let it show in full. */
.cx-ops-shell .cx-sparkline__svg { overflow: visible; }
.ops-kpi-spark .cx-sparkline, .ops-kpi-spark .cx-sparkline__svg { height: 26px; }

.ops-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.ops-pulse-chart .cx-sparkline, .ops-pulse-chart .cx-sparkline__svg { height: 110px; }
.ops-trends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.ops-trend .l { display: flex; justify-content: space-between; align-items: baseline; color: var(--ops-fg2); font-size: 12.5px; }
.ops-trend .l b { font-family: var(--font-display); font-size: 20px; color: var(--ops-ink); }
.ops-trend .cx-sparkline, .ops-trend .cx-sparkline__svg { height: 34px; }
.ops-trend .s { font-size: 12px; color: var(--ops-muted); }
.ops-totals { color: var(--ops-muted); font-size: 12px; margin-top: 10px; }

/* ── Narrow screens ─────────────────────────────────────────────────────────── */

@media (max-width: 1279px) {
    .ops-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ops-kpi:nth-child(4) { border-left: 0; border-top: 1px solid var(--ops-hairline); }
    .ops-kpi:nth-child(5) { border-top: 1px solid var(--ops-hairline); }
    .ops-ws.has-filter.has-panel { grid-template-columns: 220px minmax(0, 1fr) 340px; }
}

/* Under 1100 px (iPad landscape): the detail panel opens full screen; the sidebar stays (mockup). */
@media (max-width: 1099px) {
    .ops-ws.has-panel, .ops-ws.has-filter.has-panel { grid-template-columns: minmax(0, 1fr); }
    .ops-ws.has-filter.has-panel { grid-template-columns: 220px minmax(0, 1fr); }
    .ops-ws-panel { display: none; }
    .ops-ws-panel.open { display: flex; position: fixed; inset: 0; z-index: 1200; border-left: 0; overflow-y: auto; }
    .cx-ops-shell .ops-ws-close { display: inline-grid; margin: 10px 12px 0; }
    .ops-two { grid-template-columns: minmax(0, 1fr); }
}

/* iPad portrait and phone (≤ 900 px): the sidebar becomes a drawer behind the menu button, the page name moves into the
   top bar and the page head keeps only its line of context and its actions. */
@media (max-width: 900px) {
    .cx-ops-shell, .cx-ops-shell.is-collapsed { grid-template-columns: minmax(0, 1fr); }
    /* Closed, the drawer is also invisible to the keyboard and screen readers (visibility), after its slide-out. */
    .ops-sb { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; z-index: 1300; }
    .cx-ops-shell.drawer-open .ops-sb { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s; box-shadow: var(--ops-shadow); }
    .cx-ops-shell.is-collapsed .ops-sb-brand,
    .cx-ops-shell.is-collapsed .ops-nav-title,
    .cx-ops-shell.is-collapsed .ops-sb-nav a .t,
    .cx-ops-shell.is-collapsed .ops-sb-who .t  { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .cx-ops-shell.is-collapsed .ops-nav-title { height: auto; margin: 0; padding: 12px 10px 4px; background: none; }
    .cx-ops-shell.is-collapsed .ops-sb-nav a { justify-content: flex-start; padding: 6px 10px; }
    .cx-ops-shell.is-collapsed .ops-sb-foot { flex-direction: row; }
    .cx-ops-shell.is-collapsed .ops-sb-who { justify-content: flex-start; padding-left: 4px; }
    .cx-ops-shell.is-collapsed .ops-nb { position: static; min-width: 20px; width: auto; height: 18px; padding: 0 6px; font-size: 10.5px; background: transparent; }
    .cx-ops-shell.is-collapsed .ops-nb.bad { background: var(--ops-nb-bad-bg); }
    .cx-ops-shell.is-collapsed .ops-nb.work { background: var(--ops-nb-work-bg); }
    .cx-ops-shell .ops-sb-toggle { display: none; }
    .cx-ops-shell .ops-sb-close { display: inline-grid; }
    .cx-ops-shell.drawer-open .ops-scrim { display: block; position: fixed; inset: 0; background: var(--ops-scrim); z-index: 1250; }
    .cx-ops-shell .ops-menu { display: inline-grid; }
    .cx-ops-shell .ops-ptitle { display: block; }
    .ops-find { flex: 0 1 auto; }

    .ops-head { flex-wrap: nowrap; padding: 10px 16px; }
    /* The top bar names the page; the heading stays for screen readers. */
    .ops-head h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .ops-head-title { flex: 1 1 auto; }
    .ops-head-sub { white-space: normal; }
}

@media (max-width: 759px) {
    .ops-ws.has-filter, .ops-ws.has-filter.has-panel { grid-template-columns: minmax(0, 1fr); }
    .ops-ws-filter { border-right: 0; border-bottom: 1px solid var(--ops-hairline-strong); }
}

/* Phone (≤ 768 px): the top bar keeps symbols only. */
@media (max-width: 768px) {
    .ops-topbar { padding: 0 10px; gap: 6px; }
    .ops-scope { padding: 0 6px; }
    .ops-scope .t { display: none; }
    .ops-find { flex: 0 0 auto; width: 32px; padding: 0; justify-content: center; background: transparent; }
    .ops-find .t, .ops-find .ops-kbd { display: none; }
    .ops-stand { display: none; }
    .ops-pal { top: 16px; }
    .ops-pal-foot { display: none; }
}

@media (max-width: 640px) {
    .ops-dash { padding: 16px; gap: 18px; }
    .ops-att-row { grid-template-columns: 30px minmax(0, 1fr) 18px; padding: 11px 14px; }
    .ops-att-where { display: none; }
    .ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-kpi:nth-child(n) { border-left: 0; border-top: 1px solid var(--ops-hairline); }
    .ops-kpi:nth-child(-n+2) { border-top: 0; }
    .ops-kpi:nth-child(2n) { border-left: 1px solid var(--ops-hairline); }
    .ops-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .ops-trends { grid-template-columns: minmax(0, 1fr); }
    .cx-ops-main > :not(.ops-head):not(.ops-dash):not(.ops-ws):not(.ops-steps) { margin-left: 12px; margin-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .ops-skel, .ops-spin { animation: none; }
    .ops-sb { transition: none; }
}

/* ── Bootstrap re-tint (scoped) ──────────────────────────────────────────────── */

.cx-ops-shell .text-muted { color: var(--ops-muted) !important; }
/* Bootstrap's pink code colour misses AA on the dark ground (App-Release explanations). */
.cx-ops-shell code { color: var(--ops-accent-text); }
.cx-ops-shell .spinner-border { color: var(--ops-accent); }

.cx-ops-shell .form-label { color: var(--ops-muted); }
/* Checkbox labels (App-Release, Hilfe-Nutzung) kept the light app's dark label colour on the dark shell. */
.cx-ops-shell .form-check-label { color: var(--ops-ink); }

.cx-ops-shell .form-control,
.cx-ops-shell .form-select {
    background-color: var(--ops-panel-2);
    color: var(--ops-ink);
    border-color: var(--ops-hairline-strong);
}


.cx-ops-shell .form-select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23a39c92' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
}

.cx-ops-shell .form-control:focus,
.cx-ops-shell .form-select:focus {
    background-color: var(--ops-panel-2);
    color: var(--ops-ink);
    border-color: var(--ops-accent);
    box-shadow: 0 0 0 .2rem var(--ops-accent-tint);
}

.cx-ops-shell .btn-outline-secondary {
    color: var(--ops-muted);
    border-color: var(--ops-hairline-strong);
}

.cx-ops-shell .btn-outline-secondary:hover,
.cx-ops-shell .btn-outline-secondary:focus {
    color: var(--ops-ink);
    background: var(--ops-panel-2);
    border-color: var(--ops-hairline-strong);
}

/* Bootstrap's own copper (#B8601F) misses AA on both grounds: outline and link buttons take the Ops text tone. */
.cx-ops-shell .btn-outline-primary { color: var(--ops-accent-text); border-color: var(--ops-accent); background: transparent; }
.cx-ops-shell .btn-outline-primary:hover,
.cx-ops-shell .btn-outline-primary:focus { color: var(--ops-on-accent); background: var(--ops-accent-btn); border-color: var(--ops-accent-btn); }
.cx-ops-shell .btn-link { color: var(--ops-accent-text); }
.cx-ops-shell .btn-link:hover { color: var(--ops-ink); }

.cx-ops-shell .btn-primary {
    background: var(--ops-accent-btn);
    border-color: var(--ops-accent-btn);
    color: var(--ops-on-accent);
    font-weight: 600;
}

.cx-ops-shell .btn-primary:hover,
.cx-ops-shell .btn-primary:focus {
    background: var(--ops-accent-btn);
    border-color: var(--ops-accent-btn);
    color: var(--ops-on-accent);
    filter: brightness(.92);
}

.cx-ops-shell .alert-danger {
    background: color-mix(in srgb, var(--ops-danger) 12%, transparent);
    color: var(--ops-danger);
    border-color: color-mix(in srgb, var(--ops-danger) 35%, transparent);
}

.cx-ops-shell .table {
    color: var(--ops-ink);
    border-color: var(--ops-hairline);
    margin-bottom: 0;
}

.cx-ops-shell .table > :not(caption) > * > * {
    background: transparent;
    color: inherit;
    border-bottom-color: var(--ops-hairline);
    box-shadow: none;
}

/* ── Section cards ───────────────────────────────────────────────────────────── */

.cx-ops-card {
    background: var(--ops-panel);
    border: 1px solid var(--ops-hairline);
    border-radius: var(--cx-radius-surface);
    padding: 18px 20px;
    margin-top: 18px;
    animation: ops-rise .45s ease-out backwards;
}

.cx-ops-card:nth-of-type(2) { animation-delay: .06s; }
.cx-ops-card:nth-of-type(3) { animation-delay: .12s; }
.cx-ops-card:nth-of-type(4) { animation-delay: .18s; }
.cx-ops-card:nth-of-type(5) { animation-delay: .24s; }

.cx-ops-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ops-ink);
}

.cx-ops-card h3 i { color: var(--ops-accent); }

.cx-ops-h3-meta {
    font-size: .78rem;
    font-weight: 500;
    color: var(--ops-muted);
    margin-left: 2px;
}

.cx-ops-empty-note { color: var(--ops-muted); font-size: .88rem; }

/* ── KPI tiles ───────────────────────────────────────────────────────────────── */

.cx-ops-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.cx-ops-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: var(--ops-panel);
    border: 1px solid var(--ops-hairline);
    border-radius: var(--cx-radius-surface);
    animation: ops-rise .4s ease-out backwards;
    transition: transform .18s ease, border-color .18s ease;
}

.cx-ops-tile:hover { transform: translateY(-2px); border-color: var(--ops-hairline-strong); z-index: 5; }

.cx-ops-tile:nth-child(2) { animation-delay: .04s; }
.cx-ops-tile:nth-child(3) { animation-delay: .08s; }
.cx-ops-tile:nth-child(4) { animation-delay: .12s; }
.cx-ops-tile:nth-child(5) { animation-delay: .16s; }
.cx-ops-tile:nth-child(6) { animation-delay: .2s; }
.cx-ops-tile:nth-child(7) { animation-delay: .24s; }
.cx-ops-tile:nth-child(8) { animation-delay: .28s; }

.cx-ops-tile-value {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cx-ops-tile-dim { font-size: .95rem; font-weight: 600; color: var(--ops-muted); }
.cx-ops-tile-label { font-size: .8rem; color: var(--ops-muted); }
.cx-ops-tile-label a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.cx-ops-tile-label a:hover { color: var(--ops-ink); }

.cx-ops-tile-warn { border-color: color-mix(in srgb, var(--ops-warn) 50%, transparent); background: color-mix(in srgb, var(--ops-warn) 7%, var(--ops-panel)); }
.cx-ops-tile-danger { border-color: color-mix(in srgb, var(--ops-danger) 50%, transparent); background: color-mix(in srgb, var(--ops-danger) 7%, var(--ops-panel)); }

/* Value + sparkline sharing one row inside a tile. */
.cx-ops-tile-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.cx-ops-tile-spark { flex: 1; min-width: 0; max-width: 130px; margin-left: auto; }
.cx-ops-tile-spark .cx-sparkline, .cx-ops-tile-spark .cx-sparkline__svg { height: 30px; }

/* ── Platform pulse ──────────────────────────────────────────────────────────── */

.cx-ops-pulse-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.cx-ops-pulse-meta { font-size: .78rem; color: var(--ops-muted); }

.cx-ops-live-dot {
    width: 9px;
    height: 9px;
    border-radius: var(--cx-radius-round);
    background: var(--ops-ok);
    display: inline-block;
    animation: ops-ping 2.4s ease-out infinite;
}

@keyframes ops-ping {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ops-ok) 55%, transparent); }
    70% { box-shadow: 0 0 0 9px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.cx-ops-pulse-chart { margin-top: 6px; }
.cx-ops-pulse-chart .cx-sparkline, .cx-ops-pulse-chart .cx-sparkline__svg { height: 96px; }

/* The end/hover dots are drawn in viewBox units and would stretch into ovals at
   this height — the tooltip alone carries the hover affordance here. */
.cx-ops-pulse-chart .cx-sparkline__svg circle { display: none; }

/* Draw-in animation for every ops sparkline: CxSparkline normalizes the path
   length to 1 via pathLength, so dasharray/dashoffset animate in pure CSS. */
.cx-ops-shell .cx-sparkline__line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: ops-draw 1.1s ease-out .2s forwards;
}

@keyframes ops-draw { to { stroke-dashoffset: 0; } }

/* ── Business trend cards (30-day sparklines) ────────────────────────────────── */

.cx-ops-trends {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.cx-ops-trend {
    background: var(--ops-panel-2);
    border: 1px solid var(--ops-hairline);
    border-radius: var(--cx-radius-surface);
    padding: 12px 14px;
    transition: transform .18s ease, border-color .18s ease;
}

.cx-ops-trend:hover { transform: translateY(-2px); border-color: var(--ops-hairline-strong); z-index: 5; position: relative; }

.cx-ops-trend-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.cx-ops-trend-label { font-size: .8rem; color: var(--ops-muted); }
.cx-ops-trend-label i { color: var(--ops-accent); margin-right: 2px; }

.cx-ops-trend-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cx-ops-trend-spark { margin: 8px 0 6px; }
.cx-ops-trend-spark .cx-sparkline, .cx-ops-trend-spark .cx-sparkline__svg { height: 44px; }

.cx-ops-trend-sub { font-size: .78rem; color: var(--ops-muted); }

.cx-ops-totals {
    display: flex;
    gap: 8px 20px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--ops-hairline);
    color: var(--ops-muted);
    font-size: .8rem;
}

/* ── Status/level badges ─────────────────────────────────────────────────────── */

.cx-ops-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: var(--cx-radius-control);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

.cx-ops-badge-ok { background: color-mix(in srgb, var(--ops-ok) 14%, transparent); color: var(--ops-ok); }
.cx-ops-badge-warn { background: color-mix(in srgb, var(--ops-warn) 14%, transparent); color: var(--ops-warn); }
.cx-ops-badge-danger { background: color-mix(in srgb, var(--ops-danger) 13%, transparent); color: var(--ops-danger); }
.cx-ops-badge-muted { background: var(--ops-panel-2); color: var(--ops-muted); }

/* ── Tables ──────────────────────────────────────────────────────────────────── */

.cx-ops-table th {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--ops-muted);
}

.cx-ops-table td { vertical-align: middle; }
.cx-ops-num { font-variant-numeric: tabular-nums; }
.cx-ops-id { font-size: .76rem; font-weight: 400; color: var(--ops-muted); white-space: nowrap; }
/* A count of 0, „nie“ and „kein Video“ step back, so the numbers that are there stand out (design standard 17). Above
   the cell colour of .cx-ops-shell .table, which would win otherwise; muted, not faint, to keep 4.5:1 (standard 19). */
.cx-ops-shell .table .cx-ops-num-zero,
.cx-ops-shell .table .cx-ops-help-novideo { color: var(--ops-muted); }
/* /ops/hilfe: the demo switch sits on the line of the period pills; the sums are one quiet line above the tables. */
.cx-ops-help-demo { margin-bottom: 2px; }
.cx-ops-help-sum { margin: 14px 0 0; color: var(--ops-muted); font-size: .9rem; }
.cx-ops-help-sum b { color: var(--ops-ink); font-variant-numeric: tabular-nums; }
/* The date column sits right after right-aligned numbers: keep it apart while the table is a table (the card has its own). */
@container (width > 900px) { .cx-ops-table .cx-ops-help-last { padding-left: 1.5rem; } }

/* Action cells (Betriebe): the buttons wrap inside the cell, 8 px apart (standard; overrides Bootstrap's ms-1 on
   some of them). */
.cx-ops-table td.cx-ops-actions { text-align: right; }
.cx-ops-actions .btn { margin: 4px 0 4px 8px !important; white-space: nowrap; }

/* Sorting for tables whose sort buttons sit in the header: shown only once the rows are cards (below). */
.cx-ops-card-sort { display: none; }

/* ── Log browser ─────────────────────────────────────────────────────────────── */

.cx-ops-log-table { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: .82rem; }
.cx-ops-log-table td { padding: 4px 8px; }
.cx-ops-log-row { cursor: pointer; }
.cx-ops-log-row:hover td { background: var(--ops-panel-2); }

.cx-ops-log-detail pre {
    background: var(--ops-field);
    color: var(--ops-ink);
    border: 1px solid var(--ops-hairline);
    border-radius: var(--cx-radius-surface);
    padding: 12px 14px;
    font-size: .78rem;
    max-height: 420px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.cx-ops-log-msg {
    max-width: 720px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Feedback detail ─────────────────────────────────────────────────────────── */

.cx-ops-screenshots { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.cx-ops-screenshots img {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--cx-radius-surface);
    border: 1px solid var(--ops-hairline-strong);
}

.cx-ops-detail-panel {
    background: var(--ops-panel-2);
    border: 1px solid var(--ops-hairline);
    border-radius: var(--cx-radius-surface);
    padding: 14px 16px;
}

/* ── App release (/ops/app-release) ──────────────────────────────────────────── */

.cx-ops-release-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.cx-ops-release-platform { font-size: .8rem; color: var(--ops-muted); }
.cx-ops-release-platform i { color: var(--ops-accent); margin-right: 2px; }

.cx-ops-release-build {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 2px 0 4px;
}

.cx-ops-shell .alert-success {
    background: color-mix(in srgb, var(--ops-ok) 12%, transparent);
    color: var(--ops-ok);
    border-color: color-mix(in srgb, var(--ops-ok) 35%, transparent);
}

.cx-ops-shell .alert-info {
    background: color-mix(in srgb, var(--ops-info) 10%, transparent);
    color: var(--ops-info);
    border-color: color-mix(in srgb, var(--ops-info) 30%, transparent);
}

/* Preview of the app's update dialog (UpdateAvailableDialog.tsx) — the app's light
   palette on purpose, so the operator sees what the worker sees. */
.cx-ops-update-preview {
    background: rgba(28, 25, 21, .45);
    border-radius: var(--cx-radius-surface);
    padding: 18px;
    display: flex;
    justify-content: center;
}

.cx-ops-update-preview-card {
    width: 100%;
    max-width: 340px;
    background: #FAF7F2;
    color: #1C1915;
    border-radius: var(--cx-radius-surface);
    padding: 20px;
}

.cx-ops-update-preview-badge {
    display: inline-block;
    background: #FBEFE5;
    color: #B8601F;
    border-radius: var(--cx-radius-control);
    padding: 3px 12px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.cx-ops-update-preview-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.cx-ops-update-preview-lead { margin-top: 6px; font-size: .85rem; line-height: 1.45; color: #8E8679; }

.cx-ops-update-preview-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(28, 25, 21, .08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cx-ops-update-preview-note { display: flex; gap: 8px; font-size: .84rem; line-height: 1.4; color: #4A443C; overflow-wrap: anywhere; }
.cx-ops-update-preview-note span { flex: none; width: 6px; height: 6px; border-radius: var(--cx-radius-control); background: #B8601F; margin-top: 6px; }

.cx-ops-update-preview-install {
    margin-top: 16px;
    background: #B8601F;
    color: #fff;
    border-radius: var(--cx-radius-surface);
    padding: 11px;
    text-align: center;
    font-weight: 600;
}

.cx-ops-update-preview-later { margin-top: 6px; padding: 8px; text-align: center; font-size: .85rem; color: #8E8679; }

/* Own confirmation dialog (scrim + modal, z-band 5040/5050 as in the tenant app). */
.cx-ops-scrim {
    position: fixed;
    inset: 0;
    z-index: 5040;
    background: var(--ops-scrim);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.cx-ops-modal {
    position: fixed;
    z-index: 5050;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: var(--ops-panel);
    color: var(--ops-ink);
    border: 1px solid var(--ops-hairline-strong);
    border-radius: var(--cx-radius-surface);
    box-shadow: var(--ops-shadow);
    padding: 20px 22px;
}

.cx-ops-modal h4 { font-size: 1.05rem; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.cx-ops-modal h4 i { color: var(--ops-accent); }

/* ── Filter toolbar ──────────────────────────────────────────────────────────── */

.cx-ops-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-top: 16px;
}

.cx-ops-toolbar .cx-ops-field-wide { min-width: 220px; }
.cx-ops-toolbar .cx-ops-field-narrow { width: 110px; }

.cx-ops-toolbar .form-label { font-size: .78rem; margin-bottom: 2px; }

.cx-ops-pills { display: flex; gap: 6px; flex-wrap: wrap; }

.cx-ops-pill {
    border: 1px solid var(--ops-hairline-strong);
    background: transparent;
    color: var(--ops-muted);
    border-radius: var(--cx-radius-control);
    padding: 4px 14px;
    font-size: .84rem;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.cx-ops-pill:hover { color: var(--ops-ink); border-color: var(--ops-accent); }

.cx-ops-pill.active {
    background: var(--ops-accent-btn);
    border-color: var(--ops-accent-btn);
    color: var(--ops-on-accent);
    font-weight: 600;
}

/* ── Reduced motion ──────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .cx-ops-card,
    .cx-ops-tile,
    .cx-ops-shell .cx-sparkline__line,
    .cx-ops-live-dot { animation: none; }
    .cx-ops-shell .cx-sparkline__line { stroke-dashoffset: 0; }
    .cx-ops-tile:hover, .cx-ops-trend:hover { transform: none; }
}

/* ── Stacked card tables ─────────────────────────────────────────────────────
   They follow the inner width of their card, not of the window: next to the sidebar a card is narrower than the
   window. Up to 900 px inside the card each row becomes a card; the widest tables (Betriebe, KI-Guthaben) need
   more than 770 px as a table, so a lower limit lets them scroll sideways inside the card (measured 18.11.).
   Anything a table keeps in its header (sorting) needs a card-mode twin: see .cx-ops-card-sort. */

.cx-ops-card { container-type: inline-size; }

@container (width <= 900px) {

    .cx-ops-card-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
    .cx-ops-card-sort-label { color: var(--ops-muted); font-size: .8rem; margin-right: 4px; }
    .cx-ops-card-sort .btn[aria-pressed="true"] { border-color: var(--ops-accent); color: var(--ops-ink); }
    .cx-ops-stack .cx-ops-badge { white-space: normal; }
    /* The card has the muted badge's own colour: the badge takes the panel colour so it stays a pill. */
    .cx-ops-stack .cx-ops-badge-muted { background: var(--ops-panel); }

    /* Stacked card tables: header row disappears, each data row becomes a
       card; cells show their data-label as a fixed left-hand column. The row
       is a wrapping flex so .cx-ops-stack-half cells can sit two per line. */
    /* .cx-ops-shell: Bootstrap's later .table { display: table } would otherwise keep the table a table, which then
       grows with its widest content instead of the card. */
    .cx-ops-shell .cx-ops-stack,
    .cx-ops-stack > thead,
    .cx-ops-stack > tbody { display: block; }

    .cx-ops-stack > thead { display: none; }

    .cx-ops-stack > tbody > tr {
        position: relative;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        border: 1px solid var(--ops-hairline);
        border-radius: var(--cx-radius-surface);
        padding: 10px 12px;
        margin-bottom: 10px;
        background: var(--ops-panel-2);
    }

    .cx-ops-stack > tbody > tr > td {
        display: flex;
        flex: 1 1 100%;
        align-items: baseline;
        gap: 10px;
        padding: 3px 0;
        border: 0;
        box-shadow: none;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* A table inside a card row (KI breakdown) stays a table: numbers never break mid-digit, it scrolls inside the
       card instead of inheriting the card's word breaking. */
    .cx-ops-stack > tbody > tr > td:has(> .cx-ops-table) { display: block; min-width: 0; max-width: 100%; }
    .cx-ops-stack > tbody > tr > td > .cx-ops-table { display: block; width: 100%; max-width: 100%; overflow-x: auto; overflow-wrap: normal; }
    .cx-ops-stack > tbody > tr > td > .cx-ops-table th,
    .cx-ops-stack > tbody > tr > td > .cx-ops-table td { white-space: nowrap; }

    /* Action cells and badges carry Bootstrap's nowrap: on the phone card they wrap, or the card outgrows the screen. */
    .cx-ops-stack > tbody > tr > td.text-nowrap,
    .cx-ops-stack > tbody > tr > td.cx-ops-actions { white-space: normal !important; flex-wrap: wrap; row-gap: 6px; justify-content: flex-start; }
    /* The buttons name themselves: no „Aktionen“ label on the card, and no empty line where a row has none. */
    .cx-ops-stack > tbody > tr > td.cx-ops-actions::before { display: none; }
    .cx-ops-stack > tbody > tr > td.cx-ops-actions:not(:has(.btn)) { display: none; }
    .cx-ops-stack > tbody > tr > td.cx-ops-actions { gap: 8px; }
    .cx-ops-stack > tbody > tr > td.cx-ops-actions .btn { margin: 0 !important; }
    /* Right-aligned table numbers read left on the card, next to their label. */
    .cx-ops-stack > tbody > tr > td.text-end { text-align: left !important; justify-content: flex-start; }

    .cx-ops-stack > tbody > tr > td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 40%;
        max-width: 150px;
        color: var(--ops-muted);
        font-size: .74rem;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    .cx-ops-stack > tbody > tr > .cx-ops-stack-title {
        order: -1;
        font-weight: 700;
        font-size: .95rem;
        padding-bottom: 6px;
        padding-right: 96px; /* keeps clear of the pinned status badge */
    }

    /* Status badge pinned next to the card headline instead of its own row. */
    .cx-ops-stack > tbody > tr > .cx-ops-stack-status {
        position: absolute;
        top: 10px;
        right: 12px;
        flex: none;
        width: auto;
        padding: 0;
    }

    .cx-ops-stack > tbody > tr > .cx-ops-stack-status::before { display: none; }

    /* Compact numeric stats: label above value, two cells per line. */
    .cx-ops-stack > tbody > tr > .cx-ops-stack-half {
        flex: 1 1 50%;
        max-width: 50%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        text-align: left;
    }

    .cx-ops-stack > tbody > tr > .cx-ops-stack-half[data-label]::before { flex: none; max-width: none; }

    /* "—" cells carry no information on a card — drop them entirely. */
    .cx-ops-stack > tbody > tr > .cx-ops-cell-empty { display: none; }
}

/* ── Mobile (≤640px: iPhone portrait; tables stack by card width above) ──────
   Data tables carry data-label attributes on their cells and the .cx-ops-stack
   class: below the breakpoint each row becomes a card. Cells opt into extras:
   .cx-ops-stack-title (card headline), .cx-ops-stack-status (badge pinned to
   the headline's right), .cx-ops-stack-half (two-per-row mini stats) and
   .cx-ops-cell-empty ("—" cells vanish instead of wasting a row). */

@media (max-width: 640px) {

    .cx-ops-card { padding: 14px; margin-top: 14px; }

    .cx-ops-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
    .cx-ops-tile { padding: 12px; }
    .cx-ops-tile-value { font-size: 1.4rem; }
    .cx-ops-tile-spark { max-width: 110px; }
    .cx-ops-tile-spark .cx-sparkline, .cx-ops-tile-spark .cx-sparkline__svg { height: 26px; }

    .cx-ops-pulse-chart .cx-sparkline, .cx-ops-pulse-chart .cx-sparkline__svg { height: 68px; }

    .cx-ops-trends { grid-template-columns: 1fr 1fr; gap: 8px; }
    .cx-ops-trend { padding: 10px 12px; }
    .cx-ops-trend-spark .cx-sparkline, .cx-ops-trend-spark .cx-sparkline__svg { height: 36px; }

    /* Toolbar: fields share rows in pairs, wide fields take the full row.
       16px inputs stop iOS Safari from zooming in on focus. */
    .cx-ops-toolbar { gap: 8px; }
    .cx-ops-toolbar > div { flex: 1 1 45%; }
    .cx-ops-toolbar .cx-ops-field-wide { flex: 1 1 100%; min-width: 0; }
    .cx-ops-toolbar .cx-ops-field-narrow { width: auto; }
    .cx-ops-toolbar .form-select,
    .cx-ops-toolbar .form-control { font-size: 16px; }
    .cx-ops-toolbar button[type="submit"] { width: 100%; padding-top: 8px; padding-bottom: 8px; }

    .cx-ops-pill { padding: 7px 14px; }

    /* Log browser: one flex card per entry — time/level/source on top,
       the message wrapping below (clamped to two lines until opened). */
    .cx-ops-log-table,
    .cx-ops-log-table > tbody { display: block; }
    .cx-ops-log-table > thead { display: none; }
    .cx-ops-log-table > tbody > tr { display: block; }

    .cx-ops-log-table > tbody > tr.cx-ops-log-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 2px 10px;
        padding: 8px 2px;
        border-bottom: 1px solid var(--ops-hairline);
    }

    .cx-ops-log-table > tbody > tr > td {
        display: block;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .cx-ops-log-table > tbody > tr.cx-ops-log-row > td:nth-child(4) { flex: 1 1 100%; }

    .cx-ops-log-msg {
        max-width: none;
        white-space: normal;
        overflow-wrap: anywhere;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .cx-ops-log-detail { padding: 8px 0; }
    .cx-ops-log-detail pre { max-height: 320px; }

    /* Feedback detail: comfortable touch targets, larger screenshot thumbs. */
    .cx-ops-detail-panel { padding: 12px; }
    .cx-ops-detail-panel .btn { flex: 1 1 auto; padding-top: 8px; padding-bottom: 8px; }

    .cx-ops-screenshots img { width: 44vw; max-width: 180px; height: auto; aspect-ratio: 7 / 5; }
}

/* ── Newsletters (/ops/rundschreiben) ────────────────────────────────────────── */

.cx-ops-rs-edit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.cx-ops-rs-form,
.cx-ops-rs-preview { min-width: 0; }

.cx-ops-rs-preview { position: sticky; top: 16px; }

.cx-ops-rs-frame {
    display: block;
    width: 100%;
    height: 72vh;
    min-height: 420px;
    border: 1px solid var(--ops-hairline-strong);
    border-radius: var(--cx-radius-surface);
    background: #fff;
}

.cx-ops-rs-frame-phone { width: 390px; max-width: 100%; margin: 0 auto; }

.cx-ops-rs-thumb {
    width: 132px;
    height: auto;
    border: 1px solid var(--ops-hairline-strong);
    border-radius: var(--cx-radius-surface);
}

.cx-ops-rs-error { color: var(--ops-danger); font-size: .875rem; margin-top: 4px; }

.cx-ops-rs-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 18px;
    padding: 12px 0;
    background: var(--ops-bg);
    border-top: 1px solid var(--ops-hairline-strong);
}

.cx-ops-rs-open { flex: 1 1 240px; color: var(--ops-warn); font-size: .9rem; }

.cx-ops-rs-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.cx-ops-rs-tile {
    background: var(--ops-panel-2);
    border: 1px solid var(--ops-hairline);
    border-radius: var(--cx-radius-surface);
    padding: 10px 12px;
    color: var(--ops-muted);
    font-size: .85rem;
}

.cx-ops-rs-tile-n {
    color: var(--ops-ink);
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.cx-ops-rs-tile-side { border-style: dashed; }

.cx-ops-rs-find { max-width: 320px; }

@media (max-width: 1100px) {
    .cx-ops-rs-edit { grid-template-columns: minmax(0, 1fr); }
    .cx-ops-rs-preview { position: static; }
    .cx-ops-rs-frame { height: 60vh; }
}

@media (max-width: 640px) {
    .cx-ops-rs-actions .btn { flex: 1 1 100%; min-height: 44px; }
    .cx-ops-rs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
