/*
 * Compatibility and pre-design-system layer.
 *
 * Generic legacy selectors remain available for old Core/module markup, but
 * they can never outrank the canonical components in design-system.css.
 */
@layer csq-compatibility {

:root {
    color-scheme: light;
    --theme-light-bg: #f1f3f5;
    --theme-light-panel: #ffffff;
    --theme-light-text: #171a1f;
    --theme-light-muted: #4d5966;
    --theme-light-line: #bac3cd;
    --theme-nav-active-bg: #c91517;
    --theme-nav-active-text: #ffffff;
    --theme-nav-hover-bg: #fff4cc;
    --theme-nav-hover-text: #17191c;
    --theme-nav-inactive-bg: #ffffff;
    --theme-nav-inactive-text: #20242a;
    --theme-action-primary-bg: #1d4ed8;
    --theme-action-primary-text: #ffffff;
    --theme-action-secondary-bg: #f3f4f6;
    --theme-action-secondary-text: #17191c;
    --theme-action-success-bg: #087443;
    --theme-action-success-text: #ffffff;
    --theme-action-danger-bg: #b42318;
    --theme-action-danger-text: #ffffff;
    --theme-accent: #f4c400;
    --bg: var(--theme-light-bg);
    --panel: var(--theme-light-panel);
    --text: var(--theme-light-text);
    --muted: var(--theme-light-muted);
    --line: var(--theme-light-line);
    --nav-active-bg: var(--theme-nav-active-bg);
    --nav-active-text: var(--theme-nav-active-text);
    --nav-hover-bg: var(--theme-nav-hover-bg);
    --nav-hover-text: var(--theme-nav-hover-text);
    --nav-inactive-bg: var(--theme-nav-inactive-bg);
    --nav-inactive-text: var(--theme-nav-inactive-text);
    --action-primary-bg: var(--theme-action-primary-bg);
    --action-primary-text: var(--theme-action-primary-text);
    --action-secondary-bg: var(--theme-action-secondary-bg);
    --action-secondary-text: var(--theme-action-secondary-text);
    --action-success-bg: var(--theme-action-success-bg);
    --action-success-text: var(--theme-action-success-text);
    --action-danger-bg: var(--theme-action-danger-bg);
    --action-danger-text: var(--theme-action-danger-text);
    --primary: var(--action-primary-bg);
    --primary-dark: color-mix(in srgb, var(--action-primary-bg) 72%, #000000);
    --accent: var(--theme-accent);
    --danger: var(--action-danger-bg);
    --success: var(--action-success-bg);
    --chart-blue: #145cc5;
    --chart-green: #087443;
    --chart-red: #b42318;
    --chart-amber: #b65c00;
    --chart-violet: #7a3e9d;
    --chart-teal: #007a74;
    --chart-slate: #59636f;
    --surface-subtle: color-mix(in srgb, var(--panel) 95%, var(--text));
    --surface: var(--panel);
    --surface-soft: var(--surface-subtle);
    --input-bg: var(--panel);
    --disabled-bg: color-mix(in srgb, var(--panel) 82%, var(--text));
    --disabled-text: var(--muted);
    --warning: #8a6300;
    --soft-red: #fff0ef;
    --soft-yellow: #fff8d8;
    --info-soft: #eef2f7;
    --warning-soft: #fff8d8;
    --warning-text: #4d3b00;
    --danger-soft: #fff1f0;
    --success-soft: #edfff6;
}

* {
    box-sizing: border-box;
}

.visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

body {
    --bg: var(--theme-light-bg);
    --panel: var(--theme-light-panel);
    --text: var(--theme-light-text);
    --muted: var(--theme-light-muted);
    --line: var(--theme-light-line);
    --nav-active-bg: var(--theme-nav-active-bg);
    --nav-active-text: var(--theme-nav-active-text);
    --nav-hover-bg: var(--theme-nav-hover-bg);
    --nav-hover-text: var(--theme-nav-hover-text);
    --nav-inactive-bg: var(--theme-nav-inactive-bg);
    --nav-inactive-text: var(--theme-nav-inactive-text);
    --action-primary-bg: var(--theme-action-primary-bg);
    --action-primary-text: var(--theme-action-primary-text);
    --action-secondary-bg: var(--theme-action-secondary-bg);
    --action-secondary-text: var(--theme-action-secondary-text);
    --action-success-bg: var(--theme-action-success-bg);
    --action-success-text: var(--theme-action-success-text);
    --action-danger-bg: var(--theme-action-danger-bg);
    --action-danger-text: var(--theme-action-danger-text);
    --primary: var(--action-primary-bg);
    --primary-dark: color-mix(in srgb, var(--action-primary-bg) 72%, #000000);
    --accent: var(--theme-accent);
    --danger: var(--action-danger-bg);
    --success: var(--action-success-bg);
    --chart-blue: #145cc5;
    --chart-green: #087443;
    --chart-red: #b42318;
    --chart-amber: #b65c00;
    --chart-violet: #7a3e9d;
    --chart-teal: #007a74;
    --chart-slate: #59636f;
    --surface-subtle: color-mix(in srgb, var(--panel) 95%, var(--text));
    --surface: var(--panel);
    --surface-soft: var(--surface-subtle);
    --input-bg: var(--panel);
    --disabled-bg: color-mix(in srgb, var(--panel) 82%, var(--text));
    --disabled-text: var(--muted);
    background:
        linear-gradient(180deg, rgba(244, 196, 0, .12), transparent 260px),
        var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
}

body.theme-mode-light {
    color-scheme: light;
}

body.theme-mode-dark {
    color-scheme: dark;
    --bg: #111418;
    --panel: #1b2026;
    --text: #f2f4f7;
    --muted: #aab2bd;
    --line: #38414b;
    --surface-subtle: #242a31;
    --input-bg: #171b20;
    --disabled-bg: #303740;
    --disabled-text: #9aa4af;
    --nav-inactive-bg: #242a31;
    --nav-inactive-text: #e2e7ec;
    --nav-hover-bg: color-mix(in srgb, var(--nav-active-bg) 32%, #242a31);
    --nav-hover-text: #ffffff;
    --primary-dark: color-mix(in srgb, var(--action-primary-bg) 72%, #ffffff);
    --soft-red: #3a2021;
    --soft-yellow: #332f1d;
    --warning: #f0c75e;
    --info-soft: #27313b;
    --warning-soft: #37311c;
    --warning-text: #f1d77a;
    --danger-soft: #3a2021;
    --success-soft: #18352b;
}

@media (prefers-color-scheme: dark) {
    body.theme-mode-system {
        color-scheme: dark;
        --bg: #111418;
        --panel: #1b2026;
        --text: #f2f4f7;
        --muted: #aab2bd;
        --line: #38414b;
        --surface-subtle: #242a31;
        --input-bg: #171b20;
        --disabled-bg: #303740;
        --disabled-text: #9aa4af;
        --nav-inactive-bg: #242a31;
        --nav-inactive-text: #e2e7ec;
        --nav-hover-bg: color-mix(in srgb, var(--nav-active-bg) 32%, #242a31);
        --nav-hover-text: #ffffff;
        --primary-dark: color-mix(in srgb, var(--action-primary-bg) 72%, #ffffff);
        --soft-red: #3a2021;
        --soft-yellow: #332f1d;
        --warning: #f0c75e;
        --info-soft: #27313b;
        --warning-soft: #37311c;
        --warning-text: #f1d77a;
        --danger-soft: #3a2021;
        --success-soft: #18352b;
    }

}

body.theme-radius-sharp {
    --radius-ui: 0;
    --radius-card: 0;
}

body.theme-radius-normal {
    --radius-ui: 6px;
    --radius-card: 8px;
}

body.theme-radius-rounded {
    --radius-ui: 14px;
    --radius-card: 22px;
}

body.theme-density-compact {
    --space-page: 14px;
    --space-panel: 14px;
    --control-y: 6px;
    --grid-gap: 10px;
    --table-cell-y: 6px;
}

body.theme-density-normal {
    --space-page: 28px;
    --space-panel: 24px;
    --control-y: 10px;
    --grid-gap: 16px;
    --table-cell-y: 10px;
}

body.theme-density-comfortable {
    --space-page: 44px;
    --space-panel: 36px;
    --control-y: 14px;
    --grid-gap: 22px;
    --table-cell-y: 14px;
}

body.auth-has-bg {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, var(--auth-bg-overlay-start, .35)), rgba(246, 246, 244, var(--auth-bg-overlay-end, .49))),
        var(--auth-bg-image),
        var(--bg);
    background-attachment: fixed, fixed, scroll;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: cover, cover, auto;
}

body.theme-mode-dark.auth-has-bg {
    background:
        linear-gradient(180deg, rgba(17, 20, 24, var(--auth-bg-overlay-start, .35)), rgba(17, 20, 24, var(--auth-bg-overlay-end, .49))),
        var(--auth-bg-image),
        var(--bg);
}

@media (prefers-color-scheme: dark) {
    body.theme-mode-system.auth-has-bg {
        background:
            linear-gradient(180deg, rgba(17, 20, 24, var(--auth-bg-overlay-start, .35)), rgba(17, 20, 24, var(--auth-bg-overlay-end, .49))),
            var(--auth-bg-image),
            var(--bg);
    }

}

body.app-authenticated {
    height: auto;
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: clip;
    overflow-y: visible;
}

a {
    color: var(--primary);
}

.app-header {
    background: var(--panel);
    border-bottom: 3px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar {
    align-items: center;
    display: grid;
    gap: 20px;
    grid-template-columns: auto 1fr auto;
    min-height: 66px;
    padding: 10px 28px;
}

.brand {
    align-items: center;
    color: var(--text);
    display: flex;
    gap: 10px;
    text-decoration: none;
}

.brand img {
    height: 34px;
    object-fit: contain;
    width: auto;
}

.brand-text {
    display: grid;
    gap: 1px;
    line-height: 1.05;
}

.brand-text strong {
    color: var(--text);
    font-size: calc(20px * var(--ds-text-scale, 1));
    font-weight: 700;
}

.brand-text small {
    color: var(--muted);
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 600;
    letter-spacing: .02em;
}

.avatar,
.avatar-frame {
    aspect-ratio: 1;
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.avatar {
    object-fit: contain;
}

.avatar-frame {
    --avatar-x: 50%;
    --avatar-y: 50%;
    --avatar-size: 100%;
    --avatar-left: 0%;
    --avatar-top: 0%;
    display: inline-block;
    flex: 0 0 auto;
    overflow: hidden;
    position: relative;
    vertical-align: middle;
}

.avatar-frame .avatar-image {
    height: var(--avatar-size, 100%);
    left: var(--avatar-left, 0%);
    object-fit: contain;
    object-position: var(--avatar-x, 50%) var(--avatar-y, 50%);
    position: absolute;
    top: var(--avatar-top, 0%);
    width: var(--avatar-size, 100%);
}

.entity-avatar-frame {
    align-items: center;
    aspect-ratio: 1;
    background: var(--entity-color, var(--accent));
    border: 1px solid rgba(32, 33, 36, .15);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    justify-content: center;
    letter-spacing: .03em;
    overflow: hidden;
    position: relative;
    text-transform: uppercase;
    vertical-align: middle;
}

.entity-avatar-image {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.avatar-sm {
    height: 32px;
    width: 32px;
}

.avatar-xl {
    height: 80px;
    width: 80px;
}

.side-nav a.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.side-nav a.active:hover {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.top-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.auth-company-meta {
    display: grid;
    gap: 2px;
    justify-items: end;
    line-height: 1.2;
    text-align: right;
}

.auth-company-meta strong {
    font-size: calc(15px * var(--ds-text-scale, 1));
}

.auth-company-meta span {
    color: var(--muted);
    font-size: calc(13px * var(--ds-text-scale, 1));
}

.logout-form {
    margin: 0;
}

.profile-menu-list {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-ui, 6px);
    box-shadow: 0 14px 34px rgba(32, 33, 36, .18);
    display: grid;
    gap: 2px;
    min-width: 220px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 90;
}

.view-as-menu {
    width: 100%;
}

.view-as-menu > summary {
    background: linear-gradient(135deg, var(--surface-subtle), color-mix(in srgb, var(--surface-subtle) 76%, var(--nav-hover-bg)));
    border-color: var(--line);
    color: var(--text);
    gap: 10px;
    min-height: 52px;
    justify-content: space-between;
    padding: 8px 10px;
    width: 100%;
}

.view-as-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-as-icon {
    align-items: center;
    background: color-mix(in srgb, var(--nav-active-bg) 12%, var(--panel));
    border: 1px solid color-mix(in srgb, var(--nav-active-bg) 35%, var(--line));
    border-radius: 10px;
    color: var(--nav-active-bg);
    display: inline-flex;
    flex: 0 0 30px;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.view-as-icon svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 18px;
}

.view-as-menu > summary:hover,
.view-as-menu[open] > summary {
    background: color-mix(in srgb, var(--nav-hover-bg) 60%, var(--panel));
    border-color: color-mix(in srgb, var(--nav-active-bg) 45%, var(--line));
    color: var(--text);
}

.view-as-menu[open] > summary .view-as-icon {
    background: color-mix(in srgb, var(--nav-active-bg) 18%, var(--panel));
    border-color: var(--nav-active-bg);
}

.view-as-menu-list {
    left: 0;
    min-width: 100%;
    right: auto;
    padding: 7px;
}

.view-as-menu-list .view-as-option {
    justify-content: flex-start;
}

.view-as-option {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--text);
    display: flex;
    font-weight: 600;
    gap: 12px;
    justify-content: space-between;
    padding: 9px 10px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
}

.view-as-option:hover {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
    filter: none;
}

@media (hover: hover) and (pointer: fine) {
    .account-menu:hover > .profile-menu-list,
.account-menu:focus-within > .profile-menu-list {
        display: grid;
    }

}

.view-as-option.is-current {
    background: var(--surface-subtle);
    color: var(--text);
}

.view-as-option.is-current::after {
    color: var(--nav-active-bg);
    content: "✓";
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 900;
}

.empty-note {
    background: var(--surface-subtle);
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    padding: 14px;
}

.topbar a {
    background: var(--nav-inactive-bg);
    border-radius: var(--radius-ui, 6px);
    color: var(--nav-inactive-text);
    padding: 7px 9px;
    text-decoration: none;
}

.topbar a:hover {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

.topbar a.active:hover {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.app-shell {
    display: grid;
    flex: 1;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 0;
    width: 100%;
}

/* Preferences are applied in the document head so the first paint matches the saved layout. */
html.side-nav-collapsed .app-shell {
    grid-template-columns: 48px minmax(0, 1fr);
}

html.side-nav-collapsed .side-nav {
    overflow: visible;
    padding-left: 6px;
    padding-right: 6px;
}

html.side-nav-collapsed .side-nav .module-switcher-current-label,
html.side-nav-collapsed .side-nav .critical-alerts-label,
html.side-nav-collapsed .side-nav-section-label,
html.side-nav-collapsed .side-menu-toggle,
html.side-nav-collapsed .side-nav-link-label {
    display: none;
}

html.side-nav-collapsed .side-nav .view-as-menu > summary,
html.side-nav-collapsed .side-title,
html.side-nav-collapsed .side-menu-summary,
html.side-nav-collapsed .side-nav a {
    justify-content: center;
}

html.side-nav-collapsed .side-nav .view-as-menu > summary,
html.side-nav-collapsed .side-nav a {
    padding-left: 6px;
    padding-right: 6px;
}

html.side-nav-collapsed .side-nav .view-as-menu > summary::after {
    display: none;
}

html.side-nav-collapsed .side-title {
    padding-left: 4px;
    padding-right: 4px;
}

html.side-nav-collapsed .side-nav-link-icon,
html.side-nav-collapsed .side-nav-section-icon {
    flex-basis: 20px;
}

.app-shell.is-side-nav-collapsed {
    grid-template-columns: 48px minmax(0, 1fr);
}

.side-nav {
    background: var(--panel);
    border-right: 1px solid var(--line);
    min-height: 0;
    overflow-y: auto;
    padding: 18px 14px;
    position: relative;
    z-index: 30;
}

.side-nav-collapse {
    align-items: center;
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    padding: 0;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
    width: 28px;
}

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

.side-nav-collapse svg {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 16px;
}

.side-nav-content {
    min-width: 0;
}

.side-nav-section-icon,
.side-nav-link-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 18px;
    justify-content: center;
}

.side-nav-section-icon svg,
.side-nav-link-icon svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 17px;
}

.app-content-scroll {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    overflow-x: clip;
    overflow-y: visible;
}

.maintenance-state-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 10px;
    min-width: 0;
}

.maintenance-state-summary .field-help {
    flex: 1 1 320px;
    min-width: 0;
}

[data-maintenance-warning] {
    min-width: 0;
}

.side-section {
    display: grid;
    gap: 6px;
    margin-bottom: 22px;
}

.side-title {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--nav-active-bg);
    display: flex;
    gap: 8px;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 800;
    letter-spacing: .04em;
    margin: 8px 0 2px;
    padding: 14px 10px 6px;
    text-transform: uppercase;
}

.side-menu-summary {
    cursor: pointer;
    justify-content: flex-start;
    list-style: none;
    user-select: none;
}

.side-menu-summary .side-nav-section-label {
    flex: 1 1 auto;
    min-width: 0;
}

.side-menu-group {
    display: block;
}

.side-menu-items {
    display: grid;
    gap: 6px;
}

.side-menu-summary::-webkit-details-marker {
    display: none;
}

.side-menu-group:not([open]) > :not(summary) {
    display: none;
}

.side-section:first-child .side-title {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.side-nav a {
    align-items: center;
    background: var(--nav-inactive-bg);
    border-radius: var(--radius-ui, 6px);
    color: var(--nav-inactive-text);
    display: flex;
    gap: 8px;
    padding: 9px 10px;
    text-decoration: none;
}

.side-nav a:hover {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

.side-nav a.active:hover {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.side-nav.is-collapsed {
    overflow: visible;
    padding-left: 6px;
    padding-right: 6px;
}

.side-nav.is-collapsed .module-switcher-current-label,
.side-nav.is-collapsed .critical-alerts-label,
.side-nav.is-collapsed .side-nav-section-label,
.side-nav.is-collapsed .side-menu-toggle,
.side-nav.is-collapsed .side-nav-link-label {
    display: none;
}

.side-nav.is-collapsed .side-nav-collapse svg {
    transform: rotate(180deg);
}

.side-nav.is-collapsed .view-as-menu > summary {
    justify-content: center;
    padding-left: 6px;
    padding-right: 6px;
}

.side-nav.is-collapsed .view-as-menu > summary::after {
    display: none;
}

.side-nav.is-collapsed .side-title {
    justify-content: center;
    padding-left: 4px;
    padding-right: 4px;
}

.side-nav.is-collapsed .side-menu-summary {
    justify-content: center;
}

.side-nav.is-collapsed .side-nav a {
    justify-content: center;
    padding-left: 6px;
    padding-right: 6px;
}

.side-nav.is-collapsed .side-nav-link-icon,
.side-nav.is-collapsed .side-nav-section-icon {
    flex-basis: 20px;
}

.page {
    flex: 1;
    margin: 0;
    max-width: none;
    padding: var(--space-page, 28px);
    min-width: 0;
}

body.theme-width-contained .page {
    margin-left: auto;
    margin-right: auto;
    max-width: 1180px;
    width: 100%;
}

body.theme-width-wide .page {
    max-width: 1480px;
    width: 100%;
}

body.theme-width-full .page {
    max-width: none;
    width: 100%;
}

.auth-page {
    align-items: center;
    display: flex;
    justify-content: center;
    margin: 0 auto;
    max-width: 1180px;
    width: 100%;
}

.auth-panel,
.panel,
.grid-cards article {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-card, 8px);
    box-shadow: 0 10px 24px rgba(32, 33, 36, .06);
}

.auth-panel,
.panel {
    padding: var(--space-panel, 24px);
    margin-bottom: 18px;
}

.auth-panel {
    margin: 40px auto;
    max-width: 760px;
    width: 100%;
}

.auth-page > .auth-panel {
    margin: 40px 0;
}

body.auth-has-bg .auth-panel {
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: blur(4px);
}

.narrow {
    max-width: 520px;
}

.page-title {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
}

.page-title h1 {
    font-size: calc(24px * var(--ds-text-scale, 1));
    line-height: 1.2;
    margin: 0;
}

.page-title h2 {
    font-size: calc(24px * var(--ds-text-scale, 1));
    line-height: 1.2;
    margin: 0;
}

.profile-form {
    display: grid;
    gap: 0;
}

.profile-tabs-panel {
    padding-top: 16px;
}

.profile-tabs {
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 6px;
    margin: -4px -4px 16px;
    overflow-x: auto;
    padding: 0 4px;
}

.profile-tab {
    background: var(--nav-inactive-bg);
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: var(--nav-inactive-text);
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 12px;
}

.profile-tab:hover {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

.profile-tab.is-active {
    background: var(--nav-active-bg);
    border-bottom-color: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.profile-tab.is-active:hover {
    background: var(--nav-active-bg);
    border-bottom-color: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.profile-tab-panel {
    display: none;
}

.profile-tab-panel.is-active {
    display: block;
}

.settings-tabs {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-card, 8px);
    flex-wrap: wrap;
    margin: 2px 0 14px;
    overflow: visible;
    padding: 4px;
}

.settings-panel {
    max-width: none;
    width: 100%;
}

.settings-shell {
    padding: 14px;
}

.settings-shell > h1 {
    display: none;
}

.settings-shell .settings-tabs {
    margin: 0 0 6px;
    padding: 3px;
}

.settings-subpage {
    padding: 14px;
}

.settings-subpage > h1 {
    display: none;
}

.settings-subpage > .settings-top-nav {
    margin: 0 0 6px;
    padding: 3px;
}

.settings-subpage > .page-title {
    margin: 0 0 6px;
}

.settings-subpage > .page-title h2 {
    font-size: calc(22px * var(--ds-text-scale, 1));
    line-height: 1.15;
}

.settings-tabs-panel {
    padding-top: 0;
}

.settings-tabs-panel h2:first-child {
    margin-top: 0;
}

.settings-tabs .profile-tab {
    background: var(--nav-inactive-bg);
    border: 0;
    border-radius: var(--radius-ui, 6px);
    font-weight: 700;
    min-height: 36px;
    padding: 7px 12px;
    color: var(--nav-inactive-text);
    text-decoration: none;
}

.settings-tabs .profile-tab:hover {
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

.settings-top-nav {
    margin-bottom: 10px;
}

.settings-tabs .profile-tab.is-active {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.settings-tabs .profile-tab.is-active:hover {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
}

.settings-tabs-panel .profile-tab-panel.is-active {
    display: grid;
    gap: var(--grid-gap, 16px);
    min-width: 0;
}

.settings-tabs-panel h2 {
    font-size: calc(22px * var(--ds-text-scale, 1));
    margin: 0 0 2px;
}

.settings-savebar {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 10px;
    padding: 10px;
}

.settings-panel form[data-active-tab="settings-access"] .settings-savebar {
    display: none;
}

.settings-savebar .action-with-help {
    justify-self: end;
}

.settings-two-column {
    align-items: start;
    display: grid;
    gap: var(--grid-gap, 18px);
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr);
}

.settings-panel label {
    gap: 5px;
}

.settings-panel input,
.settings-panel select,
.settings-panel textarea {
    padding: 8px 10px;
}

.settings-mail-notifications {
    border-top: 1px solid var(--line);
    margin-top: 22px;
    padding-top: 18px;
}

.settings-mail-notifications h3 {
    margin: 0 0 4px;
}

.security-throttle-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.settings-company-details {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.settings-company-details label:last-child {
    grid-column: span 2;
}

.compact-text {
    margin: -2px 0 4px;
}

.settings-color-grid {
    display: grid;
    gap: var(--grid-gap, 16px);
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.settings-media-policy-matrix-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius-card, 8px);
    contain: paint;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.settings-media-policy-matrix {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.settings-media-policy-matrix th,
.settings-media-policy-matrix td {
    border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

.settings-media-policy-matrix thead th {
    background: color-mix(in srgb, var(--surface-subtle) 70%, var(--surface));
    color: var(--text-strong, var(--text));
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
}

.settings-media-policy-matrix thead th:nth-child(1) { width: 24%; }

.settings-media-policy-matrix thead th:nth-child(2) { width: 12%; }

.settings-media-policy-matrix thead th:nth-child(3) { width: 15%; }

.settings-media-policy-matrix thead th:nth-child(4) { width: 19%; }

.settings-media-policy-matrix thead th:nth-child(5) { width: 16%; }

.settings-media-policy-matrix thead th:nth-child(6) { width: 14%; }

.settings-media-policy-matrix tbody tr:last-child th,
.settings-media-policy-matrix tbody tr:last-child td {
    border-bottom: 0;
}

.settings-media-policy-matrix tbody th {
    color: var(--text-strong, var(--text));
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 700;
}

.settings-media-policy-matrix tbody tr:hover {
    background: color-mix(in srgb, var(--surface-subtle) 46%, transparent);
}

.settings-media-policy-description,
.settings-media-policy-unit {
    color: var(--muted, var(--text-muted));
    display: block;
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 400;
    line-height: 1.35;
    margin-top: 3px;
}

.settings-media-policy-control,
.settings-media-policy-size label {
    display: block;
    margin: 0;
}

.settings-media-policy-matrix input,
.settings-media-policy-matrix select {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
}

.settings-media-policy-size {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
}

.settings-media-policy-size .settings-media-policy-unit {
    margin: 0;
}

.settings-color-grid label,
.settings-style-grid label {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-card, 8px);
    padding: 12px;
}

.settings-style-heading {
    font-size: calc(18px * var(--ds-text-scale, 1));
    margin: 12px 0 0;
}

.settings-account-options {
    display: grid;
    gap: var(--grid-gap, 16px);
    grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.settings-account-options .check-card {
    align-items: flex-start;
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-card, 8px);
    display: flex;
    gap: 10px;
    padding: 12px;
}

.settings-account-invite-title {
    display: block;
}

.settings-account-validity {
    display: grid;
    gap: 5px;
    margin-top: 8px;
}

.settings-account-validity label {
    font-size: calc(13px * var(--ds-text-scale, 1));
}

.settings-account-validity select {
    width: 100%;
}

.settings-account-options .check-card > input {
    flex: 0 0 auto;
    margin-top: 3px;
    width: auto;
}

.settings-account-options .check-card > span {
    display: grid;
    gap: 3px;
}

.notification-module-grid {
    display: grid;
    gap: var(--grid-gap, 16px);
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.notification-module-card {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-card, 8px);
    display: grid;
    gap: 12px;
    padding: 16px;
}

.notification-module-toggle {
    align-items: center;
    display: flex;
    gap: 9px;
}

.notification-module-toggle input {
    width: auto;
}

.notification-preferences-group {
    display: grid;
    gap: 6px;
}

.notification-preferences-group + .notification-preferences-group {
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 12px;
}

.notification-preferences-group h3 {
    color: var(--muted);
    font-size: calc(12px * var(--ds-text-scale, 1));
    letter-spacing: .06em;
    margin: 0;
    text-transform: uppercase;
}

.module-upload-form {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: var(--radius-card, 8px);
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
}

.module-upload-dropzone {
    align-items: center;
    background: var(--panel);
    border: 2px dashed var(--line);
    border-radius: var(--radius-card, 8px);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 7px;
    justify-content: center;
    min-height: 180px;
    padding: 22px;
    text-align: center;
    transition: background 160ms ease, border-color 160ms ease;
}

.module-upload-dropzone.is-dragging,
.module-upload-dropzone:hover {
    background: var(--soft-yellow);
    border-color: var(--accent);
}

.module-upload-dropzone input[type="file"] {
    height: 1px;
    left: 0;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    width: 1px;
}

.module-upload-dropzone:focus-within {
    outline: 3px solid rgba(244, 196, 0, .45);
    outline-offset: 2px;
}

.module-upload-title {
    font-size: calc(19px * var(--ds-text-scale, 1));
    font-weight: 900;
}

.module-upload-or,
.module-upload-file,
.module-upload-notes {
    color: var(--muted);
    font-size: calc(13px * var(--ds-text-scale, 1));
}

.module-file-button {
    pointer-events: none;
}

.module-upload-file.has-file {
    color: var(--success);
    font-weight: 800;
}

.module-upload-notes {
    display: grid;
    gap: 3px;
}

.module-upload-notes code {
    background: var(--info-soft);
    border-radius: 5px;
    padding: 2px 5px;
}

.module-list-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.module-list-heading h2 {
    margin: 0;
}

.settings-color-grid label {
    align-content: space-between;
    min-height: 118px;
}

.settings-color-grid .label-title {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    line-height: 1.25;
    min-height: 40px;
}

.settings-color-grid .label-title .help-trigger {
    flex: 0 0 auto;
    margin-left: auto;
    transform: none;
}

.settings-color-grid input[type="color"] {
    cursor: pointer;
    height: 44px;
    padding: 3px;
    width: 100%;
}

.settings-style-grid {
    display: grid;
    gap: var(--grid-gap, 16px);
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.settings-smtp-grid {
    display: grid;
    gap: var(--grid-gap, 16px);
    grid-template-columns: minmax(220px, 2fr) minmax(100px, .65fr) minmax(150px, 1fr) minmax(220px, 1.4fr) minmax(220px, 1.4fr);
}

.settings-test-row {
    align-items: end;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(260px, 1fr) auto;
    padding-top: 12px;
}

.settings-test-row button {
    min-height: 40px;
    min-width: 150px;
}

.avatar-editor-grid {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(120px, 160px) 1fr;
}

.avatar-preview-box {
    align-items: center;
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 14px;
}

.avatar-preview-box > span:not(.avatar-frame) {
    color: var(--muted);
    font-size: calc(12px * var(--ds-text-scale, 1));
    text-align: center;
}

.avatar-controls {
    display: grid;
    gap: 8px;
}

.avatar-controls:focus,
.avatar-controls.is-dragging {
    outline: 3px solid rgba(244, 196, 0, .22);
    outline-offset: 4px;
}

.avatar-actions {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar-paste-target {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: calc(13px * var(--ds-text-scale, 1));
    height: 32px;
    justify-content: center;
    line-height: 1;
    min-height: 32px;
    padding: 4px 12px;
}

.avatar-paste-status {
    color: var(--muted);
    flex: 1 1 180px;
    font-size: calc(12px * var(--ds-text-scale, 1));
    line-height: 1.25;
    min-width: 160px;
}

.avatar-paste-status.is-error {
    color: var(--danger);
    font-weight: 700;
}

.avatar-paste-status.is-ok {
    color: #0f7b3b;
    font-weight: 700;
}

.compact-sliders {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    max-width: 560px;
}

.compact-sliders label {
    color: var(--muted);
    font-size: calc(13px * var(--ds-text-scale, 1));
    gap: 6px;
}

.compact-sliders input[type="range"] {
    min-height: 0;
    padding: 0;
}

.check-row {
    align-items: center;
    display: inline-flex;
    font-weight: 500;
    gap: 8px;
    justify-self: start;
}

.check-row input {
    width: auto;
}

.notification-template-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.logo-remove-row {
    margin-top: 10px;
}

.range-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
}

.range-row output {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 700;
    min-width: 56px;
    padding: 5px 10px;
    text-align: center;
}

.form-actions {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 18px;
}

.info-item {
    align-items: baseline;
    display: inline-flex;
    gap: 5px;
}

.info-item > span {
    color: var(--muted);
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 700;
    text-transform: uppercase;
}

.info-item strong {
    color: var(--text);
    font-size: calc(14px * var(--ds-text-scale, 1));
}

.security-review-panel {
    border-left: 4px solid var(--danger);
}

.security-review-item {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 0 0;
}

.security-review-item strong {
    color: var(--danger);
}

.security-review-item p {
    color: var(--muted);
    margin: 3px 0 0;
}

.app-footer {
    background: var(--surface-subtle);
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: grid;
    font-size: calc(13px * var(--ds-text-scale, 1));
    gap: 6px;
    padding: 12px 28px;
}

.app-footer strong {
    color: var(--text);
}

.app-footer a {
    color: var(--muted);
}

.footer-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    min-width: 0;
}

.footer-company-row,
.footer-contact-row {
    justify-content: flex-start;
}

.footer-contact-value {
    align-items: flex-start;
    display: inline-flex;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
}

.footer-contact-icon {
    display: inline-flex;
    flex: 0 0 auto;
    margin-top: 1px;
}

.footer-contact-icon svg {
    fill: none;
    height: 14px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 14px;
}

.footer-contact-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.footer-platform-row {
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: calc(12px * var(--ds-text-scale, 1));
    gap: 8px 18px;
    justify-content: flex-end;
    padding-top: 6px;
}

.footer-platform-separator {
    color: var(--line-strong);
    font-weight: 700;
}

.footer-distribution {
    font-weight: 700;
}

.footer-powered {
    align-items: center;
    color: #8a8f94;
    display: inline-flex;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.footer-powered img {
    height: 18px;
    object-fit: contain;
    width: auto;
}

.footer-powered strong {
    color: #62676c;
}

.eyebrow {
    color: var(--primary-dark);
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

.grid-cards {
    display: grid;
    gap: var(--grid-gap, 16px);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 16px;
}

.grid-cards article {
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.grid-cards article .button {
    align-self: flex-start;
    margin-top: auto;
}

@media (max-width: 1500px) {

}

@media (max-width: 1180px) {

}

@media (max-width: 900px) {

}

@media (max-width: 640px) {

}

.entity-card-action {
    background: transparent;
    border: 0;
    color: var(--action-primary-bg);
    cursor: pointer;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 800;
    margin-top: 9px;
    padding: 0;
    text-align: left;
}

.entity-card-action:hover {
    color: var(--nav-active-bg);
    text-decoration: underline;
}

.icon-button {
    align-items: center;
    display: inline-flex;
    font-size: calc(16px * var(--ds-text-scale, 1));
    height: 32px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.icon-button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.custom-record-meta-fields {
    display: contents;
}

.custom-record-modal-actions {
    margin-top: 14px;
}

.form-grid {
    display: grid;
    gap: var(--grid-gap, 16px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.align-end {
    align-items: end;
}

.form-grid.align-end button {
    min-height: 44px;
}

.form-stack {
    display: grid;
    gap: 16px;
}

.export-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.export-actions > span {
    color: var(--muted);
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 700;
}

.admin-list-controls {
    justify-content: flex-start;
}

.inline-filter-form {
    margin: 0;
}

.inline-filter-form label {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 700;
    gap: 6px;
    margin: 0;
}

.inline-filter-form select {
    min-height: 32px;
    padding: 4px 28px 4px 10px;
}

.audit-log-results,
.audit-log-table-wrap {
    min-width: 0;
    max-width: 100%;
}

.audit-log-pagination {
    min-height: 30px;
}

.audit-log-pagination .pagination {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin: 0;
    min-height: 30px;
}

.audit-log-pagination .pagination .button {
    box-sizing: border-box;
    font-size: calc(13px * var(--ds-text-scale, 1));
    line-height: 1.2;
    min-height: 30px;
    padding: 5px 10px;
    white-space: nowrap;
}

.audit-log-pagination-bottom {
    border-top: 1px solid var(--border);
    margin-top: 14px;
    padding-top: 12px;
}

.audit-log-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.audit-log-table .audit-col-time { width: 12%; }

.audit-log-table .audit-col-severity { width: 12%; }

.audit-log-table .audit-col-event { width: 14%; }

.audit-log-table .audit-col-entity { width: 12%; }

.audit-log-table .audit-col-actor { width: 13%; }

.audit-log-table .audit-col-target { width: 12%; }

.audit-log-table .audit-col-details { width: 17%; }

.audit-log-table .audit-col-ip { width: 8%; }

.audit-log-table th,
.audit-log-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 1100px) {

}

@media (max-width: 640px) {

}

.date-time-control {
    align-items: stretch;
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    width: 240px;
}

.date-time-control input[type="date"],
.date-time-control input[type="datetime-local"],
.date-time-control input[type="time"] {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.date-time-picker-button {
    align-items: center;
    align-self: stretch;
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-left: 0;
    border-radius: 0 var(--radius-ui, 6px) var(--radius-ui, 6px) 0;
    color: var(--text);
    display: inline-flex;
    flex: 0 0 34px;
    justify-content: center;
    min-height: 0;
    padding: 0;
}

.date-time-control input[type="date"],
.date-time-control input[type="datetime-local"],
.date-time-control input[type="time"] {
    border-radius: var(--radius-ui, 6px) 0 0 var(--radius-ui, 6px);
}

.date-time-picker-button:hover,
.date-time-picker-button:focus-visible {
    background: color-mix(in srgb, var(--action-primary-bg) 10%, var(--input-bg));
    border-color: var(--action-primary-bg);
    color: var(--action-primary-bg);
    outline: none;
}

.date-time-picker-button:disabled,
fieldset[disabled] .date-time-picker-button {
    cursor: not-allowed;
    opacity: .55;
}

.date-time-picker-button::before {
    background: currentColor;
    content: "";
    display: block;
    height: 16px;
    width: 16px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 3v4m10-4v4M4 10h16M6 5h12a2 2 0 0 1 2 2v13H4V7a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 3v4m10-4v4M4 10h16M6 5h12a2 2 0 0 1 2 2v13H4V7a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.date-time-picker-button[data-picker-type="time"]::before,
.date-time-picker-button[data-picker-type="datetime-local"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 7v5l3 2' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 7v5l3 2' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
}

.date-time-control input[type="date"]::-webkit-calendar-picker-indicator,
.date-time-control input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.date-time-control input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0;
}

.compact-button {
    min-height: 32px;
    padding: 4px 10px;
}

.page-actions-compact {
    border-top: 0;
    justify-content: flex-start;
    margin-bottom: 14px;
    padding-top: 0;
}

.dialog-close {
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    font-size: calc(22px * var(--ds-text-scale, 1));
    line-height: 1;
}

.section-kicker {
    color: var(--muted);
    font-size: calc(.86rem * var(--ds-text-scale, 1));
    letter-spacing: .02em;
    margin: 14px 0 8px;
    text-transform: uppercase;
}

.access-page {
    max-width: none;
}

.function-access-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 18px;
    overflow: hidden;
    scroll-margin-top: 150px;
}

.function-access-form > .form-actions {
    display: none;
}

.settings-content {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.access-note {
    background: var(--warning-soft);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--warning-text);
    margin-bottom: 14px;
    padding: 10px 12px;
}

.list-heading {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: -4px 0 12px;
    padding-bottom: 12px;
}

.list-heading h1,
.list-heading h2 {
    font-size: calc(24px * var(--ds-text-scale, 1));
    line-height: 1.2;
    margin: 0;
}

.heading-inline {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.list-panel > .heading-inline {
    margin-bottom: 8px;
}

.inline-alert {
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 800;
    line-height: 1.2;
    padding: 4px 9px;
}

.inline-alert.error {
    background: var(--danger-soft);
    border-color: #f3b6b3;
    color: var(--danger);
}

.inline-alert.warning {
    background: var(--soft-yellow);
    border-color: var(--accent);
    color: var(--warning);
}

.list-stats {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.compact-admin-table {
    font-size: calc(14px * var(--ds-text-scale, 1));
    min-width: 1080px;
}

.compact-admin-table th,
.compact-admin-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

.compact-admin-table code {
    padding: 2px 6px;
}

.access-level-section-row td {
    background: var(--soft-yellow);
    border-bottom: 1px solid rgba(229, 191, 27, .7);
    color: var(--warning);
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 800;
    letter-spacing: .03em;
    padding: 7px 10px;
    text-transform: uppercase;
}

.access-level-sort-actions {
    display: inline-flex;
    gap: 4px;
}

.access-level-sort-actions button {
    align-items: center;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    min-height: 32px;
    padding: 4px;
    width: 32px;
}

.access-level-sort-actions button:disabled {
    cursor: default;
    opacity: .35;
}

.navigation-editor {
    align-items: start;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.navigation-module-list {
    min-width: 0;
    overflow: visible;
    width: 100%;
}

.navigation-module-list .navigation-list-help {
    flex-basis: 100%;
}

.navigation-module-list .navigation-list-help {
    margin: -2px 0 2px;
    padding: 0;
}

.navigation-list-help {
    color: var(--muted);
    font-size: calc(.86rem * var(--ds-text-scale, 1));
    line-height: 1.4;
    margin: 0;
    padding: 0 12px 10px;
}

.navigation-detail {
    min-width: 0;
    width: 100%;
}

.navigation-group-heading {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.navigation-group-heading h3 {
    margin: 0;
}

.navigation-order-context {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.navigation-order-context:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.navigation-order-context h4 {
    margin: 16px 0 8px;
}

/* Every navigation group uses the same column grid, even when its labels differ. */
.navigation-order-table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.navigation-order-table code {
    overflow-wrap: anywhere;
    white-space: normal;
}

.navigation-order-table th:first-child,
.navigation-order-table td:first-child {
    width: 38%;
}

.navigation-order-table th:nth-child(2),
.navigation-order-table td:nth-child(2) {
    width: 52%;
}

.navigation-order-table th:last-child,
.navigation-order-table td:last-child {
    width: 10%;
}

.row-edit summary {
    border-radius: 6px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 800;
    padding: 4px 6px;
}

.row-edit[open] {
    position: fixed;
    z-index: 1000;
    top: 50%;
    left: 50%;
    width: min(900px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--panel);
    border: 1px solid var(--accent);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(32, 33, 36, .22), 0 0 0 100vmax rgba(32, 33, 36, .34);
    display: block;
    margin: 0;
    padding: 6px 8px 8px;
    transform: translate(-50%, -50%);
}

.row-edit[open] > summary {
    background: transparent;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.entity-edit-heading {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 8px;
    padding: 4px 0 12px;
}

.entity-edit-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.entity-edit-identity strong {
    font-size: calc(17px * var(--ds-text-scale, 1));
}

.entity-edit-identity span {
    color: var(--muted);
    font-size: calc(12px * var(--ds-text-scale, 1));
    overflow-wrap: anywhere;
}

.entity-edit-reference {
    color: var(--muted);
    display: grid;
    gap: 2px;
    text-align: right;
}

.entity-edit-reference span {
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.entity-edit-reference strong {
    color: var(--text);
    font-size: calc(12px * var(--ds-text-scale, 1));
}

.entity-edit-color {
    background: var(--entity-color, var(--accent));
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 50%;
    display: block;
    height: 42px;
    width: 42px;
}

@media (min-width: 900px) {

    .row-edit[open] {
        max-height: none;
        overflow-y: visible;
    }

}

@media (max-width: 899px) {
    .row-edit[open] {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

}

@media (max-width: 640px) {
    .entity-edit-heading {
        align-items: start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .entity-edit-reference {
        grid-column: 2;
        text-align: left;
    }

}
.row-form-actions {
    align-items: end;
    display: flex;
    gap: 8px;
}

.row-form-actions button {
    white-space: nowrap;
}

.compact-button {
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    font-size: calc(0.9rem * var(--ds-text-scale, 1));
}

.media-table {
    min-width: 1120px;
}

.media-thumb {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 54px;
    object-fit: contain;
    width: 54px;
}

.media-file-icon {
    align-items: center;
    background: var(--soft-yellow);
    border: 1px solid var(--accent);
    border-radius: 8px;
    display: inline-flex;
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 800;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.maintenance-admin-banner {
    align-items: center;
    background: var(--warning-soft);
    border-bottom: 2px solid var(--accent);
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 8px 16px;
}

.maintenance-admin-banner.is-expired {
    background: var(--danger-soft);
    border-bottom-color: var(--primary);
}

.maintenance-admin-banner strong {
    color: var(--primary);
}

.maintenance-admin-banner span,
.maintenance-admin-banner small {
    color: var(--muted);
}

.maintenance-admin-banner a {
    color: var(--primary);
    font-weight: 700;
    margin-left: auto;
}

.media-path {
    display: block;
    margin-top: 5px;
    max-width: 360px;
    white-space: normal;
    word-break: break-all;
}

.media-usage-list {
    display: grid;
    gap: 3px;
    margin-top: 6px;
}

.media-usage-list small {
    color: var(--muted);
}

.media-delete {
    min-width: 160px;
}

.system-doc-content {
    display: grid;
    gap: 12px;
}

.system-doc-content > h1 {
    display: none;
}

.system-doc-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 16px 18px;
}

.system-doc-section h2 {
    font-size: calc(20px * var(--ds-text-scale, 1));
    margin: 0 0 8px;
}

.system-doc-section h3 {
    color: var(--primary-dark);
    font-size: calc(13px * var(--ds-text-scale, 1));
    letter-spacing: .04em;
    margin: 14px 0 6px;
    text-transform: uppercase;
}

.system-doc-section p {
    margin: 6px 0;
}

.system-doc-section ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.list-panel {
    padding: 0;
}

.sort-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.view-controls {
    margin-left: 8px;
}

.sort-controls > span {
    color: var(--muted);
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 700;
}

.sort-controls a {
    background: var(--surface-subtle);
    border: 1px solid color-mix(in srgb, var(--line) 78%, var(--panel));
    border-radius: 999px;
    color: var(--muted);
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 600;
    padding: 5px 10px;
    text-decoration: none;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.sort-controls a:hover {
    background: var(--panel);
    border-color: color-mix(in srgb, var(--muted) 45%, var(--line));
    color: var(--text);
}

.sort-controls a.active {
    background: var(--panel);
    border-color: color-mix(in srgb, var(--action-primary-bg) 42%, var(--line));
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--action-primary-bg) 62%, var(--line));
    color: var(--text);
    font-weight: 700;
}

.sort-controls a.active:hover {
    background: var(--panel);
    border-color: color-mix(in srgb, var(--action-primary-bg) 54%, var(--line));
    color: var(--text);
}

body.theme-density-compact .panel {
    margin-bottom: 10px;
}

body.theme-density-compact .page-title {
    margin-bottom: 8px;
}

body.theme-density-compact .page-title h1 {
    font-size: calc(20px * var(--ds-text-scale, 1));
}

body.theme-density-compact .admin-list-controls {
    gap: 8px 14px;
    padding: 6px 10px;
}

body.theme-density-compact .list-heading {
    gap: 6px;
    margin: -4px 0 6px;
    padding-bottom: 6px;
}

body.theme-density-compact .list-heading h1,
body.theme-density-compact .list-heading h2 {
    font-size: calc(18px * var(--ds-text-scale, 1));
}

body.theme-density-compact .inline-alert {
    font-size: calc(11px * var(--ds-text-scale, 1));
    padding: 3px 8px;
}

body.theme-density-compact .list-stats {
    gap: 4px;
}

body.theme-density-compact .sort-controls {
    gap: 4px;
}

body.theme-density-compact .sort-controls > span,
body.theme-density-compact .inline-filter-form label {
    font-size: calc(12px * var(--ds-text-scale, 1));
}

body.theme-density-compact .sort-controls a {
    font-size: calc(12px * var(--ds-text-scale, 1));
    padding: 3px 8px;
}

body.theme-density-compact .inline-filter-form select {
    min-height: 28px;
    padding-bottom: 3px;
    padding-top: 3px;
}

body.theme-density-compact .compact-admin-table {
    font-size: calc(13px * var(--ds-text-scale, 1));
}

body.theme-density-compact .compact-admin-table th,
body.theme-density-compact .compact-admin-table td {
    padding-bottom: 5px;
    padding-top: 5px;
}

.sort-link {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.sort-link.active,
.sort-link:hover {
    color: var(--primary-dark);
}

.sort-link.active:hover {
    color: var(--primary-dark);
}

.wide {
    grid-column: 1 / -1;
}

label {
    color: var(--text);
    display: grid;
    font-weight: 700;
    gap: 6px;
}

.label-title {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.label-inline-control {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.label-inline-control input[type="checkbox"],
.label-inline-control input[type="radio"] {
    flex: 0 0 auto;
}

.action-with-help {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-self: start;
}

.action-with-help.wide {
    grid-column: 1 / -1;
}

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

.help-box {
    background: var(--soft-yellow);
    border: 1px solid var(--accent);
    border-radius: 8px;
    margin: 16px 0;
    padding: 16px;
}

.help-box h2 {
    margin-top: 0;
}

.helper {
    background: var(--surface-subtle);
    border-left: 4px solid var(--accent);
    margin: 12px 0 18px;
    padding: 10px 12px;
}

.button-help {
    display: block;
    margin: -4px 0 4px;
}

.help-trigger {
    align-items: center;
    background: var(--soft-yellow);
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--warning);
    cursor: help;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0;
    font-weight: 700;
    height: 22px;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0;
    position: relative;
    vertical-align: middle;
    width: 22px;
    z-index: 3;
}

.help-trigger::before {
    content: "?";
    font-size: calc(13px * var(--ds-text-scale, 1));
}

.help-trigger::after {
    background: #202124;
    border-radius: 8px;
    bottom: auto;
    box-shadow: 0 10px 24px rgba(32, 33, 36, .18);
    color: #fff;
    content: attr(data-help);
    font-size: calc(13px * var(--ds-text-scale, 1));
    font-weight: 400;
    left: 0;
    line-height: 1.35;
    max-width: min(320px, calc(100vw - 40px));
    min-width: 220px;
    opacity: 0;
    padding: 10px 12px;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 8px);
    transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease;
    visibility: hidden;
    white-space: normal;
    z-index: 1000;
}

.help-trigger:hover::after,
.help-trigger:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.help-trigger:hover,
.help-trigger:focus-visible {
    z-index: 1002;
}

.helper.help-trigger,
.button-help.help-trigger {
    border-left: 1px solid var(--accent);
    margin: 0 0 0 6px;
}

.button-help.help-trigger {
    align-self: center;
    justify-self: start;
}

input,
textarea,
select {
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-ui, 6px);
    color: var(--text);
    font: inherit;
    padding: var(--control-y, 10px) 12px;
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--action-primary-bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--action-primary-bg) 18%, transparent);
    outline: none;
}

input[readonly],
textarea[readonly],
input:disabled,
textarea:disabled,
select:disabled {
    background: var(--disabled-bg);
    border-color: var(--line);
    color: var(--disabled-text);
    cursor: not-allowed;
}

fieldset[disabled] {
    opacity: .86;
}

textarea {
    resize: vertical;
}

button,
.button {
    background: var(--action-secondary-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-ui, 6px);
    color: var(--action-secondary-text);
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: 10px 14px;
    text-decoration: none;
}

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

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

button.danger,
.button.danger {
    background: var(--action-danger-bg);
    border-color: var(--action-danger-bg);
    color: var(--action-danger-text);
}

button.secondary,
.button.secondary {
    background: var(--action-secondary-bg);
    border-color: var(--line);
    color: var(--action-secondary-text);
}

/* Vse vsebinske dialoge zapiramo z enotnim kvadratnim gumbom.  Obvestilni
   elementi (flash/toast) nimajo tega selektorja in ohranijo svoj rdeči križec. */
button.dialog-close {
    align-items: center;
    background: var(--action-secondary-bg);
    border-radius: 8px;
    border: 1px solid var(--line);
    box-sizing: border-box;
    color: var(--action-secondary-text);
    display: inline-grid;
    font-size: calc(18px * var(--ds-text-scale, 1));
    height: 36px;
    justify-content: center;
    line-height: 1;
    min-height: 36px;
    min-width: 36px;
    padding: 0;
    width: 36px;
}

button:hover,
.button:hover {
    filter: brightness(.98);
}

button.avatar-paste-target {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    font-size: calc(13px * var(--ds-text-scale, 1));
    height: 32px;
    justify-content: center;
    line-height: 1;
    min-height: 32px;
    padding: 0 12px;
    vertical-align: top;
}

button.primary:hover,
.button.primary:hover {
    background: color-mix(in srgb, var(--action-primary-bg) 90%, #000000);
    border-color: color-mix(in srgb, var(--action-primary-bg) 90%, #000000);
    color: var(--action-primary-text);
    filter: none;
}

button.success:hover,
.button.success:hover {
    background: color-mix(in srgb, var(--action-success-bg) 90%, #000000);
    border-color: color-mix(in srgb, var(--action-success-bg) 90%, #000000);
    color: var(--action-success-text);
    filter: none;
}

button.danger:hover,
.button.danger:hover {
    background: color-mix(in srgb, var(--action-danger-bg) 90%, #000000);
    border-color: color-mix(in srgb, var(--action-danger-bg) 90%, #000000);
    color: var(--action-danger-text);
    filter: none;
}

button:disabled,
.button[aria-disabled="true"] {
    background: var(--disabled-bg);
    border-color: var(--line);
    color: var(--disabled-text);
    cursor: not-allowed;
    filter: none;
    opacity: .82;
    pointer-events: none;
}

.flash {
    border: 1px solid rgba(32, 33, 36, .12);
    border-radius: 6px;
    margin: 12px 0;
    padding: 12px 14px;
}

.flash.error {
    background: var(--soft-red);
    color: var(--danger);
}

.flash.success {
    background: var(--success-soft);
    color: var(--success);
}

.flash.info {
    background: var(--warning-soft);
    border: 1px solid var(--accent);
    color: var(--warning-text);
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 920px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: calc(13px * var(--ds-text-scale, 1));
    text-transform: uppercase;
}

.inline-form {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.inline-form .button-help {
    margin: 0;
}

.checks {
    display: grid;
    gap: 8px;
}

.checks label {
    align-items: center;
    display: flex;
    font-weight: 400;
    gap: 8px;
}

.check-row {
    align-items: center;
    display: flex;
    font-weight: 400;
    gap: 8px;
}

.checks input,
label input[type="checkbox"] {
    width: auto;
}

code {
    background: var(--info-soft);
    border-radius: 6px;
    display: inline-block;
    padding: 4px 7px;
    white-space: normal;
}

.inline-form.long {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
}

@media (max-width: 760px) {
    body.app-authenticated {
        height: auto;
        max-width: 100vw;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .settings-tabs {
        display: grid;
        gap: 4px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .settings-tabs .profile-tab {
        min-width: 0;
        text-align: left;
        white-space: normal;
    }

    .topbar,
.form-grid,
.settings-two-column,
.settings-company-details,
.settings-color-grid,
.settings-account-options,
.settings-style-grid,
.settings-smtp-grid,
.security-throttle-grid,
.settings-test-row,
.inline-form {
        grid-template-columns: 1fr;
    }

    .row-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-savebar {
        align-items: stretch;
        flex-direction: column;
        position: static;
    }

    .settings-company-details label:last-child {
        grid-column: auto;
    }

    .topbar {
        align-items: flex-start;
        display: grid;
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 12px 16px;
    }

    .top-actions {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .auth-company-meta {
        align-items: start;
        justify-items: start;
        text-align: left;
    }

    .top-actions .account-menu {
        flex: 0 0 auto;
    }

    .app-shell {
        display: block;
        min-height: 0;
    }

    .app-content-scroll {
        display: block;
        overflow: visible;
    }

    .side-nav {
        border-bottom: 1px solid var(--line);
        border-right: 0;
        box-sizing: border-box;
        display: flex;
        gap: 10px;
        max-width: 100vw;
        min-width: 0;
        overflow-x: auto;
        padding: 10px 12px;
        width: 100%;
    }

    .side-nav-collapse {
        display: none;
    }

    .side-nav-content {
        align-items: center;
        display: flex;
        flex: 1 1 auto;
        gap: 10px;
        min-width: 0;
        overflow-x: auto;
    }

    .side-nav.is-collapsed {
        padding: 10px 12px;
    }

    .side-nav.is-collapsed .module-switcher-current-label,
.side-nav.is-collapsed .critical-alerts-label,
.side-nav.is-collapsed .side-nav-section-label,
.side-nav.is-collapsed .side-menu-toggle,
.side-nav.is-collapsed .side-nav-link-label {
        display: inline;
    }

    .side-nav.is-collapsed .side-nav-section-icon,
.side-nav.is-collapsed .side-nav-link-icon {
        flex-basis: auto;
    }

    .side-nav.is-collapsed .side-nav a,
.side-nav.is-collapsed .side-title,
.side-nav.is-collapsed .side-menu-summary,
.side-nav.is-collapsed .view-as-menu > summary {
        justify-content: initial;
        padding-left: 4px;
        padding-right: 4px;
    }

    .side-section {
        display: flex;
        flex: 0 0 auto;
        gap: 6px;
        margin-bottom: 0;
    }

    .side-menu-group {
        display: block;
    }

    .side-menu-items {
        display: flex;
        gap: 6px;
    }

    .side-title {
        align-items: center;
        display: flex;
        padding: 0 4px;
        white-space: nowrap;
    }

    .side-nav a {
        background: var(--nav-inactive-bg);
        color: var(--nav-inactive-text);
        border: 1px solid var(--line);
        white-space: nowrap;
    }

    .info-item {
        flex-wrap: wrap;
    }

    .profile-menu-list {
        left: auto;
        max-width: calc(100vw - 24px);
        right: 0;
    }

    .view-as-menu-list {
        left: 0;
        right: auto;
    }

    .security-review-item {
        align-items: stretch;
        flex-direction: column;
    }

    .app-footer {
        align-items: flex-start;
        padding: 10px 16px;
    }

    .footer-platform-row {
        justify-content: flex-start;
    }

    .page {
        padding: 16px;
    }

    .auth-panel,
.panel,
.grid-cards article {
        box-shadow: none;
    }

    .auth-panel {
        margin: 0;
        max-width: none;
    }

    h1 {
        font-size: calc(26px * var(--ds-text-scale, 1));
        line-height: 1.2;
    }

    h2 {
        font-size: calc(20px * var(--ds-text-scale, 1));
    }

    button,
.button,
input,
textarea,
select {
        min-height: 44px;
    }

    .table-wrap {
        overflow: visible;
    }

    table,
thead,
tbody,
th,
td,
tr {
        display: block;
        min-width: 0;
        width: 100%;
    }

    thead {
        display: none;
    }

    tr {
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 10px;
    }

    td {
        border-bottom: 1px solid var(--line);
        display: grid;
        gap: 8px;
        grid-template-columns: 120px 1fr;
        padding: 10px 4px;
    }

    td:last-child {
        border-bottom: 0;
    }

    td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: calc(12px * var(--ds-text-scale, 1));
        font-weight: 700;
        text-transform: uppercase;
    }

    td[data-label="Urejanje"] {
        display: block;
    }

    td[data-label="Urejanje"]::before {
        display: block;
        margin-bottom: 8px;
    }

    .navigation-order-table td[data-label="Pot"] {
        display: block;
    }

    .navigation-order-table td[data-label="Pot"]::before {
        display: block;
        margin-bottom: 6px;
    }

    .access-level-section-row {
        background: transparent;
        border: 0;
        margin: 14px 0 6px;
        padding: 0;
    }

    .access-level-section-row td {
        border: 0;
        display: block;
        padding: 7px 10px;
    }

    .access-level-section-row td::before {
        display: none;
    }

    .avatar-editor-grid,
.compact-sliders {
        grid-template-columns: 1fr;
    }

    .avatar-preview-box {
        justify-self: start;
        min-width: 160px;
    }

    .form-actions {
        align-items: stretch;
        justify-content: stretch;
    }

    .form-actions button {
        width: 100%;
    }

    .button-help.help-trigger,
.helper.help-trigger {
        background: var(--soft-yellow);
        border-left: 1px solid var(--accent);
        padding: 0;
    }

    .help-trigger::after {
        left: 0;
    }

}

@media (max-width: 420px) {
    .settings-tabs {
        grid-template-columns: 1fr;
    }

}

/* Page-header actions are inline controls, not a form footer. */
body.ui-version-modern .page-title > .page-actions {
    border-top: 0;
    padding-top: 0;
}

body.ui-version-modern .settings-mail-notifications {
    border-top: 0;
    margin-top: 0;
    padding-top: 16px;
}

body.ui-version-modern .settings-mail-notifications .notification-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ui-version-modern .settings-savebar .button-help {
    display: none !important;
}

/* Table-oriented settings keep the table, but share the same section heading
   rhythm as form-oriented settings. */
body.ui-version-modern .module-list-heading,
body.ui-version-modern .navigation-module-overview-head,
body.ui-version-modern .navigation-group-heading {
    border-bottom: 1px solid var(--ds-border);
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

body.ui-version-modern .module-list-heading h2,
body.ui-version-modern .navigation-module-overview-head h2,
body.ui-version-modern .navigation-group-heading h2,
body.ui-version-modern .navigation-group-heading h3 {
    font-size: calc(1rem * var(--ds-text-scale, 1));
    line-height: 1.3;
}

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

body.ui-version-modern .ds-settings-section .form-grid,
body.ui-version-modern .ds-settings-section .settings-smtp-grid,
body.ui-version-modern .ds-settings-section .notification-module-grid {
    gap: 10px 12px;
}

body.ui-version-modern .settings-account-options,
body.ui-version-modern .notification-module-grid {
    gap: 12px;
}

body.ui-version-modern .settings-account-options .check-card,
body.ui-version-modern .notification-module-card {
    gap: 8px;
    padding: 10px 12px;
}

body.ui-version-modern .settings-mail-panels > .profile-tab-panel {
    display: none;
}

body.ui-version-modern .settings-mail-panels > .profile-tab-panel.is-active {
    display: grid;
    gap: 12px;
}

body.ui-version-modern .settings-auth-entry-section,
body.ui-version-modern .settings-auth-entry-section > * { min-width: 0; }

body.ui-version-modern .settings-auth-entry-block-heading { display: grid; gap: 3px; }

body.ui-version-modern .settings-auth-entry-block-heading h3,
body.ui-version-modern .settings-auth-entry-block-heading p { margin: 0; }

body.ui-version-modern .settings-auth-entry-block-heading h3 { font-size: calc(1rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .settings-auth-entry-block-heading p { font-size: calc(.82rem * var(--ds-text-scale, 1)); }

body.ui-version-modern .settings-auth-entry-root-choice {
    align-items: start;
    display: grid;
    gap: 6px 10px;
    grid-template-columns: minmax(150px, .55fr) minmax(180px, 1fr) 132px;
}

body.ui-version-modern .settings-auth-entry-root-choice > label { display: grid; gap: 5px; grid-column: 2 / -1; min-width: 0; }

body.ui-version-modern .settings-auth-entry-root-choice select { max-width: none; width: 100%; }

body.ui-version-modern .settings-auth-entry-root-options {
    border-top: 1px solid var(--ds-border);
    display: grid;
    gap: 10px;
    margin-top: 2px;
    padding-top: 10px;
}

body.ui-version-modern .settings-auth-entry-root-options > [hidden],
body.ui-version-modern .settings-auth-entry-root-options [data-auth-entry-shared-options][hidden] { display: none !important; }

body.ui-version-modern .settings-auth-entry-root-options > [data-auth-entry-shared-options] { display: grid; gap: 8px; }

body.ui-version-modern .settings-auth-entry-root-options > [data-auth-entry-shared-options] h3,
body.ui-version-modern .settings-auth-entry-root-options > [data-auth-entry-shared-options] p { margin: 0; }

@media (max-width: 760px) {
    body.ui-version-modern .settings-auth-entry-root-choice { grid-template-columns: 1fr; }

    body.ui-version-modern .settings-auth-entry-root-choice > label { grid-column: auto; }

}

body.ui-version-modern .settings-color-grid,
body.ui-version-modern .settings-style-grid {
    gap: 10px 12px;
}

body.ui-version-modern .settings-color-grid label {
    align-content: start;
    gap: 6px;
    min-height: 0;
    padding: 10px 12px;
}

body.ui-version-modern .settings-color-grid .label-title {
    min-height: 0;
}

body.ui-version-modern .settings-color-grid input[type="color"] {
    height: 34px;
    width: 48px;
}

body.ui-version-modern .settings-savebar {
    box-shadow: none;
    margin-top: 8px;
    padding: 8px 10px;
}

body.ui-version-modern .module-list-heading,
body.ui-version-modern .navigation-module-overview-head,
body.ui-version-modern .navigation-group-heading {
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

body.ui-version-modern .settings-panel .compact-admin-table th,
body.ui-version-modern .settings-panel .compact-admin-table td {
    padding-bottom: 7px;
    padding-top: 7px;
}

body.ui-version-modern .settings-panel .empty-state,
body.ui-version-modern .settings-panel .empty-note {
    min-height: 0;
    padding: 10px 12px;
}

/* Field-help typography is a Design System contract. Settings retain only
   their semantic warning treatment. */
body.ui-version-modern .settings-panel .field-help.setting-warning {
    border-left: 3px solid var(--ds-warning, #b7791f);
    color: var(--ds-text);
    padding-left: 7px;
}

.help-trigger:hover,
.help-trigger:focus-visible,
.help-trigger.is-open {
    z-index: 20000;
}

.help-trigger::after {
    z-index: 20001;
}

.help-trigger.is-open::after {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

@media (max-width: 640px) {
    body.ui-version-modern .settings-login-appearance {
        grid-template-columns: 1fr;
    }

    body.ui-version-modern .settings-mail-notifications .notification-module-grid {
        grid-template-columns: 1fr;
    }

}

.module-settings-nav {
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 760px) {

}

@media (max-width: 440px) {
    .brand img {
        height: 28px;
    }

    td {
        grid-template-columns: 1fr;
    }

}

@media print {
    .app-header,
.side-nav,
.page-actions,
form,
.flash {
        display: none !important;
    }

    .app-shell,
.app-main,
.panel {
        background: #fff !important;
        box-shadow: none !important;
        display: block !important;
        margin: 0 !important;
        max-width: none !important;
        padding: 0 !important;
        width: 100% !important;
    }

}

/* Central permission editor: menu-aligned, compact and shared by Core and all modules. */
.permission-workspace {
    max-width: none;
}

.permission-context-selector-empty {
    color: var(--muted);
    font-size: calc(11px * var(--ds-text-scale, 1));
}

.permission-context-selector-empty {
    margin: 0;
    padding: 6px 2px;
}

.sr-only {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

a[href^="mailto:"],
a[href^="tel:"] {
    cursor: pointer;
    user-select: text;
    -webkit-user-select: text;
}

.core-kpi-primary { border-top-color: var(--action-primary-bg); }

.core-kpi-success { border-top-color: var(--action-success-bg); }

.core-kpi-danger { border-top-color: var(--action-danger-bg); }

.core-kpi-neutral { border-top-color: var(--muted); }

/* Core analytical dashboard -------------------------------------------------
 * Page-scoped layer following the compact 4 + 2 + 3 card grid. */
.core-dashboard {
    --core-dashboard-accent: color-mix(in srgb, var(--action-primary-bg) 58%, var(--action-danger-bg));
    display: grid;
    gap: 12px;
    margin-top: 14px;
    min-width: 0;
}

.core-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--ds-radius-panel, 8px);
    box-shadow: 0 2px 9px rgba(24, 39, 58, .035);
    min-width: 0;
    padding: 14px;
    scroll-margin-top: calc(var(--ds-header-height, 56px) + 38px);
}

.core-card-header {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin: 0 0 6px;
    min-height: 30px;
}

.core-card-title {
    align-items: center;
    display: flex;
    gap: 6px;
    min-width: 0;
}

.core-card-title h2 {
    font-size: calc(12px * var(--ds-text-scale, 1));
    font-weight: 850;
    letter-spacing: .015em;
    line-height: 1.25;
    margin: 0;
    text-transform: uppercase;
}

.core-card-period {
    flex: 0 0 auto;
    margin: 0;
}

.core-card-period select {
    background-color: var(--panel);
    border-color: var(--line);
    border-radius: var(--ds-radius-control, 6px);
    font-size: calc(11px * var(--ds-text-scale, 1));
    font-weight: 750;
    min-height: 30px;
    min-width: 72px;
    padding: 5px 24px 5px 8px;
}

.core-card-tools {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.core-expand-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--ds-radius-control, 6px);
    color: var(--muted);
    display: inline-flex;
    font-size: calc(14px * var(--ds-text-scale, 1));
    height: 30px;
    justify-content: center;
    min-width: 30px;
    padding: 0;
    width: 30px;
}

.core-expand-button:hover,
.core-expand-button:focus-visible {
    background: var(--surface-subtle);
    border-color: var(--line);
    color: var(--action-primary-bg);
}

.core-kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.core-kpi {
    border-top: 2px solid var(--action-primary-bg);
    color: inherit;
    display: grid;
    gap: 4px;
    min-height: 0;
    padding: 11px 13px 8px;
    text-decoration: none;
    transition: none;
}

.core-kpi:hover,
.core-kpi:focus-visible {
    box-shadow: 0 2px 9px rgba(24, 39, 58, .035);
    transform: none;
}

.core-kpi-primary { border-top-color: var(--action-primary-bg); }

.core-kpi-success { border-top-color: var(--action-success-bg); }

.core-kpi-accent { border-top-color: var(--core-dashboard-accent); }

.core-kpi-danger { border-top-color: var(--action-danger-bg); }

.core-kpi-number {
    font-size: calc(26px * var(--ds-text-scale, 1));
    line-height: 1;
    margin-top: 1px;
}

.core-kpi-context {
    color: var(--muted);
    font-size: calc(10.5px * var(--ds-text-scale, 1));
    line-height: 1.35;
    min-height: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.core-kpi-change {
    align-items: center;
    display: flex;
    gap: 7px;
    margin-top: 3px;
    min-height: 16px;
}

.core-kpi-change > span {
    font-size: calc(10.5px * var(--ds-text-scale, 1));
    font-weight: 850;
    white-space: nowrap;
}

.core-kpi-change small {
    color: var(--muted);
    font-size: calc(10px * var(--ds-text-scale, 1));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.core-kpi-change .is-positive { color: var(--action-success-bg); }

.core-kpi-change .is-negative { color: var(--action-danger-bg); }

.core-kpi-change .is-flat { color: var(--muted); }

.core-kpi-sparkline {
    color: var(--core-series);
    height: 36px;
    margin: 2px 0 0;
    overflow: visible;
    width: 100%;
}

.core-kpi-sparkline polygon {
    fill: var(--core-series);
    opacity: .075;
}

.core-kpi-sparkline polyline {
    fill: none;
    stroke: var(--core-series);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.35;
    vector-effect: non-scaling-stroke;
}

.core-kpi-sparkline-empty {
    align-items: center;
    border-bottom: 1px dashed var(--line);
    color: var(--muted);
    display: flex;
    font-size: calc(10px * var(--ds-text-scale, 1));
    height: 36px;
    margin-top: 2px;
}

.core-primary-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.core-primary-grid > .core-card {
    min-height: 0;
}

.core-chart-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0 0 7px;
}

.core-chart-legend span {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: calc(10.5px * var(--ds-text-scale, 1));
    gap: 5px;
}

.core-chart-legend i,
.core-donut-legend i {
    background: var(--core-series);
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    height: 7px;
    width: 7px;
}

.core-chart-stage {
    min-width: 0;
    position: relative;
}

.core-line-chart,
.core-bar-chart {
    display: block;
    height: 145px;
    overflow: visible;
    width: 100%;
}

.core-chart-grid {
    fill: none;
    stroke: color-mix(in srgb, var(--line) 72%, transparent);
    stroke-width: .28;
    vector-effect: non-scaling-stroke;
}

.core-chart-line {
    fill: none;
    stroke: var(--core-series);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.3;
    vector-effect: non-scaling-stroke;
}

.core-chart-area {
    fill: var(--core-series);
    opacity: .09;
}

.core-chart-point {
    fill: transparent;
    opacity: 0;
    pointer-events: all;
    stroke: transparent;
    stroke-width: 0;
    vector-effect: non-scaling-stroke;
}

.core-chart-point:focus {
    opacity: 1;
    outline: none;
}

.core-chart-hover-dot {
    background: var(--core-series, var(--chart-blue));
    border: 1.5px solid var(--panel);
    border-radius: 50%;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--core-series, var(--chart-blue)) 36%, transparent);
    height: 7px;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, -50%);
    width: 7px;
    z-index: 9999;
}

.core-chart-bar {
    fill: var(--core-series);
    opacity: .84;
    pointer-events: all;
}

.core-chart-bar:hover { opacity: 1; }

.core-chart-axis {
    color: var(--muted);
    display: flex;
    font-size: calc(9.5px * var(--ds-text-scale, 1));
    justify-content: space-between;
    margin: 2px 2% 0 4%;
}

.core-card-facts {
    background: var(--surface-subtle);
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: var(--ds-radius-control, 6px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 11px;
}

.core-card-facts > div {
    display: grid;
    gap: 2px;
    padding: 6px 9px;
}

.core-card-facts > div + div { border-left: 1px solid var(--line); }

.core-card-facts span,
.core-card-facts small { color: var(--muted); font-size: calc(9.5px * var(--ds-text-scale, 1)); }

.core-card-facts span { font-weight: 750; }

.core-card-facts strong { font-size: calc(13px * var(--ds-text-scale, 1)); }

.core-chart-empty {
    align-content: center;
    background: var(--surface-subtle);
    border: 1px dashed var(--line);
    border-radius: var(--ds-radius-control, 6px);
    display: grid;
    gap: 4px;
    min-height: 166px;
    padding: 18px;
    text-align: center;
}

.core-chart-empty strong { font-size: calc(12px * var(--ds-text-scale, 1)); }

.core-chart-empty span { color: var(--muted); font-size: calc(10.5px * var(--ds-text-scale, 1)); line-height: 1.4; }

.core-storage-topline {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(120px, .42fr) minmax(0, 1fr);
}

.core-storage-topline > div:first-child {
    align-content: center;
    display: grid;
    gap: 3px;
}

.core-storage-topline > div:first-child span,
.core-storage-topline > div:first-child small { color: var(--muted); font-size: calc(10px * var(--ds-text-scale, 1)); }

.core-storage-topline > div:first-child strong { font-size: calc(27px * var(--ds-text-scale, 1)); line-height: 1; }

.core-storage-history-empty {
    background: var(--surface-subtle);
    border: 1px dashed var(--line);
    border-radius: var(--ds-radius-control, 6px);
    display: grid;
    gap: 3px;
    margin: 0;
    min-height: 0;
    padding: 10px 11px;
}

.core-storage-history-empty strong { font-size: calc(11px * var(--ds-text-scale, 1)); }

.core-storage-history-empty span { color: var(--muted); font-size: calc(10px * var(--ds-text-scale, 1)); line-height: 1.4; }

.core-storage-breakdown {
    align-items: center;
    display: grid;
    gap: 20px;
    grid-template-columns: 132px minmax(0, 1fr);
    margin: 13px 0 0;
}

.core-donut {
    display: block;
    height: 112px;
    overflow: visible;
    width: 112px;
}

.core-donut-track,
.core-donut-segment {
    fill: none;
    stroke-width: 4.7;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.core-donut-track { stroke: var(--surface-subtle); }

.core-donut-segment { stroke: var(--core-series); transition: stroke-width .12s ease; }

.core-donut-segment:hover { stroke-width: 5.4; }

.core-donut-value { fill: var(--text); font-size: calc(4px * var(--ds-text-scale, 1)); font-weight: 850; }

.core-donut-label { fill: var(--muted); font-size: calc(2.45px * var(--ds-text-scale, 1)); }

.core-donut-legend {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.core-donut-legend > div {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.core-donut-legend span {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}

.core-donut-legend strong { font-size: calc(10.5px * var(--ds-text-scale, 1)); }

.core-donut-legend small { color: var(--muted); font-size: calc(10px * var(--ds-text-scale, 1)); white-space: nowrap; }

.core-storage-cause {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 2px;
    margin-top: 11px;
    padding-top: 9px;
}

.core-storage-cause span,
.core-storage-cause small { color: var(--muted); font-size: calc(9.5px * var(--ds-text-scale, 1)); }

.core-storage-cause strong { font-size: calc(12px * var(--ds-text-scale, 1)); }

.core-secondary-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.core-secondary-grid > .core-card { min-height: 236px; }

.core-security-events-card { grid-column: span 2; }

.core-accounts-card,
.core-modules-card { grid-column: span 1; }

.core-storage-history-summary {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: var(--ds-radius-control, 6px);
    display: grid;
    gap: 3px;
    min-height: 0;
    padding: 10px 11px;
}

.core-storage-history-summary strong { font-size: calc(11px * var(--ds-text-scale, 1)); }

.core-storage-history-summary span { color: var(--muted); font-size: calc(10px * var(--ds-text-scale, 1)); line-height: 1.4; }

.core-storage-history-chart { margin-top: 10px; }

.core-status-donut-layout {
    align-content: start;
    display: grid;
    gap: 13px;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    min-height: 178px;
    width: 100%;
}

.core-status-donut-layout .core-donut {
    height: 112px;
    margin: 0 auto;
    width: 112px;
}

.core-status-donut-layout .core-donut-legend {
    gap: 7px;
    width: 100%;
}

.core-status-donut-layout .core-donut-legend > div {
    display: grid;
    gap: 8px;
    grid-template-columns: 8px minmax(0, 1fr);
}

.core-status-donut-layout .core-donut-legend i {
    align-self: center;
}

.core-status-donut-layout .core-donut-legend span {
    align-items: baseline;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.core-status-donut-layout .core-donut-legend strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.core-status-donut-layout .core-donut-legend small {
    text-align: right;
}

.core-security-events-layout {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: 105px minmax(0, 1fr);
}

.core-security-total {
    display: grid;
    align-content: start;
}

.core-security-total > strong { font-size: calc(25px * var(--ds-text-scale, 1)); line-height: 1; }

.core-security-total > span { color: var(--muted); font-size: calc(9.5px * var(--ds-text-scale, 1)); margin-top: 3px; }

.core-security-total ul { display: grid; gap: 6px; list-style: none; margin: 14px 0 0; padding: 0; }

.core-security-total li { align-items: center; color: var(--muted); display: grid; font-size: calc(9.5px * var(--ds-text-scale, 1)); gap: 5px; grid-template-columns: 7px minmax(0, 1fr) auto; }

.core-security-total li i { border-radius: 50%; height: 6px; width: 6px; }

.core-security-total li i.is-critical { background: var(--chart-red); }

.core-security-total li i.is-warning { background: var(--chart-amber); }

.core-security-total li i.is-info { background: var(--chart-blue); }

.core-security-total li b { color: var(--text); }

.core-chart-stage-small .core-line-chart,
.core-chart-stage-small .core-bar-chart { height: 70px; }

.core-chart-empty-compact { min-height: 97px; padding: 10px; }

.core-service-line {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: calc(9.5px * var(--ds-text-scale, 1));
    gap: 13px;
    justify-content: center;
    padding: 2px 0 0;
}

.core-service-line i {
    background: var(--line);
    height: 12px;
    width: 1px;
}

.core-chart-tooltip {
    background: color-mix(in srgb, var(--text) 94%, transparent);
    border-radius: 5px;
    color: var(--panel);
    font-size: calc(10px * var(--ds-text-scale, 1));
    font-weight: 750;
    max-width: 220px;
    padding: 6px 8px;
    pointer-events: none;
    position: fixed;
    transform: translate(-50%, calc(-100% - 9px));
    white-space: nowrap;
    z-index: 10000;
}

#core-activity-detail,
#core-storage-detail { max-width: min(920px, calc(100vw - 28px)); width: 820px; }

.core-dashboard-detail { min-width: 0; padding: 4px 0 2px; }

.core-chart-stage-expanded .core-line-chart { height: 360px; }

.core-storage-detail .core-storage-breakdown { grid-template-columns: 190px minmax(0, 1fr); }

.core-storage-detail .core-donut { height: 180px; width: 180px; }

.core-storage-detail .core-storage-history-empty { margin-top: 18px; }

@media (max-width: 1320px) {
    .core-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .core-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .core-security-events-card { grid-column: 1 / -1; }

}

@media (max-width: 980px) {
    .core-primary-grid { grid-template-columns: 1fr; }

}

@media (max-width: 760px) {
    .core-secondary-grid { grid-template-columns: 1fr; }

    .core-modules-card { grid-column: auto; }

}

@media (max-width: 600px) {
    .core-dashboard { gap: 10px; margin-top: 10px; }

    .core-kpi-grid { gap: 10px; grid-template-columns: 1fr; }

    .core-kpi { min-height: 165px; }

    .core-card { padding: 12px; }

    .core-card-header { align-items: flex-start; }

    .core-card-title h2 { font-size: calc(11px * var(--ds-text-scale, 1)); }

    .core-primary-grid,
.core-secondary-grid { gap: 10px; }

    .core-primary-grid > .core-card,
.core-secondary-grid > .core-card { min-height: 0; }

    .core-line-chart { height: 155px; }

    .core-card-facts { grid-template-columns: 1fr; }

    .core-card-facts > div + div { border-left: 0; border-top: 1px solid var(--line); }

    .core-storage-topline { grid-template-columns: 1fr; }

    .core-storage-breakdown,
.core-storage-detail .core-storage-breakdown,
.core-status-donut-layout { grid-template-columns: 1fr; }

    .core-donut,
.core-storage-detail .core-donut { height: 138px; margin: 0 auto; width: 138px; }

    .core-status-donut-layout .core-donut { height: 112px; width: 112px; }

    .core-security-events-layout { grid-template-columns: 92px minmax(0, 1fr); }

    .core-service-line { align-items: flex-start; flex-direction: column; gap: 4px; }

    .core-service-line i { display: none; }

    .core-chart-stage-expanded .core-line-chart { height: 230px; }

    .core-chart-tooltip { display: none; }

}

/* Core system-document footer and content shell. */
.footer-documents-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: flex-start;
    min-width: 0;
}
.system-doc-content > .documentation-document-title {
    display: none;
}

} /* @layer csq-compatibility */
