/*
 * CSQ Design System 1.0
 *
 * This layer is the official platform UI. app.css remains the recoverable
 * The shared base layer remains in app.css; every rule here belongs to the official UI.
 */

@layer csq-canonical {

body.ui-version-modern {
    --ds-text-scale: var(--theme-text-scale, 1);
    --ds-font-size: calc(14px * var(--ds-text-scale));
    --ds-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ds-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    /* Canonical semantic surface and content roles. Theme settings only feed
       their public source tokens; components consume these semantic roles. */
    --ds-canvas: var(--theme-light-bg, #f1f3f5);
    --ds-panel: var(--theme-light-panel, #fff);
    --ds-raised: color-mix(in srgb, var(--ds-panel) 97%, var(--ds-text));
    --ds-inset: color-mix(in srgb, var(--ds-panel) 94%, var(--ds-text));
    --ds-divider-surface: color-mix(in srgb, var(--ds-panel) 88%, var(--ds-text));
    --ds-selected-surface: color-mix(in srgb, var(--ds-primary) 5%, var(--ds-panel));
    --ds-bg: var(--ds-canvas);
    --ds-surface: var(--theme-light-panel, #fff);
    --ds-surface-raised: var(--ds-raised);
    --ds-surface-subtle: var(--ds-inset);
    --ds-surface-strong: var(--ds-divider-surface);
    --ds-surface-selected: var(--ds-selected-surface);
    --ds-text-primary: var(--theme-light-text, #171a1f);
    --ds-text-secondary: var(--theme-light-muted, #4d5966);
    --ds-text-decorative: color-mix(in srgb, var(--ds-text-secondary) 76%, var(--ds-panel));
    --ds-text: var(--ds-text-primary);
    --ds-text-muted: var(--ds-text-secondary);
    --ds-text-faint: var(--ds-text-decorative);
    --ds-page-heading-description-gap: 6px;
    --ds-border: var(--theme-light-line, #bac3cd);
    --ds-border-strong: color-mix(in srgb, var(--ds-border) 72%, var(--ds-text));
    --ds-focus: color-mix(in srgb, var(--action-primary-bg) 36%, transparent);
    --ds-primary: var(--action-primary-bg);
    --ds-primary-text: var(--action-primary-text);
    --ds-success: #087443;
    --ds-success-soft: #eaf8f1;
    --ds-warning: #8a5b00;
    --ds-warning-soft: #fff6dc;
    --ds-danger: #b42318;
    --ds-danger-soft: #fff0ee;
    --ds-info: #175cd3;
    --ds-info-soft: #eff6ff;
    --ds-legal: #6941c6;
    --ds-legal-soft: #f4f0ff;
    --ds-radius-control: var(--radius-ui, 6px);
    --ds-radius-panel: var(--radius-card, 8px);
    --ds-menu-font-family: var(--ds-font);
    --ds-menu-font-size: calc(13px * var(--ds-text-scale, 1));
    --ds-menu-font-weight: 580;
    --ds-menu-line-height: 1.35;
    --ds-menu-inactive-bg: var(--nav-inactive-bg);
    --ds-menu-inactive-text: var(--nav-inactive-text);
    --ds-menu-hover-bg: var(--nav-hover-bg);
    --ds-menu-hover-text: var(--nav-hover-text);
    --ds-menu-active-bg: var(--nav-active-bg);
    --ds-menu-active-text: var(--nav-active-text);
    --ds-menu-aux-font-size: calc(11px * var(--ds-text-scale, 1));
    --ds-menu-aux-font-weight: 400;
    --ds-popover-row-bg: var(--nav-inactive-bg);
    --ds-popover-row-text: var(--nav-inactive-text);
    --ds-popover-row-muted: color-mix(in srgb, var(--nav-inactive-text) 72%, var(--nav-inactive-bg));
    --ds-popover-row-hover-bg: var(--nav-hover-bg);
    --ds-popover-row-hover-text: var(--nav-hover-text);
    --ds-popover-row-hover-muted: color-mix(in srgb, var(--nav-hover-text) 72%, var(--nav-hover-bg));
    --ds-popover-row-current-bg: color-mix(in srgb, var(--nav-active-bg) 10%, var(--ds-surface));
    --ds-popover-row-current-border: color-mix(in srgb, var(--nav-active-bg) 22%, var(--ds-border));
    --ds-popover-row-current-text: color-mix(in srgb, var(--nav-active-bg) 82%, var(--ds-text));
    --ds-popover-row-current-hover-bg: color-mix(in srgb, var(--nav-active-bg) 14%, var(--nav-hover-bg));
    --ds-shadow-menu: 0 12px 32px rgba(16, 24, 40, .16), 0 2px 8px rgba(16, 24, 40, .08);
    --ds-shadow-dialog: 0 24px 80px rgba(16, 24, 40, .28), 0 4px 16px rgba(16, 24, 40, .12);
    --ds-header-height: 56px;
    --ds-sidebar-width: 244px;
    --ds-sidebar-collapsed: 56px;
    --ds-directional-icon-size: 16px;
    --ds-directional-icon-stroke: 2;
    /* Content width is measured against the live workspace after the
       persistent sidebar. Wide deliberately occupies most of that workspace,
       while full remains visibly wider and contained stays readable. */
    --ds-content-contained: 900px;
    --ds-content-wide: 88%;
    --ds-content-full: none;
    --ds-content-max: var(--ds-content-wide);
    --ds-content-form: 760px;
    --ds-content-detail: 980px;
    --ds-page-pad: 18px;
    --ds-panel-pad: 16px;
    --ds-expanded-content-inline-offset: 24px;
    --ds-page-gap: 12px;
    --ds-page-header-content-gap: 8px;
    --ds-section-gap: 16px;
    --ds-panel-gap: 12px;
    --ds-header-gap: 16px;
    --ds-panel-header-y: 11px;
    --ds-toolbar-gap: 8px;
    --ds-toolbar-pad: 8px;
    --ds-form-gap: 10px;
    --ds-field-gap: 4px;
    --ds-action-gap: 7px;
    --ds-table-x: 10px;
    --ds-card-pad: 13px;
    --ds-gap: var(--ds-page-gap);
    --ds-control-height: 34px;
    --ds-table-y: 8px;
    --ds-field-width-short: 14rem;
    --ds-field-width-medium: 32rem;
    --ds-field-width-long: 48rem;
    background-color: var(--ds-bg);
    color: var(--ds-text);
    font-family: var(--ds-font);
    font-size: var(--ds-font-size);
    line-height: 1.42;
}

/* Legacy theme-font classes remain valid compatibility markers. Precise
   typography now comes from the single percentage-based text-scale token. */
body.ui-version-modern.theme-font-small,
body.ui-version-modern.theme-font-normal,
body.ui-version-modern.theme-font-large { --ds-font-size: calc(14px * var(--ds-text-scale)); }

body.ui-version-modern.theme-density-compact {
    --ds-page-pad: 12px;
    --ds-panel-pad: 12px;
    --ds-page-gap: 8px;
    --ds-page-header-content-gap: 6px;
    --ds-section-gap: 12px;
    --ds-panel-gap: 8px;
    --ds-header-gap: 12px;
    --ds-panel-header-y: 9px;
    --ds-toolbar-gap: 6px;
    --ds-toolbar-pad: 6px;
    --ds-form-gap: 8px;
    --ds-field-gap: 3px;
    --ds-action-gap: 5px;
    --ds-card-pad: 10px;
    --ds-control-height: 30px;
    --ds-table-y: 5px;
}

body.ui-version-modern.theme-density-comfortable {
    --ds-page-pad: 24px;
    --ds-panel-pad: 20px;
    --ds-page-gap: 16px;
    --ds-page-header-content-gap: 10px;
    --ds-section-gap: 20px;
    --ds-panel-gap: 16px;
    --ds-header-gap: 20px;
    --ds-panel-header-y: 13px;
    --ds-toolbar-gap: 10px;
    --ds-toolbar-pad: 10px;
    --ds-form-gap: 12px;
    --ds-field-gap: 5px;
    --ds-action-gap: 9px;
    --ds-card-pad: 16px;
    --ds-control-height: 38px;
    --ds-table-y: 11px;
}

body.ui-version-modern.theme-width-contained { --ds-content-max: var(--ds-content-contained); }

body.ui-version-modern.theme-width-wide { --ds-content-max: var(--ds-content-wide); }

body.ui-version-modern.theme-width-full { --ds-content-max: var(--ds-content-full); }

@media (max-width: 640px) {
    body.ui-version-modern { --ds-expanded-content-inline-offset: 15px; }

    body.ui-version-modern.theme-width-contained,
body.ui-version-modern.theme-width-wide,
body.ui-version-modern.theme-width-full { --ds-content-max: var(--ds-content-full); }

}

body.ui-version-modern.theme-mode-dark {
    --ds-canvas: #10151b;
    --ds-panel: #181f27;
    --ds-raised: #202833;
    --ds-inset: #242e39;
    --ds-divider-surface: #2c3743;
    --ds-selected-surface: #172c4a;
    --ds-bg: var(--ds-canvas);
    --ds-surface: var(--ds-panel);
    --ds-surface-raised: var(--ds-raised);
    --ds-surface-subtle: var(--ds-inset);
    --ds-surface-strong: var(--ds-divider-surface);
    --ds-surface-selected: var(--ds-selected-surface);
    --ds-text-primary: #edf2f7;
    --ds-text-secondary: #b7c1cc;
    --ds-text-decorative: #8794a2;
    --ds-text: var(--ds-text-primary);
    --ds-text-muted: var(--ds-text-secondary);
    --ds-text-faint: var(--ds-text-decorative);
    --ds-border: #343f4c;
    --ds-border-strong: #4a5765;
    --ds-focus: color-mix(in srgb, var(--action-primary-bg) 55%, transparent);
    --ds-success: #5fd3a1;
    --ds-success-soft: #15372a;
    --ds-warning: #f3c568;
    --ds-warning-soft: #392f18;
    --ds-danger: #ff8a80;
    --ds-danger-soft: #3d211f;
    --ds-info: #8bb8ff;
    --ds-info-soft: #1a2d48;
    --ds-legal: #c9a7ff;
    --ds-legal-soft: #302447;
    --ds-shadow-menu: 0 14px 36px rgba(0, 0, 0, .42);
    --ds-shadow-dialog: 0 28px 90px rgba(0, 0, 0, .62);
}

@media (prefers-color-scheme: dark) {
    body.ui-version-modern.theme-mode-system {
        --ds-canvas: #10151b;
        --ds-panel: #181f27;
        --ds-raised: #202833;
        --ds-inset: #242e39;
        --ds-divider-surface: #2c3743;
        --ds-selected-surface: #172c4a;
        --ds-bg: var(--ds-canvas);
        --ds-surface: var(--ds-panel);
        --ds-surface-raised: var(--ds-raised);
        --ds-surface-subtle: var(--ds-inset);
        --ds-surface-strong: var(--ds-divider-surface);
        --ds-surface-selected: var(--ds-selected-surface);
        --ds-text-primary: #edf2f7;
        --ds-text-secondary: #b7c1cc;
        --ds-text-decorative: #8794a2;
        --ds-text: var(--ds-text-primary);
        --ds-text-muted: var(--ds-text-secondary);
        --ds-text-faint: var(--ds-text-decorative);
        --ds-border: #343f4c;
        --ds-border-strong: #4a5765;
        --ds-success: #5fd3a1;
        --ds-success-soft: #15372a;
        --ds-warning: #f3c568;
        --ds-warning-soft: #392f18;
        --ds-danger: #ff8a80;
        --ds-danger-soft: #3d211f;
        --ds-info: #8bb8ff;
        --ds-info-soft: #1a2d48;
        --ds-legal: #c9a7ff;
        --ds-legal-soft: #302447;
        --ds-shadow-menu: 0 14px 36px rgba(0, 0, 0, .42);
        --ds-shadow-dialog: 0 28px 90px rgba(0, 0, 0, .62);
    }

}

body.ui-version-modern main,
body.ui-version-modern main p,
body.ui-version-modern main dd,
body.ui-version-modern main td,
body.ui-version-modern main code {
    user-select: text;
}

body.ui-version-modern button,
body.ui-version-modern .button,
body.ui-version-modern nav,
body.ui-version-modern summary {
    user-select: none;
}

body.ui-version-modern h1,
body.ui-version-modern h2,
body.ui-version-modern h3,
body.ui-version-modern p,
body.ui-version-modern dl { margin-top: 0; }

body.ui-version-modern h1 { font-size: calc(1.5rem * var(--ds-text-scale, 1)); line-height: 1.2; letter-spacing: -.018em; }

body.ui-version-modern h2 { font-size: calc(18px * var(--ds-text-scale, 1)); line-height: 1.3; letter-spacing: -.008em; }

body.ui-version-modern h3 { font-size: calc(15.5px * var(--ds-text-scale, 1)); line-height: 1.35; }

body.ui-version-modern code { font-family: var(--ds-mono); font-size: .9em; }

body.ui-version-modern a { color: var(--ds-primary); text-underline-offset: 2px; }

body.ui-version-modern :focus-visible {
    outline: 3px solid var(--ds-focus);
    outline-offset: 1px;
}

/* Application shell */
body.ui-version-modern .app-header {
    background: var(--ds-surface-raised);
    border-bottom: 1px solid var(--ds-border);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

body.ui-version-modern .topbar {
    gap: 16px;
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr) auto;
    min-height: var(--ds-header-height);
    padding: 7px 18px;
}

body.ui-version-modern .topbar .brand {
    background: transparent;
    color: var(--ds-text, var(--text));
    cursor: pointer;
    gap: 9px;
}

body.ui-version-modern .brand img {
    height: 36px;
    margin-inline: 6px;
    max-width: 144px;
    transform: scale(1.3);
    transform-origin: center;
}

body.ui-version-modern .brand-text strong { font-size: calc(16px * var(--ds-text-scale, 1)); letter-spacing: -.01em; }

body.ui-version-modern .brand-text small { font-size: calc(9px * var(--ds-text-scale, 1)); letter-spacing: .045em; text-transform: uppercase; }

body.ui-version-modern .topbar .brand:hover {
    background: transparent;
    color: var(--ds-text, var(--text));
    filter: none;
}

body.ui-version-modern .topbar .brand:hover .brand-text strong { color: var(--ds-text, var(--text)); }

body.ui-version-modern .theme-logo-variant-dark { display: none; }

body.ui-version-modern.theme-mode-dark .theme-logo-variant-light { display: none; }

body.ui-version-modern.theme-mode-dark .theme-logo-variant-dark { display: block; }

@media (prefers-color-scheme: dark) {
    body.ui-version-modern.theme-mode-system .theme-logo-variant-light { display: none; }

    body.ui-version-modern.theme-mode-system .theme-logo-variant-dark { display: block; }

}

body.ui-version-modern .documentation-meta {
    padding: 12px 14px;
}

body.ui-version-modern .documentation-content {
    min-width: 0;
}

body.ui-version-modern .documentation-content pre {
    max-width: 100%;
    overflow: auto;
}

@media (max-width: 640px) {

}

/* Canonical main sidebar: local navigation only. Core owns the shell while
   Core/module providers remain the source of groups, items and permissions. */
body.ui-version-modern .ds-mobile-nav-trigger {
    align-items: center;
    background: var(--ds-surface, var(--panel));
    border: 1px solid var(--ds-line, var(--line));
    border-radius: var(--radius-ui, 6px);
    color: var(--ds-text, var(--text));
    cursor: pointer;
    display: none;
    height: 40px;
    justify-content: center;
    padding: 0;
    width: 40px;
}

/* Keep the responsive trigger out of the desktop grid even when the shared
   button primitive is declared later in this canonical layer. */
body.ui-version-modern button.ds-mobile-nav-trigger { display: none; }

body.ui-version-modern .ds-mobile-nav-trigger svg,
body.ui-version-modern .ds-sidebar-mobile-close svg {
    fill: none;
    height: 20px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.9;
    width: 20px;
}

body.ui-version-modern .ds-mobile-nav-trigger:hover,
body.ui-version-modern .ds-mobile-nav-trigger[aria-expanded="true"] {
    background: var(--nav-hover-bg);
    border-color: color-mix(in srgb, var(--nav-active-bg) 42%, var(--ds-line, var(--line)));
    color: var(--nav-hover-text);
}

body.ui-version-modern .ds-sidebar {
    background: var(--ds-surface, var(--panel));
    border: 0;
    border-right: 1px solid var(--ds-border, var(--line));
    box-sizing: border-box;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: var(--ds-sidebar-width);
    z-index: 30;
}

body.ui-version-modern .ds-sidebar-surface {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    width: 100%;
}

body.ui-version-modern .ds-sidebar-mobile-header,
body.ui-version-modern .ds-sidebar-backdrop { display: none; }

body.ui-version-modern .ds-sidebar .side-nav-content {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 10px;
    scrollbar-gutter: stable;
}

body.ui-version-modern .ds-sidebar .side-section { margin: 0 0 12px; }

body.ui-version-modern .ds-sidebar .side-section:last-child { margin-bottom: 0; }

body.ui-version-modern .ds-sidebar .side-menu-items { display: grid; gap: 3px; }

body.ui-version-modern .ds-sidebar .side-context-header {
    align-items: center;
    color: var(--ds-text, var(--text));
    display: flex;
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 780;
    gap: 8px;
    letter-spacing: .04em;
    line-height: 1.2;
    min-height: 34px;
    padding: 4px 9px 6px;
    text-transform: uppercase;
}

body.ui-version-modern .ds-sidebar .side-context-header .side-nav-section-icon {
    color: var(--nav-active-bg);
    display: inline-flex;
    flex: 0 0 20px;
}

body.ui-version-modern .ds-sidebar .side-section--context { margin-bottom: 16px; }

body.ui-version-modern .ds-sidebar .sidebar-module-switcher { display: block; }

body.ui-version-modern .ds-sidebar .sidebar-module-switcher > .side-context-header {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control);
    box-sizing: border-box;
    cursor: pointer;
    padding: 4px 9px 6px;
    width: 100%;
}

body.ui-version-modern .ds-sidebar .sidebar-module-switcher > .side-context-header::after {
    display: block;
    margin-left: auto;
}

body.ui-version-modern .ds-sidebar .sidebar-module-switcher > .side-context-header:hover {
    background: var(--ds-popover-row-hover-bg);
    border-color: color-mix(in srgb, var(--nav-active-bg) 30%, var(--ds-border));
    color: var(--ds-popover-row-hover-text);
}

body.ui-version-modern .ds-sidebar .sidebar-module-switcher[open] > .side-context-header {
    background: var(--ds-popover-row-current-bg);
    border-color: var(--ds-popover-row-current-border);
    color: var(--ds-popover-row-current-text);
}

body.ui-version-modern .ds-sidebar .sidebar-module-switcher .module-switcher-icon { color: var(--nav-active-bg); }

body.ui-version-modern .ds-sidebar .side-title {
    align-items: center;
    background: transparent;
    border: 0;
    box-sizing: border-box;
    color: var(--ds-text-faint, var(--muted));
    display: flex;
    font-size: calc(10px * var(--ds-text-scale, 1));
    font-weight: 750;
    gap: 8px;
    letter-spacing: .06em;
    min-height: 28px;
    padding: 4px 9px;
    text-transform: uppercase;
    width: 100%;
}

body.ui-version-modern .ds-sidebar .side-section--section > .side-title,
body.ui-version-modern .ds-sidebar .side-section--section > summary.side-title { margin-bottom: 3px; }

body.ui-version-modern .ds-sidebar summary.side-title {
    border-radius: var(--radius-ui, 6px);
    cursor: pointer;
    list-style: none;
}

body.ui-version-modern .ds-sidebar summary.side-title::-webkit-details-marker { display: none; }

body.ui-version-modern .ds-sidebar summary.side-title:hover { background: var(--ds-surface-subtle); color: var(--ds-text-muted); }

body.ui-version-modern .ds-sidebar .side-menu-toggle {
    flex: 0 0 12px;
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
    text-align: center;
    transform: rotate(0deg);
    transition: transform .16s ease;
}

body.ui-version-modern .ds-sidebar details[open] > summary .side-menu-toggle { transform: rotate(90deg); }

body.ui-version-modern .ds-sidebar a[data-sidebar-item] {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-ui, 6px);
    box-sizing: border-box;
    background: var(--ds-menu-inactive-bg);
    color: var(--ds-menu-inactive-text);
    display: flex;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    gap: 10px;
    line-height: var(--ds-menu-line-height);
    min-height: 42px;
    overflow: hidden;
    padding: 8px 9px;
    text-decoration: none;
    width: 100%;
}

body.ui-version-modern .ds-sidebar a[data-sidebar-item]:hover {
    background: var(--ds-menu-hover-bg);
    border-color: transparent;
    color: var(--ds-menu-hover-text);
}

body.ui-version-modern .ds-sidebar a[data-sidebar-item].active {
    background: var(--ds-menu-active-bg);
    border-color: transparent;
    color: var(--ds-menu-active-text);
    font-weight: var(--ds-menu-font-weight);
    position: relative;
}

body.ui-version-modern .ds-sidebar a[data-sidebar-item].active:hover {
    background: var(--ds-menu-active-bg);
    border-color: transparent;
    color: var(--ds-menu-active-text);
}

body.ui-version-modern .ds-sidebar a[data-sidebar-item].active::before {
    background: var(--nav-active-bg);
    border-radius: 0 3px 3px 0;
    content: "";
    inset-block: 7px;
    left: -1px;
    position: absolute;
    width: 3px;
}

body.ui-version-modern .ds-sidebar .side-nav-link-icon {
    align-items: center;
    color: currentColor;
    display: inline-flex;
    flex: 0 0 20px;
    height: 20px;
    justify-content: center;
    width: 20px;
}

body.ui-version-modern .ds-sidebar .side-nav-link-icon svg { height: 19px; width: 19px; }

body.ui-version-modern .ds-sidebar .side-nav-link-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.ui-version-modern .ds-sidebar-footer {
    align-items: center;
    background: var(--ds-surface, var(--panel));
    border-top: 1px solid var(--ds-border, var(--line));
    display: flex;
    flex: 0 0 auto;
    min-height: 54px;
    padding: 7px 10px;
}

body.ui-version-modern .ds-sidebar-footer .side-nav-collapse {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-ui, 6px);
    box-sizing: border-box;
    color: var(--ds-text-muted, var(--muted));
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 650;
    gap: 10px;
    height: 40px;
    justify-content: flex-start;
    min-height: 40px;
    padding: 0 9px;
    width: 100%;
}

body.ui-version-modern .ds-sidebar-footer .side-nav-collapse:hover { background: var(--ds-surface-subtle); border-color: var(--ds-border); color: var(--ds-text); }

body.ui-version-modern .ds-sidebar-footer .side-nav-collapse svg { flex: 0 0 20px; height: 20px; transition: transform .16s ease; width: 20px; }

body.ui-version-modern .ds-sidebar-tooltip {
    background: #172033;
    border-radius: 6px;
    box-shadow: var(--ds-shadow-menu);
    color: #fff;
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 650;
    left: 0;
    line-height: 1.3;
    max-width: min(220px, calc(100vw - 24px));
    padding: 7px 9px;
    pointer-events: none;
    position: fixed;
    top: 0;
    white-space: nowrap;
    z-index: 390;
}

body.ui-version-modern .ds-sidebar-tooltip[hidden] { display: none !important; }

@media (min-width: 901px) {
    body.ui-version-modern .ds-sidebar.is-collapsed,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar { padding: 0; width: var(--ds-sidebar-collapsed); }

    body.ui-version-modern .app-shell.is-side-nav-collapsed,
html.side-nav-collapsed body.ui-version-modern .app-shell { grid-template-columns: var(--ds-sidebar-collapsed) minmax(0, 1fr); }

    body.ui-version-modern .ds-sidebar.is-collapsed .side-nav-content,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-nav-content { padding: 8px 6px; scrollbar-gutter: auto; }

    body.ui-version-modern .ds-sidebar.is-collapsed .side-section,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-section { display: block; margin: 0 0 4px; }

    body.ui-version-modern .ds-sidebar.is-collapsed .side-title,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-title,
body.ui-version-modern .ds-sidebar.is-collapsed .side-context-header,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-context-header { display: none; }

    body.ui-version-modern .ds-sidebar.is-collapsed .sidebar-module-switcher > .side-context-header,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .sidebar-module-switcher > .side-context-header {
        display: flex;
        height: 42px;
        justify-content: center;
        margin: 0 auto;
        max-width: 42px;
        min-height: 42px;
        min-width: 42px;
        padding: 0;
        width: 42px;
    }

    body.ui-version-modern .ds-sidebar.is-collapsed .sidebar-module-switcher .module-switcher-current-label,
body.ui-version-modern .ds-sidebar.is-collapsed .sidebar-module-switcher > summary::after,
body.ui-version-modern .ds-sidebar.is-collapsed .sidebar-module-switcher .side-menu-toggle,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .sidebar-module-switcher .module-switcher-current-label,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .sidebar-module-switcher > summary::after,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .sidebar-module-switcher .side-menu-toggle { display: none; }

    body.ui-version-modern .ds-sidebar.is-collapsed .side-menu-items,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-menu-items { display: grid !important; gap: 4px; }

    body.ui-version-modern .ds-sidebar.is-collapsed a[data-sidebar-item],
html.side-nav-collapsed body.ui-version-modern .ds-sidebar a[data-sidebar-item] {
        display: flex !important;
        height: 42px !important;
        justify-content: center;
        margin: 0 auto;
        max-width: 42px !important;
        min-height: 42px !important;
        min-width: 42px !important;
        padding: 0 !important;
        width: 42px !important;
    }

    body.ui-version-modern .ds-sidebar.is-collapsed .side-nav-link-label,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-nav-link-label { display: none; }

    body.ui-version-modern .ds-sidebar.is-collapsed a[data-sidebar-item].active::before,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar a[data-sidebar-item].active::before { inset-block: 8px; left: -7px; }

    body.ui-version-modern .ds-sidebar.is-collapsed .ds-sidebar-footer,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .ds-sidebar-footer { padding: 7px; }

    body.ui-version-modern .ds-sidebar.is-collapsed .side-nav-collapse,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-nav-collapse { justify-content: center; padding: 0; }

    body.ui-version-modern .ds-sidebar.is-collapsed .side-nav-collapse svg,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-nav-collapse svg { transform: rotate(180deg); }

    body.ui-version-modern .ds-sidebar.is-collapsed .side-nav-collapse-label,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar .side-nav-collapse-label { display: none; }

}

@media (max-width: 900px) {
    body.ui-version-modern .topbar[data-ds-global-header] {
        grid-template-areas: "mobile brand utilities actions";
        grid-template-columns: 40px minmax(36px, auto) minmax(0, 1fr) auto;
    }

    body.ui-version-modern button.ds-mobile-nav-trigger { display: inline-flex; grid-area: mobile; }

    body.ui-version-modern .app-shell,
body.ui-version-modern .app-shell.is-side-nav-collapsed { display: block; min-width: 0; }

    body.ui-version-modern .ds-sidebar,
body.ui-version-modern .ds-sidebar.is-collapsed,
html.side-nav-collapsed body.ui-version-modern .ds-sidebar {
        background: transparent;
        border: 0;
        bottom: 0;
        display: block;
        height: auto;
        left: 0;
        max-height: none;
        max-width: none;
        overflow: visible;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: var(--ds-sidebar-mobile-top, var(--ds-header-height, 64px));
        width: auto;
        z-index: 350;
    }

    body.ui-version-modern .ds-sidebar-backdrop {
        background: rgb(15 23 42 / .38);
        border: 0;
        cursor: pointer;
        display: block;
        inset: 0;
        opacity: 0;
        padding: 0;
        pointer-events: none;
        position: absolute;
        transition: opacity .18s ease;
        width: 100%;
    }

    body.ui-version-modern .ds-sidebar-backdrop[hidden] { display: block; }

    body.ui-version-modern .ds-sidebar-surface {
        background: var(--ds-surface, var(--panel));
        border-right: 1px solid var(--ds-border, var(--line));
        box-shadow: 12px 0 28px rgb(15 23 42 / .14);
        height: 100%;
        max-width: min(86vw, 340px);
        pointer-events: auto;
        transform: translateX(-105%);
        transition: transform .2s ease;
        width: 100%;
    }

    body.ui-version-modern .ds-sidebar[data-mobile-open="true"] { pointer-events: auto; }

    body.ui-version-modern .ds-sidebar[data-mobile-open="true"] .ds-sidebar-backdrop { opacity: 1; pointer-events: auto; }

    body.ui-version-modern .ds-sidebar[data-mobile-open="true"] .ds-sidebar-surface { transform: translateX(0); }

    body.ui-version-modern .ds-sidebar-mobile-header {
        align-items: center;
        border-bottom: 1px solid var(--ds-border, var(--line));
        display: flex;
        flex: 0 0 auto;
        justify-content: space-between;
        min-height: 54px;
        padding: 7px 10px 7px 14px;
    }

    body.ui-version-modern .ds-sidebar-mobile-header h2 { font-size: calc(14px * var(--ds-text-scale, 1)); margin: 0; }

    body.ui-version-modern .ds-sidebar-mobile-close {
        align-items: center;
        background: transparent;
        border: 0;
        border-radius: var(--radius-ui, 6px);
        color: var(--ds-text-muted);
        cursor: pointer;
        display: inline-flex;
        font: inherit;
        font-size: calc(24px * var(--ds-text-scale, 1));
        height: 40px;
        justify-content: center;
        padding: 0;
        width: 40px;
    }

    body.ui-version-modern .ds-sidebar-mobile-close:hover { background: var(--ds-surface-subtle); color: var(--ds-text); }

    body.ui-version-modern .ds-sidebar .side-nav-content,
body.ui-version-modern .ds-sidebar.is-collapsed .side-nav-content {
        display: block;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 10px;
    }

    body.ui-version-modern .ds-sidebar .side-section,
body.ui-version-modern .ds-sidebar.is-collapsed .side-section { display: block; margin-bottom: 12px; }

    body.ui-version-modern .ds-sidebar .side-title,
body.ui-version-modern .ds-sidebar.is-collapsed .side-title { display: flex; }

    body.ui-version-modern .ds-sidebar .side-menu-items,
body.ui-version-modern .ds-sidebar.is-collapsed .side-menu-items { display: grid; }

    body.ui-version-modern .ds-sidebar a[data-sidebar-item],
body.ui-version-modern .ds-sidebar.is-collapsed a[data-sidebar-item] {
        display: flex !important;
        height: auto !important;
        justify-content: flex-start;
        margin: 0;
        max-width: none !important;
        min-height: 44px !important;
        padding: 9px !important;
        width: 100% !important;
    }

    body.ui-version-modern .ds-sidebar .side-nav-link-label,
body.ui-version-modern .ds-sidebar.is-collapsed .side-nav-link-label { display: inline; }

    body.ui-version-modern .ds-sidebar .ds-sidebar-footer { display: none; }

    body.ui-version-modern.is-sidebar-drawer-open { overflow: hidden; }

}

@media (max-width: 480px) {
    body.ui-version-modern .topbar[data-ds-global-header] {
        gap: 4px;
        grid-template-areas:
            "mobile brand actions"
            "utilities utilities utilities";
        grid-template-columns: 40px 36px minmax(0, 1fr);
    }

    body.ui-version-modern .topbar[data-ds-global-header] > .brand { max-width: 36px; }

    body.ui-version-modern .topbar[data-ds-global-header] .brand-text { display: none; }

    body.ui-version-modern .topbar[data-ds-global-header] .global-header-utility-slot { justify-content: flex-start; }

}

/* Global header triggers share one state matrix. Content-specific modifiers
   keep semantic meaning (for example danger) without inventing local colors. */
body.ui-version-modern .ds-shell-flyout > .ds-header-trigger:hover,
body.ui-version-modern .ds-header-trigger:hover {
    background: var(--ds-popover-row-hover-bg);
    border-color: color-mix(in srgb, var(--nav-active-bg) 30%, var(--ds-border));
    color: var(--ds-popover-row-hover-text);
}

body.ui-version-modern .ds-shell-flyout > .ds-header-trigger[aria-expanded="true"],
body.ui-version-modern .ds-header-trigger[aria-expanded="true"] {
    background: var(--ds-popover-row-current-bg);
    border-color: var(--ds-popover-row-current-border);
    color: var(--ds-popover-row-current-text);
}

body.ui-version-modern .ds-shell-flyout > .ds-header-trigger:focus-visible,
body.ui-version-modern .ds-header-trigger:focus-visible {
    outline: 3px solid var(--ds-focus);
    outline-offset: 2px;
}

body.ui-version-modern .ds-shell-flyout > .ds-header-trigger--danger,
body.ui-version-modern .ds-shell-flyout > .ds-header-trigger--danger:hover,
body.ui-version-modern .ds-shell-flyout > .ds-header-trigger--danger[aria-expanded="true"],
body.ui-version-modern .ds-header-trigger--danger,
body.ui-version-modern .ds-header-trigger--danger:hover,
body.ui-version-modern .ds-header-trigger--danger[aria-expanded="true"] {
    background: color-mix(in srgb, var(--ds-danger) 7%, var(--ds-surface));
    border-color: color-mix(in srgb, var(--ds-danger) 42%, var(--ds-border));
    color: var(--ds-danger);
}

/* Core administration closure (wave 5). These rules only compose existing
   Design System primitives for the scoped Core administration renderers. */
body.ui-version-modern .core-access-level-collection,
body.ui-version-modern .core-media-collection,
body.ui-version-modern .core-module-collection {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    min-width: 0;
    overflow: hidden;
}

body.ui-version-modern .ds-settings-layout-content > .ds-collection-summary {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel) var(--ds-radius-panel) 0 0;
}

body.ui-version-modern .core-access-level-table { min-width: 840px; table-layout: fixed; }

body.ui-version-modern .core-access-level-table th:first-child,
body.ui-version-modern .core-access-level-table td:first-child { width: 21%; }

body.ui-version-modern .core-access-level-table td:first-child .pill { margin: 2px 3px 2px 0; }

body.ui-version-modern .core-access-level-table th:nth-child(2),
body.ui-version-modern .core-access-level-table td:nth-child(2) { width: 17%; }

body.ui-version-modern .core-access-level-table th:nth-child(3),
body.ui-version-modern .core-access-level-table td:nth-child(3) { width: 15%; }

body.ui-version-modern .core-access-level-table th:nth-child(4),
body.ui-version-modern .core-access-level-table td:nth-child(4) { width: 12%; }

body.ui-version-modern .core-access-level-table th:nth-child(5),
body.ui-version-modern .core-access-level-table td:nth-child(5) { max-width: none; white-space: normal; width: 19%; }

body.ui-version-modern .core-access-level-table th:nth-child(6),
body.ui-version-modern .core-access-level-table td:nth-child(6) { width: 5%; }

body.ui-version-modern .core-access-level-table th:nth-child(7),
body.ui-version-modern .core-access-level-table td:nth-child(7) { width: 5%; }

body.ui-version-modern .core-access-level-table th:nth-child(8),
body.ui-version-modern .core-access-level-table td:nth-child(8) { width: 6%; }

body.ui-version-modern .core-access-level-table code { overflow-wrap: normal; white-space: nowrap; }

body.ui-version-modern .core-media-table code { overflow-wrap: anywhere; white-space: normal; }

body.ui-version-modern .core-media-table { min-width: 760px; }

body.ui-version-modern .core-media-table td:first-child { width: 72px; }

body.ui-version-modern .core-media-table .media-file-purpose,
body.ui-version-modern .core-media-table .media-file-name { display: block; }

body.ui-version-modern .core-media-table .media-file-purpose {
    color: var(--ds-text);
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    font-weight: 750;
    margin-bottom: 2px;
}

body.ui-version-modern .core-media-table .media-file-name {
    color: var(--ds-text-strong, var(--ds-text));
    overflow-wrap: anywhere;
}

body.ui-version-modern .core-media-table .media-usage-list {
    color: var(--ds-text-muted);
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    line-height: 1.4;
}

body.ui-version-modern .core-media-delete-usage { margin: 8px 0 14px; padding-left: 20px; }

body.ui-version-modern .core-module-collection { padding: 14px; }

body.ui-version-modern .modules-core-status { align-items: center; display: flex; gap: 14px; justify-content: space-between; min-width: 0; }

body.ui-version-modern .modules-core-status > .ds-action-menu { margin-left: 0; }

body.ui-version-modern .modules-core-status > div { display: grid; gap: 3px; min-width: 0; }

body.ui-version-modern .modules-core-status span { color: var(--ds-text-muted); }

body.ui-version-modern .module-units { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); overflow: hidden; }

body.ui-version-modern .module-unit { background: var(--ds-surface); display: grid; gap: 8px 14px; grid-template-columns: minmax(0, 1fr) 112px 40px; min-width: 0; padding: 12px 14px; }

body.ui-version-modern .module-unit + .module-unit { border-top: 1px solid var(--ds-border); }

body.ui-version-modern .module-unit-primary { min-width: 0; }

body.ui-version-modern .module-unit-identity { display: grid; gap: 3px; min-width: 0; }

body.ui-version-modern .module-unit-identity > strong { font-size: calc(.94rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .module-unit-identity > span { color: var(--ds-text-muted); line-height: 1.38; }

body.ui-version-modern .module-unit-lifecycle { align-self: center; grid-column: 2; grid-row: 1; justify-self: start; min-width: 0; }

body.ui-version-modern .module-unit-secondary { align-items: center; color: var(--ds-text-muted); display: flex; flex-wrap: wrap; gap: 7px 10px; grid-column: 1 / -1; min-width: 0; }

body.ui-version-modern .module-update-action { margin-left: auto; white-space: nowrap; }

body.ui-version-modern .module-unit-actions { align-self: center; grid-column: 3; grid-row: 1; justify-self: start; }

body.ui-version-modern .module-unit-actions:empty { display: none; }

@media (max-width: 760px) {
    body.ui-version-modern .core-access-level-table,
body.ui-version-modern .core-media-table { min-width: 0; }

    body.ui-version-modern .core-access-level-collection .table-wrap,
body.ui-version-modern .core-media-collection .table-wrap { overflow: visible; }

    body.ui-version-modern .core-access-level-table thead,
body.ui-version-modern .core-media-table thead { display: none; }

    body.ui-version-modern .core-access-level-table tbody,
body.ui-version-modern .core-media-table tbody { display: grid; }

    body.ui-version-modern .core-access-level-table tr:not(.access-level-section-row),
body.ui-version-modern .core-media-table tr { border-bottom: 1px solid var(--ds-border); display: grid; padding: 12px; }

    body.ui-version-modern .core-access-level-table td,
body.ui-version-modern .core-media-table td { border: 0; display: grid; gap: 4px; max-width: none !important; padding: 7px 0 !important; text-align: left !important; width: auto !important; }

    body.ui-version-modern .core-access-level-table td::before,
body.ui-version-modern .core-media-table td::before { color: var(--ds-text-muted); content: attr(data-label); font-size: calc(.7rem * var(--ds-text-scale, 1)); font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }

    body.ui-version-modern .core-access-level-table .access-level-section-row { display: table-row; }

    body.ui-version-modern .core-access-level-table .access-level-section-row td::before { content: none; }

    body.ui-version-modern .core-module-collection { padding: 0; }

    body.ui-version-modern .modules-core-status { align-items: start; flex-direction: column; }

    body.ui-version-modern .module-unit { gap: 9px; padding: 11px 12px; }

    body.ui-version-modern .module-unit-primary { gap: 10px; }

    body.ui-version-modern .module-unit-secondary { align-items: start; flex-direction: column; gap: 7px; }

    body.ui-version-modern .module-unit-lifecycle { grid-column: 2; }

    body.ui-version-modern .module-unit-actions { grid-column: 3; }

    body.ui-version-modern .module-update-action { margin-left: 0; }

}

@media (prefers-reduced-motion: reduce) {
    body.ui-version-modern .ds-sidebar-surface,
body.ui-version-modern .ds-sidebar-backdrop,
body.ui-version-modern .ds-sidebar .side-menu-toggle,
body.ui-version-modern .ds-sidebar-footer .side-nav-collapse svg { transition: none; }

}

body.ui-version-modern .account-menu > summary {
    border: 1px solid transparent;
    min-height: 34px;
    padding: 3px 7px 3px 4px;
}

body.ui-version-modern .profile-menu-list {
    background: var(--ds-surface-raised);
    border: 1px solid var(--ds-border);
    box-shadow: var(--ds-shadow-menu);
    color: var(--ds-text);
}

body.ui-version-modern .profile-menu-list a { font-size: calc(.88rem * var(--ds-text-scale, 1)); min-height: 34px; padding: 7px 10px; }

body.ui-version-modern .info-item { gap: 4px; }

body.ui-version-modern .info-item > span { color: var(--ds-text-faint); font-size: calc(.72rem * var(--ds-text-scale, 1)); text-transform: uppercase; }

body.ui-version-modern .info-item > strong { color: var(--ds-text); font-size: calc(.78rem * var(--ds-text-scale, 1)); font-weight: 600; }

body.ui-version-modern .app-shell { grid-template-columns: var(--ds-sidebar-width) minmax(0, 1fr); }

body.ui-version-modern .app-shell.is-side-nav-collapsed { grid-template-columns: var(--ds-sidebar-collapsed) minmax(0, 1fr); }

html.side-nav-collapsed body.ui-version-modern .app-shell { grid-template-columns: var(--ds-sidebar-collapsed) minmax(0, 1fr); }

body.ui-version-modern .side-nav {
    background: var(--ds-surface);
    border-right: 1px solid var(--ds-border);
    color: var(--ds-text);
    padding: 0;
    width: var(--ds-sidebar-width);
}

body.ui-version-modern .side-nav.is-collapsed { width: var(--ds-sidebar-collapsed); }

html.side-nav-collapsed body.ui-version-modern .side-nav { width: var(--ds-sidebar-collapsed); }

body.ui-version-modern .side-nav-collapse {
    align-items: center;
    background: var(--ds-surface-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control);
    color: var(--ds-text);
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    min-height: 34px;
    min-width: 34px;
    width: 34px;
}

body.ui-version-modern .side-nav-collapse svg { height: 20px; stroke-width: 2.5; width: 20px; }

body.ui-version-modern .side-nav-collapse:hover {
    background: var(--nav-hover-bg);
    border-color: color-mix(in srgb, var(--nav-active-bg) 42%, var(--ds-border));
    color: var(--nav-hover-text);
}

body.ui-version-modern .side-nav-content { padding: 8px; }

body.ui-version-modern .side-section { margin: 0 0 8px; }

body.ui-version-modern .side-title {
    color: var(--ds-text-faint);
    font-size: calc(.68rem * var(--ds-text-scale, 1));
    font-weight: 700;
    letter-spacing: .065em;
    min-height: 28px;
    padding: 5px 8px;
    text-transform: uppercase;
}

body.ui-version-modern .side-nav a {
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control);
    color: var(--ds-text-muted);
    font-size: calc(.86rem * var(--ds-text-scale, 1));
    font-weight: 560;
    gap: 9px;
    min-height: 34px;
    padding: 6px 8px;
}

body.ui-version-modern .side-nav a:hover { background: var(--ds-surface-subtle); border-color: var(--ds-border); color: var(--ds-text); }

body.ui-version-modern .side-nav a.active {
    background: color-mix(in srgb, var(--nav-active-bg) 12%, var(--ds-surface));
    border-color: color-mix(in srgb, var(--nav-active-bg) 26%, var(--ds-border));
    color: color-mix(in srgb, var(--nav-active-bg) 78%, var(--ds-text));
    font-weight: 650;
    position: relative;
}

body.ui-version-modern .side-nav a.active::before {
    background: var(--nav-active-bg);
    border-radius: 3px;
    content: "";
    height: 18px;
    left: -5px;
    position: absolute;
    top: 7px;
    width: 3px;
}

body.ui-version-modern .side-nav-section-icon,
body.ui-version-modern .side-nav-link-icon { color: currentColor; height: 17px; width: 17px; }

body.ui-version-modern .side-nav.is-collapsed .side-nav a { justify-content: center; padding-inline: 6px; }

body.ui-version-modern .app-content-scroll { background: var(--ds-bg); }

body.ui-version-modern .page {
    gap: var(--ds-page-gap);
    margin: 0 auto;
    max-width: var(--ds-content-max);
    padding: var(--ds-page-pad);
    width: 100%;
}

body.ui-version-modern .ds-page-body {
    display: grid;
    gap: var(--ds-section-gap);
    min-width: 0;
    width: 100%;
}

body.ui-version-modern .ds-page-body--form { max-width: min(100%, var(--ds-content-form)); }

body.ui-version-modern .ds-page-body--detail { max-width: min(100%, var(--ds-content-detail)); }

body.ui-version-modern .ds-page-body--list,
body.ui-version-modern .ds-page-body--settings,
body.ui-version-modern .ds-page-body--dashboard,
body.ui-version-modern .ds-page-body--diagnostic { max-width: 100%; }

/* Headers, panels and toolbars */
body.ui-version-modern .page-title,
body.ui-version-modern .ds-page-header {
    align-items: center;
    background: transparent;
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px var(--ds-header-gap);
    justify-content: space-between;
    margin: 0 0 var(--ds-page-header-content-gap);
    min-height: 0;
    padding: 1px 1px 7px;
}

body.ui-version-modern .page-title h1,
body.ui-version-modern .ds-page-header h1,
body.ui-version-modern .ds-page-header h2 {
    color: var(--ds-text);
    font-size: calc(1.5rem * var(--ds-text-scale, 1));
    line-height: 1.18;
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

body.ui-version-modern .ds-page-header-copy {
    display: grid;
    flex: 1 1 36rem;
    gap: 3px;
    min-width: min(100%, 28rem);
}

body.ui-version-modern .ds-page-heading-line {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 2px var(--ds-page-heading-description-gap, 6px);
    min-width: 0;
}

/* Page-owned context selectors stay in the same compact heading flow as the
   title, description and page overflow. Their popup remains its own shared
   flyout contract; this only defines the closed trigger's placement. */
body.ui-version-modern .ds-page-heading-inline {
    align-items: center;
    display: inline-flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: var(--ds-action-gap);
    max-width: 100%;
    min-width: 0;
}

body.ui-version-modern .ds-page-heading-inline > .ds-action-menu { flex: 0 0 auto; }

body.ui-version-modern .ds-page-inline-selector { flex: 0 1 auto; min-width: 0; position: relative; }

body.ui-version-modern .ds-page-inline-selector > .ds-page-inline-selector-trigger {
    align-items: center;
    background: var(--ds-surface);
    border: 1px solid var(--ds-border-strong, var(--ds-border));
    border-radius: var(--ds-radius-control);
    color: var(--ds-text);
    cursor: pointer;
    display: flex;
    gap: 6px;
    list-style: none;
    max-width: 100%;
    min-height: calc(var(--ds-control-height) - 6px);
    padding: 5px 8px;
}

body.ui-version-modern .ds-page-inline-selector > .ds-page-inline-selector-trigger::-webkit-details-marker { display: none; }

body.ui-version-modern .ds-page-inline-selector-copy { align-items: center; display: flex; gap: 6px; min-width: 0; }

body.ui-version-modern .ds-page-inline-selector-copy > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.ui-version-modern .ds-page-inline-selector-copy > .ds-directional-icon { flex: 0 0 auto; }

body.ui-version-modern .ds-page-header-copy h1,
body.ui-version-modern .ds-page-header-copy h2 {
    align-items: center;
    display: inline-flex;
    flex: 0 1 auto;
    gap: 8px;
}

body.ui-version-modern .page-title > .hint,
body.ui-version-modern .page-title > div > .hint,
body.ui-version-modern .ds-page-description {
    color: var(--ds-text-muted);
    display: block;
    flex: 1 1 22rem;
    font-size: calc(.88rem * var(--ds-text-scale, 1));
    line-height: 1.35;
    margin: 0;
    max-width: 80ch;
    min-width: min(100%, 18rem);
    overflow-wrap: anywhere;
}

/* A page title and its description are one heading line where space permits.
   The generic description rules above remain suitable for other containers;
   this focused rule prevents every page header from inventing its own gap. */
body.ui-version-modern .ds-page-heading-line > .ds-page-description {
    flex: 0 1 auto;
    min-width: 0;
}

/* Inline page context and its overflow need a little breathing room before
   the supporting description without changing the title→description gap. */
body.ui-version-modern .ds-page-heading-inline + .ds-page-description { margin-left: 6px; }

/* Canonical input-affix geometry: interaction state never changes its box. */
body.ui-version-modern .password-input-control { display: block; isolation: isolate; position: relative; width: 100%; }

body.ui-version-modern .password-input-control > input[type="password"],
body.ui-version-modern .password-input-control > input[type="text"] { box-sizing: border-box; display: block; padding-right: calc(var(--ds-password-affix-size) + var(--ds-password-affix-inset) + 8px) !important; width: 100%; }

body.ui-version-modern .password-input-control {
    --ds-password-affix-size: var(--ds-control-height);
    --ds-password-affix-inset: 5px;
}

body.ui-version-modern .password-visibility-toggle { align-items: center; appearance: none; background: transparent; border: 0; border-radius: 4px; box-sizing: border-box; color: var(--ds-text-muted); cursor: pointer; display: inline-flex; flex: 0 0 var(--ds-password-affix-size); height: var(--ds-password-affix-size); justify-content: center; line-height: 1; margin: 0; min-height: var(--ds-password-affix-size); min-width: var(--ds-password-affix-size); padding: 5px; position: absolute; right: var(--ds-password-affix-inset); top: 50%; transform: translateY(-50%); width: var(--ds-password-affix-size); }

body.ui-version-modern .password-input-control > .password-visibility-toggle:hover,
body.ui-version-modern .password-input-control > .password-visibility-toggle:focus-visible,
body.ui-version-modern .password-input-control > .password-visibility-toggle[aria-pressed="true"],
body.ui-version-modern .password-input-control > .password-visibility-toggle:active { background: var(--ds-surface-subtle); color: var(--ds-text); filter: none; }

body.ui-version-modern .password-input-control > .password-visibility-toggle:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .password-input-control > .password-visibility-toggle:active { background: var(--ds-surface-strong); }

body.ui-version-modern .password-visibility-toggle svg { display: block; fill: none; flex: 0 0 18px; height: 18px; pointer-events: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 18px; }

body.ui-version-modern .page-actions,
body.ui-version-modern .ds-page-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: var(--ds-action-gap);
    justify-content: flex-end;
    margin: 0;
    min-width: 0;
}

body.ui-version-modern .ds-page-action { white-space: nowrap; }

body.ui-version-modern .ds-page-status-summary { margin: 0 0 var(--ds-page-gap); }

body.ui-version-modern .panel,
body.ui-version-modern .ds-panel,
body.ui-version-modern .settings-panel {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    box-shadow: none;
    color: var(--ds-text);
    margin: 0;
    padding: var(--ds-panel-pad);
}

body.ui-version-modern .panel > h1:first-child,
body.ui-version-modern .panel > h2:first-child,
body.ui-version-modern .panel > h3:first-child { margin-bottom: 10px; }

body.ui-version-modern .ds-panel-header {
    align-items: flex-start;
    background: var(--ds-surface-subtle);
    border-bottom: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel) var(--ds-radius-panel) 0 0;
    display: flex;
    gap: var(--ds-panel-gap);
    justify-content: space-between;
    margin: calc(var(--ds-panel-pad) * -1) calc(var(--ds-panel-pad) * -1) var(--ds-section-gap);
    padding: var(--ds-panel-header-y) var(--ds-panel-pad);
}

body.ui-version-modern .ds-panel-header h2,
body.ui-version-modern .ds-panel-header p { margin-bottom: 0; }

body.ui-version-modern .ds-panel-header p { color: var(--ds-text-muted); font-size: calc(.84rem * var(--ds-text-scale, 1)); margin-top: 2px; }

body.ui-version-modern .ds-toolbar {
    align-items: end;
    background: var(--ds-surface-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-toolbar-gap);
    margin: 0;
    min-height: 46px;
    padding: var(--ds-toolbar-pad);
}

/* Canonical collection/list pattern. Domain filters and data stay page-owned;
   Core owns the stable anatomy, density and interaction surfaces. */
body.ui-version-modern .ds-visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

body.ui-version-modern .ds-collection {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    min-width: 0;
}

body.ui-version-modern .ds-collection-toolbar {
    align-items: center;
    background: var(--ds-surface);
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    gap: var(--ds-toolbar-gap);
    justify-content: space-between;
    min-width: 0;
    padding: var(--ds-toolbar-pad);
}

body.ui-version-modern .ds-submit-search {
    align-items: stretch;
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-control);
    display: grid;
    flex: 1 1 360px;
    grid-template-columns: 34px minmax(120px, 1fr) auto auto;
    max-width: 500px;
    min-width: 280px;
    overflow: hidden;
}

body.ui-version-modern .ds-submit-search:focus-within {
    border-color: var(--ds-primary);
    box-shadow: 0 0 0 3px var(--ds-focus);
}

body.ui-version-modern .ds-submit-search-icon {
    align-items: center;
    color: var(--ds-text-muted);
    display: flex;
    justify-content: center;
    pointer-events: none;
}

body.ui-version-modern .ds-submit-search-icon svg {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
    width: 16px;
}

body.ui-version-modern .ds-submit-search input[type="search"] {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: var(--ds-control-height);
    min-width: 0;
    outline: 0;
    padding: 0 4px;
    width: 100%;
}

body.ui-version-modern .ds-submit-search input[type="search"]::-webkit-search-cancel-button { display: none; }

body.ui-version-modern .ds-submit-search-clear {
    align-items: center;
    color: var(--ds-text-muted);
    display: flex;
    font-size: calc(1.15rem * var(--ds-text-scale, 1));
    justify-content: center;
    min-width: 28px;
    text-decoration: none;
}

body.ui-version-modern .ds-submit-search-clear:hover { color: var(--ds-text); }

body.ui-version-modern .ds-submit-search-button {
    border-radius: 0;
    min-height: var(--ds-control-height);
    padding-inline: 14px;
}

body.ui-version-modern .ds-collection-controls,
body.ui-version-modern .ds-collection-export {
    align-items: center;
    display: flex;
    gap: var(--ds-toolbar-gap);
    min-width: 0;
}

body.ui-version-modern .ds-collection-controls { justify-content: flex-end; }

body.ui-version-modern .ds-collection-control { margin: 0; min-width: 0; }

body.ui-version-modern .ds-collection-control select { min-width: 120px; }

body.ui-version-modern .ds-collection-export { border-left: 1px solid var(--ds-border); padding-left: var(--ds-toolbar-gap); }

body.ui-version-modern .ds-collection-export > span,
body.ui-version-modern .ds-segmented-label {
    color: var(--ds-text-muted);
    font-size: calc(.75rem * var(--ds-text-scale, 1));
    font-weight: 650;
}

body.ui-version-modern .ds-collection-export .button { padding-inline: 8px; }

body.ui-version-modern .ds-collection-filter { flex: 0 0 auto; position: relative; }

body.ui-version-modern .ds-collection-filter > summary { list-style: none; }

body.ui-version-modern .ds-collection-filter > summary::-webkit-details-marker { display: none; }

body.ui-version-modern .ds-collection-filter-trigger {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    min-height: var(--ds-control-height);
}

body.ui-version-modern .ds-collection-filter.is-active .ds-collection-filter-trigger {
    background: color-mix(in srgb, var(--ds-primary) 8%, var(--ds-surface));
    border-color: color-mix(in srgb, var(--ds-primary) 44%, var(--ds-border));
    color: var(--ds-primary);
}

body.ui-version-modern .ds-collection-filter-count {
    color: currentColor;
    font-size: calc(.76rem * var(--ds-text-scale, 1));
    font-variant-numeric: tabular-nums;
    font-weight: 850;
}

body.ui-version-modern .ds-collection-filter-panel {
    right: 0;
    width: min(420px, calc(100vw - 24px));
}

body.ui-version-modern .ds-collection-filter-form { display: grid; gap: 10px; }

body.ui-version-modern .ds-collection-filter-fields { display: grid; gap: 12px; padding: 10px 12px 2px; }

body.ui-version-modern .ds-collection-filter-section { display: grid; gap: 5px; }

body.ui-version-modern .ds-collection-filter-section > label,
body.ui-version-modern .ds-collection-filter-label {
    color: var(--ds-text-muted);
    font-size: calc(.72rem * var(--ds-text-scale, 1));
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.ui-version-modern .ds-collection-filter-section select,
body.ui-version-modern .ds-collection-filter-section input { width: 100%; }

body.ui-version-modern .ds-collection-filter-footer {
    align-items: center;
    display: flex;
    gap: var(--ds-action-gap);
    justify-content: space-between;
    margin: 0 12px;
}

body.ui-version-modern .ds-sortable-header,
body.ui-version-modern .ds-sortable-header-group { align-items: center; display: inline-flex; min-width: 0; }

body.ui-version-modern .ds-sortable-header {
    border-radius: var(--ds-radius-control);
    color: var(--ds-text-muted);
    gap: 3px;
    padding: 3px 2px;
    text-decoration: none;
}

body.ui-version-modern .ds-sortable-header:hover { color: var(--ds-text); }

body.ui-version-modern .ds-sortable-header:focus-visible { outline: 2px solid var(--ds-primary); outline-offset: 2px; }

body.ui-version-modern .ds-sortable-header.is-active { color: var(--ds-primary); font-weight: 850; }

body.ui-version-modern .ds-sort-icon { opacity: .58; }

body.ui-version-modern .ds-sortable-header:hover .ds-sort-icon,
body.ui-version-modern .ds-sortable-header:focus-visible .ds-sort-icon,
body.ui-version-modern .ds-sortable-header.is-active .ds-sort-icon { opacity: 1; }

body.ui-version-modern .ds-sortable-header-group { gap: 4px; }

body.ui-version-modern .ds-sortable-header-separator { color: var(--ds-text-faint); }

body.ui-version-modern .ds-export-action { align-items: center; display: inline-flex; gap: 5px; }

body.ui-version-modern .ds-export-icon { align-items: center; display: inline-flex; }

body.ui-version-modern .ds-export-icon svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 17px;
}

body.ui-version-modern .ds-export-action--csv .ds-export-icon { color: var(--ds-success); }

body.ui-version-modern .ds-export-action--pdf .ds-export-icon { color: var(--ds-danger); }

/* Route tabs are URL navigation. They remain native links and use a linear
   active marker rather than the filled selection used by segmented modes. */
body.ui-version-modern .ds-route-tabs {
    align-items: end;
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 2px;
    /* Desktop navigation is not a scroll surface. Narrow viewports keep the
       native horizontal overflow but hide an otherwise distracting scrollbar. */
    scrollbar-width: none;
}

body.ui-version-modern .ds-route-tabs::-webkit-scrollbar { display: none; }

body.ui-version-modern .ds-route-tab {
    align-items: center;
    background: transparent;
    border-bottom: 3px solid transparent;
    color: var(--ds-text-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: calc(.82rem * var(--ds-text-scale, 1));
    font-weight: 650;
    margin-bottom: -1px;
    min-height: 40px;
    padding: 8px 11px;
    text-decoration: none;
    white-space: nowrap;
}

body.ui-version-modern .ds-route-tab:hover { background: var(--ds-surface-subtle); color: var(--ds-text); }

body.ui-version-modern .ds-route-tab[aria-current="page"] {
    border-bottom-color: var(--ds-primary);
    color: var(--ds-text);
    font-weight: 750;
}

body.ui-version-modern .ds-route-tab:focus-visible {
    border-radius: var(--ds-radius-control) var(--ds-radius-control) 0 0;
    box-shadow: inset 0 0 0 3px var(--ds-focus);
    outline: 0;
}

/* Segmented controls select one local mode. Links preserve URL-backed state;
   local buttons expose the selected option with aria-pressed. */
body.ui-version-modern .ds-segmented-control {
    align-items: center;
    background: var(--ds-surface-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control);
    display: inline-flex;
    gap: 2px;
    margin: 0;
    padding: 2px;
}

body.ui-version-modern .ds-segmented-label { margin-inline: 5px 3px; }

body.ui-version-modern .ds-segmented-option {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: calc(var(--ds-radius-control) - 2px);
    color: var(--ds-text-muted);
    display: inline-flex;
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    font-weight: 650;
    justify-content: center;
    min-height: calc(var(--ds-control-height) - 6px);
    padding: 5px 9px;
    text-decoration: none;
}

body.ui-version-modern .ds-segmented-option:hover:not(:disabled) {
    background: color-mix(in srgb, var(--ds-surface) 72%, transparent);
    color: var(--ds-text);
    filter: none;
}

body.ui-version-modern .ds-segmented-option[aria-current="true"],
body.ui-version-modern .ds-segmented-option[aria-pressed="true"] {
    background: var(--ds-surface);
    border-color: var(--ds-border-strong);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
    color: var(--ds-primary);
    font-weight: 750;
}

body.ui-version-modern .ds-segmented-option:focus-visible {
    box-shadow: 0 0 0 3px var(--ds-focus);
    outline: 0;
    position: relative;
    z-index: 1;
}

body.ui-version-modern .ds-collection-summary {
    align-items: center;
    background: var(--ds-surface-subtle);
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 22px;
    margin: 0;
    min-height: 38px;
    padding: 6px calc(var(--ds-toolbar-pad) + 2px);
}

body.ui-version-modern .ds-collection-summary-item {
    align-items: baseline;
    display: inline-flex;
    gap: 5px;
    margin: 0;
}

body.ui-version-modern .ds-collection-summary-item dt { color: var(--ds-text-muted); font-size: calc(12.5px * var(--ds-text-scale, 1)); font-weight: 650; }

body.ui-version-modern .ds-collection-summary-item dd { color: var(--ds-text); font-size: calc(13px * var(--ds-text-scale, 1)); font-variant-numeric: tabular-nums; font-weight: 750; margin: 0; }

body.ui-version-modern .ds-collection-summary-item--active dd { color: var(--ds-success); }

body.ui-version-modern .ds-collection-summary-item--warning dd { color: var(--ds-warning); }

body.ui-version-modern .ds-collection-summary-item--suspended dd,
body.ui-version-modern .ds-collection-summary-item--error dd { color: var(--ds-danger); }

body.ui-version-modern .ds-collection .table-wrap,
body.ui-version-modern .ds-collection .ds-table-wrap { border: 0; border-radius: 0 0 var(--ds-radius-panel) var(--ds-radius-panel); }

body.ui-version-modern .ds-collection-table th:first-child,
body.ui-version-modern .ds-collection-table td:first-child { padding-left: calc(var(--ds-table-x) + 2px); }

body.ui-version-modern .ds-collection-table th:last-child,
body.ui-version-modern .ds-collection-table td:last-child { padding-right: calc(var(--ds-table-x) + 2px); }

body.ui-version-modern .ds-collection-primary-link {
    background: transparent;
    border: 0;
    color: var(--ds-text);
    display: inline;
    font: inherit;
    font-weight: 700;
    min-height: 0;
    padding: 0;
    text-align: left;
}

body.ui-version-modern a.ds-collection-primary-link {
    color: var(--ds-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.ui-version-modern .ds-collection-primary-link:hover { color: var(--ds-primary); text-decoration: underline; }

body.ui-version-modern .ds-action-menu { display: inline-flex; position: relative; }

body.ui-version-modern .ds-action-menu-trigger[aria-expanded="true"] {
    background: var(--ds-surface-strong);
    border-color: var(--ds-border-strong);
}

body.ui-version-modern .ds-action-menu-panel {
    background: var(--ds-surface-raised);
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-control);
    box-shadow: var(--ds-shadow-menu);
    display: grid;
    min-width: 156px;
    padding: 4px;
    position: fixed;
    text-align: left;
    z-index: 80;
}

body.ui-version-modern .ds-action-menu-panel[hidden] { display: none; }

body.ui-version-modern .ds-action-menu-item {
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: var(--ds-text);
    display: block;
    font-size: calc(.82rem * var(--ds-text-scale, 1));
    font-weight: 550;
    min-height: 32px;
    padding: 7px 9px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

body.ui-version-modern .ds-action-menu-item:hover,
body.ui-version-modern .ds-action-menu-item:focus-visible { background: var(--ds-surface-strong); outline: 0; }

body.ui-version-modern .ds-action-menu-item--danger { color: var(--ds-danger); }

body.ui-version-modern .ds-row-action-trigger {
    font-size: calc(1.15rem * var(--ds-text-scale, 1));
    letter-spacing: .08em;
    min-height: 30px;
    min-width: 34px;
    padding: 3px 7px;
}

body.ui-version-modern .ds-page-overflow-trigger { min-height: var(--ds-control-height); min-width: var(--ds-control-height); }

body.ui-version-modern .ds-collection-state {
    border: 0;
    border-radius: 0 0 var(--ds-radius-panel) var(--ds-radius-panel);
    min-height: 160px;
}

@media (max-width: 1350px) {
    body.ui-version-modern .ds-collection-toolbar { align-items: stretch; flex-wrap: wrap; }

    body.ui-version-modern .ds-submit-search { flex-basis: 100%; max-width: none; }

    body.ui-version-modern .ds-collection-controls { flex: 1 1 100%; }

}

@media (max-width: 760px) {
    body.ui-version-modern .ds-submit-search { min-width: 0; }

    body.ui-version-modern .ds-collection-controls { align-items: stretch; flex-direction: column; }

    body.ui-version-modern .ds-collection-control select { width: 100%; }

    body.ui-version-modern .ds-collection-export { border-left: 0; padding-left: 0; }

    body.ui-version-modern .ds-collection-filter { flex: 1 1 auto; }

    body.ui-version-modern .ds-collection-filter-trigger { justify-content: center; width: 100%; }

    body.ui-version-modern .ds-collection-filter-panel { left: 0; right: auto; }

    body.ui-version-modern .ds-segmented-control { align-self: flex-start; }

    body.ui-version-modern .ds-segmented-option { min-height: 40px; }

    body.ui-version-modern .ds-route-tab { min-height: 44px; }

}

/* Actions and form controls */
body.ui-version-modern button,
body.ui-version-modern .button,
body.ui-version-modern input[type="button"],
body.ui-version-modern input[type="submit"] {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control);
    display: inline-flex;
    font-family: var(--ds-font);
    font-size: calc(.84rem * var(--ds-text-scale, 1));
    font-weight: 600;
    line-height: 1;
    gap: 6px;
    justify-content: center;
    min-height: var(--ds-control-height);
    padding: 6px 11px;
    text-decoration: none;
    white-space: nowrap;
}

body.ui-version-modern button.primary,
body.ui-version-modern .button.primary { background: var(--action-primary-bg); border-color: var(--action-primary-bg); color: var(--action-primary-text); }

body.ui-version-modern button.secondary,
body.ui-version-modern .button.secondary { background: var(--ds-surface); border-color: var(--ds-border-strong); color: var(--ds-text); }

body.ui-version-modern button.success,
body.ui-version-modern .button.success { background: var(--action-success-bg); border-color: var(--action-success-bg); color: var(--action-success-text); }

body.ui-version-modern button.warning,
body.ui-version-modern .button.warning { background: var(--ds-warning-soft); border-color: color-mix(in srgb, var(--ds-warning) 45%, var(--ds-border)); color: var(--ds-warning); }

body.ui-version-modern button.danger,
body.ui-version-modern .button.danger,
body.ui-version-modern button.destructive,
body.ui-version-modern .button.destructive { background: var(--action-danger-bg); border-color: var(--action-danger-bg); color: var(--action-danger-text); }

body.ui-version-modern button.ghost,
body.ui-version-modern .button.ghost { background: transparent; border-color: transparent; color: var(--ds-text-muted); }

body.ui-version-modern button:hover:not(:disabled):not(.password-visibility-toggle),
body.ui-version-modern .button:hover { filter: brightness(.97); transform: none; }

body.ui-version-modern button.secondary:hover:not(:disabled),
body.ui-version-modern .button.secondary:hover { background: var(--ds-surface-strong); }

body.ui-version-modern button:disabled,
body.ui-version-modern .button[aria-disabled="true"] { background: var(--ds-surface-strong); border-color: var(--ds-border); color: var(--ds-text-muted); cursor: not-allowed; opacity: .7; }

body.ui-version-modern button.is-busy { color: transparent !important; position: relative; }

body.ui-version-modern button.is-busy::after {
    animation: ds-busy-spin .7s linear infinite;
    border: 2px solid color-mix(in srgb, currentColor 28%, transparent);
    border-radius: 50%;
    border-top-color: currentColor;
    color: var(--ds-text);
    content: "";
    height: 14px;
    inset: 50% auto auto 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 14px;
}

body.ui-version-modern button.primary.is-busy::after { color: var(--action-primary-text); }

body.ui-version-modern button.success.is-busy::after { color: var(--action-success-text); }

body.ui-version-modern button.warning.is-busy::after { color: var(--ds-warning); }

body.ui-version-modern button.danger.is-busy::after,
body.ui-version-modern button.destructive.is-busy::after { color: var(--action-danger-text); }

body.ui-version-modern .compact-button { min-height: 28px; padding: 4px 8px; }

body.ui-version-modern label { color: var(--ds-text); font-size: calc(14px * var(--ds-text-scale, 1)); font-weight: 620; gap: var(--ds-field-gap); }

body.ui-version-modern .field-help {
    color: var(--ds-text-muted);
    display: block;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

body.ui-version-modern .hint,
body.ui-version-modern .helper,
body.ui-version-modern .button-help { color: var(--ds-text-muted); font-size: calc(13px * var(--ds-text-scale, 1)); font-weight: 400; line-height: 1.4; }

body.ui-version-modern .ds-account-status-explanation {
    color: var(--ds-text-muted);
    display: block;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 400;
    line-height: 1.4;
    margin-top: 2px;
}

body.ui-version-modern input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
body.ui-version-modern select,
body.ui-version-modern textarea {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-control);
    color: var(--ds-text);
    font-family: var(--ds-font);
    font-size: calc(.88rem * var(--ds-text-scale, 1));
    font-weight: 400;
    line-height: 1.35;
    min-height: var(--ds-control-height);
    padding: 6px 9px;
}

body.ui-version-modern textarea { line-height: 1.45; min-height: 76px; resize: vertical; }

body.ui-version-modern input::placeholder,
body.ui-version-modern textarea::placeholder { color: var(--ds-text-faint); opacity: 1; }

body.ui-version-modern input:focus,
body.ui-version-modern select:focus,
body.ui-version-modern textarea:focus { border-color: var(--ds-primary); box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern input:disabled,
body.ui-version-modern select:disabled,
body.ui-version-modern textarea:disabled,
body.ui-version-modern input[readonly] { background: var(--ds-surface-subtle); color: var(--ds-text-muted); }

body.ui-version-modern input[type="color"] { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); height: var(--ds-control-height); padding: 3px; width: 48px; }

body.ui-version-modern .form-grid { gap: var(--ds-form-gap) var(--ds-panel-gap); }

body.ui-version-modern .form-stack { gap: var(--ds-form-gap); }

body.ui-version-modern .form-actions { align-items: center; gap: var(--ds-action-gap); }

body.ui-version-modern .form-grid > label:not(.wide) { max-width: var(--ds-field-width-medium); }

body.ui-version-modern .form-grid input[type="number"] { max-width: var(--ds-field-width-short); }

body.ui-version-modern .form-grid input[type="date"],
body.ui-version-modern .form-grid input[type="time"] { max-width: var(--ds-field-width-short); }

body.ui-version-modern .ds-form-field { display: grid; gap: var(--ds-field-gap); min-width: 0; }

body.ui-version-modern input.ds-field--short,
body.ui-version-modern select.ds-field--short,
body.ui-version-modern textarea.ds-field--short { max-width: var(--ds-field-width-short); width: 100%; }

body.ui-version-modern input.ds-field--medium,
body.ui-version-modern select.ds-field--medium,
body.ui-version-modern textarea.ds-field--medium { max-width: var(--ds-field-width-medium); width: 100%; }

body.ui-version-modern input.ds-field--long,
body.ui-version-modern select.ds-field--long,
body.ui-version-modern textarea.ds-field--long { max-width: var(--ds-field-width-long); width: 100%; }

body.ui-version-modern .ds-required-marker { color: var(--ds-danger); font-weight: 800; }

body.ui-version-modern .ds-form-actions {
    background: var(--ds-surface);
    border-top: 1px solid var(--ds-border);
    display: flex;
    justify-content: space-between;
    margin: var(--ds-section-gap) 0;
    min-height: calc(var(--ds-control-height) + 20px);
    padding: 10px 12px;
}

body.ui-version-modern .ds-form-actions[hidden] { display: none !important; }

body.ui-version-modern .ds-form-actions-note {
    align-items: center;
    color: var(--ds-text-muted);
    display: inline-flex;
    font-size: calc(13px * var(--ds-text-scale, 1));
    gap: 7px;
    min-height: var(--ds-control-height);
}

body.ui-version-modern .ds-form-actions-note::before {
    background: var(--ds-text-faint);
    border-radius: 50%;
    content: "";
    flex: 0 0 auto;
    height: 7px;
    width: 7px;
}

body.ui-version-modern .ds-form-actions.is-dirty .ds-form-actions-note { color: var(--ds-warning); font-weight: 700; }

body.ui-version-modern .ds-form-actions.is-dirty .ds-form-actions-note::before { background: var(--ds-warning); }

body.ui-version-modern .ds-form-actions.is-busy .ds-form-actions-note { color: var(--ds-primary); font-weight: 700; }

body.ui-version-modern .ds-form-actions.is-busy .ds-form-actions-note::before {
    animation: ds-spin .8s linear infinite;
    background: transparent;
    border: 2px solid color-mix(in srgb, var(--ds-primary) 24%, transparent);
    border-top-color: var(--ds-primary);
    height: 11px;
    width: 11px;
}

body.ui-version-modern .ds-form-actions-buttons { display: flex; flex-wrap: wrap; gap: var(--ds-action-gap); margin-left: auto; }

body.ui-version-modern .ds-form-actions-buttons > * { min-height: var(--ds-control-height); }

body.ui-version-modern .ds-action-menu-item.is-disabled { cursor: not-allowed; opacity: .62; }

body.ui-version-modern .ds-action-menu-item.is-disabled small { color: var(--ds-text-muted); display: block; font-size: .75em; font-weight: 400; margin-top: 2px; text-align: left; white-space: normal; }

body.ui-version-modern form[aria-busy="true"] .ds-form-actions { pointer-events: none; }

body.ui-version-modern .ds-form-actions-sentinel { display: block; height: 1px; width: 100%; }

body.ui-version-modern .ds-form-actions--sticky.is-floating {
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-panel);
    bottom: max(10px, env(safe-area-inset-bottom));
    box-shadow: 0 -5px 18px rgba(16, 24, 40, .12);
    left: var(--ds-form-actions-left);
    margin: 0;
    /* Same content geometry as the docked bar; only its surface changes. */
    padding: 10px 12px;
    position: fixed;
    width: var(--ds-form-actions-width);
    z-index: 900;
}

body.ui-version-modern form.ds-form-has-floating-actions {
    padding-bottom: var(--ds-form-actions-space, calc(var(--ds-control-height) + 34px));
}

body.ui-version-modern .check-row,
body.ui-version-modern .ds-checkbox { align-items: center; display: inline-flex; gap: 7px; }

body.ui-version-modern input[type="checkbox"],
body.ui-version-modern input[type="radio"] { accent-color: var(--ds-primary); height: 16px; width: 16px; }

body.ui-version-modern .ds-switch { align-items: flex-start; cursor: pointer; display: inline-grid; gap: 9px; grid-template-columns: 34px 1fr; }

body.ui-version-modern .ds-switch > input { height: 1px; opacity: 0; position: absolute; width: 1px; }

body.ui-version-modern .ds-switch-control { background: var(--ds-border-strong); border-radius: 999px; height: 20px; position: relative; transition: background .15s ease; width: 34px; }

body.ui-version-modern .ds-switch-control::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.3); content: ""; height: 16px; left: 2px; position: absolute; top: 2px; transition: transform .15s ease; width: 16px; }

body.ui-version-modern .ds-switch > input:checked + .ds-switch-control { background: var(--ds-primary); }

body.ui-version-modern .ds-switch > input:checked + .ds-switch-control::after { transform: translateX(14px); }

body.ui-version-modern .ds-switch > input:focus-visible + .ds-switch-control { box-shadow: 0 0 0 3px var(--ds-focus); }

body.ui-version-modern .ds-switch:has(> input:disabled) { cursor: not-allowed; opacity: .68; }

body.ui-version-modern .ds-switch-copy { display: grid; gap: 2px; }

body.ui-version-modern .ds-switch-copy small { color: var(--ds-text-muted); font-weight: 400; }

body.ui-version-modern .ds-submit-switch { align-items: flex-start; background: transparent; border: 0; color: inherit; cursor: pointer; display: inline-grid; gap: 9px; grid-template-columns: 34px minmax(0, 1fr); margin: 0; min-width: 0; padding: 0; text-align: left; }

body.ui-version-modern .ds-submit-switch.is-checked .ds-switch-control { background: var(--ds-primary); }

body.ui-version-modern .ds-submit-switch.is-checked .ds-switch-control::after { transform: translateX(14px); }

body.ui-version-modern .ds-submit-switch:focus-visible { outline: 0; }

body.ui-version-modern .ds-submit-switch:focus-visible .ds-switch-control { box-shadow: 0 0 0 3px var(--ds-focus); }

body.ui-version-modern .ds-submit-switch.is-disabled { cursor: not-allowed; opacity: .68; }

/* Data display */
body.ui-version-modern .table-wrap,
body.ui-version-modern .ds-table-wrap { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); overflow: auto; }

body.ui-version-modern table { background: var(--ds-surface); border-collapse: separate; border-spacing: 0; color: var(--ds-text); font-size: calc(.84rem * var(--ds-text-scale, 1)); width: 100%; }

body.ui-version-modern caption { color: var(--ds-text-muted); font-size: calc(.78rem * var(--ds-text-scale, 1)); padding: 7px var(--ds-table-x); text-align: left; }

body.ui-version-modern th,
body.ui-version-modern td { border-bottom: 1px solid var(--ds-border); padding: var(--ds-table-y) var(--ds-table-x); text-align: left; vertical-align: middle; }

body.ui-version-modern th { background: var(--ds-surface-strong); color: var(--ds-text); font-size: calc(12.5px * var(--ds-text-scale, 1)); font-weight: 700; letter-spacing: .025em; position: sticky; text-transform: uppercase; top: 0; z-index: 1; }

body.ui-version-modern .ds-sort-link { color: inherit; display: inline-flex; gap: 4px; text-decoration: none; }

body.ui-version-modern th[aria-sort="ascending"] .ds-sort-link::after { content: "↑"; }

body.ui-version-modern th[aria-sort="descending"] .ds-sort-link::after { content: "↓"; }

body.ui-version-modern tbody tr:last-child td { border-bottom: 0; }

body.ui-version-modern tbody tr:hover td { background: color-mix(in srgb, var(--ds-primary) 3.5%, var(--ds-surface)); }

body.ui-version-modern tbody tr.is-open > td,
body.ui-version-modern tbody tr[aria-selected="true"] > td { background: var(--ds-surface-selected); }

body.ui-version-modern tbody tr.is-open > td:first-child,
body.ui-version-modern tbody tr[aria-selected="true"] > td:first-child { box-shadow: inset 3px 0 0 var(--ds-primary); }

body.ui-version-modern td strong { font-weight: 650; }

body.ui-version-modern .navigation-module-overview {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    overflow: hidden;
    width: 100%;
}

body.ui-version-modern .navigation-detail,
body.ui-version-modern .navigation-order-context {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

body.ui-version-modern .ds-menu-context-editor { display: grid; gap: 12px; outline: 0; }

body.ui-version-modern .ds-menu-context-editor:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); border-radius: var(--ds-radius-panel); }

body.ui-version-modern .ds-menu-editor-groups { display: grid; gap: 18px; }

body.ui-version-modern .ds-menu-editor-list { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); overflow: hidden; }

body.ui-version-modern .ds-menu-editor-row { align-items: center; background: var(--ds-surface); display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; padding: 10px 12px; }

body.ui-version-modern .ds-menu-editor-row + .ds-menu-editor-row { border-top: 1px solid var(--ds-border); }

body.ui-version-modern .ds-menu-editor-row-copy { min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .ds-menu-editor-row-copy strong { font-size: calc(.9rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-menu-editor-row-controls { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: flex-end; min-width: 0; }

body.ui-version-modern .ds-menu-editor-columns { align-items: end; color: var(--ds-text-muted); display: flex; font-size: calc(.68rem * var(--ds-text-scale, 1)); font-weight: 750; gap: 12px; letter-spacing: .045em; padding: 0 12px 5px; text-transform: uppercase; }

body.ui-version-modern .ds-menu-editor-columns > :first-child { flex: 1 1 auto; min-width: 0; }

body.ui-version-modern .ds-menu-editor-columns > .ds-menu-editor-row-controls { flex: 0 0 auto; font-size: inherit; gap: 8px 12px; }

body.ui-version-modern .ds-menu-editor-mobile-label { display: none; }

body.ui-version-modern .navigation-module-overview-head {
    align-items: center;
    background: var(--ds-surface-subtle);
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 11px 14px;
}

body.ui-version-modern .navigation-module-overview-head h2 {
    font-size: calc(1rem * var(--ds-text-scale, 1));
    margin: 0;
}

body.ui-version-modern .navigation-module-overview-head p {
    color: var(--ds-text-muted);
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    margin: 3px 0 0;
}

/* Canonical ordering-table component: shared by Core and every module. */
body.ui-version-modern .ds-order-table {
    min-width: 760px;
    table-layout: fixed;
    width: 100%;
}

body.ui-version-modern .ds-order-table td {
    height: 54px;
}

body.ui-version-modern .ds-order-table td:first-child strong,
body.ui-version-modern .navigation-module-id {
    display: block;
}

body.ui-version-modern .navigation-module-id {
    color: var(--ds-text-faint);
    font-size: calc(.7rem * var(--ds-text-scale, 1));
    font-weight: 500;
    margin-top: 2px;
}

body.ui-version-modern .ds-visibility-control,
body.ui-version-modern .ds-order-control {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

body.ui-version-modern .ds-visibility-control {
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    font-weight: 600;
    white-space: nowrap;
}

body.ui-version-modern .ds-order-actions {
    align-items: center;
    display: inline-flex;
    gap: 4px;
    margin: 0;
}

body.ui-version-modern .ds-order-actions button {
    align-items: center;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    min-height: 28px;
    padding: 3px;
    width: 28px;
}

body.ui-version-modern .ds-order-actions button:disabled {
    cursor: default;
    opacity: .62;
}

body.ui-version-modern .ds-order-position {
    color: var(--ds-text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 20px;
}

body.ui-version-modern .ds-row-action-form {
    margin: 0;
}

body.ui-version-modern .ds-table-actions,
body.ui-version-modern .ds-table-actions-heading {
    box-sizing: border-box;
    min-width: 96px;
    overflow-wrap: normal;
    text-align: right;
    white-space: nowrap;
    width: 96px;
}

body.ui-version-modern .navigation-module-table { min-width: 760px; }

body.ui-version-modern .navigation-module-table th:nth-child(1) { width: 24%; }

body.ui-version-modern .navigation-module-table th:nth-child(2) { width: 14%; }

body.ui-version-modern .navigation-module-table th:nth-child(3) { width: 18%; }

body.ui-version-modern .navigation-module-table th:nth-child(4) { width: 28%; }

body.ui-version-modern .navigation-module-table th:nth-child(5) { width: 16%; }

body.ui-version-modern .navigation-order-table th:first-child,
body.ui-version-modern .navigation-order-table td:first-child { width: 24%; }

body.ui-version-modern .navigation-order-table th:nth-child(2),
body.ui-version-modern .navigation-order-table td:nth-child(2) { width: 28%; }

body.ui-version-modern .navigation-order-table th:nth-child(3),
body.ui-version-modern .navigation-order-table td:nth-child(3) { width: 16%; }

body.ui-version-modern .navigation-order-table th:nth-child(4),
body.ui-version-modern .navigation-order-table td:nth-child(4) { width: 20%; }

body.ui-version-modern .navigation-order-table th:last-child,
body.ui-version-modern .navigation-order-table td:last-child { width: 12%; }

body.ui-version-modern .navigation-order-table code { white-space: nowrap; }

body.ui-version-modern .pill {
    align-items: center;
    background: var(--ds-info-soft);
    border: 1px solid color-mix(in srgb, var(--ds-info) 25%, transparent);
    border-radius: 999px;
    color: var(--ds-info);
    display: inline-flex;
    font-size: calc(.72rem * var(--ds-text-scale, 1));
    font-weight: 700;
    gap: 5px;
    line-height: 1.2;
    min-height: 22px;
    padding: 3px 8px;
    white-space: nowrap;
}

body.ui-version-modern .pill::before { background: currentColor; border-radius: 50%; content: ""; height: 5px; width: 5px; }

body.ui-version-modern .pill.active,
body.ui-version-modern .pill.success { background: var(--ds-success-soft); border-color: color-mix(in srgb, var(--ds-success) 26%, transparent); color: var(--ds-success); }

body.ui-version-modern .pill.inactive { background: var(--ds-surface-strong); border-color: var(--ds-border); color: var(--ds-text-muted); }

body.ui-version-modern .pill.warning { background: var(--ds-warning-soft); border-color: color-mix(in srgb, var(--ds-warning) 28%, transparent); color: var(--ds-warning); }

body.ui-version-modern .pill.error,
body.ui-version-modern .pill.suspended,
body.ui-version-modern .pill.critical { background: var(--ds-danger-soft); border-color: color-mix(in srgb, var(--ds-danger) 28%, transparent); color: var(--ds-danger); }

body.ui-version-modern .pill.legal { background: var(--ds-legal-soft); border-color: color-mix(in srgb, var(--ds-legal) 28%, transparent); color: var(--ds-legal); }

body.ui-version-modern .notification-state-summary {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 100%;
    min-width: 0;
}

body.ui-version-modern .notification-state-summary .pill { white-space: nowrap; }

body.ui-version-modern .notification-state-separator { color: var(--ds-text-muted); font-size: calc(.72rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .settings-notification-table .ds-table { min-width: 0; table-layout: fixed; }

body.ui-version-modern .settings-notification-table .ds-table th,
body.ui-version-modern .settings-notification-table .ds-table td { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .settings-notification-table .ds-table .ds-table-actions,
body.ui-version-modern .settings-notification-table .ds-table .ds-table-actions-heading { overflow-wrap: normal; }

body.ui-version-modern .avatar-frame,
body.ui-version-modern .avatar { border: 1px solid color-mix(in srgb, var(--theme-accent) 62%, var(--ds-border)); }

body.ui-version-modern .ds-metadata { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; }

body.ui-version-modern .ds-metadata > div { display: inline-flex; gap: 5px; }

body.ui-version-modern .ds-metadata dt { color: var(--ds-text-muted); font-size: calc(12.5px * var(--ds-text-scale, 1)); font-weight: 600; text-transform: uppercase; }

body.ui-version-modern .ds-metadata dd { color: var(--ds-text); font-size: calc(13px * var(--ds-text-scale, 1)); font-weight: 700; margin: 0; overflow-wrap: anywhere; }

body.ui-version-modern .ds-count-badge {
    align-items: center;
    background: var(--ds-surface-strong);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    color: var(--ds-text);
    display: inline-flex;
    font-size: calc(12.5px * var(--ds-text-scale, 1));
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    justify-content: center;
    line-height: 1;
    min-height: 22px;
    min-width: 22px;
    padding: 3px 7px;
}

body.ui-version-modern .ds-collection-summary-item--active .ds-count-badge {
    background: var(--ds-success-soft);
    border-color: color-mix(in srgb, var(--ds-success) 28%, var(--ds-border));
    color: var(--ds-success);
}

body.ui-version-modern .ds-collection-summary-item--warning .ds-count-badge {
    background: var(--ds-warning-soft);
    border-color: color-mix(in srgb, var(--ds-warning) 30%, var(--ds-border));
    color: var(--ds-warning);
}

body.ui-version-modern .ds-collection-summary-item--suspended .ds-count-badge,
body.ui-version-modern .ds-collection-summary-item--error .ds-count-badge {
    background: var(--ds-danger-soft);
    border-color: color-mix(in srgb, var(--ds-danger) 28%, var(--ds-border));
    color: var(--ds-danger);
}

body.ui-version-modern .empty-note,
body.ui-version-modern .ds-empty-state {
    align-items: center;
    background: var(--ds-surface-subtle);
    border: 1px dashed var(--ds-border-strong);
    border-radius: var(--ds-radius-panel);
    color: var(--ds-text-muted);
    display: flex;
    flex-direction: column;
    gap: 7px;
    justify-content: center;
    min-height: 92px;
    padding: 16px;
    text-align: center;
}

body.ui-version-modern .ds-empty-state p { margin: 0; }

body.ui-version-modern .ds-empty-state--compact { min-height: 0; padding: 12px; }

body.ui-version-modern .ds-state-title { color: var(--ds-text); }

body.ui-version-modern .ds-state-marker,
body.ui-version-modern .ds-empty-state-icon { border: 2px solid var(--ds-text-faint); border-radius: 3px; height: 22px; position: relative; width: 28px; }

body.ui-version-modern .ds-state-marker::after,
body.ui-version-modern .ds-empty-state-icon::after { background: var(--ds-surface-subtle); border: solid var(--ds-text-faint); border-width: 0 0 2px 2px; content: ""; height: 7px; left: 8px; position: absolute; top: 5px; transform: rotate(-45deg); width: 9px; }

body.ui-version-modern .ds-state--success .ds-state-marker { border-color: var(--ds-success); }

body.ui-version-modern .ds-state--warning .ds-state-marker { border-color: var(--ds-warning); }

body.ui-version-modern .ds-state--error .ds-state-marker,
body.ui-version-modern .ds-state--offline .ds-state-marker { border-color: var(--ds-danger); }

body.ui-version-modern .ds-state--permission .ds-state-marker,
body.ui-version-modern .ds-state--disabled .ds-state-marker { border-color: var(--ds-text-muted); }

body.ui-version-modern .ds-state--loading,
body.ui-version-modern .ds-state--saving { min-height: 68px; }

/* Shared browser error presentation: shell-specific renderers share this
   anatomy while preserving their own security/runtime boundary. */
body.ui-version-modern .ds-error-presentation {
    align-items: start;
    background: var(--ds-surface-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    max-width: 760px;
    padding: clamp(20px, 3vw, 30px);
}

body.ui-version-modern .ds-error-marker {
    border: 2px solid var(--ds-danger);
    border-radius: 50%;
    box-sizing: border-box;
    display: block;
    height: 28px;
    margin-top: 2px;
    position: relative;
    width: 28px;
}

body.ui-version-modern .ds-error-marker::before,
body.ui-version-modern .ds-error-marker::after { background: var(--ds-danger); border-radius: 1px; content: ""; height: 2px; left: 6px; position: absolute; top: 11px; transform: rotate(45deg); width: 12px; }

body.ui-version-modern .ds-error-marker::after { transform: rotate(-45deg); }

body.ui-version-modern .ds-error-presentation--warning .ds-error-marker { border-color: var(--ds-warning); }

body.ui-version-modern .ds-error-presentation--warning .ds-error-marker::before,
body.ui-version-modern .ds-error-presentation--warning .ds-error-marker::after { background: var(--ds-warning); }

body.ui-version-modern .ds-error-presentation--permission .ds-error-marker { border-color: var(--ds-text-muted); }

body.ui-version-modern .ds-error-presentation--permission .ds-error-marker::before,
body.ui-version-modern .ds-error-presentation--permission .ds-error-marker::after { background: var(--ds-text-muted); }

body.ui-version-modern .ds-error-copy { display: grid; gap: 7px; min-width: 0; }

body.ui-version-modern .ds-error-copy h2,
body.ui-version-modern .ds-error-copy p { margin: 0; }

body.ui-version-modern .ds-error-copy h2 { font-size: calc(1.15rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-error-status { color: var(--ds-text-faint); font-size: calc(.72rem * var(--ds-text-scale, 1)); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }

body.ui-version-modern .ds-error-message { color: var(--ds-text-muted); line-height: 1.5; }

body.ui-version-modern .ds-error-detail { color: var(--ds-text-muted); font-size: calc(.88rem * var(--ds-text-scale, 1)); line-height: 1.45; }

body.ui-version-modern .ds-error-incident { color: var(--ds-text-muted); font-size: calc(.82rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-error-incident code { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: 4px; color: var(--ds-text); font-family: var(--ds-font-mono, ui-monospace, monospace); overflow-wrap: anywhere; padding: 2px 5px; user-select: all; }

body.ui-version-modern .ds-error-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 2; margin-top: 2px; }

body.ui-version-modern .ds-error-presentation--auth { background: transparent; border: 0; border-radius: 0; max-width: none; padding: 0; }

body.ui-version-modern .ds-error-presentation--auth .ds-error-actions { grid-column: 1 / -1; }

body.ui-version-modern .ds-error-presentation--auth .ds-error-marker { height: 24px; width: 24px; }

body.ui-version-modern .ds-error-presentation--auth .ds-error-marker::before,
body.ui-version-modern .ds-error-presentation--auth .ds-error-marker::after { left: 5px; top: 9px; width: 10px; }

@media (max-width: 560px) {
    body.ui-version-modern .ds-error-presentation { gap: 10px; padding: 18px; }

    body.ui-version-modern .ds-error-actions { grid-column: 1 / -1; }

}

/* Shared expandable row used for compact provider and settings summaries. */
body.ui-version-modern .ds-accordion { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); overflow: hidden; }

body.ui-version-modern .ds-accordion-item { border-left: 3px solid transparent; }

body.ui-version-modern .ds-accordion-item + .ds-accordion-item { border-top: 1px solid var(--ds-border); }

body.ui-version-modern [data-ds-accordion] .ds-accordion-item.is-open { background: var(--ds-surface-selected); border-left-color: var(--ds-primary); }

body.ui-version-modern .ds-accordion-trigger {
    align-items: center;
    background: var(--ds-surface);
    border: 0;
    color: var(--ds-text);
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

body.ui-version-modern .ds-accordion-trigger:hover { background: var(--ds-surface-subtle); }

body.ui-version-modern [data-ds-accordion] .ds-accordion-item.is-open .ds-accordion-trigger { background: var(--ds-surface-selected); }

body.ui-version-modern .ds-accordion-trigger:focus-visible { box-shadow: inset 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-accordion-summary { min-width: 0; }

body.ui-version-modern .ds-accordion-title { display: block; font-weight: 700; }

body.ui-version-modern .ds-accordion-subtitle { color: var(--ds-text-muted); display: block; font-size: calc(.78rem * var(--ds-text-scale, 1)); margin-top: 2px; min-width: 0; overflow-wrap: anywhere; white-space: normal; }

body.ui-version-modern .ds-accordion-subtitle .pill { margin-right: 5px; vertical-align: middle; }

body.ui-version-modern .ds-accordion-subtitle .pill { font-size: calc(.68rem * var(--ds-text-scale, 1)); min-height: 18px; padding: 2px 6px; }

body.ui-version-modern .ds-accordion-metadata { color: var(--ds-text-muted); display: flex; flex-wrap: wrap; font-size: calc(.78rem * var(--ds-text-scale, 1)); gap: 5px 16px; justify-content: flex-end; }

body.ui-version-modern .ds-accordion-open-label { display: none; font-weight: 700; }

body.ui-version-modern [data-ds-accordion] .ds-accordion-item.is-open .ds-accordion-count { display: none; }

body.ui-version-modern [data-ds-accordion] .ds-accordion-item.is-open .ds-accordion-open-label { color: var(--ds-primary); display: inline; }

body.ui-version-modern .ds-accordion-icon { color: var(--ds-text-muted); font-size: calc(1.1rem * var(--ds-text-scale, 1)); line-height: 1; transform: rotate(0deg); transition: transform .15s ease; }

body.ui-version-modern .ds-accordion-trigger[aria-expanded="true"] .ds-accordion-icon { transform: rotate(180deg); }

body.ui-version-modern .ds-accordion-panel { background: var(--ds-surface-subtle); border-top: 1px solid var(--ds-border); padding: 12px 14px 14px var(--ds-expanded-content-inline-offset); }

body.ui-version-modern .ds-accordion-panel[hidden] { display: none; }

/* Permission editor composes the shared accordion into three deliberate levels:
   area summary, compact feature row, and its inset editor surface. */
body.ui-version-modern .permission-area-accordion { background: transparent; border: 0; border-radius: 0; display: grid; gap: 10px; overflow: visible; }

body.ui-version-modern .permission-area-accordion > .permission-area { background: var(--ds-surface-raised); border: 1px solid var(--ds-border); border-left: 3px solid transparent; border-radius: var(--ds-radius-panel); overflow: hidden; }

body.ui-version-modern .permission-area-accordion > .permission-area,
body.ui-version-modern .permission-area > .ds-accordion-panel,
body.ui-version-modern .permission-document-policies { min-width: 0; }

/* The generic legacy compact table reserves 1080px. Group document policy has
   only three bounded columns and must use the available settings width instead
   of making its whole accordion unreachable on an ordinary laptop. */
body.ui-version-modern .permission-document-policies .compact-admin-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

body.ui-version-modern .permission-document-policies .compact-admin-table th:first-child,
body.ui-version-modern .permission-document-policies .compact-admin-table td:first-child { width: 34%; }

body.ui-version-modern .permission-area-accordion > .permission-area + .permission-area { border-top: 1px solid var(--ds-border); }

body.ui-version-modern .permission-area > .ds-accordion-trigger { background: var(--ds-surface-raised); padding: 12px 14px; }

body.ui-version-modern .permission-area > .ds-accordion-trigger:hover,
body.ui-version-modern .permission-area.is-open > .ds-accordion-trigger { background: var(--ds-surface-subtle); }

body.ui-version-modern .permission-area > .ds-accordion-trigger .ds-accordion-title { font-size: calc(.94rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .permission-area > .ds-accordion-trigger .ds-accordion-title { font-weight: 760; }

body.ui-version-modern .permission-area > .ds-accordion-trigger .ds-accordion-subtitle { font-size: calc(.78rem * var(--ds-text-scale, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.ui-version-modern .permission-area > .ds-accordion-panel { background: color-mix(in srgb, var(--ds-surface-subtle) 72%, var(--ds-surface-raised)); border-top-color: var(--ds-border); padding: 10px 14px 12px var(--ds-expanded-content-inline-offset); }

body.ui-version-modern .permission-feature-list { background: var(--ds-surface); border: 1px solid color-mix(in srgb, var(--ds-border) 82%, transparent); border-radius: var(--ds-radius-control); overflow: clip; }

body.ui-version-modern .permission-feature-item + .permission-feature-item { border-top: 1px solid var(--ds-border); }

body.ui-version-modern .permission-feature-row { align-items: center; background: var(--ds-surface); border: 0; border-radius: 0; color: var(--ds-text); cursor: pointer; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) max-content auto; min-height: 54px; padding: 8px 12px; text-align: left; width: 100%; }

body.ui-version-modern .permission-feature-row:hover { background: var(--ds-surface-subtle); }

body.ui-version-modern .permission-feature-row:focus-visible { box-shadow: inset 0 0 0 2px var(--ds-primary); outline: none; position: relative; z-index: 1; }

body.ui-version-modern [data-ds-current-row].is-current > [data-ds-current-row-trigger] { background: color-mix(in srgb, var(--ds-primary) 7%, var(--ds-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ds-primary) 38%, var(--ds-border)), inset 4px 0 0 color-mix(in srgb, var(--ds-primary) 68%, var(--ds-border)); position: relative; z-index: 1; }

body.ui-version-modern [data-ds-current-row].is-current > [data-ds-current-row-trigger]:hover { background: color-mix(in srgb, var(--ds-primary) 10%, var(--ds-surface)); }

body.ui-version-modern .permission-feature-row .ds-accordion-title { font-size: calc(.88rem * var(--ds-text-scale, 1)); line-height: 1.3; }

body.ui-version-modern .permission-feature-row .ds-accordion-subtitle { font-size: calc(.78rem * var(--ds-text-scale, 1)); line-height: 1.35; }

body.ui-version-modern .permission-feature-open-icon { color: var(--ds-text-muted); font-size: calc(1.15rem * var(--ds-text-scale, 1)); line-height: 1; }

body.ui-version-modern dialog.permission-feature-dialog .permission-feature-dialog-body { min-width: 0; }

body.ui-version-modern dialog.permission-feature-dialog .permission-editor-sections { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Permission rows reserve compact semantic slots: access, runtime state and review.
   An absent badge stays visually empty without moving the neighbouring meaning. */
body.ui-version-modern .permission-feature-metadata { align-items: center; display: grid; gap: 6px 8px; grid-template-columns: 8.5rem 9.5rem 8rem; justify-content: end; min-width: 0; width: max-content; }

body.ui-version-modern .permission-feature-metadata-cell { align-items: center; display: flex; min-height: 24px; min-width: 0; width: 100%; }

body.ui-version-modern .permission-feature-metadata-cell--empty { visibility: hidden; }

body.ui-version-modern .permission-feature-metadata-cell--empty > [aria-hidden="true"] { display: none; }

body.ui-version-modern .permission-feature-metadata-state { color: var(--ds-text-muted); }

body.ui-version-modern .permission-feature-metadata-review { justify-content: flex-start; }

body.ui-version-modern .permission-expanded-editor { display: grid; gap: 12px; max-width: 100%; min-width: 0; width: 100%; }

body.ui-version-modern .permission-review-row { align-items: center; border-bottom: 1px solid var(--ds-border); color: var(--ds-text-muted); display: flex; flex-wrap: wrap; font-size: calc(.84rem * var(--ds-text-scale, 1)); gap: 8px 12px; justify-content: space-between; margin: 0; padding: 0 0 10px; }

body.ui-version-modern .permission-review-row strong { color: var(--ds-warning); }

body.ui-version-modern .permission-inline-note { color: var(--ds-text-muted); font-size: calc(.82rem * var(--ds-text-scale, 1)); margin: 0; }

body.ui-version-modern .permission-inline-note--warning { color: var(--ds-warning); }

body.ui-version-modern .permission-editor-sections { align-items: stretch; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }

body.ui-version-modern .permission-editor-section { align-content: start; background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); display: grid; gap: 10px; min-width: 0; padding: 14px; }

body.ui-version-modern .permission-editor-section-heading { display: grid; gap: 3px; }

body.ui-version-modern .permission-editor-section-heading > h3 { color: var(--ds-text); font-size: calc(.9rem * var(--ds-text-scale, 1)); line-height: 1.25; margin: 0; }

body.ui-version-modern .permission-editor-section-heading > p { color: var(--ds-text-muted); font-size: calc(.8rem * var(--ds-text-scale, 1)); line-height: 1.4; margin: 0; }

body.ui-version-modern .permission-editor-section--mode .permission-mode-control { align-self: start; background: transparent; border: 0; display: grid; gap: 7px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; width: min(100%, 18rem); }

body.ui-version-modern .permission-editor-section--mode .permission-mode-control .ds-segmented-option { border-color: var(--ds-border); border-radius: var(--ds-radius-control); color: var(--ds-text-muted); min-height: 64px; min-width: 0; padding: 8px; }

body.ui-version-modern .permission-editor-section--mode .permission-mode-control .ds-segmented-option[aria-pressed="true"][value="hidden"] { background: var(--ds-surface-subtle); border-color: var(--ds-border-strong); color: var(--ds-text); }

body.ui-version-modern .permission-editor-section--mode .permission-mode-control .ds-segmented-option[aria-pressed="true"][value="view"] { background: color-mix(in srgb, var(--ds-info) 10%, var(--ds-surface)); border-color: color-mix(in srgb, var(--ds-info) 40%, var(--ds-border)); color: var(--ds-info); }

body.ui-version-modern .permission-editor-section--mode .permission-mode-control .ds-segmented-option[aria-pressed="true"][value="manage"] { background: color-mix(in srgb, var(--ds-success) 12%, var(--ds-surface)); border-color: color-mix(in srgb, var(--ds-success) 42%, var(--ds-border)); color: var(--ds-success); }

body.ui-version-modern .permission-option-group { display: grid; gap: 7px; min-width: 0; }

body.ui-version-modern .permission-option-group--stack { align-content: start; }

body.ui-version-modern .permission-editor-option { align-items: start; display: grid; gap: 8px; grid-template-columns: auto minmax(0, 1fr); margin: 0; min-width: 0; }

body.ui-version-modern .permission-editor-option > input { margin-top: 3px; }

body.ui-version-modern .permission-editor-option > span { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .permission-editor-option strong { color: var(--ds-text); font-size: calc(.84rem * var(--ds-text-scale, 1)); line-height: 1.35; }

body.ui-version-modern .permission-editor-option small { color: var(--ds-text-muted); font-size: calc(.78rem * var(--ds-text-scale, 1)); line-height: 1.35; }

body.ui-version-modern .permission-editor-section--informational { background: var(--ds-surface); }

body.ui-version-modern .permission-account-anatomy { display: grid; gap: 12px; }

body.ui-version-modern .permission-account-destination { border-top: 1px solid var(--ds-border); display: grid; gap: 8px; padding-top: 12px; }

body.ui-version-modern .permission-account-destination:first-child { border-top: 0; padding-top: 0; }

body.ui-version-modern .permission-account-destination > h4 { color: var(--ds-text); font-size: calc(.84rem * var(--ds-text-scale, 1)); line-height: 1.3; margin: 0; }

body.ui-version-modern .permission-account-contributions { display: grid; gap: 0; }

body.ui-version-modern .permission-account-contribution { align-items: start; border-top: 1px solid var(--ds-border); display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) max-content; padding: 8px 0; }

body.ui-version-modern .permission-account-contribution:first-child { border-top: 0; padding-top: 0; }

body.ui-version-modern .permission-account-contribution > span { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .permission-account-contribution strong { color: var(--ds-text); font-size: calc(.82rem * var(--ds-text-scale, 1)); line-height: 1.35; }

body.ui-version-modern .permission-account-contribution small { color: var(--ds-text-muted); font-size: calc(.76rem * var(--ds-text-scale, 1)); line-height: 1.35; }

body.ui-version-modern .permission-account-contribution .permission-account-contribution-note { color: var(--ds-text-subtle); }

/* Canonical read-only detail surfaces use the useful dialog width. This is a
   reusable Core contract, not a page-specific width exception. */
body.ui-version-modern .ds-readonly-details { max-width: none; width: 100%; }

body.ui-version-modern .permission-editor-section--readonly { gap: 12px; }

body.ui-version-modern .permission-editor-section--readonly .permission-account-anatomy { gap: 0; }

body.ui-version-modern .permission-scope-control { max-width: min(100%, 42rem); }

body.ui-version-modern .permission-scope-entities { align-items: center !important; display: grid; gap: 5px; min-width: 0; }

body.ui-version-modern .permission-scope-entities input { max-width: 22rem; width: 100%; }

@media (max-width: 1120px) {
    body.ui-version-modern .permission-editor-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    body.ui-version-modern .permission-editor-section--scope:last-child { grid-column: 1 / -1; }

}

@media (max-width: 960px) {
    body.ui-version-modern .permission-feature-row { grid-template-columns: minmax(0, 1fr) auto; }

    body.ui-version-modern .permission-feature-metadata { grid-column: 1 / -1; justify-self: end; }

}

@media (max-width: 760px) {
    body.ui-version-modern .ds-page-heading-inline { align-items: center; width: 100%; }

    body.ui-version-modern .ds-page-inline-selector { flex: 1 1 auto; max-width: 100%; }

    body.ui-version-modern .permission-feature-metadata { gap: 6px 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); justify-self: stretch; width: auto; }

    body.ui-version-modern .permission-feature-metadata-review { grid-column: 1 / -1; }

    body.ui-version-modern .permission-feature-row .permission-feature-metadata { grid-column: 1 / -1; justify-self: stretch; }

    body.ui-version-modern .permission-editor-sections,
body.ui-version-modern dialog.permission-feature-dialog .permission-editor-sections { grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .permission-editor-section--scope:last-child { grid-column: auto; }

    body.ui-version-modern .permission-editor-section--mode .permission-mode-control { width: 100%; }

    body.ui-version-modern .permission-account-contribution { gap: 7px; grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .permission-scope-entities { width: 100%; }

    body.ui-version-modern .permission-scope-entities input { max-width: 100%; }

}

@media (max-width: 480px) {
    body.ui-version-modern .permission-feature-row .ds-accordion-subtitle { display: none; }

    body.ui-version-modern .permission-feature-row { min-height: 0; padding-block: 10px; }

}

body.ui-version-modern table.ds-accordion > tbody > tr.ds-accordion-panel > td { padding: 0; text-align: left; width: auto; }

body.ui-version-modern table.ds-accordion > tbody > tr.ds-accordion-panel .ds-audit-details { margin: 0; padding: 0; }

body.ui-version-modern .ds-audit-details { display: grid; gap: 12px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

body.ui-version-modern .ds-audit-details > div { min-width: 0; }

body.ui-version-modern .ds-audit-details dt { color: var(--ds-text-muted); font-size: calc(.72rem * var(--ds-text-scale, 1)); font-weight: 700; margin-bottom: 4px; text-transform: uppercase; }

body.ui-version-modern .ds-audit-details dd { margin: 0; min-width: 0; }

body.ui-version-modern .ds-audit-details pre { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); box-sizing: border-box; margin: 0; max-width: 100%; min-width: 0; overflow: visible; overflow-wrap: anywhere; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; }

body.ui-version-modern .audit-review-overview { align-items: center; background: var(--ds-warning-soft); border-bottom: 1px solid var(--ds-border); display: flex; gap: 12px 18px; justify-content: space-between; min-width: 0; padding: 12px 14px; }

body.ui-version-modern .audit-review-overview-copy { min-width: 0; }

body.ui-version-modern .audit-review-overview h2 { color: var(--ds-text); font-size: calc(.94rem * var(--ds-text-scale, 1)); margin: 0; }

body.ui-version-modern .audit-review-overview p { color: var(--ds-text-muted); font-size: calc(.8rem * var(--ds-text-scale, 1)); margin: 3px 0 0; }

body.ui-version-modern .audit-review-overview form { flex: 0 1 auto; min-width: 0; }

body.ui-version-modern .audit-review-overview button { max-width: 100%; white-space: normal; }

body.ui-version-modern .audit-log-event-row.is-open > td { background: var(--ds-surface-selected); }

body.ui-version-modern .audit-log-table .audit-detail-trigger { min-height: 44px; padding: 6px 8px; }

body.ui-version-modern .audit-log-table .audit-detail-trigger .ds-accordion-title { color: var(--ds-primary); }

body.ui-version-modern .audit-log-table .audit-detail-trigger .ds-accordion-subtitle { color: var(--ds-text-muted); }

body.ui-version-modern .audit-log-table th:last-child,
body.ui-version-modern .audit-log-table td:last-child { text-align: left; width: auto; }

body.ui-version-modern .audit-log-detail-cell { box-sizing: border-box; }

body.ui-version-modern .audit-log-detail-region { min-width: 0; }

body.ui-version-modern .audit-detail-wide { grid-column: 1 / -1; }

body.ui-version-modern .audit-detail-secondary { display: block; margin-top: 4px; min-width: 0; }

body.ui-version-modern .audit-technical-value,
body.ui-version-modern .audit-review-result { overflow-wrap: anywhere; word-break: break-word; }

body.ui-version-modern .audit-review-state dd { align-items: flex-start; display: flex; flex-direction: column; gap: 5px; }

body.ui-version-modern .audit-detail-review-form { border-top: 1px solid var(--ds-border); display: flex; justify-content: flex-end; margin: 0; padding: 12px 0 2px; }

@media (max-width: 760px) {
    body.ui-version-modern .ds-audit-details { grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .audit-review-overview { align-items: stretch; flex-direction: column; }

    body.ui-version-modern .audit-review-overview form,
body.ui-version-modern .audit-review-overview button { width: 100%; }

    body.ui-version-modern .audit-log-table { border: 0; min-width: 0; overflow: visible; }

    body.ui-version-modern .audit-log-table > tbody > tr.audit-log-event-row { margin-bottom: 12px; }

    body.ui-version-modern .audit-log-table > tbody > tr.audit-log-event-row.is-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; }

    body.ui-version-modern .audit-log-table > tbody > tr.audit-log-event-row.is-open + tr.audit-log-detail-row { border-color: var(--ds-border); border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; margin-bottom: 12px; padding: 0; }

    body.ui-version-modern .audit-log-table > tbody > tr.audit-log-detail-row > td.audit-log-detail-cell { display: block; max-width: 100%; min-width: 0; width: 100%; }

    body.ui-version-modern .audit-log-table > tbody > tr.audit-log-detail-row > td.audit-log-detail-cell::before { display: none; }

    body.ui-version-modern .audit-log-table > tbody > tr.audit-log-detail-row .ds-audit-details { padding: 0; }

    body.ui-version-modern .audit-detail-review-form { justify-content: stretch; margin: 0; }

    body.ui-version-modern .audit-detail-review-form button { width: 100%; }

}

body.ui-version-modern .ds-cleanup-owner-panel { overflow: hidden; padding: 0; }

body.ui-version-modern .ds-cleanup-task-list { min-width: 0; }

body.ui-version-modern .ds-cleanup-task-head,
body.ui-version-modern .ds-cleanup-task-row { align-items: center; display: grid; gap: 12px; grid-template-columns: minmax(250px, 1.65fr) minmax(180px, 1.25fr) minmax(92px, .65fr) minmax(100px, .7fr) minmax(145px, .9fr) 20px; }

body.ui-version-modern .ds-cleanup-task-head { background: var(--ds-surface-subtle); border-bottom: 1px solid var(--ds-border); color: var(--ds-text-faint); font-size: calc(.7rem * var(--ds-text-scale, 1)); font-weight: 700; letter-spacing: .035em; padding: 8px 14px; text-transform: uppercase; }

body.ui-version-modern .ds-cleanup-task-row { border-bottom: 1px solid var(--ds-border); color: var(--ds-text); min-height: 62px; padding: 9px 14px; text-decoration: none; }

body.ui-version-modern .ds-cleanup-task-row:last-child { border-bottom: 0; }

body.ui-version-modern .ds-cleanup-task-row:hover { background: var(--ds-surface-subtle); color: var(--ds-text); }

body.ui-version-modern .ds-cleanup-task-row:focus-visible { box-shadow: inset 0 0 0 2px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-cleanup-task-row.is-current { background: var(--ds-primary-soft); }

body.ui-version-modern .ds-cleanup-task-name { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .ds-cleanup-task-name strong { font-size: calc(.86rem * var(--ds-text-scale, 1)); line-height: 1.3; }

body.ui-version-modern .ds-cleanup-task-name small { color: var(--ds-text-muted); display: -webkit-box; font-size: calc(.74rem * var(--ds-text-scale, 1)); line-height: 1.35; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

body.ui-version-modern .ds-cleanup-task-cell { color: var(--ds-text-muted); font-size: calc(.8rem * var(--ds-text-scale, 1)); line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .ds-cleanup-task-disclosure { color: var(--ds-text-faint); font-size: calc(1.35rem * var(--ds-text-scale, 1)); justify-self: end; }

body.ui-version-modern dialog.ds-modal.ds-cleanup-provider-dialog { max-height: min(90vh, 840px); }

body.ui-version-modern .ds-cleanup-workspace { align-content: start; display: grid; gap: 0; padding-block: 0; }

body.ui-version-modern .ds-cleanup-workspace-section { border-bottom: 1px solid var(--ds-border); padding: 12px 0; }

body.ui-version-modern .ds-cleanup-workspace-section:last-child { border-bottom: 0; }

body.ui-version-modern .ds-cleanup-workspace-section > h3 { font-size: calc(.76rem * var(--ds-text-scale, 1)); letter-spacing: .04em; margin: 0 0 10px; text-transform: uppercase; }

body.ui-version-modern .ds-cleanup-state-summary { display: grid; gap: 10px 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }

body.ui-version-modern .ds-cleanup-state-summary > div { min-width: 0; }

body.ui-version-modern .ds-cleanup-state-summary dt,
body.ui-version-modern .ds-cleanup-sample-row dt,
body.ui-version-modern .ds-cleanup-history-row dt { color: var(--ds-text-faint); font-size: calc(.69rem * var(--ds-text-scale, 1)); font-weight: 700; text-transform: uppercase; }

body.ui-version-modern .ds-cleanup-state-summary dd { font-size: calc(.86rem * var(--ds-text-scale, 1)); font-weight: 700; margin: 3px 0 0; }

body.ui-version-modern .ds-cleanup-note { color: var(--ds-text-muted); font-size: calc(.82rem * var(--ds-text-scale, 1)); margin: 9px 0 0; }

body.ui-version-modern .ds-cleanup-policy-section { padding-block: 10px; }

body.ui-version-modern .ds-cleanup-policy-section > h3 { margin-bottom: 8px; }

body.ui-version-modern .ds-cleanup-policy-bar { align-items: center; display: flex; flex-wrap: wrap; margin: 0; row-gap: 6px; }

body.ui-version-modern .ds-cleanup-policy-item { align-items: center; border-left: 1px solid var(--ds-border); display: inline-flex; flex: 0 0 auto; gap: 7px; margin: 0; min-width: 0; padding: 0 11px; }

body.ui-version-modern .ds-cleanup-policy-bar > .ds-cleanup-policy-retention { border-left: 0; padding-left: 0; }

body.ui-version-modern .ds-cleanup-policy-retention,
body.ui-version-modern .ds-cleanup-recommended,
body.ui-version-modern .ds-cleanup-next-run { color: var(--ds-text-muted); font-size: calc(.8rem * var(--ds-text-scale, 1)); font-weight: 700; }

body.ui-version-modern .ds-cleanup-recommended > strong,
body.ui-version-modern .ds-cleanup-frequency > strong { color: var(--ds-text); }

body.ui-version-modern .ds-cleanup-days-input { align-items: center; display: flex; gap: 7px; }

body.ui-version-modern .ds-cleanup-days-input input { max-width: 72px; }

body.ui-version-modern .ds-cleanup-days-input > span { color: var(--ds-text-muted); font-weight: 500; }

body.ui-version-modern .ds-cleanup-policy-switch { align-items: center; display: inline-flex; gap: 9px; }

body.ui-version-modern .ds-cleanup-policy-switch .ds-switch-copy { align-items: baseline; display: inline-flex; font-size: calc(.8rem * var(--ds-text-scale, 1)); gap: 4px; white-space: nowrap; }

body.ui-version-modern .ds-cleanup-policy-switch .ds-switch-copy small { font-size: inherit; }

body.ui-version-modern .ds-cleanup-frequency { font-size: calc(.8rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-cleanup-next-run input { width: 190px; }

body.ui-version-modern .ds-cleanup-policy-preview { color: var(--ds-warning); gap: 8px; padding-right: 0; white-space: nowrap; }

body.ui-version-modern .ds-cleanup-policy-preview[hidden] { display: none; }

body.ui-version-modern .ds-cleanup-policy-preview > span { font-size: calc(.8rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-cleanup-policy-preview button { white-space: nowrap; }

body.ui-version-modern .ds-cleanup-sample-label { color: var(--ds-text-muted); font-size: calc(.76rem * var(--ds-text-scale, 1)); margin: 0 0 8px; }

body.ui-version-modern .ds-cleanup-sample-list,
body.ui-version-modern .ds-cleanup-history-list { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); overflow: hidden; }

body.ui-version-modern .ds-cleanup-sample-row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 9px 11px; }

body.ui-version-modern .ds-cleanup-sample-row + .ds-cleanup-sample-row { border-top: 1px solid var(--ds-border); }

body.ui-version-modern .ds-cleanup-sample-row > div { min-width: 120px; }

body.ui-version-modern .ds-cleanup-sample-row dd { font-size: calc(.79rem * var(--ds-text-scale, 1)); margin: 2px 0 0; overflow-wrap: anywhere; }

body.ui-version-modern .ds-cleanup-selection { display: grid; gap: 8px; }

body.ui-version-modern .ds-cleanup-selection-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }

body.ui-version-modern .ds-cleanup-select-all { align-items: center; display: inline-flex; min-height: 40px; }

body.ui-version-modern .ds-cleanup-selection-toolbar > strong { color: var(--ds-text-muted); font-size: calc(.78rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-cleanup-candidate-row { align-items: center; cursor: pointer; display: flex; gap: 10px; min-height: 44px; padding: 0 10px; }

body.ui-version-modern .ds-cleanup-candidate-row + .ds-cleanup-candidate-row { border-top: 1px solid var(--ds-border); }

body.ui-version-modern .ds-cleanup-candidate-row > input { flex: 0 0 auto; height: 20px; width: 20px; }

body.ui-version-modern .ds-cleanup-candidate-row .ds-cleanup-sample-row { flex: 1 1 auto; padding-inline: 0; }

body.ui-version-modern .ds-cleanup-preview-pagination { align-items: center; display: flex; gap: 10px; justify-content: flex-end; }

body.ui-version-modern .ds-cleanup-preview-pagination span { color: var(--ds-text-muted); font-size: calc(.78rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-cleanup-history-row { padding: 10px 12px; }

body.ui-version-modern .ds-cleanup-history-row + .ds-cleanup-history-row { border-top: 1px solid var(--ds-border); }

body.ui-version-modern .ds-cleanup-history-row > div { align-items: baseline; display: flex; gap: 10px; justify-content: space-between; }

body.ui-version-modern .ds-cleanup-history-row time { color: var(--ds-text-muted); font-size: calc(.76rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-cleanup-history-row dl { display: flex; flex-wrap: wrap; gap: 7px 20px; margin: 8px 0 0; }

body.ui-version-modern .ds-cleanup-history-row dl > div { min-width: 78px; }

body.ui-version-modern .ds-cleanup-history-row dd { font-size: calc(.78rem * var(--ds-text-scale, 1)); margin: 2px 0 0; }

body.ui-version-modern .ds-cleanup-history-error { color: var(--ds-danger); font-size: calc(.76rem * var(--ds-text-scale, 1)); margin: 8px 0 0; }

body.ui-version-modern .ds-cleanup-execute-form { margin-top: 14px; }

body.ui-version-modern .ds-cleanup-job { margin-top: 0; }

body.ui-version-modern .ds-cleanup-job p { color: var(--ds-text-muted); margin: 6px 0 0; }

body.ui-version-modern .ds-cleanup-workspace-footer { flex-wrap: wrap; }

body.ui-version-modern .ds-cleanup-workspace-footer > form { margin: 0; }

body.ui-version-modern .ds-cleanup-empty { align-items: flex-start; background: transparent; border: 0; border-top: 1px solid var(--ds-border); border-radius: 0; flex-direction: row; justify-content: flex-start; min-height: 0; padding: 8px 0 0; text-align: left; }

body.ui-version-modern .ds-cleanup-empty .ds-empty-state-icon { display: none; }

@media (min-width: 901px) {
    body.ui-version-modern .app-shell.is-side-nav-collapsed,
html.side-nav-collapsed body.ui-version-modern .app-shell { grid-template-columns: 48px minmax(0, 1fr); }

    body.ui-version-modern .side-nav.is-collapsed,
html.side-nav-collapsed body.ui-version-modern .side-nav {
        padding-inline: 3px;
        width: 48px;
    }

    body.ui-version-modern .side-nav.is-collapsed .side-nav-collapse,
html.side-nav-collapsed body.ui-version-modern .side-nav-collapse {
        flex-basis: 30px;
        height: 30px;
        min-height: 30px;
        min-width: 30px;
        width: 30px;
    }

    body.ui-version-modern .side-nav.is-collapsed .side-nav-content,
html.side-nav-collapsed body.ui-version-modern .side-nav-content { padding: 5px 0; }

    body.ui-version-modern .side-nav.is-collapsed .side-section,
html.side-nav-collapsed body.ui-version-modern .side-section { margin-bottom: 4px; }

    body.ui-version-modern .side-nav.is-collapsed .side-title,
html.side-nav-collapsed body.ui-version-modern .side-title {
        min-height: 23px;
        padding: 2px 0;
    }

    body.ui-version-modern .side-nav.is-collapsed .side-nav a,
html.side-nav-collapsed body.ui-version-modern .side-nav a {
        box-sizing: border-box;
        flex: 0 0 34px;
        gap: 0;
        height: 34px;
        justify-self: center;
        margin-inline: auto;
        max-width: 34px;
        min-height: 34px;
        min-width: 34px;
        padding: 0;
        width: 34px;
    }

    body.ui-version-modern .side-nav.is-collapsed .side-nav a.active::before,
html.side-nav-collapsed body.ui-version-modern .side-nav a.active::before {
        height: 22px;
        left: -4px;
        top: 6px;
    }

    body.ui-version-modern .side-nav.is-collapsed .side-nav-link-icon,
body.ui-version-modern .side-nav.is-collapsed .side-nav-section-icon,
html.side-nav-collapsed body.ui-version-modern .side-nav-link-icon,
html.side-nav-collapsed body.ui-version-modern .side-nav-section-icon {
        flex: 0 0 22px;
        height: 22px;
        width: 22px;
    }

    body.ui-version-modern .side-nav.is-collapsed .side-nav-link-icon svg,
body.ui-version-modern .side-nav.is-collapsed .side-nav-section-icon svg,
html.side-nav-collapsed body.ui-version-modern .side-nav-link-icon svg,
html.side-nav-collapsed body.ui-version-modern .side-nav-section-icon svg {
        height: 21px;
        width: 21px;
    }

}

@media (max-width: 760px) {
    body.ui-version-modern .ds-accordion-trigger { grid-template-columns: minmax(0, 1fr) auto; }

    body.ui-version-modern .ds-accordion-metadata { grid-column: 1 / -1; justify-content: flex-start; }

    body.ui-version-modern .ds-cleanup-owner-panel { background: transparent; border: 0; overflow: visible; }

    body.ui-version-modern .ds-cleanup-task-head { display: none; }

    body.ui-version-modern .ds-cleanup-task-list { display: grid; gap: 8px; }

    body.ui-version-modern .ds-cleanup-task-row { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); gap: 5px 10px; grid-template-columns: minmax(0, 1fr) 18px; padding: 12px; }

    body.ui-version-modern .ds-cleanup-task-row:last-child { border-bottom: 1px solid var(--ds-border); }

    body.ui-version-modern .ds-cleanup-task-name { grid-column: 1; }

    body.ui-version-modern .ds-cleanup-task-name small { display: none; }

    body.ui-version-modern .ds-cleanup-task-cell { display: grid; gap: 5px; grid-column: 1; grid-template-columns: 78px minmax(0, 1fr); }

    body.ui-version-modern .ds-cleanup-task-cell::before { color: var(--ds-text-faint); content: attr(data-label); font-size: calc(.68rem * var(--ds-text-scale, 1)); font-weight: 700; text-transform: uppercase; }

    body.ui-version-modern .ds-cleanup-task-disclosure { align-self: center; grid-column: 2; grid-row: 1 / span 5; }

    body.ui-version-modern .ds-cleanup-state-summary { grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .ds-cleanup-policy-bar { align-items: stretch; flex-direction: column; row-gap: 0; }

    body.ui-version-modern .ds-cleanup-policy-item { border-left: 0; border-top: 1px solid var(--ds-border); box-sizing: border-box; justify-content: flex-start; padding: 8px 0; width: 100%; }

    body.ui-version-modern .ds-cleanup-policy-bar > .ds-cleanup-policy-retention { border-top: 0; padding-top: 0; }

    body.ui-version-modern .ds-cleanup-policy-preview { align-items: flex-start; flex-direction: column; white-space: normal; }

    body.ui-version-modern .ds-cleanup-selection-toolbar { align-items: stretch; flex-direction: column; }

    body.ui-version-modern .ds-cleanup-policy-preview button { width: 100%; }

    body.ui-version-modern .ds-cleanup-candidate-row { align-items: flex-start; padding-block: 7px; }

    body.ui-version-modern .ds-cleanup-candidate-row .ds-cleanup-sample-row { display: grid; gap: 6px; }

    body.ui-version-modern .ds-cleanup-preview-pagination { justify-content: space-between; }

    body.ui-version-modern .ds-cleanup-workspace-footer > button,
body.ui-version-modern .ds-cleanup-workspace-footer > form,
body.ui-version-modern .ds-cleanup-workspace-footer > form > button { flex: 1 1 auto; }

}

@media (min-width: 761px) and (max-width: 1200px) {
    body.ui-version-modern .ds-cleanup-task-head,
body.ui-version-modern .ds-cleanup-task-row { gap: 9px; grid-template-columns: minmax(210px, 1.4fr) minmax(150px, 1.1fr) minmax(82px, .65fr) minmax(90px, .65fr) minmax(120px, .8fr) 18px; }

    body.ui-version-modern .ds-cleanup-task-name small { -webkit-line-clamp: 1; }

}

body.ui-version-modern .flash,
body.ui-version-modern .inline-alert { border: 1px solid var(--ds-border); border-left-width: 4px; border-radius: var(--ds-radius-control); box-shadow: none; font-size: calc(13px * var(--ds-text-scale, 1)); padding: 9px 11px; }

body.ui-version-modern .flash.success { background: var(--ds-success-soft); border-left-color: var(--ds-success); color: var(--ds-success); }

body.ui-version-modern .flash.warning { background: var(--ds-warning-soft); border-left-color: var(--ds-warning); color: var(--ds-warning); }

body.ui-version-modern .flash.error { background: var(--ds-danger-soft); border-left-color: var(--ds-danger); color: var(--ds-danger); }

body.ui-version-modern .flash.info { background: var(--ds-info-soft); border-left-color: var(--ds-info); color: var(--ds-info); }

/* Cards are compact summaries, not page-sized containers. */
body.ui-version-modern .notification-module-grid { gap: 10px; }

body.ui-version-modern .notification-module-card,
body.ui-version-modern .ds-card {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    box-shadow: none;
    color: var(--ds-text);
    min-height: 0;
    padding: var(--ds-card-pad);
}

body.ui-version-modern .notification-policy-controls { display: grid; gap: 10px; min-width: 0; }

body.ui-version-modern .notification-policy-controls .ds-switch { margin: 0; }

body.ui-version-modern .ds-code-preview {
    align-items: start;
    display: grid;
    gap: var(--ds-panel-gap);
    grid-template-columns: minmax(148px, 196px) minmax(0, 1fr);
}

body.ui-version-modern .ds-code-preview-visual {
    align-items: center;
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control);
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
}

body.ui-version-modern .ds-code-preview-visual img { display: block; height: auto; max-height: 196px; max-width: 100%; width: 100%; }

body.ui-version-modern .ds-code-preview-copy { display: grid; gap: var(--ds-form-gap); min-width: 0; }

body.ui-version-modern .ds-code-preview-copy h2,
body.ui-version-modern .ds-code-preview-copy p,
body.ui-version-modern .ds-code-preview-metadata { margin: 0; }

body.ui-version-modern .ds-code-preview-actions { margin-top: 2px; }

body.ui-version-modern .ds-copy-field { display: grid; gap: 6px; }

body.ui-version-modern .ds-copy-field-control { align-items: stretch; display: flex; gap: var(--ds-action-gap); }

body.ui-version-modern .ds-copy-field-control textarea { flex: 1 1 auto; font-family: var(--ds-font-mono); min-width: 0; resize: none; }

body.ui-version-modern .ds-copy-field-control button { flex: 0 0 auto; }

@media (max-width: 640px) {
    body.ui-version-modern .ds-copy-field-control { align-items: stretch; flex-direction: column; }

    body.ui-version-modern .ds-code-preview { grid-template-columns: 1fr; }

    body.ui-version-modern .ds-code-preview-visual { justify-self: center; width: min(196px, 100%); }

}

body.ui-version-modern dialog::backdrop { background: rgba(15, 23, 42, .52); backdrop-filter: blur(2px); }

body.ui-version-modern .ds-dialog-header {
    align-items: center;
    background: var(--ds-surface-raised);
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    justify-content: space-between;
    margin: 0;
    min-height: 52px;
    padding: 9px 10px 9px 16px;
    position: sticky;
    top: 0;
    z-index: 3;
}

body.ui-version-modern .dialog-close,
body.ui-version-modern .ds-icon-button {
    align-items: center;
    align-self: stretch;
    background: transparent;
    border: 0;
    border-radius: var(--ds-radius-control);
    color: var(--ds-text-muted);
    display: inline-flex;
    font-size: calc(21px * var(--ds-text-scale, 1));
    height: auto;
    justify-content: center;
    margin: -5px -4px -5px 8px;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
}

body.ui-version-modern .dialog-close:hover { background: var(--ds-surface-strong); color: var(--ds-text); filter: none; }

body.ui-version-modern .ds-dialog-body { padding: var(--ds-panel-pad); }

/* Canonical record-modal contract. Only the body scrolls; header and footer
   stay visible. S/M/L are the only supported size families. */
body.ui-version-modern.ds-modal-open { overflow: hidden; }

body.ui-version-modern dialog.ds-modal {
    align-content: start;
    background: var(--ds-surface-raised);
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-panel);
    box-shadow: var(--ds-shadow-dialog);
    color: var(--ds-text);
    height: fit-content;
    margin: auto;
    max-height: min(88dvh, 900px);
    max-width: calc(100vw - 32px);
    overflow: hidden;
    padding: 0;
}

body.ui-version-modern dialog.ds-modal[open] {
    display: grid;
    grid-template-rows: auto minmax(0, auto) auto;
}

body.ui-version-modern dialog.ds-modal--s { width: min(500px, calc(100vw - 32px)); }

body.ui-version-modern dialog.ds-modal--m { width: min(720px, calc(100vw - 32px)); }

body.ui-version-modern dialog.ds-modal--l { width: min(980px, calc(100vw - 32px)); }

body.ui-version-modern dialog.ds-modal--edit[open] { grid-template-rows: auto minmax(0, auto); }

body.ui-version-modern .ds-modal-header {
    align-items: center;
    background: var(--ds-surface-raised);
    border-bottom: 1px solid var(--ds-border);
    display: grid;
    gap: 11px;
    min-height: 68px;
    padding: 11px 12px 11px 18px;
    position: relative;
    z-index: 2;
}

body.ui-version-modern .ds-modal-header--with-visual { grid-template-columns: auto minmax(0, 1fr) auto; }

body.ui-version-modern .ds-modal-header--plain { grid-template-columns: minmax(0, 1fr) auto; }

body.ui-version-modern .ds-modal-visual {
    align-items: center;
    display: flex;
    justify-content: center;
}

body.ui-version-modern .ds-modal-visual .avatar,
body.ui-version-modern .ds-modal-visual .avatar-frame { flex: 0 0 auto; }

body.ui-version-modern .ds-modal-heading-copy { min-width: 0; }

body.ui-version-modern .ds-modal-heading-copy h2 {
    color: var(--ds-text);
    font-size: calc(1.08rem * var(--ds-text-scale, 1));
    line-height: 1.25;
    margin: 0;
}

body.ui-version-modern .ds-modal-heading-copy p {
    color: var(--ds-text-muted);
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    margin: 2px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ui-version-modern .ds-modal-close {
    align-items: center;
    align-self: center;
    background: transparent;
    border: 0;
    border-radius: var(--ds-radius-control);
    color: var(--ds-text-muted);
    display: inline-flex;
    font-size: calc(1.35rem * var(--ds-text-scale, 1));
    height: 40px;
    justify-content: center;
    margin: 0;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
    width: 40px;
}

body.ui-version-modern .ds-modal-header--plain .ds-modal-close { grid-column: 2; }

body.ui-version-modern .ds-modal-header--with-visual .ds-modal-close { grid-column: 3; }

body.ui-version-modern .ds-modal-close:hover { background: var(--ds-surface-strong); color: var(--ds-text); }

body.ui-version-modern .ds-modal-close:focus { box-shadow: none; outline: 0; }

body.ui-version-modern .ds-modal-close:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 1px solid var(--ds-primary); }

body.ui-version-modern .ds-modal-body {
    max-height: calc(min(88dvh, 900px) - 128px);
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 18px;
}

body.ui-version-modern .ds-modal-body > :first-child { margin-top: 0; }

body.ui-version-modern .ds-modal-body > :last-child { margin-bottom: 0; }

body.ui-version-modern .ds-modal-footer {
    align-items: center;
    background: var(--ds-surface-raised);
    border-top: 1px solid var(--ds-border);
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-action-gap);
    justify-content: flex-end;
    min-height: 58px;
    padding: 11px 18px;
    position: relative;
    z-index: 2;
}

body.ui-version-modern .ds-modal-footer > button,
body.ui-version-modern .ds-modal-footer > .button { min-height: var(--ds-control-height); }

body.ui-version-modern .ds-modal-form {
    align-content: start;
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, auto) auto;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

body.ui-version-modern .ds-modal-form-grid {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
}

body.ui-version-modern .ds-modal-form-grid > .wide { grid-column: 1 / -1; }

body.ui-version-modern .ds-modal-form-grid label { gap: 5px; min-width: 0; }

body.ui-version-modern .system-document-edit-fields {
    display: contents;
}

body.ui-version-modern .system-document-edit-fields[hidden] {
    display: none !important;
}

body.ui-version-modern .system-document-option-list { display: grid; gap: 9px 14px; }

body.ui-version-modern .system-document-option-list--groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }

body.ui-version-modern .system-document-option-list > .field-help { grid-column: 1 / -1; margin: 0 0 2px; }

body.ui-version-modern .system-document-option-list .check-row { align-items: start; }

body.ui-version-modern .system-document-option-list .check-row > span { display: grid; gap: 2px; }

body.ui-version-modern .system-document-option-list .check-row small { color: var(--ds-text-muted); }

body.ui-version-modern .system-document-reacceptance { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); display: grid; gap: 9px; margin: 4px 0 0; padding: 13px; }

body.ui-version-modern .system-document-reacceptance legend { color: var(--ds-text); font-weight: 750; padding: 0 4px; }

body.ui-version-modern .system-document-reacceptance p { color: var(--ds-text-muted); margin: 0; }

body.ui-version-modern .system-document-reacceptance .check-row { align-items: start; }

body.ui-version-modern .system-document-reacceptance .check-row span { display: grid; gap: 2px; }

body.ui-version-modern .system-document-reacceptance small { color: var(--ds-text-muted); }

body.ui-version-modern .system-document-management { display: grid; gap: 12px; }

body.ui-version-modern .system-document-management-heading { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; }

body.ui-version-modern .system-document-management-heading h2 { margin: 0; }

body.ui-version-modern .system-document-management-heading p { margin: 4px 0 0; }

body.ui-version-modern .system-document-management-actions { align-items: center; display: flex; flex-wrap: wrap; gap: var(--ds-action-gap); justify-content: flex-end; }

body.ui-version-modern .system-document-management-table { overflow: hidden; }

body.ui-version-modern .system-document-management-table .ds-table { min-width: 0; table-layout: fixed; }

body.ui-version-modern .system-document-management-table .ds-table th,
body.ui-version-modern .system-document-management-table .ds-table td { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .system-document-management-table .ds-table .ds-table-actions,
body.ui-version-modern .system-document-management-table .ds-table .ds-table-actions-heading { min-width: 96px; overflow-wrap: normal; white-space: nowrap; width: 96px; }

body.ui-version-modern .system-document-management-table th:nth-child(1),
body.ui-version-modern .system-document-management-table td:nth-child(1) { width: 30%; }

body.ui-version-modern .system-document-management-table th:nth-child(2),
body.ui-version-modern .system-document-management-table td:nth-child(2) { width: 9%; }

body.ui-version-modern .system-document-management-table th:nth-child(3),
body.ui-version-modern .system-document-management-table td:nth-child(3) { width: 18%; }

body.ui-version-modern .system-document-management-table th:nth-child(4),
body.ui-version-modern .system-document-management-table td:nth-child(4) { width: 20%; }

body.ui-version-modern .system-document-management-table th:nth-child(5),
body.ui-version-modern .system-document-management-table td:nth-child(5) { width: 16%; }

body.ui-version-modern .system-document-management-table th:nth-child(6),
body.ui-version-modern .system-document-management-table td:nth-child(6) { width: 96px; }

body.ui-version-modern .system-document-title-cell { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }

body.ui-version-modern .system-document-title-cell > .ds-collection-primary-link { flex: 1 1 110px; min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .system-document-title-cell > .ds-order-control { flex: 0 0 auto; }

body.ui-version-modern .system-document-viewer-dialog .documentation-content { margin: 0; }

body.ui-version-modern .system-document-viewer-dialog .documentation-content > :first-child { margin-top: 0; }

body.ui-version-modern .system-document-viewer-dialog .documentation-content > :last-child { margin-bottom: 0; }

body.ui-version-modern .system-document-evidence-toolbar { margin: 0 0 12px; }

body.ui-version-modern .system-document-evidence-filter-form { align-items: end; display: grid; gap: 10px; grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(130px, .8fr) minmax(180px, 1.2fr) auto; margin: 0; }

body.ui-version-modern .system-document-evidence-filter-form > label { display: grid; gap: 5px; }

body.ui-version-modern .system-document-evidence-filter-form .form-actions { margin: 0; }

body.ui-version-modern .system-document-evidence-summary { margin-bottom: 12px; }

body.ui-version-modern .system-document-evidence-summary .info-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }

body.ui-version-modern .system-document-evidence-results { display: grid; gap: 12px; }

body.ui-version-modern .system-document-evidence-pagination { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

body.ui-version-modern .system-document-evidence-pagination > span { color: var(--ds-text-muted); font-size: calc(.8rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-auth-panel.system-document-gate-panel { max-width: 860px; }

body.ui-version-modern .system-document-gate-meta { align-items: baseline; display: flex; flex-wrap: wrap; gap: 6px 12px; }

body.ui-version-modern .system-document-gate-meta span:last-child { color: var(--ds-text-muted); font-size: calc(.84rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .system-document-gate-content { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); max-height: min(48vh, 560px); overflow: auto; padding: 16px; }

body.ui-version-modern .system-document-gate-content > :first-child { margin-top: 0; }

body.ui-version-modern .system-document-gate-content > :last-child { margin-bottom: 0; }

body.ui-version-modern .system-document-gate-form { border-top: 1px solid var(--ds-border); margin-top: 2px; padding-top: 14px; }

body.ui-version-modern .system-document-gate-form > .primary { justify-self: start; }

body.ui-version-modern .system-document-gate-logout { margin: 0; }

@media (max-width: 760px) {
    body.ui-version-modern .system-document-option-list--groups { grid-template-columns: 1fr; }

    body.ui-version-modern .system-document-management-heading { align-items: stretch; flex-direction: column; }

    body.ui-version-modern .system-document-management-actions { justify-content: stretch; }

    body.ui-version-modern .system-document-management-actions > * { flex: 1 1 auto; }

    body.ui-version-modern .system-document-management-table { overflow: visible; }

    body.ui-version-modern .system-document-management-table .ds-table,
body.ui-version-modern .system-document-management-table .ds-table tbody { display: block; width: 100%; }

    body.ui-version-modern .system-document-management-table .ds-table thead { display: none; }

    body.ui-version-modern .system-document-management-table .ds-table tr { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); box-sizing: border-box; display: grid; gap: 8px 14px; grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 10px; max-width: 100%; padding: 11px 12px; width: 100%; }

    body.ui-version-modern .system-document-management-table .ds-table td { border: 0; box-sizing: border-box; display: grid; gap: 3px; min-width: 0; padding: 3px 0; text-align: left; width: auto; }

    body.ui-version-modern .system-document-management-table .ds-table td:not(:first-child)::before { color: var(--ds-text-muted); content: attr(data-label); display: block; font-size: calc(.68rem * var(--ds-text-scale, 1)); font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }

    body.ui-version-modern .system-document-management-table .ds-table td:nth-child(1) { grid-column: 1; grid-row: 1; width: auto; }

    body.ui-version-modern .system-document-management-table .ds-table td:nth-child(2) { grid-column: 1; grid-row: 2; width: auto; }

    body.ui-version-modern .system-document-management-table .ds-table td:nth-child(3) { grid-column: 2; grid-row: 2; width: auto; }

    body.ui-version-modern .system-document-management-table .ds-table td:nth-child(4) { grid-column: 1; grid-row: 3; width: auto; }

    body.ui-version-modern .system-document-management-table .ds-table td:nth-child(5) { grid-column: 2; grid-row: 3; width: auto; }

    body.ui-version-modern .system-document-management-table .ds-table td:nth-child(6) { align-items: start; display: flex; grid-column: 2; grid-row: 1; justify-content: flex-end; padding-left: 6px; width: auto; }

    body.ui-version-modern .system-document-management-table .ds-table td:nth-child(6)::before { content: none; }

    body.ui-version-modern .system-document-evidence-filter-form { grid-template-columns: 1fr; }

    body.ui-version-modern .system-document-evidence-pagination { align-items: stretch; display: grid; }

    body.ui-version-modern .system-document-evidence-pagination .ds-pagination { justify-content: space-between; }

    body.ui-version-modern .system-document-gate-content { max-height: 38vh; padding: 14px; }

    body.ui-version-modern .system-document-gate-form > .primary,
body.ui-version-modern .system-document-gate-logout > .secondary { width: 100%; }

}

/* Core responsive/density hardening. Collection-specific composition avoids
   changing legacy compact tables whose column contracts still require scroll. */
body.ui-version-modern .accounts-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

body.ui-version-modern .accounts-table th,
body.ui-version-modern .accounts-table td { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .accounts-table .ds-table-actions,
body.ui-version-modern .accounts-table .ds-table-actions-heading { overflow-wrap: normal; }

body.ui-version-modern .accounts-table th:nth-child(1),
body.ui-version-modern .accounts-table td:nth-child(1) { width: 55%; }

body.ui-version-modern .accounts-table th:nth-child(2),
body.ui-version-modern .accounts-table td:nth-child(2) { width: 13%; }

body.ui-version-modern .accounts-table th:nth-child(3),
body.ui-version-modern .accounts-table td:nth-child(3) { width: auto; }

body.ui-version-modern .accounts-table th:nth-child(4),
body.ui-version-modern .accounts-table td:nth-child(4) { width: 96px; }

body.ui-version-modern .account-identity { display: grid; gap: 3px; min-width: 0; }

body.ui-version-modern .account-identity-primary,
body.ui-version-modern .account-email-meta,
body.ui-version-modern .account-email-address { min-width: 0; }

body.ui-version-modern .account-identity-primary { align-items: baseline; display: flex; flex-wrap: wrap; gap: 3px 8px; }

body.ui-version-modern .account-reference { flex: 0 0 auto; font-size: calc(.72rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .account-email-meta { align-items: start; display: grid; gap: 4px 8px; grid-template-columns: minmax(0, 1fr) auto; }

body.ui-version-modern .account-email-address { overflow-wrap: anywhere; }

body.ui-version-modern .core-access-level-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

body.ui-version-modern .core-access-level-table th:nth-child(1),
body.ui-version-modern .core-access-level-table td:nth-child(1) { width: 12%; }

body.ui-version-modern .core-access-level-table th:nth-child(2),
body.ui-version-modern .core-access-level-table td:nth-child(2) { width: 20%; }

body.ui-version-modern .core-access-level-table th:nth-child(3),
body.ui-version-modern .core-access-level-table td:nth-child(3) { width: 17%; }

body.ui-version-modern .core-access-level-table th:nth-child(4),
body.ui-version-modern .core-access-level-table td:nth-child(4) { width: auto; }

body.ui-version-modern .core-access-level-table th:nth-child(5),
body.ui-version-modern .core-access-level-table td:nth-child(5) { width: 82px; }

body.ui-version-modern .core-access-level-table th:nth-child(6),
body.ui-version-modern .core-access-level-table td:nth-child(6) { width: 96px; }

body.ui-version-modern .core-access-level-table th:nth-child(7),
body.ui-version-modern .core-access-level-table td:nth-child(7) { width: 82px; }

@media (max-width: 760px) {
    body.ui-version-modern .account-list-panel .table-wrap,
    body.ui-version-modern .core-access-level-collection .table-wrap { overflow: visible; }

    body.ui-version-modern .accounts-table,
    body.ui-version-modern .accounts-table tbody,
    body.ui-version-modern .core-access-level-table,
    body.ui-version-modern .core-access-level-table tbody { display: block; min-width: 0; width: 100%; }

    body.ui-version-modern .accounts-table thead,
    body.ui-version-modern .core-access-level-table thead { display: none; }

    body.ui-version-modern .accounts-table tbody > tr,
    body.ui-version-modern .core-access-level-table tbody > tr:not(.access-level-section-row) {
        border: 1px solid var(--ds-border);
        border-radius: var(--ds-radius-control);
        box-sizing: border-box;
        display: grid;
        gap: 8px 14px;
        grid-template-columns: minmax(0, 1fr) auto;
        margin-bottom: 10px;
        max-width: 100%;
        padding: 11px 12px;
        width: 100%;
    }

    body.ui-version-modern .accounts-table td,
    body.ui-version-modern .core-access-level-table td {
        border: 0;
        box-sizing: border-box;
        display: grid;
        gap: 3px;
        min-width: 0;
        padding: 3px 0 !important;
        text-align: left !important;
        width: auto !important;
    }

    body.ui-version-modern .ds-table-actions,
    body.ui-version-modern .ds-table-actions-heading { min-width: 0; white-space: normal; width: auto; }

    body.ui-version-modern .accounts-table td::before,
    body.ui-version-modern .core-access-level-table td::before {
        color: var(--ds-text-muted);
        content: attr(data-label);
        font-size: calc(.68rem * var(--ds-text-scale, 1));
        font-weight: 750;
        letter-spacing: .035em;
        text-transform: uppercase;
    }

    body.ui-version-modern .accounts-table td:nth-child(1) { grid-column: 1 / -1; grid-row: 1; }
    body.ui-version-modern .accounts-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
    body.ui-version-modern .accounts-table td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
    body.ui-version-modern .accounts-table td:nth-child(4) { align-items: end; display: flex; grid-column: 2; grid-row: 2; justify-content: flex-end; }
    body.ui-version-modern .accounts-table td:nth-child(4)::before { margin-right: 8px; }

    body.ui-version-modern .accounts-table .account-email-meta { display: flex; flex-wrap: wrap; }

    body.ui-version-modern .core-access-level-table tbody > .access-level-section-row {
        box-sizing: border-box;
        display: block;
        max-width: 100%;
        width: 100%;
    }

    body.ui-version-modern .core-access-level-table td:nth-child(1) { grid-column: 1; grid-row: 2; }
    body.ui-version-modern .core-access-level-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
    body.ui-version-modern .core-access-level-table td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
    body.ui-version-modern .core-access-level-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 4; }
    body.ui-version-modern .core-access-level-table td:nth-child(5) { grid-column: 2; grid-row: 2; }
    body.ui-version-modern .core-access-level-table td:nth-child(6) { grid-column: 1; grid-row: 5; }
    body.ui-version-modern .core-access-level-table td:nth-child(7) { grid-column: 2; grid-row: 5; }

    body.ui-version-modern .core-access-level-table .ds-collection-primary-link { max-width: 100%; overflow-wrap: anywhere; white-space: normal; width: auto; }
}

body.ui-version-modern .ds-modal-section {
    border-top: 1px solid var(--ds-border);
    margin-top: 20px;
    padding-top: 16px;
}

body.ui-version-modern .ds-modal-section p { color: var(--ds-text-muted); margin: 0; }

body.ui-version-modern .ds-modal-error-summary {
    background: var(--ds-danger-soft);
    border: 1px solid color-mix(in srgb, var(--ds-danger) 34%, var(--ds-border));
    border-radius: var(--ds-radius-control);
    color: var(--ds-danger);
    grid-column: 1 / -1;
    margin: 0 0 14px;
    padding: 9px 11px;
}

body.ui-version-modern .ds-modal-error-summary:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-modal-form [aria-invalid="true"] { border-color: var(--ds-danger); }

body.ui-version-modern .ds-discard-confirm-dialog .ds-modal-body { padding-block: 20px; }

body.ui-version-modern .ds-discard-confirm-dialog .ds-modal-body p { color: var(--ds-text-muted); margin: 0; }

@media (max-width: 640px) {
    body.ui-version-modern .ds-modal-form-grid { grid-template-columns: 1fr; }

    body.ui-version-modern .ds-modal-form-grid > .wide { grid-column: 1; }

}

@media (max-width: 480px) {
    body.ui-version-modern dialog.ds-modal {
        align-content: stretch;
        border: 0;
        border-radius: 0;
        height: 100dvh;
        margin: 0;
        max-height: 100dvh;
        max-width: 100vw;
        width: 100vw;
    }

    body.ui-version-modern dialog.ds-modal[open] { grid-template-rows: auto minmax(0, 1fr) auto; }

    body.ui-version-modern dialog.ds-modal--edit[open] { grid-template-rows: auto minmax(0, 1fr); }

    body.ui-version-modern .ds-modal-form { grid-template-rows: minmax(0, 1fr) auto; }

    body.ui-version-modern .ds-modal-form { align-content: stretch; }

    body.ui-version-modern .ds-modal-body { max-height: none; }

    body.ui-version-modern .ds-modal-header { min-height: 64px; padding: 9px 8px 9px 14px; }

    body.ui-version-modern .ds-modal-body { padding: 15px 14px; }

    body.ui-version-modern .ds-modal-footer { padding: 10px 14px; }

    body.ui-version-modern .ds-modal--confirm {
        align-content: start;
        border: 1px solid var(--ds-border-strong);
        border-radius: var(--ds-radius-panel);
        height: auto;
        margin: auto;
        max-height: calc(100dvh - 32px);
        max-width: calc(100vw - 24px);
        width: calc(100vw - 24px);
    }

    body.ui-version-modern dialog.ds-modal--confirm[open] { grid-template-rows: auto minmax(0, auto) auto; }

    body.ui-version-modern dialog.ds-modal--confirm .ds-modal-body { max-height: calc(100dvh - 148px); }

}

@media (min-width: 761px) and (max-width: 900px) {
    body.ui-version-modern .side-nav-collapse { display: inline-flex; }

}

body.ui-version-modern .ds-tooltip { position: relative; }

body.ui-version-modern .ds-tooltip:not(.ds-header-trigger) { border-bottom: 1px dotted currentColor; cursor: help; }

body.ui-version-modern .ds-tooltip::after {
    background: #101828;
    border-radius: 5px;
    bottom: calc(100% + 7px);
    color: #fff;
    content: attr(data-tooltip);
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 500;
    left: 50%;
    max-width: 260px;
    opacity: 0;
    padding: 6px 8px;
    pointer-events: none;
    position: absolute;
    transform: translate(-50%, 3px);
    transition: opacity .12s ease, transform .12s ease;
    white-space: normal;
    width: max-content;
    z-index: 30;
}

body.ui-version-modern .ds-tooltip:hover::after,
body.ui-version-modern .ds-tooltip:focus::after { opacity: 1; transform: translate(-50%, 0); }

body.ui-version-modern .ds-loader { align-items: center; color: var(--ds-text-muted); display: inline-flex; font-size: calc(.82rem * var(--ds-text-scale, 1)); gap: 7px; }

body.ui-version-modern .ds-spinner { animation: ds-spin .7s linear infinite; border: 2px solid var(--ds-border); border-radius: 50%; border-top-color: var(--ds-primary); height: 16px; width: 16px; }

@keyframes ds-spin { to { transform: rotate(360deg); } }

@keyframes ds-busy-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* UI feedback ------------------------------------------------------------
   Toasts are transient page feedback. Inline notices, form summaries and
   field errors stay in document flow and are never auto-dismissed. */
body.ui-version-modern .ds-toast-region {
    display: grid;
    gap: 8px;
    max-height: calc(100dvh - var(--ds-toast-offset, 156px) - 12px);
    max-width: min(400px, calc(100vw - 32px));
    overflow: visible;
    pointer-events: none;
    position: fixed;
    right: 16px;
    top: var(--ds-toast-offset, 156px);
    width: 400px;
    z-index: 12000;
}

body.ui-version-modern .ds-toast-region:focus-visible {
    outline: 3px solid var(--ds-focus);
    outline-offset: 3px;
}

body.ui-version-modern .ds-toast,
body.ui-version-modern .ds-alert {
    --ds-feedback-color: var(--ds-info);
    --ds-feedback-soft: var(--ds-info-soft);
    align-items: start;
    background: var(--ds-feedback-soft);
    border: 1px solid color-mix(in srgb, var(--ds-feedback-color) 32%, var(--ds-border));
    border-left: 4px solid var(--ds-feedback-color);
    border-radius: var(--ds-radius-control);
    color: var(--ds-text);
    display: grid;
    font-size: calc(.86rem * var(--ds-text-scale, 1));
    gap: 10px;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    line-height: 1.4;
    margin: 0;
    min-width: 0;
    padding: 10px 8px 10px 12px;
}

body.ui-version-modern .ds-toast {
    box-shadow: var(--ds-shadow-menu);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity .18s ease, transform .18s ease;
}

body.ui-version-modern .ds-toast.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

body.ui-version-modern .ds-toast--success,
body.ui-version-modern .ds-alert--success { --ds-feedback-color: var(--ds-success); --ds-feedback-soft: var(--ds-success-soft); }

body.ui-version-modern .ds-toast--info,
body.ui-version-modern .ds-alert--info { --ds-feedback-color: var(--ds-info); --ds-feedback-soft: var(--ds-info-soft); }

body.ui-version-modern .ds-toast--warning,
body.ui-version-modern .ds-alert--warning { --ds-feedback-color: var(--ds-warning); --ds-feedback-soft: var(--ds-warning-soft); }

body.ui-version-modern .ds-toast--error,
body.ui-version-modern .ds-alert--error { --ds-feedback-color: var(--ds-danger); --ds-feedback-soft: var(--ds-danger-soft); }

body.ui-version-modern .ds-feedback-icon {
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--ds-feedback-color) 42%, transparent);
    border-radius: 50%;
    color: var(--ds-feedback-color);
    display: inline-flex;
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-style: normal;
    font-weight: 800;
    height: 20px;
    justify-content: center;
    line-height: 1;
    margin-top: 1px;
    width: 20px;
}

body.ui-version-modern .ds-feedback-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    overflow-wrap: anywhere;
}

body.ui-version-modern .ds-feedback-title,
body.ui-version-modern .ds-alert-title {
    color: var(--ds-text);
    display: block;
    font-weight: 750;
}

body.ui-version-modern .ds-feedback-message { color: var(--ds-text-muted); }

body.ui-version-modern .ds-feedback-count {
    color: var(--ds-feedback-color);
    font-size: calc(.75rem * var(--ds-text-scale, 1));
    font-weight: 800;
    margin-top: 2px;
}

body.ui-version-modern .ds-feedback-close {
    align-items: center;
    align-self: center;
    background: transparent;
    border: 0;
    border-radius: var(--ds-radius-control);
    color: var(--ds-text-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: calc(20px * var(--ds-text-scale, 1));
    height: 40px;
    justify-content: center;
    margin: -7px -3px -7px 0;
    padding: 0;
    width: 40px;
}

body.ui-version-modern .ds-feedback-close:hover { background: color-mix(in srgb, var(--ds-feedback-color) 10%, transparent); color: var(--ds-feedback-color); }

body.ui-version-modern .ds-feedback-close:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-alert {
    box-shadow: none;
    margin-block: 10px;
    width: 100%;
}

body.ui-version-modern .ds-alert:not(:has(.ds-feedback-close)) { grid-template-columns: 20px minmax(0, 1fr); }

body.ui-version-modern .ds-form-error-summary {
    grid-column: 1 / -1;
    margin: 0 0 14px;
}

body.ui-version-modern .ds-form-error-summary:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-form-error-list { margin: 3px 0 0; padding-left: 18px; }

body.ui-version-modern .ds-field-error {
    color: var(--ds-danger);
    display: block;
    font-size: calc(.77rem * var(--ds-text-scale, 1));
    font-weight: 650;
    grid-column: 1 / -1;
    line-height: 1.35;
    margin-top: 3px;
}

/* Public Core authentication shell. Identity Provider entry points retain
   their independent presentation and session contract. */
body.ui-version-modern.ds-auth-body {
    min-height: 100vh;
    overflow-x: hidden;
}

body.ui-version-modern .skip-link {
    background: var(--ds-surface);
    border: 1px solid var(--ds-primary);
    border-radius: var(--ds-radius-control);
    color: var(--ds-text);
    font-weight: 700;
    left: 12px;
    padding: 8px 12px;
    position: fixed;
    top: 10px;
    transform: translateY(calc(-100% - 20px));
    transition: transform .12s ease;
    z-index: 100;
}

body.ui-version-modern .skip-link:focus {
    box-shadow: 0 0 0 3px var(--ds-focus);
    outline: 0;
    transform: translateY(0);
}

body.ui-version-modern .ds-auth-shell {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 100vh;
    padding: clamp(22px, 5vh, 54px) 20px 24px;
}

body.ui-version-modern.ds-auth-body .ds-auth-layout {
    align-items: stretch;
    display: grid;
    grid-template-areas: "information authentication";
    grid-template-columns: 290px minmax(0, 540px);
    max-width: 830px;
    min-width: 0;
    transform: translateX(clamp(-145px, calc(435px - 50vw), 0px));
    width: 100%;
}

body.ui-version-modern.ds-auth-body .ds-auth-layout:not(:has(> .ds-auth-information)) {
    grid-template-areas: "authentication";
    grid-template-columns: minmax(0, 860px);
    max-width: 860px;
    transform: none;
}

body.ui-version-modern .ds-auth-panel {
    background: color-mix(in srgb, var(--ds-surface) 96%, transparent);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
    box-shadow: 0 14px 38px rgba(23, 25, 28, .08);
    grid-area: authentication;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

body.ui-version-modern.ds-auth-body .ds-auth-layout:has(> .ds-auth-information) > .ds-auth-panel {
    border-radius: 0 var(--ds-radius-card) var(--ds-radius-card) 0;
}

body.ui-version-modern.ds-auth-body .ds-auth-layout:not(:has(> .ds-auth-information)) > .ds-auth-panel:not(.system-document-gate-panel) {
    justify-self: center;
    max-width: 560px;
}

body.ui-version-modern.auth-has-bg .ds-auth-panel {
    backdrop-filter: blur(6px);
}

body.ui-version-modern .ds-auth-panel--wide { max-width: 640px; }

body.ui-version-modern .ds-auth-brand {
    align-items: center;
    background: color-mix(in srgb, var(--ds-surface-subtle) 72%, transparent);
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    justify-content: flex-start;
    min-height: 74px;
    padding: 16px 24px;
}

body.ui-version-modern .ds-auth-brand-link {
    align-items: center;
    color: var(--ds-text);
    display: inline-flex;
    font-size: calc(1.08rem * var(--ds-text-scale, 1));
    gap: 10px;
    min-width: 0;
    text-decoration: none;
}

body.ui-version-modern .ds-auth-brand-link img {
    height: 42px;
    max-width: 144px;
    object-fit: contain;
    width: auto;
}

body.ui-version-modern .ds-auth-brand-link:focus-visible,
body.ui-version-modern .ds-auth-secondary-links a:focus-visible,
body.ui-version-modern .ds-auth-information a:focus-visible {
    border-radius: var(--ds-radius-control);
    box-shadow: 0 0 0 3px var(--ds-focus);
    outline: 0;
}

body.ui-version-modern .ds-auth-panel-content {
    display: grid;
    gap: 18px;
    padding: 28px 30px 30px;
}

body.ui-version-modern .ds-auth-heading { display: grid; gap: 8px; }

body.ui-version-modern .ds-auth-heading h1 {
    font-size: clamp(1.65rem, 5vw, 2rem);
    letter-spacing: -.025em;
    line-height: 1.12;
    margin: 0;
}

body.ui-version-modern .ds-auth-heading > p:not(.ds-auth-eyebrow) {
    color: var(--ds-text-muted);
    line-height: 1.55;
    margin: 0;
}

body.ui-version-modern .ds-auth-intro {
    color: var(--ds-text-muted);
    display: grid;
    gap: 8px;
    line-height: 1.55;
    min-width: 0;
    overflow-wrap: anywhere;
}

body.ui-version-modern .ds-auth-intro p { margin: 0; }

body.ui-version-modern .ds-auth-eyebrow {
    color: var(--ds-primary);
    font-size: calc(.72rem * var(--ds-text-scale, 1));
    font-weight: 780;
    letter-spacing: .09em;
    margin: 0;
    text-transform: uppercase;
}

body.ui-version-modern .ds-auth-form { gap: 8px; }

body.ui-version-modern .ds-auth-form label {
    font-size: calc(.82rem * var(--ds-text-scale, 1));
    font-weight: 720;
    margin: 6px 0 0;
}

body.ui-version-modern .ds-auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
body.ui-version-modern .ds-auth-form textarea { font-size: calc(16px * var(--ds-text-scale, 1)); width: 100%; }

body.ui-version-modern .ds-auth-field { display: grid; gap: 8px; min-width: 0; }

body.ui-version-modern .ds-auth-form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ui-version-modern .ds-auth-submit {
    margin-top: 10px;
    min-width: 128px;
    width: 100%;
}

body.ui-version-modern .ds-auth-secondary-links {
    align-items: center;
    border-top: 1px solid var(--ds-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: center;
    padding-top: 16px;
}

body.ui-version-modern .ds-auth-secondary-links a:not(.button) { font-size: calc(.86rem * var(--ds-text-scale, 1)); font-weight: 650; }

body.ui-version-modern .ds-auth-entry-selector { background: var(--ds-surface-subtle); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); display: grid; gap: 3px; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); padding: 3px; }

body.ui-version-modern .ds-auth-entry-selector a { border-radius: calc(var(--ds-radius-control) - 2px); color: var(--ds-text-muted); font-size: calc(.82rem * var(--ds-text-scale, 1)); font-weight: 720; min-height: 36px; padding: 8px 10px; text-align: center; text-decoration: none; }

body.ui-version-modern .ds-auth-entry-selector a:hover { background: var(--ds-surface); color: var(--ds-text); }

body.ui-version-modern .ds-auth-entry-selector a[aria-current="page"] { background: var(--ds-surface); color: var(--ds-text); box-shadow: 0 1px 2px rgba(23,25,28,.12); }

body.ui-version-modern .ds-auth-entry-selector a:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

.auth-panel .ds-auth-entry-selector { background: var(--surface-subtle); border: 1px solid var(--line); border-radius: var(--radius-card, 8px); display: grid; gap: 3px; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); margin-bottom: 18px; padding: 3px; }

.auth-panel .ds-auth-entry-selector a { border-radius: 6px; color: var(--muted); font-size: calc(13px * var(--ds-text-scale, 1)); font-weight: 700; min-height: 34px; padding: 8px 10px; text-align: center; text-decoration: none; }

.auth-panel .ds-auth-entry-selector a:hover,
.auth-panel .ds-auth-entry-selector a[aria-current="page"] { background: var(--surface); color: var(--text); }

.auth-panel .ds-auth-entry-selector a:focus-visible { box-shadow: 0 0 0 3px var(--focus, #9fbaff); outline: 0; }

body.ui-version-modern .settings-auth-entry-section { display: grid; gap: 10px; }

body.ui-version-modern .settings-auth-entry-flow { display: grid; gap: 14px; min-width: 0; }

body.ui-version-modern .settings-auth-entry-block { border-top: 1px solid var(--ds-border); display: grid; gap: 8px; min-width: 0; padding-top: 14px; }

body.ui-version-modern .settings-auth-entry-block:first-of-type { border-top: 0; padding-top: 0; }

body.ui-version-modern .settings-auth-entry-block-heading { display: grid; gap: 3px; min-width: 0; }

body.ui-version-modern .settings-auth-entry-block-heading .field-help { margin: 0; }

body.ui-version-modern .settings-auth-entry-root-choice { align-items: start; display: grid; gap: 6px 16px; min-width: 0; }

body.ui-version-modern .settings-auth-entry-root-choice > label { display: grid; gap: 4px; min-width: 0; }

body.ui-version-modern .settings-auth-entry-root-choice select { width: 100%; }

body.ui-version-modern .settings-auth-entry-root-options { min-width: 0; }

body.ui-version-modern .settings-auth-entry-section [data-auth-entry-shared-options] { display: grid; gap: 10px; }

body.ui-version-modern .settings-auth-entry-section [data-auth-entry-shared-options][hidden] { display: none; }

body.ui-version-modern .settings-auth-entry-context-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context { min-width: 0; }

body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context > span:not(.settings-auth-entry-order) { min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .settings-auth-entry-context-grid code { overflow-wrap: anywhere; white-space: normal; }

body.ui-version-modern .settings-auth-entry-section h3 { font-size: calc(1rem * var(--ds-text-scale, 1)); margin: 0; }

body.ui-version-modern .settings-auth-entry-order { margin-left: auto; width: 68px; }

body.ui-version-modern .settings-auth-entry-order input { min-height: 36px; text-align: center; width: 100%; }

body.ui-version-modern .settings-auth-entry-context-grid { gap: 0 12px; }

body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--ds-border);
    border-radius: 0;
    column-gap: 10px;
    display: grid;
    grid-template-columns: auto minmax(0, .8fr) minmax(0, 1.2fr) 68px;
    padding: 8px 0;
}

body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context > input { margin: 0; width: auto; }

body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context > strong { min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context > .settings-auth-entry-order { margin-left: 0; }

body.ui-version-modern .settings-auth-entry-routes { display: grid; gap: 0; }

body.ui-version-modern .settings-auth-entry-route { align-items: center; border-top: 1px solid var(--ds-border); display: grid; gap: 10px 18px; grid-template-columns: minmax(170px, .75fr) minmax(220px, 1.25fr) minmax(132px, auto); min-height: 52px; padding: 8px 0; }

body.ui-version-modern .settings-auth-entry-route:first-child { border-top: 0; }

body.ui-version-modern .settings-auth-entry-context { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .settings-auth-entry-context > * { min-width: 0; }

body.ui-version-modern .settings-auth-entry-path { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .settings-auth-entry-path-control { align-items: stretch; background: var(--ds-surface); border: 1px solid var(--ds-border-strong, var(--ds-border)); border-radius: var(--ds-radius-control); display: grid; grid-template-columns: auto minmax(0, 1fr); max-width: 360px; min-width: 0; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; width: 100%; }

body.ui-version-modern .settings-auth-entry-path-control:focus-within { border-color: var(--ds-primary); box-shadow: 0 0 0 3px var(--ds-focus); }

body.ui-version-modern .settings-auth-entry-path-control > span { align-items: center; background: var(--ds-surface-subtle); color: var(--ds-text-muted); display: flex; font-family: var(--ds-font-mono, ui-monospace, monospace); padding: 0 2px 0 11px; }

body.ui-version-modern .settings-auth-entry-path-control input { border: 0; border-radius: 0; box-shadow: none; min-width: 0; padding-left: 2px; }

body.ui-version-modern .settings-auth-entry-path-control input:focus { box-shadow: none; outline: 0; }

body.ui-version-modern .settings-auth-entry-fallback-note { color: var(--ds-text-muted); font-size: calc(.72rem * var(--ds-text-scale, 1)); line-height: 1.3; }

body.ui-version-modern .settings-auth-entry-fallback-note strong { color: var(--ds-text); }

body.ui-version-modern .settings-auth-entry-fallback-note code { font-family: var(--ds-font-mono, ui-monospace, monospace); }

body.ui-version-modern .settings-auth-entry-readonly-path { align-items: center; background: var(--ds-surface-subtle); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); color: var(--ds-text-muted); display: inline-flex; font-family: var(--ds-font-mono, ui-monospace, monospace); justify-self: start; max-width: 100%; min-height: var(--ds-control-height); overflow-wrap: anywhere; padding: 5px 11px; white-space: normal; width: fit-content; }

body.ui-version-modern .settings-auth-entry-owner { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; min-width: 0; }

body.ui-version-modern .settings-auth-entry-owner .button { max-width: 100%; white-space: normal; }

body.ui-version-modern .settings-auth-entry-root-description { margin: 0; }

body.ui-version-modern form.ds-form-has-floating-actions [data-tab-panel="settings-login"].is-active { padding-bottom: 18px; }

@media (min-width: 761px) {
    body.ui-version-modern .settings-auth-entry-root-choice { grid-template-columns: minmax(210px, .65fr) minmax(320px, 1.35fr); }

}

@media (max-width: 760px) {
    body.ui-version-modern .settings-auth-entry-context-grid,
body.ui-version-modern .settings-auth-entry-route { align-items: stretch; grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context {
        column-gap: 10px;
        grid-template-areas: "check name order" "check path path";
        grid-template-columns: auto minmax(0, 1fr) 68px;
        row-gap: 3px;
    }

    body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context > input { grid-area: check; }

    body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context > strong { grid-area: name; }

    body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context > span:not(.settings-auth-entry-order) { grid-area: path; }

    body.ui-version-modern .settings-auth-entry-context-grid .settings-auth-entry-context > .settings-auth-entry-order { grid-area: order; }

    body.ui-version-modern .settings-auth-entry-owner { justify-content: flex-start; }

}

body.ui-version-modern .settings-account-section { display: grid; gap: 10px; }

body.ui-version-modern .settings-account-section .settings-account-options { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }

body.ui-version-modern .settings-account-option { align-items: start; display: grid; gap: 8px; grid-template-columns: auto minmax(0, 1fr); min-width: 0; }

body.ui-version-modern .settings-account-option > input { margin-top: 3px; width: auto; }

body.ui-version-modern .settings-account-option > span { display: grid; gap: 3px; min-width: 0; }

body.ui-version-modern .settings-account-option .form-stack { gap: 3px; }

body.ui-version-modern .settings-account-validity { display: grid; gap: 4px; margin-top: 6px; max-width: 260px; }

body.ui-version-modern .settings-account-validity label { font-size: calc(.82rem * var(--ds-text-scale, 1)); }

@media (max-width: 760px) {
 }

body.ui-version-modern .settings-login-intro { display: grid; gap: 8px; min-width: 0; }

body.ui-version-modern .settings-login-intro-heading { align-items: center; display: flex; gap: 10px; justify-content: space-between; }

body.ui-version-modern .settings-login-intro-heading > label { font-weight: 720; }

body.ui-version-modern .settings-login-intro-toolbar { gap: 4px; min-height: 0; padding: 0; }

body.ui-version-modern .settings-login-intro-toolbar .button { min-height: 32px; min-width: 34px; padding: 4px 9px; }

body.ui-version-modern .settings-login-intro textarea { height: calc(7.25em + 14px); min-height: calc(7.25em + 14px); resize: vertical; width: 100%; }

body.ui-version-modern .settings-login-live-preview { display: grid; gap: 8px; min-width: 0; }

body.ui-version-modern .settings-login-preview-heading { display: grid; gap: 2px; }

body.ui-version-modern .settings-login-preview-heading h3,
body.ui-version-modern .settings-login-preview-heading p { margin: 0; }

body.ui-version-modern .settings-login-preview-heading h3 { font-size: calc(.9rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-login-preview-body { display: grid; gap: 12px; padding: 14px; }

body.ui-version-modern .ds-login-preview-contexts { background: var(--ds-surface-subtle); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; }

body.ui-version-modern .ds-login-preview-contexts button { background: transparent; border: 0; border-radius: calc(var(--ds-radius-control) - 2px); color: var(--ds-text-muted); cursor: pointer; font: inherit; font-size: calc(.82rem * var(--ds-text-scale, 1)); font-weight: 700; min-height: 36px; padding: 7px 10px; }

body.ui-version-modern .ds-login-preview-contexts button:hover,
body.ui-version-modern .ds-login-preview-contexts button.is-active { background: var(--ds-surface-raised); color: var(--ds-text); }

body.ui-version-modern .ds-login-preview-contexts button:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-login-preview-frame-wrap { --ds-login-preview-height: 800px; --ds-login-preview-scale: 1; --ds-login-preview-width: 1280px; background: var(--ds-surface-subtle); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-panel); height: var(--ds-login-preview-height); margin-inline: auto; max-width: var(--ds-login-preview-width); overflow: hidden; position: relative; width: 100%; }

body.ui-version-modern .ds-login-preview-frame-wrap iframe { border: 0; height: var(--ds-login-preview-height); left: 0; pointer-events: none; position: absolute; top: 0; transform: scale(var(--ds-login-preview-scale)); transform-origin: 0 0; width: var(--ds-login-preview-width); }

body.ui-version-modern .settings-login-live-preview .ds-login-preview-frame-wrap { margin-inline: 0; max-width: none; }

body.ui-version-modern .settings-login-live-preview .ds-login-preview-frame-wrap iframe { pointer-events: auto; }

body.ui-version-modern [data-login-preview-status]:empty { display: none; }

body.ds-auth-body .ds-auth-entry-options { display: grid; gap: 10px; }

body.ds-auth-body .ds-auth-entry-options a { background: var(--ds-surface-subtle); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); color: var(--ds-text); display: grid; gap: 3px; padding: 13px 14px; text-decoration: none; }

body.ds-auth-body .ds-auth-entry-options a:hover { background: var(--ds-surface-raised); border-color: var(--ds-border-strong); }

body.ds-auth-body .ds-auth-entry-options a:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ds-auth-body .ds-auth-entry-options a span,
body.ds-auth-body .ds-auth-entry-help { color: var(--ds-text-muted); font-size: calc(.84rem * var(--ds-text-scale, 1)); }

body.ds-auth-body .ds-auth-entry-help { margin: 12px 0 0; }

body.ui-version-modern .ds-auth-password-policy {
    background: var(--ds-surface-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control);
    color: var(--ds-text-muted);
    display: grid;
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    gap: 5px;
    margin-top: 7px;
    padding: 11px 13px;
}

body.ui-version-modern .ds-auth-password-policy strong { color: var(--ds-text); }

body.ui-version-modern .ds-auth-password-policy ul { margin: 0; padding-left: 19px; }

body.ui-version-modern .ds-auth-mfa-method {
    border: 0;
    display: grid;
    gap: 7px;
    margin: 8px 0 0;
    min-width: 0;
    padding: 0;
}

body.ui-version-modern .ds-auth-mfa-method legend { font-size: calc(.82rem * var(--ds-text-scale, 1)); font-weight: 720; padding: 0; }

body.ui-version-modern .ds-auth-mfa-method .ds-segmented-control { align-self: start; }

body.ui-version-modern .ds-auth-maintenance-meta {
    background: var(--ds-surface-subtle);
    border-radius: var(--ds-radius-control);
    color: var(--ds-text-muted);
    margin: 0;
    padding: 12px 14px;
}

body.ui-version-modern.ds-auth-body .ds-auth-information {
    background: rgba(15, 23, 34, .92);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--ds-radius-card) 0 0 var(--ds-radius-card);
    color: rgba(255, 255, 255, .88);
    display: flex;
    flex-direction: column;
    font-size: calc(.82rem * var(--ds-text-scale, 1));
    grid-area: information;
    min-width: 0;
    overflow: hidden;
    padding: 30px 24px 20px;
}

body.ui-version-modern.auth-has-bg .ds-auth-information { backdrop-filter: blur(10px); }

body.ui-version-modern .ds-auth-information-content { display: grid; gap: 24px; min-width: 0; }

body.ui-version-modern .ds-auth-information-contacts { display: grid; gap: 7px; min-width: 0; }

body.ui-version-modern .ds-auth-information-contacts { font-style: normal; }

body.ui-version-modern .ds-auth-information-row {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--ds-radius-control);
    color: inherit;
    display: grid;
    gap: 3px;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 9px 11px;
    text-decoration: none;
    white-space: normal;
}

body.ui-version-modern a.ds-auth-information-row { transition: background-color .15s ease, border-color .15s ease; }

body.ui-version-modern a.ds-auth-information-row:hover {
    background: rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
}

body.ui-version-modern .ds-auth-information-documents a.ds-auth-information-row {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

body.ui-version-modern .ds-auth-information-documents a.ds-auth-information-row > [aria-hidden="true"] {
    font-size: 1.08em;
    line-height: 1;
}

body.ui-version-modern .ds-auth-information-row small {
    color: rgba(255, 255, 255, .57);
    font-size: calc(.68rem * var(--ds-text-scale, 1));
    font-style: normal;
}

body.ui-version-modern .ds-auth-information-row strong { color: #fff; font-weight: 650; }

body.ui-version-modern .ds-auth-information-footer {
    align-items: flex-start;
    border-top: 1px solid rgba(255, 255, 255, .13);
    color: rgba(255, 255, 255, .56);
    display: grid;
    gap: 9px;
    margin-top: auto;
    min-width: 0;
    padding-top: 20px;
}

body.ui-version-modern .ds-auth-information-branding { min-width: 0; }

body.ui-version-modern .ds-auth-information-powered {
    background: rgba(255, 255, 255, .92);
    border-radius: 5px;
    color: #70757b;
    justify-content: flex-start;
    max-width: 100%;
    padding: 4px 7px;
    width: fit-content;
}

@media (max-width: 900px) {
    body.ui-version-modern.ds-auth-body .ds-auth-layout,
body.ui-version-modern.ds-auth-body .ds-auth-layout:not(:has(> .ds-auth-information)) {
        grid-template-areas:
            "authentication"
            "information";
        grid-template-columns: minmax(0, 1fr);
        max-width: 560px;
        transform: none;
    }

    body.ui-version-modern.ds-auth-body .ds-auth-layout:not(:has(> .ds-auth-information)) { grid-template-areas: "authentication"; }

    body.ui-version-modern.ds-auth-body .ds-auth-layout:has(> .ds-auth-information) > .ds-auth-panel {
        border-radius: var(--ds-radius-card) var(--ds-radius-card) 0 0;
    }

    body.ui-version-modern.ds-auth-body .ds-auth-information {
        border-radius: 0 0 var(--ds-radius-card) var(--ds-radius-card);
        padding: 25px 24px 20px;
    }

}

@media (max-width: 560px) {
    body.ui-version-modern .ds-auth-shell {
        align-content: start;
        padding: 16px 14px 20px;
    }

    body.ui-version-modern .ds-auth-panel { box-shadow: none; }

    body.ui-version-modern .ds-auth-brand { min-height: 66px; padding: 13px 16px; }

    body.ui-version-modern .ds-auth-brand-link img { height: 36px; max-width: 126px; width: auto; }

    body.ui-version-modern .ds-auth-panel-content { gap: 16px; padding: 22px 18px 24px; }

    body.ui-version-modern .ds-auth-form-grid { grid-template-columns: 1fr; }

    body.ui-version-modern .ds-auth-mfa-method .ds-segmented-control { display: flex; width: 100%; }

    body.ui-version-modern .ds-auth-mfa-method .ds-segmented-option { flex: 1; }

    body.ui-version-modern.ds-auth-body .ds-auth-information { padding: 23px 18px 18px; }

    body.ui-version-modern .settings-login-intro-heading { align-items: flex-start; flex-direction: column; }

}

body.ui-version-modern :where(input, select, textarea)[aria-invalid="true"] {
    border-color: var(--ds-danger);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ds-danger) 28%, transparent);
}

@media (max-width: 640px) {
    body.ui-version-modern .ds-toast-region {
        left: 12px;
        max-height: calc(100dvh - var(--ds-toast-offset, 156px) - 12px);
        max-width: none;
        right: 12px;
        top: var(--ds-toast-offset, 156px);
        width: auto;
    }

}

@media (prefers-reduced-motion: reduce) {
    body.ui-version-modern .ds-toast { animation: none; transition: none; }

}

body.ui-version-modern .ds-pagination { align-items: center; display: flex; flex-wrap: wrap; gap: var(--ds-action-gap); justify-content: flex-end; }

body.ui-version-modern .ds-pagination [aria-current="page"] { color: var(--ds-text-muted); font-size: calc(.8rem * var(--ds-text-scale, 1)); font-variant-numeric: tabular-nums; }

/* Settings and module normalization */
body.ui-version-modern .settings-shell,
body.ui-version-modern .settings-subpage {
    display: grid;
    gap: 12px;
}

body.ui-version-modern .settings-shell > .settings-top-nav,
body.ui-version-modern .settings-subpage > .settings-top-nav { margin: 0; }

body.ui-version-modern .settings-shell > .ds-page-header,
body.ui-version-modern .settings-subpage > .ds-page-header,
body.ui-version-modern .settings-shell > .page-title,
body.ui-version-modern .settings-subpage > .page-title { margin: 0; }

body.ui-version-modern .profile-tabs { background: var(--ds-surface-subtle); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); gap: 2px; padding: 3px; }

body.ui-version-modern .profile-tab { border: 1px solid transparent; border-radius: calc(var(--ds-radius-control) - 2px); color: var(--ds-text-muted); font-size: calc(.8rem * var(--ds-text-scale, 1)); min-height: 30px; padding: 5px 9px; }

body.ui-version-modern .profile-tab:hover { background: var(--ds-surface); color: var(--ds-text); }

body.ui-version-modern .profile-tab.is-active,
body.ui-version-modern .profile-tab[aria-selected="true"] { background: var(--ds-surface); border-color: var(--ds-border); box-shadow: inset 0 -3px var(--ds-primary), 0 1px 2px rgba(16,24,40,.06); color: var(--ds-text); font-weight: 700; }

body.ui-version-modern .settings-top-nav .profile-tab.is-active,
body.ui-version-modern .settings-top-nav .profile-tab[aria-current="page"] { box-shadow: inset 0 -3px var(--ds-primary), 0 1px 2px rgba(16,24,40,.06); }

body.ui-version-modern .settings-subnav.profile-tabs { align-items: center; background: transparent; border: 0; border-left: 2px solid var(--ds-border); border-radius: 0; gap: 4px; margin: 0; padding: 0 0 0 10px; }

body.ui-version-modern .settings-subnav-label { color: var(--ds-text-muted); font-size: calc(.72rem * var(--ds-text-scale, 1)); font-weight: 700; letter-spacing: .04em; margin-right: 2px; text-transform: uppercase; }

body.ui-version-modern .settings-subnav.profile-tabs .profile-tab { background: transparent; border: 0; border-radius: var(--ds-radius-control); font-size: calc(.76rem * var(--ds-text-scale, 1)); min-height: 28px; padding: 4px 8px; }

body.ui-version-modern .settings-subnav.profile-tabs .profile-tab:hover { background: var(--ds-surface-subtle); color: var(--ds-text); }

body.ui-version-modern .settings-subnav.profile-tabs .profile-tab.is-active,
body.ui-version-modern .settings-subnav.profile-tabs .profile-tab[aria-current="page"] { background: var(--ds-surface-subtle); border: 0; box-shadow: inset 0 -2px var(--ds-primary); color: var(--ds-text); font-weight: 700; }

body.ui-version-modern .settings-subpage + .panel,
body.ui-version-modern .settings-shell + .panel { margin-top: 0; }

/* Canonical local-section layout. This shared primitive keeps real route
   links and a compact mobile selector without settings or ARIA-tab semantics. */
body.ui-version-modern .ds-local-section-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(190px, 224px) minmax(0, 1fr);
    min-width: 0;
}

body.ui-version-modern .ds-local-section-content { min-width: 0; }

body.ui-version-modern .ds-local-section-navigation,
body.ui-version-modern .ds-local-section-navigation-desktop { min-width: 0; }

body.ui-version-modern .ds-local-section-navigation-desktop {
    max-height: calc(100dvh - var(--ds-header-height) - 32px);
    overflow: auto;
    position: sticky;
    top: calc(var(--ds-header-height) + 16px);
}

body.ui-version-modern .ds-local-section-navigation-list,
body.ui-version-modern .ds-local-section-group { display: grid; gap: 3px; }

body.ui-version-modern .ds-local-section-group + .ds-local-section-group { margin-top: 12px; }

body.ui-version-modern .ds-local-section-group-label,
body.ui-version-modern .ds-local-section-selector-group,
body.ui-version-modern .ds-local-section-selector-context {
    color: var(--ds-text-muted);
    font-size: calc(.72rem * var(--ds-text-scale, 1));
    font-weight: 750;
    letter-spacing: .04em;
    padding: 0 10px 4px;
    text-transform: uppercase;
}

body.ui-version-modern .ds-local-section-link,
body.ui-version-modern .ds-local-section-selector-link {
    align-items: center;
    background: var(--ds-menu-inactive-bg);
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control);
    color: var(--ds-menu-inactive-text);
    display: flex;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    gap: 8px;
    justify-content: space-between;
    line-height: var(--ds-menu-line-height);
    min-height: 42px;
    padding: 8px 10px;
    text-decoration: none;
}

body.ui-version-modern .ds-local-section-link:hover,
body.ui-version-modern .ds-local-section-selector-link:hover { background: var(--ds-menu-hover-bg); border-color: transparent; color: var(--ds-menu-hover-text); }

body.ui-version-modern .ds-local-section-link:focus-visible,
body.ui-version-modern .ds-local-section-selector-link:focus-visible,
body.ui-version-modern .ds-local-section-selector-trigger:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-local-section-link.is-active,
body.ui-version-modern .ds-local-section-link[aria-current="page"],
body.ui-version-modern .ds-local-section-selector-link.is-active,
body.ui-version-modern .ds-local-section-selector-link[aria-current="page"] {
    background: var(--ds-menu-active-bg);
    border-color: transparent;
    color: var(--ds-menu-active-text);
    font-weight: var(--ds-menu-font-weight);
}

body.ui-version-modern .ds-local-section-link:is(.is-active, [aria-current="page"]):hover,
body.ui-version-modern .ds-local-section-selector-link:is(.is-active, [aria-current="page"]):hover {
    background: var(--ds-menu-active-bg);
    border-color: transparent;
    color: var(--ds-menu-active-text);
}

body.ui-version-modern .ds-local-section-count {
    align-items: center;
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    color: var(--ds-text-muted);
    display: inline-flex;
    font-size: calc(.7rem * var(--ds-text-scale, 1));
    font-weight: 750;
    justify-content: center;
    min-width: 24px;
    padding: 1px 6px;
}

body.ui-version-modern .ds-local-section-current-check {
    color: currentColor;
    flex: 0 0 auto;
    font-weight: 800;
}

body.ui-version-modern .ds-local-section-selector { display: none; }

body.ui-version-modern .ds-local-section-selector-trigger {
    align-items: center;
    background: var(--ds-surface);
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-control);
    color: var(--ds-text);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 700;
    justify-content: space-between;
    min-height: 44px;
    padding: 8px 11px;
    width: 100%;
}

body.ui-version-modern .ds-local-section-selector-context { padding: 0; }

body.ui-version-modern .ds-local-section-selector-panel {
    background: var(--ds-surface-raised);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    box-shadow: var(--ds-shadow-menu);
    display: grid;
    left: 0;
    max-height: min(62dvh, 420px);
    overflow: auto;
    padding: 5px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 1200;
}

body.ui-version-modern .ds-local-section-selector-panel[hidden] { display: none; }

body.ui-version-modern .ds-local-section-selector-group { padding: 8px 8px 4px; }

/* Moj profil composes the shared local-section, accordion and form contracts. */
body.ui-version-modern .profile-page { display: grid; gap: 16px; max-width: 100%; }

body.ui-version-modern .profile-overview-grid { display: grid; gap: var(--ds-section-gap); min-width: 0; }

body.ui-version-modern .profile-section-panel { margin: 0; min-width: 0; padding: 18px; }

body.ui-version-modern .profile-overview-grid > .profile-section-panel { display: flex; flex-direction: column; }

body.ui-version-modern .profile-overview-grid > .profile-section-panel > form,
body.ui-version-modern .profile-overview-grid > #profile-details .profile-editable-block,
body.ui-version-modern .profile-overview-grid > #profile-details .profile-editable-block > form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }

body.ui-version-modern .profile-overview-grid > .profile-section-panel > form > .ds-form-actions,
body.ui-version-modern .profile-overview-grid > #profile-details .profile-editable-block > form > .ds-form-actions { margin-top: auto; }

body.ui-version-modern .profile-section-heading { display: grid; gap: 4px; margin-bottom: 16px; }

body.ui-version-modern .profile-section-heading h2 { font-size: calc(1.08rem * var(--ds-text-scale, 1)); margin: 0; }

body.ui-version-modern .profile-section-heading p { color: var(--ds-text-muted); margin: 0; }

body.ui-version-modern .profile-readonly-identity {
    background: var(--ds-surface-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    display: grid;
    gap: 3px;
    margin: 0 0 7px;
    padding: 11px 13px;
}

body.ui-version-modern .profile-readonly-identity > strong { overflow-wrap: anywhere; }

body.ui-version-modern .profile-readonly-identity > span,
body.ui-version-modern .profile-identity-help { color: var(--ds-text-muted); font-size: calc(.8rem * var(--ds-text-scale, 1)); overflow-wrap: anywhere; }

body.ui-version-modern .profile-identity-help { margin: 0 0 16px; }

body.ui-version-modern .profile-editable-block { border-top: 1px solid var(--ds-border); padding-top: 16px; }

body.ui-version-modern .profile-editable-block h3 { font-size: calc(.95rem * var(--ds-text-scale, 1)); margin: 0 0 12px; }

body.ui-version-modern .profile-security-status { margin-bottom: 16px; }

body.ui-version-modern .profile-security-recovery { margin-bottom: 16px; }

body.ui-version-modern .profile-security-recovery pre { margin: 10px 0 0; white-space: pre-wrap; }

body.ui-version-modern .profile-mfa-setup { display: grid; gap: 14px; }

body.ui-version-modern .profile-mfa-key { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; }

body.ui-version-modern .profile-notification-row {
    align-items: center;
    background: var(--ds-surface-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-width: 0;
    padding: 10px 12px;
}

body.ui-version-modern .profile-notification-row .ds-switch { flex: 1 1 auto; min-width: 0; }

body.ui-version-modern .profile-notification-copy { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .profile-notification-copy small { color: var(--ds-text-muted); }

body.ui-version-modern .profile-notifications-intro { color: var(--ds-text-muted); margin: var(--ds-form-gap) 0; margin-inline-start: var(--ds-form-gap); }

body.ui-version-modern .profile-short-form { max-width: none; }

body.ui-version-modern .profile-appearance-controls { align-items: start; }

body.ui-version-modern .profile-appearance-controls .settings-scale-field { gap: var(--ds-field-gap); }

body.ui-version-modern .profile-accordion-shell { padding: 0; }

body.ui-version-modern .profile-accordion-panel { display: grid; gap: 14px; }

body.ui-version-modern .profile-accordion-panel > .profile-section-heading { display: none; }

body.ui-version-modern .profile-accordion-count { flex: 0 0 auto; }

body.ui-version-modern .profile-extension-fallback { margin: 0; }

body.ui-version-modern .profile-page .avatar-controls { min-width: 0; }

body.ui-version-modern .profile-page .ds-file-field { min-width: 0; width: 100%; }

body.ui-version-modern .profile-page .compact-sliders { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 100%; }

body.ui-version-modern .profile-section-panel .ds-table { min-width: 620px; }

@media (min-width: 1180px) {
    body.ui-version-modern .profile-overview-grid { align-items: stretch; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

    body.ui-version-modern .profile-overview-grid .avatar-editor-grid { grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .profile-overview-grid .avatar-preview-box { justify-self: stretch; }

}

@media (max-width: 760px) {
    body.ui-version-modern .ds-local-section-layout { gap: 14px; grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .ds-local-section-navigation-desktop { display: none; }

    body.ui-version-modern .ds-local-section-selector { display: grid; gap: 5px; position: relative; }

    body.ui-version-modern .profile-section-panel:not(.profile-accordion-shell) { padding: 14px; }

    body.ui-version-modern .avatar-editor-grid { align-items: start; grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .avatar-preview-box { justify-self: stretch; }

    body.ui-version-modern .profile-notification-row { align-items: flex-start; flex-direction: column; }

}

body.ui-version-modern .ds-settings-layout-content { min-width: 0; }

body.ui-version-modern .ds-settings-layout-content > .ds-page-header {
    border-bottom: 1px solid var(--ds-border);
    margin: 0 0 var(--ds-page-gap);
    min-height: 0;
    padding: 1px 1px var(--ds-page-gap);
}

/* Settings headers inside their canonical tab panels already inherit the
   panel-to-body separation. Do not add the generic page-header gap there. */
body.ui-version-modern .ds-settings-layout-content .profile-tab-panel > .ds-page-header { margin: 0; }

body.ui-version-modern .ds-settings-layout-content > .ds-route-tabs { margin: 0 0 16px; }

/* Core and module settings share one full-width header navigator contract. */
body.ui-version-modern .ds-core-settings-layout { min-width: 0; }

body.ui-version-modern .ds-core-settings-layout > .ds-settings-layout-content { min-width: 0; }

body.ui-version-modern .ds-core-settings-layout > .ds-settings-layout-content > .ds-page-header {
    border-bottom: 1px solid var(--ds-border);
    margin: 0 0 var(--ds-page-gap);
    min-height: 0;
    padding: 1px 1px var(--ds-page-gap);
}

body.ui-version-modern .ds-settings-layout-content > .ds-page-body--settings,
body.ui-version-modern .ds-settings-content {
    display: grid;
    gap: var(--ds-section-gap);
    min-width: 0;
    width: 100%;
}

body.ui-version-modern fieldset.ds-settings-content {
    border: 0;
    margin: 0;
    padding: 0;
}

body.ui-version-modern .ds-settings-section {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-panel);
    display: grid;
    gap: var(--ds-panel-gap);
    margin: 0;
    min-width: 0;
    padding: var(--ds-panel-pad);
}

/* A compact row is a secondary setting in the surrounding page context, not
   another card. It still uses the settings-section/form-row sizing contract. */
body.ui-version-modern .ds-settings-section--compact {
    background: transparent;
    border: 0;
    border-radius: 0;
    gap: 0;
    padding: 0 0 var(--ds-field-gap);
}

body.ui-version-modern .ds-settings-section-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    gap: var(--ds-panel-gap);
    justify-content: space-between;
    padding-bottom: var(--ds-panel-header-y);
}

body.ui-version-modern .ds-settings-section-header h2 {
    font-size: calc(18px * var(--ds-text-scale, 1));
    line-height: 1.3;
    margin: 0;
}

body.ui-version-modern .ds-settings-section-header p {
    color: var(--ds-text-muted);
    font-size: calc(.84rem * var(--ds-text-scale, 1));
    margin: 3px 0 0;
}

body.ui-version-modern .ds-settings-section > h3 {
    font-size: calc(15.5px * var(--ds-text-scale, 1));
    margin: 0;
}

body.ui-version-modern .ds-settings-section .form-grid,
body.ui-version-modern .ds-settings-section .form-stack { min-width: 0; }

body.ui-version-modern .ds-settings-section .form-grid > * { min-width: 0; }

body.ui-version-modern [data-mail-transport-smtp][hidden],
body.ui-version-modern [data-mail-transport-local][hidden] { display: none !important; }

body.ui-version-modern .ds-settings-section label > input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
body.ui-version-modern .ds-settings-section label > select,
body.ui-version-modern .ds-settings-section label > textarea { max-width: 100%; width: 100%; }

body.ui-version-modern .ds-settings-section .security-recaptcha-row,
body.ui-version-modern .ds-settings-section .security-inline-setting-row,
body.ui-version-modern .ds-settings-section .security-mfa-policy-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-field-gap) var(--ds-panel-gap);
    min-width: 0;
}

body.ui-version-modern .ds-settings-section .security-inline-check,
body.ui-version-modern .ds-settings-section .security-inline-setting {
    align-items: center;
    display: inline-flex;
    flex: 0 1 auto;
    gap: var(--ds-field-gap);
    margin: 0;
    min-width: 0;
}

body.ui-version-modern .ds-settings-section .security-inline-setting > select { flex: 0 0 var(--ds-field-width-short); }

body.ui-version-modern .ds-settings-section .security-recaptcha-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }

body.ui-version-modern .ds-settings-section .security-throttle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

body.ui-version-modern .ds-settings-section .security-inline-setting-row > .field-help { flex: 1 1 260px; margin: 0; }

body.ui-version-modern .ds-settings-section .security-mfa-policy-row .pill { white-space: normal; }

body.ui-version-modern .ds-settings-section--compact .security-mfa-policy-row { gap: var(--ds-field-gap) var(--ds-panel-gap); }

body.ui-version-modern .ds-settings-section--compact .security-mfa-policy-row > .field-help {
    color: var(--ds-text-muted);
    flex: 1 1 260px;
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    margin: 0;
}

body.ui-version-modern .ds-settings-section--compact .security-mfa-policy-row > .primary {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 12px;
}

@media (max-width: 760px) {
    body.ui-version-modern .ds-settings-section { padding: 12px; }

    body.ui-version-modern .ds-settings-section .form-grid,
body.ui-version-modern .ds-settings-section .security-recaptcha-keys,
body.ui-version-modern .ds-settings-section .security-throttle-grid { grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .ds-settings-section .security-inline-setting,
body.ui-version-modern .ds-settings-section .security-inline-setting-row,
body.ui-version-modern .ds-settings-section .security-mfa-policy-row { align-items: stretch; width: 100%; }

    body.ui-version-modern .ds-settings-section .security-inline-setting { display: grid; }

    body.ui-version-modern .ds-settings-section .security-inline-setting > select { flex-basis: auto; max-width: 100%; }

}

body.ui-version-modern .ds-page-header:has(.ds-core-settings-navigator) .ds-page-header-copy { gap: 6px; }

body.ui-version-modern .ds-core-settings-navigator-context {
    color: var(--ds-text-muted);
    font-size: calc(.72rem * var(--ds-text-scale, 1));
    font-weight: 750;
    letter-spacing: .055em;
    line-height: 1;
    text-transform: uppercase;
}

body.ui-version-modern .ds-core-settings-navigator { min-width: 0; }

body.ui-version-modern .ds-core-settings-navigator > summary { list-style: none; }

body.ui-version-modern .ds-core-settings-navigator > summary::marker { content: ''; font-size: 0; }

body.ui-version-modern .ds-core-settings-navigator > summary::-webkit-details-marker { display: none; }

body.ui-version-modern .ds-core-settings-navigator > summary::after { display: none; }

body.ui-version-modern .ds-core-settings-navigator > summary > h1,
body.ui-version-modern .ds-core-settings-navigator > summary > h2 { min-width: 0; }

body.ui-version-modern .ds-core-settings-navigator > summary.ds-core-settings-navigator-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--ds-radius-control);
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
    justify-content: flex-start;
    margin: 0;
    max-width: 100%;
    min-height: 36px;
    padding: 5px 7px;
    text-align: left;
}

body.ui-version-modern .ds-core-settings-navigator-trigger > h1,
body.ui-version-modern .ds-core-settings-navigator-trigger > h2 {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin: 0;
    min-width: 0;
}

body.ui-version-modern .ds-core-settings-navigator-trigger > h1 > span:first-child,
body.ui-version-modern .ds-core-settings-navigator-trigger > h2 > span:first-child { min-width: 0; overflow-wrap: anywhere; }

body.ui-version-modern .ds-core-settings-navigator-trigger .ds-directional-icon { margin-left: 0; }

body.ui-version-modern .ds-core-settings-navigator > summary.ds-core-settings-navigator-trigger:hover,
body.ui-version-modern .ds-core-settings-navigator[open] > summary.ds-core-settings-navigator-trigger {
    background: var(--ds-surface-subtle);
    color: var(--ds-text);
}

body.ui-version-modern .ds-core-settings-navigator-trigger:focus-visible {
    box-shadow: 0 0 0 3px var(--ds-focus);
    outline: 0;
}

body.ui-version-modern .ds-core-settings-navigator + .ds-page-description {
    align-self: center;
    margin-left: 8px;
}

body.ui-version-modern .ds-core-settings-navigator[open] .ds-directional-icon--expand { transform: rotate(180deg); }

body.ui-version-modern .ds-shell-flyout-panel.ds-core-settings-navigator-panel {
    padding: 14px;
    width: min(920px, calc(100vw - 28px));
}

body.ui-version-modern .ds-core-settings-navigator-groups {
    display: grid;
    gap: 14px 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.ui-version-modern .ds-core-settings-navigator-group {
    align-content: start;
    display: grid;
    gap: 5px;
    min-width: 0;
}

body.ui-version-modern .ds-core-settings-navigator-group > h3 {
    color: var(--ds-text-muted);
    font-size: calc(.72rem * var(--ds-text-scale, 1));
    font-weight: 750;
    letter-spacing: .055em;
    line-height: 1.25;
    margin: 0;
    text-transform: uppercase;
}

body.ui-version-modern .ds-core-settings-navigator-options { display: grid; gap: 1px; }

body.ui-version-modern .ds-core-settings-navigator-option {
    align-items: center;
    background: var(--ds-menu-inactive-bg);
    border-radius: var(--ds-radius-control);
    color: var(--ds-menu-inactive-text);
    display: flex;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    gap: 8px;
    justify-content: space-between;
    line-height: var(--ds-menu-line-height);
    min-height: 36px;
    padding: 4px 8px;
    text-decoration: none;
}

body.ui-version-modern .ds-core-settings-navigator-option:hover {
    background: var(--ds-menu-hover-bg);
    color: var(--ds-menu-hover-text);
}

body.ui-version-modern .ds-core-settings-navigator-option.is-active,
body.ui-version-modern .ds-core-settings-navigator-option[aria-current="page"] {
    background: var(--ds-menu-active-bg);
    color: var(--ds-menu-active-text);
    font-weight: var(--ds-menu-font-weight);
}

body.ui-version-modern .ds-core-settings-navigator-option:is(.is-active, [aria-current="page"]):hover {
    background: var(--ds-menu-active-bg);
    color: var(--ds-menu-active-text);
}

body.ui-version-modern .ds-core-settings-navigator-branch.has-active-subitem > .ds-core-settings-navigator-option {
    color: var(--ds-menu-inactive-text);
    font-weight: var(--ds-menu-font-weight);
}

body.ui-version-modern .ds-core-settings-navigator-branch-toggle {
    align-items: center;
    background: var(--ds-menu-inactive-bg);
    border: 0;
    color: var(--ds-menu-inactive-text);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    gap: 8px;
    justify-content: space-between;
    line-height: var(--ds-menu-line-height);
    min-height: 36px;
    text-align: left;
    width: 100%;
}

body.ui-version-modern .ds-core-settings-navigator-branch-toggle:hover { background: var(--ds-menu-hover-bg); color: var(--ds-menu-hover-text); }

body.ui-version-modern .ds-core-settings-navigator-branch-toggle:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-core-settings-navigator-branch.is-expanded .ds-core-settings-navigator-branch-toggle .ds-directional-icon--expand { transform: rotate(180deg); }

body.ui-version-modern .ds-core-settings-navigator-subitems {
    border-left: 1px solid color-mix(in srgb, var(--ds-border) 78%, transparent);
    display: grid;
    gap: 1px;
    margin: 0 0 2px 16px;
    padding-left: 6px;
}

body.ui-version-modern .ds-core-settings-navigator-subitems[hidden] { display: none; }

body.ui-version-modern .ds-core-settings-navigator-subitem {
    align-items: center;
    background: var(--ds-menu-inactive-bg);
    border-radius: var(--ds-radius-control);
    color: var(--ds-menu-inactive-text);
    display: flex;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    gap: 7px;
    justify-content: space-between;
    line-height: var(--ds-menu-line-height);
    min-height: 32px;
    padding: 3px 8px;
    text-decoration: none;
}

body.ui-version-modern .ds-core-settings-navigator-subitem:hover {
    background: var(--ds-menu-hover-bg);
    color: var(--ds-menu-hover-text);
}

body.ui-version-modern .ds-core-settings-navigator-subitem.is-active,
body.ui-version-modern .ds-core-settings-navigator-subitem[aria-current="page"] {
    background: var(--ds-menu-active-bg);
    color: var(--ds-menu-active-text);
    font-weight: var(--ds-menu-font-weight);
}

body.ui-version-modern .ds-core-settings-navigator-subitem:is(.is-active, [aria-current="page"]):hover {
    background: var(--ds-menu-active-bg);
    color: var(--ds-menu-active-text);
}

@media (max-width: 1200px) {
    body.ui-version-modern .ds-shell-flyout-panel.ds-core-settings-navigator-panel { width: min(620px, calc(100vw - 28px)); }

    body.ui-version-modern .ds-core-settings-navigator-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}

@media (max-width: 760px) {
    body.ui-version-modern .ds-shell-flyout-panel.ds-core-settings-navigator-panel { padding: 14px; width: auto; }

    body.ui-version-modern .ds-core-settings-navigator-groups { grid-template-columns: minmax(0, 1fr); }

}

body.ui-version-modern .settings-color-grid,
body.ui-version-modern .settings-style-grid { align-items: start; gap: 10px 12px; }

body.ui-version-modern .settings-color-grid { align-items: stretch; grid-template-columns: repeat(4, minmax(0, 1fr)); }

body.ui-version-modern .settings-color-grid > label,
body.ui-version-modern .settings-style-grid > label { align-content: start; min-height: 0; }

body.ui-version-modern .settings-style-grid > label > :is(input:not([type="color"]), select) {
    align-self: start;
    height: var(--ds-control-height);
    width: 100%;
}

body.ui-version-modern .settings-style-grid { align-items: stretch; grid-template-columns: repeat(5, minmax(0, 1fr)); }

body.ui-version-modern .settings-color-field,
body.ui-version-modern .settings-scale-field { gap: 7px; }

body.ui-version-modern .settings-color-label { color: var(--ds-text); font-weight: 700; line-height: 1.25; }

body.ui-version-modern .ds-color-control {
    align-items: center;
    display: flex;
    gap: 9px;
    min-height: 36px;
}

body.ui-version-modern .ds-color-control input[type="color"] {
    appearance: none;
    background: var(--ds-surface);
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-control);
    cursor: pointer;
    flex: 0 0 48px;
    height: 36px;
    padding: 3px;
    width: 48px;
}

body.ui-version-modern .ds-color-control input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }

body.ui-version-modern .ds-color-control input[type="color"]::-webkit-color-swatch { border: 0; border-radius: calc(var(--ds-radius-control) - 2px); }

body.ui-version-modern .ds-color-control input[type="color"]::-moz-color-swatch { border: 0; border-radius: calc(var(--ds-radius-control) - 2px); }

body.ui-version-modern .ds-color-control input[type="color"]:hover { border-color: var(--nav-active-bg); }

body.ui-version-modern .ds-color-control input[type="color"]:focus-visible { outline: 3px solid var(--ds-focus); outline-offset: 2px; }

body.ui-version-modern .ds-color-eyedropper {
    align-items: center;
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
    min-height: 36px;
    min-width: 36px;
    padding: 0;
    width: 36px;
}

body.ui-version-modern .ds-color-eyedropper svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 17px; }

body.ui-version-modern .ds-color-eyedropper.is-active { border-color: var(--ds-primary); color: var(--ds-primary); }

body.ui-version-modern .settings-eyedropper-status {
    color: var(--ds-text-muted);
    font-size: calc(.74rem * var(--ds-text-scale, 1));
    font-weight: 600;
    line-height: 1.4;
    margin-top: -2px;
}

body.ui-version-modern .settings-eyedropper-status[hidden] { display: none; }

body.ui-version-modern .ds-color-control output {
    color: var(--ds-text-muted);
    font-family: var(--ds-mono);
    font-size: calc(.74rem * var(--ds-text-scale, 1));
    letter-spacing: .02em;
}

body.ui-version-modern .settings-color-field > .field-help { min-height: 1.1em; }

body.ui-version-modern .settings-scale-field > .field-help { min-height: 1.1em; }

body.ui-version-modern [data-theme-contrast-status] { color: var(--ds-text-muted); font-size: calc(.74rem * var(--ds-text-scale, 1)); min-height: 1.1em; }

body.ui-version-modern [data-theme-contrast-status].is-warning { color: var(--ds-warning); font-weight: 700; }

body.ui-version-modern .ds-text-scale-control {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    min-height: var(--ds-control-height);
}

body.ui-version-modern .ds-text-scale-control input[type="number"] {
    flex: 0 0 68px;
    padding-inline: 6px;
    text-align: center;
    width: 68px;
}

body.ui-version-modern .ds-text-scale-control button {
    align-items: center;
    display: inline-flex;
    flex: 0 0 var(--ds-control-height);
    font-size: calc(1.05rem * var(--ds-text-scale, 1));
    height: var(--ds-control-height);
    justify-content: center;
    line-height: 1;
    min-height: var(--ds-control-height);
    padding: 0;
    width: var(--ds-control-height);
}

body.ui-version-modern .ds-text-scale-unit { color: var(--ds-text); font-weight: 750; }

body.ui-version-modern .settings-style-toolbar {
    align-items: center;
    background: color-mix(in srgb, var(--ds-primary) 6%, var(--ds-surface));
    border: 1px solid color-mix(in srgb, var(--ds-primary) 18%, var(--ds-border));
    border-radius: var(--ds-radius-panel);
    display: flex;
    gap: var(--ds-action-gap);
    justify-content: space-between;
    padding: 9px 11px;
}

body.ui-version-modern .settings-style-toolbar > p { color: var(--ds-text-muted); margin: 0; }

body.ui-version-modern [data-theme-contrast-status]:empty { display: none; }

body.ui-version-modern [data-theme-text-scale-output] { color: var(--ds-text-muted); font-weight: 700; }

body.ui-version-modern .settings-style-heading { margin-bottom: 5px; }

body.ui-version-modern .settings-style-heading + .compact-text { margin: 0 0 10px; }

@media (max-width: 760px) {
    body.ui-version-modern .settings-color-grid,
body.ui-version-modern .settings-style-grid { grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .settings-style-toolbar { align-items: stretch; flex-direction: column; }

    body.ui-version-modern .settings-style-toolbar .button { align-self: flex-start; }

}

@media (min-width: 761px) and (max-width: 1180px) {
    body.ui-version-modern .settings-color-grid,
body.ui-version-modern .settings-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}

body.ui-version-modern .settings-style-heading { border-top: 1px solid var(--ds-border); margin-top: 18px; padding-top: 14px; }

body.ui-version-modern .settings-advanced-colors {
    background: var(--ds-surface-subtle);
    border: 0;
    border-radius: var(--ds-radius-control);
    margin-top: 18px;
    padding: 0;
}

body.ui-version-modern .settings-advanced-colors > summary {
    align-items: center;
    color: var(--ds-text);
    cursor: pointer;
    display: flex;
    font-size: calc(15.5px * var(--ds-text-scale, 1));
    font-weight: 700;
    justify-content: space-between;
    list-style: none;
    min-height: 44px;
    padding: 9px 12px;
}

body.ui-version-modern .settings-advanced-colors > summary::-webkit-details-marker { display: none; }

body.ui-version-modern .settings-advanced-colors > summary::after { color: var(--ds-text-muted); content: "⌄"; transition: transform .15s ease; }

body.ui-version-modern .settings-advanced-colors[open] > summary {
    background: var(--ds-surface-selected);
}

body.ui-version-modern .settings-advanced-colors[open] > summary::after { transform: rotate(180deg); }

body.ui-version-modern .settings-advanced-colors .ds-content-disclosure-panel > .field-help { padding: 0 0 10px; }

body.ui-version-modern .settings-advanced-colors .ds-content-disclosure-panel > .settings-color-grid { padding: 0; }

body.ui-version-modern .settings-upload-list {
    display: grid;
    gap: 12px;
    min-width: 0;
}

body.ui-version-modern .settings-upload-row {
    align-items: start;
    border-top: 1px solid var(--ds-border);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(190px, .72fr) minmax(280px, 1.28fr);
    padding-top: 12px;
}

body.ui-version-modern .settings-upload-row:first-child { border-top: 0; padding-top: 0; }

body.ui-version-modern .settings-upload-copy {
    align-content: start;
    display: grid;
    gap: 4px;
    min-width: 0;
}

body.ui-version-modern .settings-upload-copy img {
    background: var(--ds-surface-subtle);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control);
    height: 48px;
    margin-bottom: 4px;
    max-width: 180px;
    object-fit: contain;
    padding: 6px;
    width: 180px;
}

body.ui-version-modern .settings-upload-copy strong { font-size: calc(.86rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .settings-upload-copy span { color: var(--ds-text-muted); font-size: calc(.78rem * var(--ds-text-scale, 1)); line-height: 1.4; }

body.ui-version-modern .ds-file-field { display: grid; gap: var(--ds-field-gap); min-width: 0; }

body.ui-version-modern .ds-file-control {
    align-items: center;
    background: var(--ds-surface);
    border: 1px solid var(--ds-border-strong, var(--ds-border));
    border-radius: var(--ds-radius-control);
    display: flex;
    gap: 8px;
    min-height: 38px;
    padding: 3px 4px 3px 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

body.ui-version-modern .ds-file-control:focus-within {
    border-color: var(--ds-primary);
    box-shadow: 0 0 0 3px var(--ds-focus);
}

body.ui-version-modern .ds-file-control input[type="file"] {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

body.ui-version-modern .ds-file-name {
    color: var(--ds-text-muted);
    flex: 1 1 auto;
    font-size: calc(.8rem * var(--ds-text-scale, 1));
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ui-version-modern .ds-file-name.has-file { color: var(--ds-text); font-weight: 650; }

body.ui-version-modern .ds-file-trigger {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 10px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    body.ui-version-modern .settings-upload-row { grid-template-columns: 1fr; gap: 10px; }

}

/* Settings content uses one responsive rhythm.  Keep this after the legacy
   settings rules: older Core pages and module pages share these primitives. */
body.ui-version-modern .settings-panel,
body.ui-version-modern .settings-subpage {
    --settings-gap: 16px;
}

body.ui-version-modern .settings-panel .settings-content,
body.ui-version-modern .settings-subpage .settings-content {
    display: grid;
    gap: var(--settings-gap);
    min-width: 0;
    padding: 0;
}

body.ui-version-modern .settings-panel .settings-content > h2,
body.ui-version-modern .settings-subpage .settings-content > h2 {
    font-size: calc(1.1rem * var(--ds-text-scale, 1));
    line-height: 1.3;
    margin: 0;
}

body.ui-version-modern .settings-panel .settings-content > h2 + .muted,
body.ui-version-modern .settings-subpage .settings-content > h2 + .muted {
    margin-top: calc(var(--settings-gap) * -0.65);
}

body.ui-version-modern .settings-panel .ds-file-control input[type="file"],
body.ui-version-modern .settings-subpage .ds-file-control input[type="file"] {
    height: 1px !important;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px !important;
}

body.ui-version-modern .settings-panel .form-grid,
body.ui-version-modern .settings-panel .settings-smtp-grid,
body.ui-version-modern .settings-panel .settings-two-column,
body.ui-version-modern .settings-panel .settings-test-row {
    min-width: 0;
}

body.ui-version-modern .settings-panel .form-grid > *,
body.ui-version-modern .settings-panel .settings-smtp-grid > *,
body.ui-version-modern .settings-panel .settings-two-column > *,
body.ui-version-modern .settings-panel .settings-test-row > * { min-width: 0; }

body.ui-version-modern .settings-panel label > input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
body.ui-version-modern .settings-panel label > select,
body.ui-version-modern .settings-panel label > textarea { max-width: 100%; width: 100%; }

body.ui-version-modern .settings-panel label > input.ds-field--short,
body.ui-version-modern .settings-panel label > select.ds-field--short,
body.ui-version-modern .settings-panel label > textarea.ds-field--short { max-width: var(--ds-field-width-short) !important; }

body.ui-version-modern .settings-panel label > input.ds-field--medium,
body.ui-version-modern .settings-panel label > select.ds-field--medium,
body.ui-version-modern .settings-panel label > textarea.ds-field--medium { max-width: var(--ds-field-width-medium) !important; }

body.ui-version-modern .settings-panel label > input.ds-field--long,
body.ui-version-modern .settings-panel label > select.ds-field--long,
body.ui-version-modern .settings-panel label > textarea.ds-field--long { max-width: var(--ds-field-width-long) !important; }

body.ui-version-modern .settings-panel .settings-smtp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.ui-version-modern .settings-panel .settings-smtp-grid > :last-child { grid-column: span 2; }

body.ui-version-modern .settings-login-appearance {
    align-items: start;
    display: grid;
    gap: 16px 20px;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
}

body.ui-version-modern .settings-login-appearance-controls { display: grid; gap: 12px; min-width: 0; }

body.ui-version-modern .settings-login-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 0;
}

body.ui-version-modern .settings-login-background-upload { grid-column: auto; }

body.ui-version-modern .settings-login-background-upload .settings-upload-row { gap: 8px; grid-template-columns: minmax(0, 1fr); }

body.ui-version-modern .settings-login-background-upload .settings-upload-copy img { aspect-ratio: 16 / 7; height: auto; object-fit: cover; padding: 0; }

body.ui-version-modern .settings-login-intro { grid-column: auto; }

body.ui-version-modern .settings-login-copy { margin: 0; }

body.ui-version-modern .settings-login-appearance .settings-login-live-preview .ds-login-preview-frame-wrap { --ds-login-preview-height: 800px; --ds-login-preview-width: 1280px; }

@media (max-width: 1180px) {
    body.ui-version-modern .settings-panel .settings-smtp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    body.ui-version-modern .settings-login-appearance { grid-template-columns: minmax(0, 1fr); }

    body.ui-version-modern .settings-panel .settings-smtp-grid > :last-child { grid-column: auto; }

}

@media (max-width: 760px) {
    body.ui-version-modern .settings-panel .settings-smtp-grid,
body.ui-version-modern .settings-login-appearance { grid-template-columns: 1fr; }

    body.ui-version-modern .settings-panel .settings-smtp-grid > :last-child { grid-column: auto; }

    body.ui-version-modern .settings-login-background-upload,
body.ui-version-modern .settings-login-intro { grid-column: auto; }

}

body.ui-version-modern .app-footer { background: var(--ds-surface); border-top: 1px solid var(--ds-border); color: var(--ds-text-muted); font-size: calc(.74rem * var(--ds-text-scale, 1)); padding: 9px 18px; }

@media (max-width: 900px) {
    body.ui-version-modern .topbar { gap: 8px; grid-template-columns: auto minmax(0, 1fr) auto; padding-inline: 10px; }

    body.ui-version-modern .brand-text small,
body.ui-version-modern .account-menu-name { display: none; }

    body.ui-version-modern .app-shell,
body.ui-version-modern .app-shell.is-side-nav-collapsed { display: flex; flex-direction: column; }

    html.side-nav-collapsed body.ui-version-modern .side-nav,
body.ui-version-modern .side-nav,
body.ui-version-modern .side-nav.is-collapsed { border-bottom: 1px solid var(--ds-border); border-right: 0; max-width: 100%; width: 100%; }

    body.ui-version-modern .side-nav-content { display: flex; gap: 4px; overflow-x: auto; padding: 5px 8px; }

    body.ui-version-modern .side-section { display: flex; flex: 0 0 auto; margin: 0; }

    body.ui-version-modern .side-title { display: none; }

    body.ui-version-modern .side-nav a { min-height: 32px; white-space: nowrap; }

    body.ui-version-modern .side-nav .side-nav-link-label,
body.ui-version-modern .side-nav.is-collapsed .side-nav-link-label { display: inline; }

    body.ui-version-modern .page { padding: 12px; }

}

@media (max-width: 640px) {
    body.ui-version-modern { --ds-page-pad: 10px; --ds-panel-pad: 12px; --ds-page-gap: 10px; --ds-section-gap: 12px; }

    body.ui-version-modern .topbar { min-height: 50px; }

    body.ui-version-modern .brand-text strong { font-size: calc(14px * var(--ds-text-scale, 1)); }

    body.ui-version-modern .page-title,
body.ui-version-modern .ds-page-header { align-items: stretch; display: grid; gap: 7px; min-height: 0; }

    body.ui-version-modern .page-title h1,
body.ui-version-modern .ds-page-header h1 { font-size: calc(1.5rem * var(--ds-text-scale, 1)); }

    body.ui-version-modern .ds-page-header-copy { min-width: 0; }

    body.ui-version-modern .ds-page-heading-line { align-items: flex-start; display: grid; gap: 3px; }

    body.ui-version-modern .ds-page-description { min-width: 0; }

    body.ui-version-modern .ds-page-heading-inline + .ds-page-description { margin-left: 0; }

    body.ui-version-modern .page-actions,
body.ui-version-modern .ds-page-actions { justify-content: flex-start; width: 100%; }

    body.ui-version-modern .ds-page-action,
body.ui-version-modern .ds-page-overflow-trigger { min-height: 44px; }

    body.ui-version-modern .ds-toolbar { align-items: stretch; display: grid; grid-template-columns: 1fr; }

    body.ui-version-modern .form-grid { grid-template-columns: 1fr; }

    body.ui-version-modern .form-grid > * { grid-column: 1 !important; max-width: none !important; }

    body.ui-version-modern .ds-form-actions { align-items: stretch; flex-direction: column; }

    body.ui-version-modern .ds-form-actions-buttons { margin-left: 0; width: 100%; }

    body.ui-version-modern .ds-form-actions-buttons > * { flex: 1 1 auto; min-height: 44px; }

    body.ui-version-modern .ds-form-actions--sticky.is-floating { bottom: max(8px, env(safe-area-inset-bottom)); }

    body.ui-version-modern .ds-pagination { justify-content: space-between; }

    body.ui-version-modern .app-footer { padding-inline: 10px; }

}

@media (max-width: 640px) {
    body.ui-version-modern .page-title .help-trigger::after,
body.ui-version-modern .ds-page-header .help-trigger::after {
        left: auto;
        max-width: calc(100vw - 32px);
        min-width: min(220px, calc(100vw - 32px));
        right: 0;
    }

    body.ui-version-modern .navigation-detail,
body.ui-version-modern .navigation-order-context {
        overflow: hidden;
    }

    body.ui-version-modern .ds-menu-editor-row { align-items: start; grid-template-columns: 1fr; }

    body.ui-version-modern .ds-menu-editor-row-controls { justify-content: flex-start; }

    body.ui-version-modern .ds-menu-editor-columns { display: none; }

    body.ui-version-modern .ds-menu-editor-mobile-label { color: var(--ds-text-muted); display: inline-block; flex: 0 0 auto; font-size: calc(.72rem * var(--ds-text-scale, 1)); font-weight: 700; text-transform: uppercase; }

    body.ui-version-modern .navigation-module-overview .table-wrap,
body.ui-version-modern .navigation-order-context .table-wrap {
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        width: 100%;
    }

    body.ui-version-modern .ds-order-table {
        display: table;
        min-width: 760px;
        table-layout: fixed;
    }

    body.ui-version-modern .ds-order-table thead { display: table-header-group; }

    body.ui-version-modern .ds-order-table tbody { display: table-row-group; }

    body.ui-version-modern .ds-order-table tr { display: table-row; }

    body.ui-version-modern .ds-order-table th,
body.ui-version-modern .ds-order-table td { display: table-cell; height: 54px; width: auto; }

    body.ui-version-modern .ds-order-table td::before { display: none; }

}

/* Core app-shell flyouts: module switching and urgent security state. */
body.ui-version-modern .ds-shell-flyout {
    min-width: 0;
    position: relative;
}

body.ui-version-modern .ds-shell-flyout > summary {
    align-items: center;
    background: var(--ds-surface, var(--panel));
    border: 1px solid var(--ds-line, var(--line));
    border-radius: var(--radius-ui, 6px);
    color: var(--ds-text, var(--text));
    cursor: pointer;
    display: flex;
    gap: 9px;
    list-style: none;
    min-height: var(--ds-control-height, 40px);
    padding: 7px 10px;
    user-select: none;
}

body.ui-version-modern .ds-shell-flyout > summary::-webkit-details-marker { display: none; }

body.ui-version-modern .ds-shell-flyout > summary::after {
    border-bottom: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    content: "";
    flex: 0 0 6px;
    height: 6px;
    margin-left: auto;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 140ms ease;
    width: 6px;
}

body.ui-version-modern .ds-shell-flyout[open] > summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
}

/* Collection filters render the shared directional SVG themselves. Do not
   add the generic shell-flyout pseudo chevron as a second affordance. */
body.ui-version-modern .ds-shell-flyout.ds-collection-filter > summary::after {
    display: none;
}

/* The inline context selector renders its own shared directional icon. */
body.ui-version-modern .ds-shell-flyout.ds-page-inline-selector > summary::after {
    display: none;
}

/* Access-group selectors render their own shared directional SVG. */
body.ui-version-modern .ds-shell-flyout.ds-access-group-selector-popover > summary::after {
    display: none;
}

body.ui-version-modern .ds-shell-flyout > summary:hover,
body.ui-version-modern .ds-shell-flyout[open] > summary {
    background: var(--nav-hover-bg);
    border-color: color-mix(in srgb, var(--nav-active-bg) 42%, var(--ds-line, var(--line)));
    color: var(--nav-hover-text);
}

body.ui-version-modern .ds-shell-flyout > summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--theme-accent, #f4c400) 60%, transparent);
    outline-offset: 2px;
}

body.ui-version-modern .ds-shell-flyout-panel {
    background: var(--ds-surface, var(--panel));
    border: 1px solid var(--ds-line, var(--line));
    border-radius: var(--radius-card, 10px);
    box-shadow: 0 18px 48px rgba(16, 24, 40, .22);
    box-sizing: border-box;
    max-height: calc(100vh - 24px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 10px;
    position: fixed;
    width: min(380px, calc(100vw - 24px));
    z-index: 300;
}

/* Canonical anchored popover surface. Feature-specific classes may set width,
   but shell geometry, section rhythm and interactive rows remain shared. */
body.ui-version-modern .ds-popover-panel {
    background: var(--ds-surface, var(--panel));
    border: 1px solid var(--ds-line, var(--line));
    border-radius: var(--ds-radius-panel);
    box-shadow: 0 18px 48px rgba(16, 24, 40, .22);
    box-sizing: border-box;
    max-height: calc(100dvh - 24px);
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    overscroll-behavior: contain;
    white-space: normal;
}

/* Shared shell for the five global destinations. Only the width varies; its
   header stays visible while the content becomes scrollable when necessary. */
body.ui-version-modern .ds-popover-panel--compact,
body.ui-version-modern .ds-popover-panel--standard,
body.ui-version-modern .ds-popover-panel--wide {
    display: flex;
    flex-direction: column;
    max-height: min(640px, calc(100dvh - 24px));
    overflow: hidden;
    padding: 0;
}

body.ui-version-modern .ds-popover-panel--compact { width: min(340px, calc(100vw - 24px)); }

body.ui-version-modern .ds-popover-panel--standard { width: min(390px, calc(100vw - 24px)); }

body.ui-version-modern .ds-popover-panel--wide { width: min(440px, calc(100vw - 24px)); }

body.ui-version-modern .ds-popover-header {
    align-items: start;
    border-bottom: 1px solid var(--ds-line, var(--line));
    display: grid;
    flex: 0 0 auto;
    gap: var(--ds-action-gap);
    grid-template-columns: minmax(0, 1fr) auto;
    padding: var(--ds-card-pad) var(--ds-panel-pad);
}

body.ui-version-modern .ds-popover-header > div { display: grid; gap: 3px; min-width: 0; }

body.ui-version-modern .ds-popover-header h2,
body.ui-version-modern .ds-popover-header p { margin: 0; }

body.ui-version-modern .ds-popover-header h2 { font-size: calc(16px * var(--ds-text-scale, 1)); line-height: 1.25; }

body.ui-version-modern .ds-popover-header p { color: var(--ds-muted, var(--muted)); font-size: calc(12px * var(--ds-text-scale, 1)); line-height: 1.45; }

body.ui-version-modern .ds-popover-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--ds-radius-control);
    color: var(--ds-text-muted, var(--muted));
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: calc(20px * var(--ds-text-scale, 1));
    height: 40px;
    justify-content: center;
    line-height: 1;
    margin: -4px -4px 0 4px;
    padding: 0;
    width: 40px;
}

body.ui-version-modern .ds-popover-close:hover { background: var(--ds-surface-subtle); color: var(--ds-text); }

body.ui-version-modern .ds-popover-close:focus-visible {
    outline: 3px solid var(--ds-focus);
    outline-offset: 2px;
}

body.ui-version-modern .ds-popover-body {
    display: grid;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--ds-card-pad) var(--ds-panel-pad);
}

body.ui-version-modern .ds-popover-heading { min-width: 0; }

body.ui-version-modern .ds-popover-list { display: grid; gap: 3px; min-width: 0; }

body.ui-version-modern .ds-action-menu-panel.ds-popover-list {
    max-width: calc(100vw - 16px);
    min-width: 200px;
    width: max-content;
}

body.ui-version-modern .ds-popover-section { display: grid; gap: 3px; min-width: 0; }

body.ui-version-modern .ds-access-group-selector { border: 0; display: grid; gap: 6px; margin: 0; min-width: 0; padding: 0; }

body.ui-version-modern .ds-access-group-selector > legend { color: var(--ds-text); font-size: calc(.9rem * var(--ds-text-scale, 1)); font-weight: 700; padding: 0; }

body.ui-version-modern .ds-access-group-selector > .muted { font-size: calc(.82rem * var(--ds-text-scale, 1)); margin: 0; }

body.ui-version-modern .ds-access-group-selector-popover { min-width: 0; position: relative; width: min(420px, calc(100vw - 16px)); }

body.ui-version-modern .ds-access-group-selector-popover > summary { align-items: center; background: var(--ds-surface); border: 1px solid var(--ds-border-strong, var(--ds-border)); border-radius: var(--ds-radius-control); cursor: pointer; display: flex; gap: 8px; justify-content: space-between; list-style: none; min-height: var(--ds-control-height); padding: 7px 10px; }

body.ui-version-modern .ds-access-group-selector-popover > summary::-webkit-details-marker { display: none; }

body.ui-version-modern .ds-access-group-selector-popover > summary:focus-visible { box-shadow: 0 0 0 3px var(--ds-focus); outline: 0; }

body.ui-version-modern .ds-access-group-selector-popover[open] > summary { border-color: var(--ds-primary); }

body.ui-version-modern .ds-access-group-selector-trigger > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.ui-version-modern .ds-access-group-selector-panel { display: grid; gap: 10px; max-height: min(480px, calc(100vh - 32px)); min-width: min(360px, calc(100vw - 16px)); padding: 0; width: min(420px, calc(100vw - 16px)); }

body.ui-version-modern .ds-access-group-selector-search { border-bottom: 1px solid var(--ds-border); padding: 0 14px 10px; }

body.ui-version-modern .ds-access-group-selector-search input { width: 100%; }

body.ui-version-modern .ds-access-group-selector-panel .ds-popover-section { max-height: 280px; overflow: auto; padding: 0 7px 7px; }

body.ui-version-modern .ds-access-group-selector-options { display: grid; gap: 2px; }

body.ui-version-modern .ds-access-group-selector-option { align-items: center; cursor: pointer; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 40px; }

body.ui-version-modern .ds-access-group-selector-option > input { accent-color: var(--ds-primary); margin: 0; }

body.ui-version-modern .ds-access-group-selector-option .ds-popover-current-check { opacity: 0; }

body.ui-version-modern .ds-access-group-selector-option:has(input:checked) { background: var(--ds-popover-row-current-bg); border-color: var(--ds-popover-row-current-border); }

body.ui-version-modern .ds-access-group-selector-option:has(input:checked) .ds-popover-current-check { opacity: 1; }

@media (max-width: 760px) { body.ui-version-modern .ds-access-group-selector-panel,
body.ui-version-modern .ds-access-group-selector-popover { max-width: 100%; min-width: 0; width: 100%; }
 }

/* A page can own many selectable contexts without turning its heading into an
   inventory.  This stays on the same anchored-flyout contract as other Core
   selectors; only its result rows come from the owning registry. */
body.ui-version-modern .ds-selected-context-popover { position: relative; }

body.ui-version-modern .ds-selected-context-popover-panel { display: grid; gap: 0; max-height: min(560px, calc(100vh - 32px)); min-width: min(390px, calc(100vw - 16px)); padding: 0; width: min(440px, calc(100vw - 16px)); }

body.ui-version-modern .ds-selected-context-popover-search { border-bottom: 1px solid var(--ds-border); padding: 0 14px 10px; }

body.ui-version-modern .ds-selected-context-popover-search input { width: 100%; }

body.ui-version-modern .ds-selected-context-popover-body { display: grid; gap: 10px; max-height: 360px; overflow: auto; padding: 8px 7px 10px; }

body.ui-version-modern .ds-selected-context-popover-section { display: grid; gap: 3px; }

/* The generic popover filter uses the semantic hidden attribute.  Its result
   rows and sections are grids, so this explicit rule keeps component display
   declarations from resurrecting non-matching results. */
body.ui-version-modern .ds-selected-context-popover [hidden] { display: none !important; }

body.ui-version-modern .ds-selected-context-popover-section > h3 { margin: 0 5px 2px; }

body.ui-version-modern .ds-selected-context-owner { display: grid; gap: 0; min-width: 0; }

body.ui-version-modern .ds-selected-context-owner-trigger { background: transparent; grid-template-columns: minmax(0, 1fr) auto; min-height: 34px; padding: 6px 7px; }

body.ui-version-modern .ds-selected-context-owner-trigger:hover,
body.ui-version-modern .ds-selected-context-owner.is-open .ds-selected-context-owner-trigger { background: var(--ds-surface-subtle); }

body.ui-version-modern .ds-selected-context-owner-heading { color: var(--ds-text); font-size: calc(.82rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-selected-context-owner-children { background: transparent; border: 0; border-inline-start: 2px solid var(--ds-border); display: grid; gap: 3px; margin: 0 0 2px 9px; min-width: 0; padding: 1px 0 1px 7px; }

body.ui-version-modern .ds-popover-panel.ds-selected-context-popover-panel .ds-selected-popup-row { grid-template-columns: minmax(0, 1fr) 18px; }

@media (max-width: 760px) {
    body.ui-version-modern .ds-selected-context-popover { width: min(100%, 26rem); }

    body.ui-version-modern .ds-selected-context-popover-panel { max-width: 100%; min-width: 0; width: 100%; }

    body.ui-version-modern .ds-selected-context-popover-body { max-height: min(52vh, 360px); }

}

body.ui-version-modern .ds-popover-section + .ds-popover-section {
    border-top: 1px solid var(--ds-line, var(--line));
    padding-top: 9px;
}

body.ui-version-modern .ds-popover-section > h3 {
    color: var(--ds-muted, var(--muted));
    font-size: calc(10px * var(--ds-text-scale, 1));
    letter-spacing: .08em;
    margin: 0 6px 3px;
    text-transform: uppercase;
}

body.ui-version-modern .ds-popover-row {
    box-sizing: border-box;
    min-width: 0;
}

body.ui-version-modern .ds-popover-row:focus-visible {
    outline: 3px solid var(--ds-focus);
    outline-offset: 1px;
}

body.ui-version-modern .ds-popover-row:disabled,
body.ui-version-modern .ds-popover-row[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .5;
    pointer-events: none;
}

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row {
    align-items: center;
    background: var(--ds-popover-row-bg);
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control);
    color: var(--ds-popover-row-text);
    display: grid;
    font-size: calc(13px * var(--ds-text-scale, 1));
    gap: var(--ds-action-gap);
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: calc(var(--ds-control-height) + 4px);
    padding: var(--ds-action-gap) calc(var(--ds-action-gap) + 2px);
    text-decoration: none;
    width: 100%;
}

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row--text-only { grid-template-columns: minmax(0, 1fr) auto; }

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--ds-popover-row-hover-bg);
    border-color: color-mix(in srgb, var(--nav-active-bg) 30%, var(--ds-border));
    color: var(--ds-popover-row-hover-text);
}

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row.is-current {
    background: var(--ds-popover-row-current-bg);
    border-color: var(--ds-popover-row-current-border);
    color: var(--ds-popover-row-current-text);
}

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row.is-current:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--ds-popover-row-current-hover-bg);
    border-color: color-mix(in srgb, var(--nav-active-bg) 30%, var(--ds-border));
    color: var(--ds-popover-row-current-text);
}

body.ui-version-modern .ds-popover-row-copy { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .ds-popover-row-copy > * { overflow-wrap: anywhere; }

body.ui-version-modern .ds-popover-row-copy > strong { color: inherit; font-size: inherit; line-height: 1.35; }

body.ui-version-modern .ds-popover-row-copy > span,
body.ui-version-modern .ds-popover-row-copy > small {
    color: var(--ds-popover-row-muted);
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 500;
    line-height: 1.4;
}

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row:hover .ds-popover-row-copy > span,
body.ui-version-modern .ds-popover-panel .ds-popover-destination-row:hover .ds-popover-row-copy > small { color: var(--ds-popover-row-hover-muted); }

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row.is-current .ds-popover-row-copy > span,
body.ui-version-modern .ds-popover-panel .ds-popover-destination-row.is-current .ds-popover-row-copy > small {
    color: color-mix(in srgb, var(--ds-popover-row-current-text) 72%, var(--ds-popover-row-current-bg));
}

body.ui-version-modern .ds-popover-row-icon { align-items: center; display: inline-flex; flex: 0 0 20px; justify-content: center; }

body.ui-version-modern .ds-popover-row-icon svg { fill: none; height: 18px; stroke: currentColor; width: 18px; }

body.ui-version-modern .ds-popover-row-trailing,
body.ui-version-modern .ds-popover-current-check {
    align-items: center;
    color: currentColor;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 900;
    justify-content: center;
    min-width: 18px;
}

/* Selection rows used only by module switching, View as and My profile. */
body.ui-version-modern .ds-popover-panel .ds-selected-popup-row {
    align-items: center;
    background: var(--ds-menu-inactive-bg);
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control);
    color: var(--ds-menu-inactive-text);
    display: grid;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    gap: var(--ds-action-gap);
    grid-template-columns: 20px minmax(0, 1fr) 18px;
    line-height: var(--ds-menu-line-height);
    min-height: calc(var(--ds-control-height) + 4px);
    padding: var(--ds-action-gap) calc(var(--ds-action-gap) + 2px);
    text-align: left;
    text-decoration: none;
    width: 100%;
}

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row.ds-selected-popup-row:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--ds-menu-hover-bg);
    border-color: transparent;
    color: var(--ds-menu-hover-text);
}

body.ui-version-modern .ds-popover-panel .ds-popover-destination-row.ds-selected-popup-row.is-current,
body.ui-version-modern .ds-popover-panel .ds-popover-destination-row.ds-selected-popup-row.is-current:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--ds-popover-row-current-bg);
    border-color: var(--ds-popover-row-current-border);
    color: var(--ds-popover-row-current-text);
    font-weight: var(--ds-menu-font-weight);
}

body.ui-version-modern .ds-selected-popup-row .ds-popover-row-icon,
body.ui-version-modern .ds-selected-popup-row .module-switcher-option-icon {
    color: currentColor;
    height: 20px;
    width: 20px;
}

body.ui-version-modern .ds-selected-popup-row .ds-popover-row-icon svg,
body.ui-version-modern .ds-selected-popup-row .module-switcher-option-icon svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    width: 18px;
}

body.ui-version-modern .ds-selected-popup-row .ds-popover-row-copy { align-content: center; }

body.ui-version-modern .ds-selected-popup-row .ds-popover-row-copy > strong {
    color: inherit;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    line-height: var(--ds-menu-line-height);
}

body.ui-version-modern .ds-selected-popup-row .ds-popover-row-copy > small {
    color: inherit;
    font-size: var(--ds-menu-aux-font-size);
    font-weight: var(--ds-menu-aux-font-weight);
    line-height: 1.4;
    opacity: .74;
}

body.ui-version-modern .ds-selected-popup-row .ds-popover-current-check {
    color: currentColor;
    font-size: var(--ds-menu-font-size);
    font-weight: 700;
    height: 20px;
    min-width: 18px;
    width: 18px;
}

body.ui-version-modern .ds-popover-separator { border: 0; border-top: 1px solid var(--ds-line, var(--line)); margin: 6px 0; }

body.ui-version-modern .ds-popover-footer { border-top: 1px solid var(--ds-line, var(--line)); margin-top: 8px; padding: 9px 5px 2px; }

body.ui-version-modern .top-actions > .header-shell-control {
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
}

body.ui-version-modern .top-actions > .header-shell-control > summary {
    min-height: 34px;
    padding: 3px 8px;
    width: auto;
}

body.ui-version-modern .top-actions > .critical-alerts {
    margin: 0;
}

body.ui-version-modern .top-actions > .critical-alerts > summary {
    box-sizing: border-box;
    min-height: 34px;
    min-width: 128px;
    white-space: nowrap;
    width: auto;
}

body.ui-version-modern .top-actions > .critical-alerts .critical-alerts-label {
    flex: 0 1 auto;
    white-space: nowrap;
}

body.ui-version-modern .top-actions > .header-shell-control .ds-shell-flyout-panel {
    width: min(440px, calc(100vw - 24px));
}

body.ui-version-modern .ds-shell-flyout-heading:not(.ds-popover-header) {
    border-bottom: 1px solid var(--ds-line, var(--line));
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
    padding: 4px 5px 10px;
}

body.ui-version-modern .ds-shell-flyout-heading:not(.ds-popover-header) h2,
body.ui-version-modern .ds-shell-flyout-heading:not(.ds-popover-header) p { margin: 0; }

body.ui-version-modern .ds-shell-flyout-heading:not(.ds-popover-header) h2 { font-size: calc(16px * var(--ds-text-scale, 1)); line-height: 1.25; }

body.ui-version-modern .ds-shell-flyout-heading:not(.ds-popover-header) span,
body.ui-version-modern .ds-shell-flyout-heading:not(.ds-popover-header) p { color: var(--ds-muted, var(--muted)); font-size: calc(12px * var(--ds-text-scale, 1)); line-height: 1.45; }

body.ui-version-modern .module-switcher > summary { width: 100%; }

body.ui-version-modern .module-switcher-current-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ui-version-modern .module-switcher-icon,
body.ui-version-modern .module-switcher-option-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 20px;
    justify-content: center;
}

body.ui-version-modern .module-switcher-icon svg,
body.ui-version-modern .module-switcher-option-icon svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 18px;
}

body.ui-version-modern .module-switcher-groups { display: grid; gap: var(--ds-form-gap); }

body.ui-version-modern .module-switcher-group { display: grid; gap: 3px; }

body.ui-version-modern .module-switcher-group + .module-switcher-group { border-top: 1px solid var(--ds-line, var(--line)); padding-top: 9px; }

body.ui-version-modern .module-switcher-group h3 {
    color: var(--ds-muted, var(--muted));
    font-size: calc(10px * var(--ds-text-scale, 1));
    letter-spacing: .08em;
    margin: 0 6px 3px;
    text-transform: uppercase;
}

body.ui-version-modern .module-switcher-option {
    grid-template-columns: 20px minmax(0, 1fr) auto;
}

body.ui-version-modern .module-switcher-current-check {
    color: currentColor;
}

body.ui-version-modern .critical-alerts { margin: 0 8px 10px; }

body.ui-version-modern .critical-alerts > summary {
    background: var(--ds-surface-subtle, var(--surface-subtle));
    border-color: color-mix(in srgb, var(--ds-danger) 28%, var(--ds-line, var(--line)));
    color: var(--ds-text, var(--text));
    justify-content: flex-start;
    min-height: 38px;
    width: 100%;
}

body.ui-version-modern .critical-alerts > summary::after { display: none; }

body.ui-version-modern .critical-alerts > summary:hover,
body.ui-version-modern .critical-alerts[open] > summary {
    background: color-mix(in srgb, var(--ds-danger) 7%, var(--ds-surface, var(--panel)));
    border-color: color-mix(in srgb, var(--ds-danger) 48%, var(--ds-line, var(--line)));
    color: var(--ds-text, var(--text));
}

body.ui-version-modern .critical-alerts-icon { color: var(--ds-danger); }

body.ui-version-modern .critical-alerts-count {
    align-items: center;
    background: var(--ds-danger);
    border-radius: 999px;
    color: var(--theme-action-danger-text, var(--ds-surface));
    display: inline-flex;
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 900;
    justify-content: center;
    margin-left: auto;
    min-height: 22px;
    min-width: 22px;
    padding: 0 6px;
}

@media (max-width: 900px) {
    /* Keep the global header controls as intact tiles. They may wrap as a
       group, but their labels and icons must never be squeezed into one
       another when the available header width is narrow. */
    body.ui-version-modern .top-actions {
        align-items: center;
        flex-wrap: wrap;
        justify-content: flex-end;
        min-width: 0;
        row-gap: 8px;
    }

    body.ui-version-modern .top-actions > .critical-alerts {
        flex: 0 0 auto;
        max-width: none;
    }

    body.ui-version-modern .top-actions > .critical-alerts > summary {
        min-width: 128px;
    }

}

body.ui-version-modern .critical-alerts-list { display: grid; gap: 5px; }

body.ui-version-modern .critical-alert-item {
    background: transparent;
    border: 0;
    border-left: 3px solid var(--ds-danger);
    border-radius: 0 var(--ds-radius-control) var(--ds-radius-control) 0;
    color: var(--ds-text);
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    text-decoration: none;
    white-space: normal;
}

body.ui-version-modern .critical-alert-item:hover { background: var(--ds-danger-soft); color: var(--ds-text); }

body.ui-version-modern .critical-alert-item.is-static:hover { background: transparent; }

body.ui-version-modern .critical-alert-item strong { color: var(--ds-danger); font-size: calc(13px * var(--ds-text-scale, 1)); }

body.ui-version-modern .critical-alert-item span { color: var(--ds-text-muted); font-size: calc(12px * var(--ds-text-scale, 1)); line-height: 1.4; }

body.ui-version-modern .critical-alert-item em { color: var(--ds-primary); font-size: calc(12px * var(--ds-text-scale, 1)); font-style: normal; font-weight: 800; }

body.ui-version-modern .critical-alert-item .critical-alert-source {
    color: var(--ds-text-faint, var(--muted));
    font-size: calc(9px * var(--ds-text-scale, 1));
    font-style: normal;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

html.side-nav-collapsed body.ui-version-modern .side-nav .module-switcher > summary,
body.ui-version-modern .side-nav.is-collapsed .module-switcher > summary {
    box-sizing: border-box;
    height: 40px;
    justify-content: center;
    min-height: 40px;
    padding: 0;
    width: 40px;
}

html.side-nav-collapsed body.ui-version-modern .side-nav .module-switcher > summary::after,
body.ui-version-modern .side-nav.is-collapsed .module-switcher > summary::after { display: none; }

html.side-nav-collapsed body.ui-version-modern .side-nav-collapse,
body.ui-version-modern .side-nav.is-collapsed .side-nav-collapse {
    flex: 0 0 32px;
    height: 32px;
    min-height: 32px;
    min-width: 40px;
    order: -1;
    width: 40px;
}

html.side-nav-collapsed body.ui-version-modern .side-nav-collapse svg,
body.ui-version-modern .side-nav.is-collapsed .side-nav-collapse svg { display: none; }

html.side-nav-collapsed body.ui-version-modern .side-nav-collapse::before,
body.ui-version-modern .side-nav.is-collapsed .side-nav-collapse::before {
    color: currentColor;
    content: "›";
    display: block;
    font-size: calc(23px * var(--ds-text-scale, 1));
    font-weight: 700;
    line-height: 1;
    transform: translateY(-1px);
}

html.side-nav-collapsed body.ui-version-modern .side-nav .critical-alerts,
body.ui-version-modern .side-nav.is-collapsed .critical-alerts {
    margin: 2px auto 10px;
    width: 40px;
}

html.side-nav-collapsed body.ui-version-modern .side-nav .critical-alerts > summary,
body.ui-version-modern .side-nav.is-collapsed .critical-alerts > summary {
    box-sizing: border-box;
    height: 40px;
    justify-content: center;
    min-height: 40px;
    padding: 0;
    position: relative;
    width: 40px;
}

html.side-nav-collapsed body.ui-version-modern .side-nav .critical-alerts-count,
body.ui-version-modern .side-nav.is-collapsed .critical-alerts-count {
    margin: 0;
    min-height: 18px;
    min-width: 18px;
    padding: 0 4px;
    position: absolute;
    right: -6px;
    top: -7px;
}

body.ui-version-modern .side-nav.has-shell-flyout { overflow: visible; }

/* Header flyouts are rendered inside the sticky header stacking context. Raise
   that context only while an account/critical/header flyout is open so its
   panel can remain above the form-level sticky action bar. */
body.ui-version-modern .app-header:has(.header-shell-control[open], .header-shell-control.is-open) { z-index: 910; }

/* The bottom-pinned View-as flyout lives inside the sidebar stacking context.
   Raise only that context above the form-level sticky action bar while it is
   open; header flyouts keep their existing shell layering. */
body.ui-version-modern .side-nav.has-shell-flyout:has(.sidebar-view-as[open]) { z-index: 910; }

@media (max-width: 900px) {
    html.side-nav-collapsed body.ui-version-modern .side-nav .module-switcher > summary,
body.ui-version-modern .side-nav.is-collapsed .module-switcher > summary,
body.ui-version-modern .module-switcher > summary { height: auto; min-height: var(--ds-control-height, 40px); padding: 7px 10px; width: 100%; }

    html.side-nav-collapsed body.ui-version-modern .side-nav-collapse,
body.ui-version-modern .side-nav.is-collapsed .side-nav-collapse,
body.ui-version-modern .side-nav-collapse { display: none; }

    html.side-nav-collapsed body.ui-version-modern .side-nav .critical-alerts,
body.ui-version-modern .side-nav.is-collapsed .critical-alerts,
body.ui-version-modern .critical-alerts { flex: 0 0 auto; margin: 5px 8px 5px 0; width: auto; }

    html.side-nav-collapsed body.ui-version-modern .side-nav .critical-alerts > summary,
body.ui-version-modern .side-nav.is-collapsed .critical-alerts > summary,
body.ui-version-modern .critical-alerts > summary { height: auto; min-height: 40px; padding: 7px 10px; width: auto; }

    html.side-nav-collapsed body.ui-version-modern .side-nav .critical-alerts-count,
body.ui-version-modern .side-nav.is-collapsed .critical-alerts-count { margin-left: auto; position: static; }

}

@media (max-width: 760px) {

    body.ui-version-modern .module-switcher-current-label { display: block; }

    body.ui-version-modern .critical-alerts { flex: 0 0 auto; margin: 0; }

    body.ui-version-modern .critical-alerts > summary { width: auto; }

    body.ui-version-modern .critical-alerts-label { display: inline; }

    body.ui-version-modern .ds-shell-flyout-panel {
        bottom: 12px;
        left: 12px !important;
        max-height: min(72vh, 620px);
        right: 12px;
        top: auto !important;
        width: auto;
    }

    body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher .module-switcher-panel {
        bottom: auto;
        left: 8px !important;
        /* The mobile sidebar transform is the fixed-position containing block. */
        max-height: min(640px, calc(100% - 16px));
        right: auto !important;
        top: 8px !important;
        width: calc(100% - 16px);
    }

}

@media (min-width: 901px) {
    body.ui-version-modern .app-shell.is-side-nav-collapsed,
html.side-nav-collapsed body.ui-version-modern .app-shell { grid-template-columns: 48px minmax(0, 1fr); }

    body.ui-version-modern .side-nav.is-collapsed,
html.side-nav-collapsed body.ui-version-modern .side-nav { padding-inline: 3px; width: 48px; }

    body.ui-version-modern .side-nav.is-collapsed .side-nav-collapse,
html.side-nav-collapsed body.ui-version-modern .side-nav-collapse {
        flex-basis: 30px; height: 30px; min-height: 30px; min-width: 30px; width: 30px;
    }

    body.ui-version-modern .side-nav.is-collapsed .side-nav-content,
html.side-nav-collapsed body.ui-version-modern .side-nav-content { padding: 5px 0; }

    body.ui-version-modern .side-nav.is-collapsed .side-section,
html.side-nav-collapsed body.ui-version-modern .side-section { margin-bottom: 4px; }

    body.ui-version-modern .side-nav.is-collapsed .side-title,
html.side-nav-collapsed body.ui-version-modern .side-title { min-height: 23px; padding: 2px 0; }

    body.ui-version-modern .side-nav.is-collapsed .side-nav a,
html.side-nav-collapsed body.ui-version-modern .side-nav a {
        box-sizing: border-box; display: flex; flex: 0 0 34px; gap: 0; height: 34px;
        justify-self: center; margin-inline: auto; max-width: 34px; min-height: 34px;
        min-width: 34px; padding: 0; width: 34px;
    }

    body.ui-version-modern .side-nav.is-collapsed .side-nav a.active::before,
html.side-nav-collapsed body.ui-version-modern .side-nav a.active::before { height: 22px; left: -4px; top: 6px; }

    body.ui-version-modern .side-nav.is-collapsed .side-nav-link-icon,
body.ui-version-modern .side-nav.is-collapsed .side-nav-section-icon,
html.side-nav-collapsed body.ui-version-modern .side-nav-link-icon,
html.side-nav-collapsed body.ui-version-modern .side-nav-section-icon { flex: 0 0 22px; height: 22px; width: 22px; }

    body.ui-version-modern .side-nav.is-collapsed .side-nav-link-icon svg,
body.ui-version-modern .side-nav.is-collapsed .side-nav-section-icon svg,
html.side-nav-collapsed body.ui-version-modern .side-nav-link-icon svg,
html.side-nav-collapsed body.ui-version-modern .side-nav-section-icon svg { height: 21px; width: 21px; }

}

@media (prefers-reduced-motion: reduce) {
    body.ui-version-modern *,
body.ui-version-modern *::before,
body.ui-version-modern *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }

    body.ui-version-modern .ds-spinner { animation-duration: 1.4s; }

}

/* Keep the collapsed navigation trigger and icon hit areas compact after the saved state is applied. */
body.ui-version-modern .side-nav.is-collapsed .side-nav-content a,
html.side-nav-collapsed body.ui-version-modern .side-nav-content a {
    box-sizing: border-box !important;
    display: flex !important;
    flex: 0 0 34px !important;
    height: 34px !important;
    justify-self: center !important;
    margin-inline: auto !important;
    max-width: 34px !important;
    min-height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    width: 34px !important;
}

body.ui-version-modern .side-nav.is-collapsed .side-nav-collapse,
html.side-nav-collapsed body.ui-version-modern .side-nav-collapse {
    box-sizing: border-box !important;
    border-top-style: solid !important;
    display: inline-flex !important;
    flex: 0 0 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    min-width: 34px !important;
    width: 34px !important;
}

@media print {
    body.ui-version-modern .app-header,
body.ui-version-modern .side-nav,
body.ui-version-modern .app-footer,
body.ui-version-modern .page-actions { display: none !important; }

    body.ui-version-modern .app-shell { display: block; }

    body.ui-version-modern .page { max-width: none; padding: 0; }

    body.ui-version-modern .panel { border-color: #bbb; break-inside: avoid; }

}

/* Canonical global header shell: brand, an optional utility slot and one
   ordered row of module, urgent, account and view-as controls. */
body.ui-version-modern .topbar[data-ds-global-header] {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-areas: "brand utilities actions";
    grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto;
    min-height: 48px;
    min-width: 0;
    padding-block: 4px;
}

body.ui-version-modern .topbar[data-ds-global-header] > .brand {
    grid-area: brand;
    min-width: 0;
}

body.ui-version-modern .global-header-utility-slot {
    align-items: center;
    display: flex;
    gap: 6px;
    grid-area: utilities;
    justify-content: center;
    min-width: 0;
}

/* One optical contract for every compact utility glyph in the global header.
   The slot is 20px; the SVG drawing area is 18px with the same stroke language
   as the existing Core module icons. */
body.ui-version-modern .ds-core-header-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 20px;
    height: 20px;
    justify-content: center;
    line-height: 0;
    width: 20px;
}

body.ui-version-modern .ds-core-header-icon svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 18px;
}

body.ui-version-modern .ds-developer-feedback-trigger {
    align-items: center;
    background: transparent;
    border-color: transparent;
    color: var(--ds-text);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    min-width: 40px;
    padding-inline: 8px;
    width: 40px;
}

body.ui-version-modern .developer-feedback-field-label {
    align-items: baseline;
    display: inline-flex;
    gap: 3px;
}

body.ui-version-modern .topbar[data-ds-global-header] .brand img {
    height: 38px;
    transform: scale(1.18);
}

body.ui-version-modern .ds-header-context {
    align-items: center;
    background: color-mix(in srgb, var(--ds-surface-subtle) 72%, var(--ds-surface));
    border-top: 1px solid color-mix(in srgb, var(--ds-border) 72%, transparent);
    color: var(--ds-text-muted);
    display: flex;
    font-size: calc(11px * var(--ds-text-scale, 1));
    gap: 18px;
    line-height: 16px;
    min-height: 24px;
    padding: 3px 18px;
}

body.ui-version-modern .ds-header-context-user,
body.ui-version-modern .ds-header-context-name {
    align-items: baseline;
    display: flex;
    gap: 5px;
    min-width: 0;
}

body.ui-version-modern .ds-header-context-user { flex: 0 1 auto; gap: 12px; justify-content: flex-end; }

body.ui-version-modern .ds-header-context span { white-space: nowrap; }

body.ui-version-modern .ds-header-context-name > span { color: var(--ds-text-faint); font-size: calc(10px * var(--ds-text-scale, 1)); letter-spacing: .045em; text-transform: uppercase; }

body.ui-version-modern .ds-header-context strong { color: var(--ds-text); font-size: calc(11px * var(--ds-text-scale, 1)); font-weight: 650; }

body.ui-version-modern.has-global-help-open .app-header,
body.ui-version-modern.has-global-settings-open .app-header { z-index: 910; }

body.ui-version-modern .ds-global-help {
    flex: 0 0 auto;
}

body.ui-version-modern .ds-global-help-trigger {
    align-items: center;
    background: var(--ds-surface, var(--panel));
    border: 1px solid var(--ds-line, var(--line));
    border-radius: var(--ds-radius-control);
    color: var(--ds-text, var(--text));
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 650;
    gap: 7px;
    height: 40px;
    justify-content: center;
    padding: 0 11px;
    white-space: nowrap;
}

body.ui-version-modern .ds-global-help-icon {
    color: currentColor;
}

body.ui-version-modern .ds-global-help-panel[hidden] { display: none !important; }

body.ui-version-modern .ds-global-help-body {
    gap: var(--ds-form-gap);
}

body.ui-version-modern .ds-global-help-summary {
    color: var(--ds-text, var(--text));
    font-size: calc(13px * var(--ds-text-scale, 1));
    line-height: 1.5;
}

body.ui-version-modern .ds-global-help-section {
    border-top: 1px solid var(--ds-line, var(--line));
    display: grid;
    gap: 8px;
    padding-top: 12px;
}

body.ui-version-modern .ds-global-help-section[hidden] { display: none !important; }

body.ui-version-modern .ds-global-help-section h3 {
    color: var(--ds-text-muted, var(--muted));
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 750;
    letter-spacing: .055em;
    margin: 0;
    text-transform: uppercase;
}

body.ui-version-modern .ds-global-help-items { display: grid; gap: 10px; }

body.ui-version-modern .ds-global-help-items > div { display: grid; gap: 2px; }

body.ui-version-modern .ds-global-help-items strong { font-size: calc(13px * var(--ds-text-scale, 1)); line-height: 1.35; }

body.ui-version-modern .ds-global-help-items p { color: var(--ds-text-muted, var(--muted)); font-size: calc(12px * var(--ds-text-scale, 1)); line-height: 1.45; margin: 0; }

body.ui-version-modern .ds-global-help-items .ds-global-help-item-important { color: var(--ds-text); font-weight: 650; }

body.ui-version-modern .ds-global-help-points { color: var(--ds-text-muted, var(--muted)); display: grid; font-size: calc(12px * var(--ds-text-scale, 1)); gap: 6px; line-height: 1.45; margin: 0; padding-left: 18px; }

body.ui-version-modern .ds-global-help-important { background: var(--ds-warning-soft); border-inline-start: 3px solid var(--ds-warning); color: var(--ds-text); font-size: calc(12px * var(--ds-text-scale, 1)); line-height: 1.45; margin: 0; padding: var(--ds-action-gap) calc(var(--ds-action-gap) + 2px); }

body.ui-version-modern .ds-global-settings-launcher { flex: 0 0 auto; }

body.ui-version-modern .ds-global-settings-trigger {
    align-items: center;
    background: var(--ds-surface, var(--panel));
    border: 1px solid var(--ds-line, var(--line));
    border-radius: var(--ds-radius-control);
    color: var(--ds-text, var(--text));
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 650;
    gap: 7px;
    height: 40px;
    justify-content: center;
    padding: 0 11px;
    white-space: nowrap;
}

body.ui-version-modern .ds-global-settings-trigger-icon,
body.ui-version-modern .ds-global-settings-destination-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

body.ui-version-modern .ds-global-settings-trigger-icon svg,
body.ui-version-modern .ds-global-settings-destination-icon svg {
    fill: none;
    stroke: currentColor;
}

body.ui-version-modern .ds-global-settings-destination-icon svg { height: 22px; width: 22px; }

body.ui-version-modern .ds-global-settings-panel[hidden] { display: none !important; }

body.ui-version-modern .ds-global-settings-destinations {
    gap: var(--ds-form-gap);
}

body.ui-version-modern .ds-global-settings-scope { display: grid; gap: 6px; }

body.ui-version-modern .ds-global-settings-scope + .ds-global-settings-scope {
    border-top: 1px solid var(--ds-line, var(--line));
    padding-top: 12px;
}

body.ui-version-modern .ds-global-settings-scope h3 {
    color: var(--ds-text-muted, var(--muted));
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 750;
    letter-spacing: .055em;
    margin: 0;
    text-transform: uppercase;
}

body.ui-version-modern .ds-global-settings-destination {
    background: var(--ds-menu-inactive-bg);
    border-color: transparent;
    color: var(--ds-menu-inactive-text);
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    grid-template-columns: 24px minmax(0, 1fr) auto;
    line-height: var(--ds-menu-line-height);
    min-height: calc(var(--ds-control-height) + 16px);
}

body.ui-version-modern .ds-global-settings-panel .ds-global-settings-destination:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--ds-menu-hover-bg);
    border-color: transparent;
    color: var(--ds-menu-hover-text);
}

body.ui-version-modern .ds-global-settings-panel .ds-global-settings-destination.is-current,
body.ui-version-modern .ds-global-settings-panel .ds-global-settings-destination.is-current:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--ds-menu-active-bg);
    border-color: transparent;
    color: var(--ds-menu-active-text);
    font-weight: var(--ds-menu-font-weight);
}

body.ui-version-modern .ds-global-settings-destination-copy { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .ds-global-settings-destination-copy > strong {
    color: inherit;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    line-height: var(--ds-menu-line-height);
}

body.ui-version-modern .ds-global-settings-destination-copy > span {
    font-size: var(--ds-menu-aux-font-size);
    font-weight: var(--ds-menu-aux-font-weight);
}

body.ui-version-modern .ds-global-search {
    max-width: 440px;
    min-width: 180px;
    position: relative;
    width: min(100%, 420px);
}

body.ui-version-modern.has-global-search-open .app-header { z-index: 340; }

body.ui-version-modern .ds-global-search-field {
    align-items: center;
    background: var(--ds-surface, var(--panel));
    border: 1px solid var(--ds-line, var(--line));
    border-radius: var(--radius-ui, 7px);
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto auto;
    height: 38px;
    padding: 0 6px 0 9px;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

body.ui-version-modern .ds-global-search-field:hover { border-color: color-mix(in srgb, var(--ds-text-muted) 42%, var(--ds-line)); }

body.ui-version-modern .ds-global-search-field:focus-within {
    border-color: color-mix(in srgb, var(--ds-primary) 62%, var(--ds-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-primary) 14%, transparent);
}

body.ui-version-modern .ds-global-search-icon,
body.ui-version-modern .ds-global-search-result-icon {
    align-items: center;
    color: var(--ds-text-muted, var(--muted));
    display: inline-flex;
    justify-content: center;
}

body.ui-version-modern .ds-global-search input[type="search"] {
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--ds-text, var(--text));
    font: inherit;
    height: 36px;
    min-width: 0;
    outline: 0 !important;
    padding: 0 9px;
    width: 100%;
}

body.ui-version-modern .ds-global-search input[type="search"]::-webkit-search-cancel-button { display: none; }

body.ui-version-modern .ds-global-search input[type="search"]::placeholder { color: var(--ds-text-muted, var(--muted)); opacity: .9; }

body.ui-version-modern .ds-global-search kbd {
    background: var(--ds-surface-subtle, #f5f6f7);
    border: 0;
    border-left: 1px solid color-mix(in srgb, var(--ds-line, var(--line)) 70%, transparent);
    border-radius: 0;
    color: var(--ds-text-muted, var(--muted));
    font-family: inherit;
    font-size: calc(10px * var(--ds-text-scale, 1));
    line-height: 22px;
    margin: 0 1px 0 3px;
    padding: 0 8px;
    white-space: nowrap;
}

body.ui-version-modern .ds-global-search-clear {
    align-items: center;
    background: transparent;
    border: 0 !important;
    border-radius: 0;
    color: var(--ds-text-muted, var(--muted));
    cursor: pointer;
    display: inline-flex;
    font-size: calc(20px * var(--ds-text-scale, 1));
    height: 26px;
    justify-content: center;
    margin-left: 0;
    padding: 0;
    width: 26px;
}

body.ui-version-modern .ds-global-search-clear[hidden],
body.ui-version-modern .ds-global-search-spinner[hidden] { display: none !important; }

body.ui-version-modern .ds-global-search-clear:hover { background: var(--ds-surface-subtle, #f5f6f7); color: var(--ds-text, var(--text)); }

body.ui-version-modern .ds-global-search-clear:focus-visible { outline: 2px solid var(--ds-primary); outline-offset: 1px; }

body.ui-version-modern .ds-global-search-spinner {
    animation: ds-global-search-spin .75s linear infinite;
    border: 2px solid color-mix(in srgb, var(--ds-primary) 22%, transparent);
    border-radius: 50%;
    border-top-color: var(--ds-primary);
    height: 14px;
    margin-left: 5px;
    width: 14px;
}

@keyframes ds-global-search-spin { to { transform: rotate(360deg); } }

body.ui-version-modern .ds-global-search-panel {
    background: var(--ds-surface-raised, var(--panel));
    border: 1px solid var(--ds-line, var(--line));
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .12);
    box-sizing: border-box;
    max-height: min(68vh, 560px);
    overflow: auto;
    padding: 7px;
    position: fixed;
    z-index: 320;
}

body.ui-version-modern .ds-global-search-panel[hidden] { display: none !important; }

body.ui-version-modern .ds-global-search-results { display: grid; gap: 5px; }

body.ui-version-modern .ds-global-search-group { display: grid; gap: 2px; }

body.ui-version-modern .ds-global-search-group + .ds-global-search-group { border-top: 1px solid var(--ds-line, var(--line)); padding-top: 6px; }

body.ui-version-modern .ds-global-search-group h2 {
    color: var(--ds-text-muted, var(--muted));
    font-size: calc(10px * var(--ds-text-scale, 1));
    font-weight: 800;
    letter-spacing: .06em;
    margin: 0;
    padding: 5px 8px 3px;
    text-transform: uppercase;
}

body.ui-version-modern .topbar .ds-global-search-result {
    align-items: center;
    background: transparent;
    border-radius: 7px;
    color: var(--ds-text, var(--text));
    display: grid;
    gap: 10px;
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 48px;
    padding: 6px 8px;
    text-decoration: none;
}

body.ui-version-modern .topbar .ds-global-search-result:hover,
body.ui-version-modern .topbar .ds-global-search-result[aria-selected="true"] {
    background: color-mix(in srgb, var(--ds-primary) 9%, var(--ds-surface));
    color: var(--ds-text, var(--text));
}

body.ui-version-modern .topbar .ds-global-search-result:focus-visible { outline: 2px solid var(--ds-primary); outline-offset: -2px; }

body.ui-version-modern .ds-global-search-result-icon {
    background: var(--ds-surface-subtle, #f5f6f7);
    border: 1px solid var(--ds-line, var(--line));
    border-radius: 7px;
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 800;
    height: 28px;
    width: 28px;
}

body.ui-version-modern .ds-global-search-result-copy { display: grid; gap: 2px; min-width: 0; }

body.ui-version-modern .ds-global-search-result-copy strong,
body.ui-version-modern .ds-global-search-result-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.ui-version-modern .ds-global-search-result-copy strong { font-size: calc(13px * var(--ds-text-scale, 1)); line-height: 1.25; }

body.ui-version-modern .ds-global-search-result-copy small {
    color: var(--ds-text-muted, var(--muted));
    color: color-mix(in srgb, var(--ds-text, var(--text)) 72%, var(--ds-surface, #fff));
    font-size: calc(11.5px * var(--ds-text-scale, 1));
    font-weight: 500;
    line-height: 1.35;
}

body.ui-version-modern .topbar .ds-global-search-continuation {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--ds-link, var(--ds-primary));
    cursor: pointer;
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 750;
    min-height: 40px;
    padding: 7px 8px;
    text-align: left;
    width: 100%;
}

body.ui-version-modern .topbar .ds-global-search-continuation:hover,
body.ui-version-modern .topbar .ds-global-search-continuation:focus-visible {
    background: color-mix(in srgb, var(--ds-primary) 9%, var(--ds-surface));
    outline: 0;
}

body.ui-version-modern .ds-global-search-state {
    color: var(--ds-text-muted, var(--muted));
    display: grid;
    gap: 3px;
    min-height: 78px;
    place-content: center;
    text-align: center;
}

body.ui-version-modern .ds-global-search-state strong { color: var(--ds-text, var(--text)); font-size: calc(13px * var(--ds-text-scale, 1)); }

body.ui-version-modern .ds-global-search-state span { font-size: calc(12px * var(--ds-text-scale, 1)); }

@media (max-width: 1100px) {
    body.ui-version-modern .ds-global-search { max-width: 300px; min-width: 150px; }

    body.ui-version-modern .ds-global-search kbd { display: none; }

    body.ui-version-modern .ds-global-help-label { display: none; }

    body.ui-version-modern .ds-global-help-trigger { padding-inline: 9px; width: 40px; }

    body.ui-version-modern .ds-global-settings-label { display: none; }

    body.ui-version-modern .ds-global-settings-trigger { padding-inline: 9px; width: 40px; }

}

@media (max-width: 640px) {
    body.ui-version-modern .global-header-utility-slot { justify-content: flex-end; }

    body.ui-version-modern .ds-global-help-trigger { min-width: 40px; }

    body.ui-version-modern .ds-global-help-panel { max-height: calc(100dvh - 68px); }

    body.ui-version-modern .ds-global-settings-trigger { min-width: 40px; }

    body.ui-version-modern .ds-global-settings-panel { max-height: calc(100dvh - 68px); }

    body.ui-version-modern .ds-global-search { max-width: 40px; min-width: 40px; width: 40px; }

    body.ui-version-modern .ds-global-search-field { grid-template-columns: 20px minmax(0, 1fr) auto; height: 40px; padding: 0 8px; }

    body.ui-version-modern .ds-global-search:not(.is-open) input[type="search"] { caret-color: transparent; color: transparent; padding: 0; width: 0; }

    body.ui-version-modern .ds-global-search:not(.is-open) input[type="search"]::placeholder { opacity: 0; }

    body.ui-version-modern .ds-global-search:not(.is-open) .ds-global-search-clear,
body.ui-version-modern .ds-global-search kbd { display: none; }

    body.ui-version-modern .ds-global-search.is-open {
        left: 8px;
        max-width: none;
        position: fixed;
        right: 8px;
        top: 6px;
        width: auto;
        z-index: 330;
    }

    body.ui-version-modern .ds-global-search.is-open .ds-global-search-field { background: var(--ds-surface-raised, var(--panel)); }

    body.ui-version-modern .ds-global-search-panel {
        left: 8px;
        max-height: calc(100dvh - 68px);
        right: 8px;
        top: 58px;
        width: auto;
    }

    body.ui-version-modern .topbar .ds-global-search-result { min-height: 54px; }

}

@media (max-width: 480px) {
    body.ui-version-modern .topbar[data-ds-global-header]:has(.ds-global-settings-launcher) .brand-text { display: none; }

    body.ui-version-modern .topbar[data-ds-global-header]:has(.ds-global-settings-launcher) > .brand { max-width: 42px; }

    body.ui-version-modern .topbar[data-ds-global-header]:has(.ds-global-settings-launcher) .global-header-utility-slot { gap: 4px; }

}

@media (prefers-reduced-motion: reduce) {
    body.ui-version-modern .ds-global-search-field { transition: none; }

    body.ui-version-modern .ds-global-search-spinner { animation-duration: 1.4s; }

}

body.ui-version-modern .top-actions {
    flex-wrap: nowrap;
    grid-area: actions;
    min-width: 0;
    white-space: nowrap;
}

body.ui-version-modern .top-actions > .header-shell-control {
    flex: 0 0 auto;
    margin: 0;
    min-width: 0;
    position: relative;
    width: auto;
}

body.ui-version-modern .top-actions > .header-shell-control > summary {
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    min-width: 0;
    padding: 4px 9px;
    width: auto;
}

body.ui-version-modern .top-actions > .critical-alerts > summary {
    min-width: 0;
}

body.ui-version-modern details.ds-shell-flyout:not([open]) > .ds-shell-flyout-panel {
    display: none !important;
}

body.ui-version-modern .account-menu > summary {
    background: transparent;
    border-color: transparent;
    color: var(--ds-text);
    gap: 8px;
}

body.ui-version-modern .account-menu-name:has(> small) {
    display: grid;
    line-height: 1.15;
}

body.ui-version-modern .account-menu-name > strong,
body.ui-version-modern .account-menu-name > small {
    max-width: 148px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.ui-version-modern .account-menu-name > small {
    color: var(--ds-text-muted);
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 500;
}

body.ui-version-modern .account-menu-heading { gap: 10px; }

body.ui-version-modern .account-menu-summary { gap: 10px; }

body.ui-version-modern .account-menu-panel .profile-menu-list.ds-popover-body { padding: var(--ds-card-pad) var(--ds-panel-pad); }

body.ui-version-modern .account-menu-identity {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
}

body.ui-version-modern .account-menu-panel .account-menu-identity .avatar-frame,
body.ui-version-modern .account-menu-panel .account-menu-identity .entity-avatar-frame {
    height: 40px;
    width: 40px;
}

body.ui-version-modern .account-menu-identity h2,
body.ui-version-modern .account-menu-identity p {
    overflow-wrap: anywhere;
}

body.ui-version-modern .account-menu-meta-inline {
    color: var(--ds-text-muted);
    font-size: calc(.78rem * var(--ds-text-scale, 1));
    line-height: 1.45;
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

body.ui-version-modern .ds-shell-menu-list,
body.ui-version-modern .account-menu .ds-shell-menu-list,
body.ui-version-modern .view-as-menu .ds-shell-menu-list {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 0;
    position: static;
    width: 100%;
}

body.ui-version-modern .ds-shell-menu-list .view-as-option {
    align-items: center;
    background: var(--ds-menu-inactive-bg);
    border: 1px solid transparent;
    border-radius: var(--radius-ui, 6px);
    color: var(--ds-menu-inactive-text);
    display: grid;
    font-family: var(--ds-menu-font-family);
    font-size: var(--ds-menu-font-size);
    font-weight: var(--ds-menu-font-weight);
    gap: var(--ds-action-gap);
    grid-template-columns: 20px minmax(0, 1fr) 18px;
    line-height: var(--ds-menu-line-height);
    min-height: calc(var(--ds-control-height) + 4px);
    padding: var(--ds-action-gap) calc(var(--ds-action-gap) + 2px);
    text-align: left;
    text-decoration: none;
    width: 100%;
}

body.ui-version-modern .account-menu-panel .ds-popover-destination-row {
    display: grid;
}

body.ui-version-modern .ds-shell-menu-list .view-as-option:hover {
    background: var(--ds-menu-hover-bg);
    border-color: transparent;
    color: var(--ds-menu-hover-text);
}

body.ui-version-modern .ds-shell-menu-list .view-as-option.is-current,
body.ui-version-modern .ds-shell-menu-list .view-as-option.is-current:hover {
    background: var(--ds-menu-active-bg);
    border-color: transparent;
    color: var(--ds-menu-active-text);
    font-weight: var(--ds-menu-font-weight);
}

body.ui-version-modern .account-menu-panel .logout-form {
    border-top: 1px solid var(--ds-line);
    margin-top: 7px;
    padding-top: 7px;
}

body.ui-version-modern .view-as-menu > summary {
    background: transparent;
    border-color: var(--ds-line);
    color: var(--ds-text);
    justify-content: flex-start;
}

body.ui-version-modern .view-as-menu .view-as-icon {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--ds-primary);
    flex-basis: 22px;
    height: 22px;
    width: 22px;
}

body.ui-version-modern .view-as-menu.is-active-context > summary {
    background: color-mix(in srgb, var(--ds-primary) 9%, var(--ds-surface));
    border-color: color-mix(in srgb, var(--ds-primary) 48%, var(--ds-line));
    color: var(--ds-primary);
}

body.ui-version-modern .header-logout-form {
    flex: 0 0 auto;
    margin: 0;
}

body.ui-version-modern .header-logout-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-ui, 6px);
    box-sizing: border-box;
    color: var(--ds-text-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 650;
    gap: 7px;
    height: 40px;
    justify-content: center;
    min-height: 40px;
    padding: 4px 10px;
    white-space: nowrap;
}

body.ui-version-modern .header-logout-button:hover {
    background: var(--nav-hover-bg);
    border-color: color-mix(in srgb, var(--nav-active-bg) 42%, var(--ds-line));
    color: var(--nav-hover-text);
}

body.ui-version-modern .header-logout-button:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }

body.ui-version-modern .view-as-option > .ds-popover-row-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

body.ui-version-modern .view-as-option > .ds-popover-row-copy small {
    color: inherit;
    font-size: var(--ds-menu-aux-font-size);
    font-weight: var(--ds-menu-aux-font-weight);
    line-height: 1.4;
    opacity: .74;
}

body.ui-version-modern .view-as-option.view-as-end {
    border-color: transparent;
    color: var(--ds-menu-inactive-text);
    margin: 0;
    padding-bottom: var(--ds-action-gap);
}

body.ui-version-modern .view-as-option.view-as-end small {
    color: inherit;
    font-size: var(--ds-menu-aux-font-size);
    font-weight: var(--ds-menu-aux-font-weight);
}

body.ui-version-modern .view-as-menu-panel .view-as-end + .ds-popover-section {
    border-top: 1px solid var(--ds-line, var(--line));
    margin-top: 6px;
    padding-top: 9px;
}

body.ui-version-modern .critical-alerts > summary,
body.ui-version-modern .critical-alerts > summary:hover,
body.ui-version-modern .critical-alerts[open] > summary {
    color: var(--ds-danger);
}

body.ui-version-modern .critical-alerts-count {
    margin-left: 2px;
}

@media (max-width: 900px) {
    body.ui-version-modern .topbar[data-ds-global-header] {
        gap: 8px;
        grid-template-areas: "brand utilities actions";
        grid-template-columns: minmax(64px, auto) minmax(0, 1fr) auto;
        padding: 6px 10px;
    }

    body.ui-version-modern .top-actions { gap: 5px; width: auto; }

    body.ui-version-modern .account-menu-name { display: none; }

    body.ui-version-modern .ds-header-context { gap: 12px; padding-inline: 10px; }

    body.ui-version-modern .ds-header-context-user { gap: 8px; }

}

@media (max-width: 640px) {
    body.ui-version-modern .topbar[data-ds-global-header] {
        min-height: 52px;
        padding-inline: 8px;
    }

    body.ui-version-modern .topbar .brand { max-width: 92px; }

    body.ui-version-modern .brand img { height: 30px; margin-inline: 3px; max-width: 52px; transform: none; }

    body.ui-version-modern .brand-text { min-width: 0; }

    body.ui-version-modern .brand-text strong {
        display: block;
        max-width: 42px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.ui-version-modern .top-actions > .header-shell-control > summary {
        height: 40px;
        justify-content: center;
        min-width: 40px;
        padding: 4px 6px;
    }

    body.ui-version-modern .top-actions > .header-shell-control > summary::after,
body.ui-version-modern .module-switcher-current-label,
body.ui-version-modern .critical-alerts-label { display: none; }

    body.ui-version-modern .header-logout-button { min-width: 40px; padding: 4px 6px; }

    body.ui-version-modern .header-logout-button span { display: none; }

    body.ui-version-modern .ds-header-context {
        align-items: start;
        display: grid;
        gap: 1px 10px;
        grid-template-columns: minmax(0, 1fr) auto;
        line-height: 15px;
        padding: 3px 8px;
    }

    body.ui-version-modern .ds-header-context-user { display: contents; }

    body.ui-version-modern .ds-header-context-name { grid-column: 1 / -1; }

    body.ui-version-modern .ds-header-context-user > span:not(.ds-header-context-name) { font-size: calc(10px * var(--ds-text-scale, 1)); }

    body.ui-version-modern .critical-alerts-count {
        font-size: calc(10px * var(--ds-text-scale, 1));
        min-height: 18px;
        min-width: 18px;
        padding-inline: 4px;
    }

    body.ui-version-modern .ds-shell-flyout-panel {
        bottom: auto;
        left: 8px !important;
        max-height: calc(100dvh - 68px);
        right: 8px;
        top: 60px !important;
        width: auto;
    }

}

/* Cascade guard: canonical sidebar rules intentionally follow all legacy shell
   compatibility rules until the legacy stylesheet can be removed separately. */
body.ui-version-modern aside.ds-sidebar {
    background: var(--ds-surface, var(--panel));
    border: 0;
    border-right: 1px solid var(--ds-border, var(--line));
    box-sizing: border-box;
    display: block;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: var(--ds-sidebar-width);
    z-index: 30;
}

body.ui-version-modern aside.ds-sidebar .ds-sidebar-surface { display: flex; flex-direction: column; height: 100%; min-height: 0; width: 100%; }

body.ui-version-modern aside.ds-sidebar .side-nav-content {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 10px;
    scrollbar-gutter: stable;
}

body.ui-version-modern aside.ds-sidebar .side-section { display: block; margin: 0 0 12px; }

body.ui-version-modern aside.ds-sidebar .side-section--context {
    margin: 0 0 12px;
    padding-top: 4px;
}

body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher {
    border-bottom: 1px solid var(--ds-border, var(--line));
    margin-bottom: 10px;
    padding-bottom: 10px;
}

body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher > .side-context-header {
    align-items: center;
    min-height: 38px;
    padding: 6px 9px;
}

body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher > .side-context-header::after { display: none; }

body.ui-version-modern aside.ds-sidebar .sidebar-view-as > summary::after { display: none; }

body.ui-version-modern .account-menu > summary::after { display: none; }

body.ui-version-modern .ds-directional-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 var(--ds-directional-icon-size);
    height: var(--ds-directional-icon-size);
    justify-content: center;
    margin-left: auto;
    width: var(--ds-directional-icon-size);
}

body.ui-version-modern .ds-directional-icon svg {
    display: block;
    fill: none;
    height: 100%;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: var(--ds-directional-icon-stroke);
    width: 100%;
}

body.ui-version-modern .ds-directional-icon--expand {
    transform: rotate(0deg);
    transition: transform .16s ease;
}

body.ui-version-modern .ds-directional-icon--collapse { transition: transform .16s ease; }

body.ui-version-modern details[open] > summary > .ds-directional-icon--expand { transform: rotate(180deg); }

body.ui-version-modern aside.ds-sidebar .side-menu-toggle {
    flex: 0 0 var(--ds-directional-icon-size);
    font-size: inherit;
    font-weight: inherit;
    height: var(--ds-directional-icon-size);
    line-height: normal;
    text-align: initial;
    transform: rotate(0deg);
    transition: transform .16s ease;
    width: var(--ds-directional-icon-size);
}

body.ui-version-modern aside.ds-sidebar details[open] > summary .side-menu-toggle { transform: rotate(180deg); }

body.ui-version-modern aside.ds-sidebar summary.side-title:focus-visible,
body.ui-version-modern aside.ds-sidebar .side-nav-collapse:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--theme-accent, #f4c400) 60%, transparent);
    outline-offset: 2px;
}

body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher > .side-context-header .side-menu-toggle { color: var(--ds-text-faint, var(--muted)); }

body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher > .side-context-header:hover .side-menu-toggle,
body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher[open] > .side-context-header .side-menu-toggle { color: currentColor; }

body.ui-version-modern aside.ds-sidebar .side-title { display: flex; min-height: 28px; padding: 4px 9px; }

body.ui-version-modern aside.ds-sidebar .side-menu-items { display: grid; gap: 3px; }

body.ui-version-modern aside.ds-sidebar a[data-sidebar-item] {
    display: flex;
    font-size: calc(13px * var(--ds-text-scale, 1));
    gap: 10px;
    min-height: 42px;
    padding: 8px 9px;
    width: 100%;
}

body.ui-version-modern aside.ds-sidebar a[data-sidebar-item].active::before { height: auto; inset-block: 7px; left: -1px; top: auto; }

body.ui-version-modern aside.ds-sidebar .ds-sidebar-footer { display: flex; }

body.ui-version-modern aside.ds-sidebar .ds-sidebar-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
}

body.ui-version-modern aside.ds-sidebar .sidebar-view-as { width: 100%; }

body.ui-version-modern aside.ds-sidebar .sidebar-view-as > summary {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-ui, 6px);
    box-sizing: border-box;
    color: var(--ds-text-muted);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 650;
    gap: 10px;
    justify-content: flex-start;
    min-height: 40px;
    padding: 0 9px;
    width: 100%;
}

body.ui-version-modern aside.ds-sidebar .sidebar-view-as > summary:hover,
body.ui-version-modern aside.ds-sidebar .sidebar-view-as[open] > summary {
    background: var(--ds-surface-subtle);
    border-color: var(--ds-border);
    color: var(--ds-text);
}

body.ui-version-modern aside.ds-sidebar .sidebar-view-as .view-as-icon {
    color: currentColor;
    flex: 0 0 20px;
    height: 20px;
    width: 20px;
}

body.ui-version-modern aside.ds-sidebar .sidebar-view-as .view-as-icon svg { height: 18px; width: 18px; }

body.ui-version-modern aside.ds-sidebar .sidebar-view-as.is-active-context > summary {
    background: color-mix(in srgb, var(--ds-primary) 8%, var(--ds-surface));
    border-color: color-mix(in srgb, var(--ds-primary) 38%, var(--ds-border));
    color: var(--ds-primary);
}

body.ui-version-modern aside.ds-sidebar .sidebar-view-as .view-as-menu-panel { width: min(320px, calc(100vw - 24px)); }

body.ui-version-modern aside.ds-sidebar .ds-sidebar-footer .side-nav-collapse {
    display: flex;
    height: 40px;
    justify-content: flex-start;
    min-height: 40px;
    padding: 0 9px;
    width: 100%;
}

body.ui-version-modern aside.ds-sidebar .ds-sidebar-footer .side-nav-collapse .ds-directional-icon { margin-left: 0; }

body.ui-version-modern aside.ds-sidebar .ds-sidebar-footer .side-nav-collapse .ds-directional-icon svg {
    flex: 0 0 auto;
    height: 100%;
    width: 100%;
}

@media (min-width: 901px) {
    body.ui-version-modern aside.ds-sidebar.is-collapsed,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar { padding: 0; width: var(--ds-sidebar-collapsed); }

    body.ui-version-modern .app-shell.is-side-nav-collapsed,
html.side-nav-collapsed body.ui-version-modern .app-shell { grid-template-columns: var(--ds-sidebar-collapsed) minmax(0, 1fr); }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-content,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-nav-content { padding: 8px 6px; scrollbar-gutter: auto; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-section,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-section { display: block; margin: 0 0 4px; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-section--context,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-section--context {
        margin-bottom: 4px;
        padding-top: 0;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .sidebar-module-switcher,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .sidebar-module-switcher > .side-context-header,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher > .side-context-header {
        display: flex;
        position: relative;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .sidebar-module-switcher .module-switcher-current-label,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher .module-switcher-current-label { display: none; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .sidebar-module-switcher .side-menu-toggle,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .sidebar-module-switcher .side-menu-toggle {
        background: var(--ds-surface);
        border: 1px solid var(--ds-border);
        border-radius: 999px;
        bottom: -3px;
        display: inline-flex;
        height: 15px;
        padding: 1px;
        position: absolute;
        right: -3px;
        width: 15px;
    }

    /* A fixed popover is rendered inside side-nav-content, but it is not a
       collapsed navigation link. Undo the legacy 34 px anchor constraint. */
    body.ui-version-modern aside.ds-sidebar.is-collapsed .module-switcher-panel a.module-switcher-option,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .module-switcher-panel a.module-switcher-option {
        flex: 1 1 auto !important;
        gap: 9px !important;
        height: auto !important;
        justify-self: stretch !important;
        margin: 0 !important;
        max-width: none !important;
        min-height: 38px !important;
        min-width: 0 !important;
        padding: 7px 9px !important;
        width: 100% !important;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-title,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-title { display: none; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-menu-items,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-menu-items { display: grid !important; gap: 4px; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed a[data-sidebar-item],
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar a[data-sidebar-item] {
        display: flex !important;
        height: 42px !important;
        justify-content: center;
        margin: 0 auto !important;
        max-width: 42px !important;
        min-height: 42px !important;
        min-width: 42px !important;
        padding: 0 !important;
        width: 42px !important;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-link-label,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-nav-link-label { display: none; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed a[data-sidebar-item].active::before,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar a[data-sidebar-item].active::before { inset-block: 8px; left: -7px; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .ds-sidebar-footer,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .ds-sidebar-footer { display: flex; padding: 7px; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .sidebar-view-as > summary,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .sidebar-view-as > summary {
        justify-content: center;
        margin: 0 auto;
        max-width: 42px;
        min-width: 42px;
        padding: 0;
        width: 42px;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .sidebar-view-as .view-as-label,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .sidebar-view-as .view-as-label { display: none; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-collapse,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-nav-collapse {
        flex: 0 0 40px !important;
        height: 40px !important;
        justify-content: center;
        margin: 0 auto;
        min-height: 40px !important;
        min-width: 42px !important;
        order: 0;
        padding: 0;
        width: 42px !important;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-collapse .ds-directional-icon--collapse,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-nav-collapse .ds-directional-icon--collapse {
        display: inline-flex;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-collapse .ds-directional-icon--collapse svg,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-nav-collapse .ds-directional-icon--collapse svg {
        display: block;
    }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-collapse .ds-directional-icon--collapse,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-nav-collapse .ds-directional-icon--collapse { transform: rotate(180deg); }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-collapse::before,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-nav-collapse::before { content: none; display: none; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-collapse-label,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .side-nav-collapse-label { display: none; }

    body.ui-version-modern aside.ds-sidebar.is-collapsed .sidebar-view-as > summary > .ds-directional-icon--expand,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar .sidebar-view-as > summary > .ds-directional-icon--expand { display: none; }

}

@media (min-width: 901px) {
    body.ui-version-modern aside.ds-sidebar {
        align-self: start;
        height: calc(100dvh - var(--ds-sidebar-mobile-top, var(--ds-header-height)));
        max-height: calc(100dvh - var(--ds-sidebar-mobile-top, var(--ds-header-height)));
        position: sticky;
        top: var(--ds-sidebar-mobile-top, var(--ds-header-height));
    }

}

@media (max-width: 900px) {
    body.ui-version-modern .topbar[data-ds-global-header] {
        gap: 8px;
        grid-template-areas: "mobile brand utilities actions";
        grid-template-columns: 40px minmax(36px, auto) minmax(0, 1fr) auto;
    }

    body.ui-version-modern button.ds-mobile-nav-trigger { display: inline-flex; grid-area: mobile; }

    body.ui-version-modern .app-shell,
body.ui-version-modern .app-shell.is-side-nav-collapsed { display: block; min-width: 0; }

    body.ui-version-modern aside.ds-sidebar,
body.ui-version-modern aside.ds-sidebar.is-collapsed,
html.side-nav-collapsed body.ui-version-modern aside.ds-sidebar {
        background: transparent;
        border: 0;
        bottom: 0;
        display: block;
        height: auto;
        left: 0;
        max-height: none;
        max-width: none;
        overflow: visible;
        padding: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: var(--ds-sidebar-mobile-top, var(--ds-header-height, 64px));
        width: auto;
        z-index: 350;
    }

    body.ui-version-modern aside.ds-sidebar .ds-sidebar-surface {
        height: 100%;
        max-width: min(86vw, 340px);
        transform: translateX(-105%);
        width: 100%;
    }

    body.ui-version-modern aside.ds-sidebar[data-mobile-open="true"] { pointer-events: auto; }

    body.ui-version-modern aside.ds-sidebar[data-mobile-open="true"] .ds-sidebar-surface { transform: translateX(0); }

    body.ui-version-modern aside.ds-sidebar .ds-sidebar-backdrop { display: block; }

    body.ui-version-modern aside.ds-sidebar .ds-sidebar-mobile-header { display: flex; }

    body.ui-version-modern aside.ds-sidebar .side-nav-content,
body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-content { display: block; overflow-x: hidden; overflow-y: auto; padding: 10px; }

    body.ui-version-modern aside.ds-sidebar .side-section,
body.ui-version-modern aside.ds-sidebar.is-collapsed .side-section { display: block; margin: 0 0 12px; }

    body.ui-version-modern aside.ds-sidebar .side-title,
body.ui-version-modern aside.ds-sidebar.is-collapsed .side-title { display: flex; }

    body.ui-version-modern aside.ds-sidebar .side-menu-items,
body.ui-version-modern aside.ds-sidebar.is-collapsed .side-menu-items { display: grid; }

    body.ui-version-modern aside.ds-sidebar a[data-sidebar-item],
body.ui-version-modern aside.ds-sidebar.is-collapsed a[data-sidebar-item] {
        display: flex !important;
        height: auto !important;
        justify-content: flex-start;
        margin: 0 !important;
        max-width: none !important;
        min-height: 44px !important;
        padding: 9px !important;
        width: 100% !important;
    }

    body.ui-version-modern aside.ds-sidebar .side-nav-link-label,
body.ui-version-modern aside.ds-sidebar.is-collapsed .side-nav-link-label { display: inline; }

    body.ui-version-modern aside.ds-sidebar .ds-sidebar-footer { display: flex; padding: 7px 10px; }

    body.ui-version-modern aside.ds-sidebar .ds-sidebar-footer .side-nav-collapse { display: none; }

    body.ui-version-modern aside.ds-sidebar .sidebar-view-as .view-as-menu-panel {
        left: 8px !important;
        max-height: calc(100dvh - 76px);
        right: auto !important;
        top: 60px !important;
        width: calc(100% - 16px);
    }

}

@media (max-width: 480px) {
    body.ui-version-modern .topbar[data-ds-global-header] {
        gap: 4px;
        grid-template-areas:
            "mobile brand actions"
            "utilities utilities utilities";
        grid-template-columns: 40px 36px minmax(0, 1fr);
    }

    body.ui-version-modern .topbar[data-ds-global-header] > .brand { max-width: 36px; }

    body.ui-version-modern .topbar[data-ds-global-header] .brand-text { display: none; }

    body.ui-version-modern .topbar[data-ds-global-header] .global-header-utility-slot { justify-content: flex-start; }

}

/* Canonical inline expansion state ---------------------------------------
   Only content accordions and explicitly opted-in native details belong to
   this contract. Shell flyouts, menus, selects and dialogs stay outside it. */
body.ui-version-modern [data-ds-accordion] [data-ds-accordion-item]:not(tr),
body.ui-version-modern details[data-ds-content-disclosure] {
    border: 1px solid var(--ds-border);
    border-inline-start: 3px solid transparent;
    border-radius: var(--ds-radius-panel);
    box-sizing: border-box;
    overflow: clip;
}

body.ui-version-modern [data-ds-accordion] [data-ds-accordion-item]:not(tr, .permission-area) { border-block: 0; border-inline-end: 0; border-radius: 0; }

body.ui-version-modern [data-ds-accordion] [data-ds-accordion-item].is-open:not(tr),
body.ui-version-modern [data-ds-accordion] [data-ds-accordion-item]:has([data-ds-accordion-trigger][aria-expanded="true"]):not(tr),
body.ui-version-modern details[data-ds-content-disclosure][open] {
    border-inline-start-color: var(--ds-primary);
}

body.ui-version-modern [data-ds-accordion] [data-ds-accordion-trigger][aria-expanded="true"],
body.ui-version-modern details[data-ds-content-disclosure][open] > summary {
    background: var(--ds-surface-selected);
}

body.ui-version-modern [data-ds-accordion] .ds-accordion-panel,
body.ui-version-modern .ds-accordion-panel-content,
body.ui-version-modern .ds-content-disclosure-panel,
body.ui-version-modern details[data-ds-content-disclosure] {
    background: var(--ds-surface-subtle);
}

body.ui-version-modern [data-ds-accordion] .ds-accordion-panel:not(tr),
body.ui-version-modern .ds-accordion-panel-content,
body.ui-version-modern .ds-content-disclosure-panel {
    box-sizing: border-box;
    padding: 12px 14px 14px var(--ds-expanded-content-inline-offset);
}

body.ui-version-modern details[data-ds-content-disclosure] > summary {
    background: var(--ds-surface);
    cursor: pointer;
    min-width: 0;
    padding: 10px 12px;
}

body.ui-version-modern details[data-ds-content-disclosure] { padding: 0; }

body.ui-version-modern table details[data-ds-content-disclosure] {
    contain: inline-size;
    max-width: 100%;
    overflow-wrap: anywhere;
    width: 100%;
}

body.ui-version-modern [data-ds-accordion] [data-ds-accordion-trigger]:focus-visible,
body.ui-version-modern details[data-ds-content-disclosure] > summary:focus-visible {
    box-shadow: inset 0 0 0 3px var(--ds-focus);
    outline: 0;
    position: relative;
    z-index: 1;
}

body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item] > td:first-child {
    border-inline-start: 3px solid transparent;
    box-shadow: none;
}

body.ui-version-modern table[data-ds-accordion] tr.ds-accordion-panel > td:first-child {
    background: var(--ds-surface-subtle);
    border-inline-start: 3px solid transparent;
    box-shadow: none;
}

body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item].is-open > td,
body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item]:has([data-ds-accordion-trigger][aria-expanded="true"]) > td {
    background: var(--ds-surface-selected);
}

body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item].is-open > td:first-child,
body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item]:has([data-ds-accordion-trigger][aria-expanded="true"]) > td:first-child {
    border-inline-start-color: var(--ds-primary);
    box-shadow: none;
}

body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item].is-open + tr.ds-accordion-panel > td:first-child,
body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item]:has([data-ds-accordion-trigger][aria-expanded="true"]) + tr.ds-accordion-panel > td:first-child {
    border-inline-start-color: var(--ds-primary);
}

@media (max-width: 760px) {
    body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item],
body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item] + tr.ds-accordion-panel {
        border-inline-start: 3px solid transparent;
        box-sizing: border-box;
    }

    body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item].is-open,
body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item]:has([data-ds-accordion-trigger][aria-expanded="true"]),
body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item].is-open + tr.ds-accordion-panel,
body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item]:has([data-ds-accordion-trigger][aria-expanded="true"]) + tr.ds-accordion-panel {
        border-inline-start-color: var(--ds-primary);
    }

    body.ui-version-modern table[data-ds-accordion] tr[data-ds-accordion-item] > td:first-child,
body.ui-version-modern table[data-ds-accordion] tr.ds-accordion-panel > td:first-child {
        border-inline-start: 0;
    }

}

} /* @layer csq-canonical */
