
body {
    background-color: var(--color-body-background);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

[hidden] {
    display: none !important;
}

a,
a:visited {
    color: var(--color-link);
    font-weight: normal;
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--color-link-hover);
    text-decoration: none;
}

a:active {
    color: var(--color-link-pressed);
}

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

a:disabled,
a[disabled] {
    color: var(--color-link-disabled);
    cursor: not-allowed;
}

.icon-arrow-down::before,
.icon-arrow-up::before,
.icon-arrow-left::before,
.icon-arrow-right::before {
    font-family: "tabler-icons";
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    display: inline-block;
    speak: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.icon-arrow-down::before {
    content: "\ea5f";
}

.icon-arrow-up::before {
    content: "\ea62";
}

.icon-arrow-left::before {
    content: "\ea60";
}

.icon-arrow-right::before {
    content: "\ea61";
}


.login-card {
    max-width: 420px;
    width: 100%;
    padding: 2.75rem 2.5rem;
    border-radius: var(--radius-2xl);
    background: var(--login-card-bg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
}

.login-card__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
}

.login-card__logo {
    display: block;
    width: auto;
    height: 38px;
    max-width: 100%;
    object-fit: contain;
}

.login-card__title {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text-strong);
    text-align: center;
}

.login-card__subtitle {
    margin: -0.5rem 0 0;
    font-size: var(--text-body);
    color: var(--color-text-body);
    text-align: center;
}

.login-card__form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.login-card__row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: var(--text-body);
    color: var(--color-text);
}

.login-card__row label {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.login-card__row input[type="text"],
.login-card__row input[type="password"] {
    border-radius: var(--radius-lg);
    border: 1px solid var(--login-field-border);
    padding: 0.65rem 0.85rem;
    font-size: var(--text-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--color-surface);
    box-sizing: border-box;
}

.login-card__row input[type="text"]:focus,
.login-card__row input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--login-focus-ring);
}

.login-card__reset {
    text-align: right;
}

.login-card__reset a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.login-card__reset a:hover,
.login-card__reset a:focus {
    text-decoration: underline;
}

.login-card__reset--note {
    margin: 0;
    text-align: center;
    font-size: var(--text-body);
    color: var(--color-text-muted);
}

.login-card__actions {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-card__actions input[type="submit"] {
    width: 100%;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: var(--text-body);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.login-card__actions input[type="submit"]:hover {
    background: var(--color-primary-hover);
}

.login-card__actions input[type="submit"]:active {
    background: var(--color-primary-pressed);
}

.login-card__actions input[type="submit"]:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.login-card__actions input[type="submit"]:disabled,
.login-card__actions input[type="submit"].is-loading {
    background: var(--color-primary-disabled);
    cursor: progress;
}

.login-card__errornote {
    border-radius: var(--radius-xl);
    padding: 0.85rem 1rem;
    background: var(--login-error-bg);
    border: 1px solid var(--login-error-bd);
    color: var(--login-error-fg);
    font-size: var(--text-body);
    text-align: center;
    margin: 0 auto 1.2rem;
    max-width: 420px;
    box-sizing: border-box;
}

body.login {
    background: var(--login-backdrop);
}

body.login #header,
body.login #user-tools,
body.login .content-nav,
body.login #footer {
    display: none;
}

body.login #container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    box-sizing: border-box;
    background: transparent;
    border-top: 0;
    margin: 0;
    width: auto;
}

body.login #content,
body.login .content-layout,
body.login .content-main.login-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: transparent;
}

body.login .content-main.login-content {
    width: min(450px, 100%);
}

body.login .content-main.login-content .login-card {
    margin: 0 auto;
}

body.login .messages {
    width: min(450px, 100%);
    margin: 0 auto 1rem;
}

body.login .errornote {
    margin-bottom: 1rem;
}


.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--app-sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--color-body-background);
    border-right: 1px solid var(--color-neutral-200);
    z-index: 200;
    box-shadow: var(--shadow-inset-hairline), 0 0 0 1px rgba(15, 23, 42, 0.02);
    transition: width 0.2s ease;
}

body.has-app-sidebar #container {
    padding-left: var(--app-sidebar-width) !important;
    min-height: 100vh;
    box-sizing: border-box;
    transition: padding-left 0.2s ease;
    min-width: 0;
}

.app-sidebar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    min-height: var(--app-topbar-height);
    border-bottom: 1px solid var(--color-neutral-200);
    flex-shrink: 0;
}

.app-sidebar__logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    min-width: 0;
}

.app-sidebar__logo {
    display: block;
    width: auto;
    height: 38px;
    max-width: 100%;
    object-fit: contain;
}

.app-sidebar__logo-mark {
    display: none;
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.app-sidebar__collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    flex-shrink: 0;
}

.app-sidebar__collapse:hover {
    background: var(--color-neutral-100);
    color: var(--color-text);
}

.app-sidebar__collapse-icon {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.app-sidebar__nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.app-sidebar__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    color: var(--color-primary);
    font: inherit;
    font-size: var(--nav-item-size);
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s var(--ease-spring), color 0.18s var(--ease-spring);
    position: relative;
}

.app-sidebar__item:hover,
.app-sidebar__item:focus-visible {
    background: var(--color-neutral-100);
    color: var(--color-primary);
    outline: none;
}

.app-sidebar__item:focus-visible {
    box-shadow: var(--shadow-focus);
}

.app-sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: color 0.15s ease;
}

.app-sidebar__icon .ti {
    font-size: 18px;
    line-height: 1;
    color: currentColor;
}

.app-sidebar__item:hover .app-sidebar__icon,
.app-sidebar__item:focus-visible .app-sidebar__icon {
    color: var(--color-primary);
}

.app-sidebar__label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.app-sidebar__link.is-active {
    background: var(--shell-active-ground);
    color: var(--color-primary);
}

.app-sidebar__link.is-active .app-sidebar__icon {
    color: var(--color-primary);
}

.app-sidebar__group {
    display: flex;
    flex-direction: column;
}

.app-sidebar__chevron {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.app-sidebar__group.is-open > .app-sidebar__group-toggle .app-sidebar__chevron {
    transform: rotate(180deg);
}

.app-sidebar__sublist {
    list-style: none;
    margin: 0.1rem 0 0.2rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.app-sidebar__group.is-open > .app-sidebar__sublist {
    max-height: 1000px;
}

.app-sidebar__subitem {
    display: block;
    padding: 0.45rem 0.8rem 0.45rem 3rem;
    border-radius: var(--radius-md);
    color: var(--nav-item-muted);
    font-size: var(--nav-item-size);
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color 0.18s var(--ease-spring), color 0.18s var(--ease-spring),
        box-shadow 0.18s var(--ease-spring);
}

.app-sidebar__subitem:link,
.app-sidebar__subitem:visited {
    color: var(--nav-item-muted);
}

.app-sidebar__subitem:hover,
.app-sidebar__subitem:focus-visible {
    background: var(--color-neutral-100);
    color: var(--color-primary);
    outline: none;
}

.app-sidebar__subitem:focus-visible {
    box-shadow: var(--shadow-focus);
}

.app-sidebar__subitem.is-active {
    color: var(--color-primary);
    font-weight: 600;
    background: var(--shell-active-ground-soft);
    border-radius: var(--radius-md);
}

.app-sidebar__user {
    flex-shrink: 0;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--color-neutral-200);
}

.app-sidebar__user .header-user {
    width: 100%;
}

.app-sidebar__user .header-user__trigger {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-md);
}

.app-sidebar__user .header-user__trigger:hover {
    background: var(--color-neutral-100);
}

.app-sidebar__user .header-user__info {
    flex: 1 1 auto;
}

.app-sidebar__user .header-user__name {
    max-width: none;
}

.app-sidebar__user .header-user__chevron {
    margin-left: auto;
}

.app-sidebar__user .header-user__actions {
    top: auto;
    bottom: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    transform: translateY(6px);
}

.app-sidebar__user .header-user.is-open .header-user__actions {
    transform: translateY(0);
}

body.has-app-sidebar.app-sidebar-collapsed #container {
    padding-left: var(--app-sidebar-rail) !important;
}

body.app-sidebar-collapsed .app-sidebar {
    width: var(--app-sidebar-rail);
}

body.app-sidebar-collapsed .app-sidebar__top {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 0.4rem;
}

body.app-sidebar-collapsed .app-sidebar__logo {
    display: none;
}

body.app-sidebar-collapsed .app-sidebar__logo-mark {
    display: block;
}

body.app-sidebar-collapsed .app-sidebar__collapse-icon {
    transform: rotate(180deg);
}

body.app-sidebar-collapsed .app-sidebar__nav {
    padding: 0.75rem 0.4rem 1rem;
}

body.app-sidebar-collapsed .app-sidebar__item {
    justify-content: center;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
}

body.app-sidebar-collapsed .app-sidebar__label,
body.app-sidebar-collapsed .app-sidebar__chevron,
body.app-sidebar-collapsed .app-sidebar__sublist {
    display: none;
}

body.app-sidebar-collapsed .app-sidebar__user {
    padding: 0.6rem 0.4rem;
}

body.app-sidebar-collapsed .app-sidebar__user .header-user__trigger {
    justify-content: center;
    padding: 0.4rem;
}

body.app-sidebar-collapsed .app-sidebar__user .header-user__info,
body.app-sidebar-collapsed .app-sidebar__user .header-user__chevron {
    display: none;
}

body.app-sidebar-collapsed .app-sidebar__user .header-user__actions {
    left: 0;
    right: auto;
    min-width: 210px;
}


.header-user {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.header-user__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0.8rem 0.3rem 0.3rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1;
}

.header-user__trigger:focus-visible {
    box-shadow: var(--shadow-focus);
}

.header-user.is-open .header-user__trigger {
    background: var(--color-neutral-100);
    box-shadow: var(--shadow-md);
}

.header-user__avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    background: linear-gradient(140deg, var(--shell-active-ground) 0%, var(--shell-avatar-tint) 100%);
    border: 1px solid var(--shell-avatar-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-primary);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.header-user__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-user__avatar-initials {
    font-size: var(--text-body);
    letter-spacing: 0.04em;
}

.header-user__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.header-user__name {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.header-user__position {
    font-size: var(--text-label);
    font-weight: 500;
    color: var(--color-text);
    opacity: 0.7;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.header-user__chevron {
    font-size: 0.75rem;
    color: var(--color-text);
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.header-user.is-open .header-user__chevron {
    transform: rotate(180deg);
}

.header-user__actions {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    min-width: 200px;
    background: var(--color-body-background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-strong);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    flex-direction: column;
    gap: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateY(-6px);
}

.header-user.is-open .header-user__actions {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.header-user__actions li {
    width: 100%;
    list-style: none;
}

.header-user__actions li + li {
    border-top: 1px solid var(--color-border);
}

.header-user__actions a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--color-text);
    font-size: var(--text-body);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.header-user__actions a:hover,
.header-user__actions a:focus {
    background: var(--color-neutral-100);
    color: var(--color-link-hover);
}

.app-models {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.app-models__section {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 1.75rem 1.9rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.app-models__header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.app-models__eyebrow {
    display: none;
}

.app-models__title h2 {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text-strong);
}

.app-models__title h2 a {
    color: inherit;
    text-decoration: none;
}

.app-models__title h2 a:hover,
.app-models__title h2 a:focus {
    color: var(--color-primary);
}

.app-models__description {
    margin: 0.25rem 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-body);
}

.app-models__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.1rem;
}

.app-model-card {
    background: var(--color-body-background);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-hairline-strong);
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 180px;
    overflow: hidden;
}

.app-model-card__header {
    background: var(--color-body-background);
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
}

.app-model-card__icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-circle);
    background: var(--shell-active-ground);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-model-card__icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.app-model-card__icon-svg .ti {
    font-size: var(--text-title);
    line-height: 1;
    color: currentColor;
}

.app-model-card__info {
    flex: 1;
    min-width: 0;
}

.app-model-card__footer {
    background: var(--color-card-footer-background);
    padding: 0.75rem 1.25rem;
    border-top: none;
}

body.has-app-sidebar #content {
    padding-top: var(--space-5);
}


.page-header__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.page-header__title {
    margin: 0;
    font-size: var(--nav-title-size);
    font-weight: var(--nav-title-weight);
    line-height: var(--leading-tight);
    color: var(--nav-title-color);
}

.ds-overview__identity > .page-header {
    width: 100%;
}

.page-header__title-cluster {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    min-width: 0;
}

.page-header__title-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-body);
}

.page-header__title-dot {
    color: var(--color-text-subtle);
}

.ds-app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    row-gap: var(--space-3);
    padding: 0;
    margin-bottom: var(--space-5);
    max-width: 100%;
    box-sizing: border-box;
}

.ds-app-header__title {
    flex: 0 0 auto;
}

.ds-app-header__title h1 {
    margin: 0;
    font-size: var(--nav-title-size);
    font-weight: var(--nav-title-weight);
    color: var(--nav-title-color);
    line-height: var(--leading-tight);
}

.ds-app-header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .ds-app-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .ds-app-header__title h1 {
        font-size: var(--text-title);
    }

    .ds-app-header__actions {
        flex-direction: column;
        align-items: stretch;
    }
}


#footer.admin-footer {
    padding: 12px 24px;
    text-align: right;
    font-size: var(--text-caption);
    line-height: 1.4;
    color: var(--admin-footer-color);
    opacity: 0.85;
}

#footer.admin-footer .admin-footer__commit {
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

body.has-app-sidebar #container {
    display: flex;
    flex-direction: column;
}

body.has-app-sidebar #content {
    flex: 1 0 auto;
}

body.has-app-sidebar #footer.admin-footer {
    flex: 0 0 auto;
    margin-top: auto;
}


.ds-table-wrapper {
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    max-width: 100%;
    overflow-x: auto;
}

.ds-table-wrapper--reference {
    max-width: 100%;
    overflow-x: auto;
}

.ds-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-surface);
    font-size: var(--text-label);
    margin: 0;
}

.ds-table thead th {
    padding: 11px var(--space-4);
    text-align: left;
    text-transform: none;
    font-size: var(--text-caption);
    font-weight: 653;
    color: var(--color-table-header);
    background: var(--color-header-background);
    border-top: none;
    border-bottom: 0.5px solid var(--color-border);
    white-space: nowrap;
}

.ds-table thead a,
.ds-table thead a:link,
.ds-table thead a:visited {
    color: var(--color-table-header);
    text-decoration: none;
    font-weight: inherit;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.ds-table thead a:hover,
.ds-table thead a:focus {
    color: var(--color-primary);
}

.ds-table .sort-indicator {
    opacity: 0.45;
    font-size: var(--text-caption);
    margin-left: 3px;
    display: inline-block;
    line-height: 1;
    color: currentColor;
}

.ds-table th.sorted .sort-indicator {
    opacity: 1;
}

.ds-table thead th.sortable {
    padding: 0;
}

.ds-table thead th.sortable > a {
    display: block;
    padding: 11px var(--space-4);
}

.ds-table thead th.ds-table__col--num.sortable > a {
    text-align: right;
}

.ds-table--compact thead th.sortable > a {
    padding: 8px 12px;
}

.ds-table thead th.sortable:hover {
    background: var(--color-neutral-100);
}

.ds-table th.sortable:not(.sorted) > a::after {
    content: "↑";
    margin-left: 3px;
    font-size: var(--text-caption);
    line-height: 1;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.ds-table th.sortable:not(.sorted):hover > a::after,
.ds-table th.sortable:not(.sorted):focus-within > a::after {
    opacity: 0.5;
}

.ds-table tbody td {
    padding: 13px var(--space-4);
    font-size: var(--text-label);
    color: var(--color-text);
    border-bottom: 0.5px solid var(--color-border);
    vertical-align: middle;
}

.ds-table tbody tr:last-child td {
    border-bottom: none;
}

.ds-table tbody tr,
.ds-table tbody tr:nth-child(odd),
.ds-table tbody tr:nth-child(even) {
    background-color: transparent;
}

.ds-table tbody tr:hover {
    background: var(--color-neutral-100);
}

.ds-table__row--link {
    cursor: pointer;
}

.ds-table tbody td:first-child a {
    color: var(--color-text);
    font-weight: 400;
}

.ds-table tbody td:first-child a:hover {
    color: var(--color-link);
}

.ds-table th.ds-table__col--num,
.ds-table td.ds-table__col--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ds-table .num {
    color: var(--color-text-subtle);
    font-variant-numeric: tabular-nums;
}

.ds-table .qty {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ds-table .muted {
    color: var(--color-text-subtle);
}

.ds-table__actions-col,
.ds-table__actions-cell {
    text-align: center;
    vertical-align: middle;
}

.ds-table__edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 2px 5px;
    border-radius: var(--radius-xs);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.ds-table tbody tr:hover .ds-table__edit-link,
.ds-table__edit-link:focus,
.ds-table__edit-link:focus-visible,
.ds-table__edit-link:focus-within {
    opacity: 1;
}

.ds-table__edit-link:hover,
.ds-table__edit-link:focus-visible {
    color: var(--color-primary);
    background: var(--color-neutral-100);
}

.ds-table__edit-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

button.ds-table__edit-link {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    margin: 0;
}

.ds-table__edit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ds-table__edit-icon .ti {
    font-size: 16px;
    color: currentColor;
    line-height: 1;
}

.ds-table__empty {
    padding: 24px 14px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--text-label);
}

.ds-table--reference {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

.ds-table--changelist {
    table-layout: auto;
    width: 100%;
    max-width: 100%;
}

.ds-table--reference thead th:first-child:not(.ds-table__col--row-number),
.ds-table--reference tbody td:first-child:not(.ds-table__col--row-number),
.ds-table--changelist thead th:first-child,
.ds-table--changelist tbody td:first-child {
    width: 45%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.ds-table--reference th,
.ds-table--reference td,
.ds-table--changelist th,
.ds-table--changelist td {
    min-width: 0;
}

.ds-table--reference th.ds-table__col--row-number,
.ds-table--reference td.ds-table__col--row-number {
    width: 72px;
}

.ds-table--reference th.ds-table__col--fill,
.ds-table--reference td.ds-table__col--fill {
    width: auto;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    color: var(--color-text);
}

.ds-table--reference th.ds-table__col--is-active,
.ds-table--reference td.ds-table__col--is-active {
    width: 1%;
    white-space: nowrap;
    text-align: center;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
}

.ds-table--reference th.ds-table__actions-col,
.ds-table--reference td.ds-table__actions-cell {
    width: 52px;
    white-space: nowrap;
    padding-left: var(--space-2);
    padding-right: var(--space-2);
}

.ds-table--changelist th.ds-table__actions-col,
.ds-table--changelist td.ds-table__actions-cell {
    width: 72px;
    white-space: nowrap;
}

.ds-table--reference thead th:first-child:not(.ds-table__col--row-number),
.ds-table--reference tbody td:first-child:not(.ds-table__col--row-number) {
    width: 30%;
}

.ds-table--reference thead th {
    white-space: normal;
    overflow-wrap: break-word;
    vertical-align: bottom;
}

.ds-table--reference thead th a {
    display: inline;
}

.ds-table--compact thead th {
    padding: 8px 12px;
}

.ds-table--compact tbody td {
    padding: 6px 12px;
}

.ds-table--compact tbody tr:hover {
    background: transparent;
}

.ds-table--compact input,
.ds-table--compact select {
    height: 32px;
    padding: 0 8px;
    width: 100%;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--text-label);
    font-family: inherit;
}

.ds-table--compact input:focus,
.ds-table--compact select:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-color: var(--color-primary);
}

.ds-table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    flex-wrap: wrap;
    padding: var(--space-3) 0;
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.ds-table-pagination__info {
    color: var(--color-text-muted);
}

.ds-table-pagination__controls {
    display: flex;
    align-items: center;
}

.ds-table-pagination__pages {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.ds-table-pagination__current {
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ds-table-pagination__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 4px 9px;
    border-radius: var(--radius-md);
    color: var(--color-link);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ds-table-pagination__link .ti {
    font-size: 16px;
    line-height: 1;
}

.ds-table-pagination__link:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

@media (pointer: coarse) {
    .ds-table-pagination__link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }
}

.ds-table-pagination__link:hover {
    background: var(--color-neutral-100);
}

.ds-table-pagination__link--disabled,
.ds-table-pagination__link--disabled:hover {
    color: var(--color-text-subtle);
    background: transparent;
    cursor: default;
}


.ds-search--header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    height: 34px;
    padding: 0 10px;
    width: auto;
    min-width: 300px;
    max-width: 400px;
    flex: 0 1 auto;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ds-search--header:focus-within {
    box-shadow: var(--shadow-focus);
    border-color: var(--color-primary);
}

.ds-search--header .ds-search__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-text-subtle);
}

.ds-search--header .ds-search__icon .ti {
    font-size: 15px;
    line-height: 1;
    color: currentColor;
}

.ds-search--header .ds-search__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 0;
    font-size: var(--text-label);
    font-family: inherit;
    color: var(--color-text);
}

.ds-search--header .ds-search__input:focus-visible {
    outline: none;
}

.ds-search--header .ds-search__input::placeholder {
    color: var(--color-text-subtle);
}

.cl-filter {
    height: 34px;
    padding: 0 38px 0 12px;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    font-size: var(--text-label);
    font-family: inherit;
    color: var(--color-text-muted);
    background-color: var(--color-surface);
    cursor: pointer;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2364748b'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%209l6%206l6%20-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.cl-filter:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-color: var(--color-primary);
}

.cl-filter--active {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.ds-app-header__add-button,
.ds-app-header__extra-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .ds-search--header {
        width: 100%;
        max-width: none;
    }

    .ds-app-header__add-button,
    .ds-app-header__extra-button {
        width: 100%;
        justify-content: center;
    }
}


.ds-overview {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: 0;
}

.ds-overview__identity {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.ds-passport__card {
    background: transparent;
    padding: 0;
}

.ds-passport__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.ds-passport__card-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4) var(--space-6);
    align-items: start;
}

.ds-passport__column {
    display: contents;
}

.ds-passport__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

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

.ds-passport__term {
    margin: 0;
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.ds-passport__definition {
    margin: 0;
    font-size: var(--text-body);
    color: var(--color-text);
    word-break: break-word;
}

.ds-passport__muted {
    color: var(--color-text-subtle);
}

.ds-passport__link {
    color: var(--color-link);
}

.ds-passport__link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .ds-passport__card-content {
        grid-template-columns: 1fr;
    }
}


.ds-status-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: var(--text-caption);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}


.ds-status-tag--success,
.ds-status-tag--trained {
    background: var(--tone-success-solid);
    color: var(--color-surface);
}

.ds-status-tag--error {
    background: var(--tone-error-bg);
    color: var(--tone-error-fg);
}

.ds-status-tag--warning {
    background: var(--tone-warning-bg);
    color: var(--tone-warning-fg);
}

.ds-status-tag--unknown,
.ds-status-tag--started,
.ds-status-tag--processing,
.ds-status-tag--draft,
.ds-status-tag--marked {
    background: var(--tone-unknown-bg);
    color: var(--tone-unknown-fg);
}

.ds-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    margin-right: var(--space-2);
    vertical-align: middle;
    flex-shrink: 0;
}

.ds-status-dot--active {
    background: var(--tone-success-solid);
}

.ds-status-dot--inactive {
    background: var(--color-destructive);
}

.ds-status-dot--success {
    background: var(--tone-success-solid);
}

.ds-status-dot--warning {
    background: var(--tone-warning-fg);
}

.ds-status-dot--error {
    background: var(--color-destructive);
}

.ds-status-dot--muted {
    background: var(--color-text-subtle);
}

.ds-status-dot--unknown {
    background: var(--tone-warning-fg);
}

.ds-status-dot--lg {
    width: 16px;
    height: 16px;
    margin-right: 0;
}

.ds-status-dot--after {
    margin-right: 0;
    margin-left: var(--space-2);
}


.btn {
    font-family: inherit;
    font-size: var(--text-label);
    line-height: var(--leading-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 7px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 0.5px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
        box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s var(--ease-spring);
}

.btn::before,
.btn::after {
    content: none;
}

.btn:hover {
    background: var(--color-neutral-100);
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"],
.btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:active:not(:disabled):not(.btn--disabled) {
    transform: scale(0.98);
}

.btn__text {
    display: inline-block;
}

.btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn__icon .ti {
    font-size: 18px;
    line-height: 1;
}

.btn__icon--left {
    margin-right: calc(-1 * var(--space-1));
}

.btn__icon--right {
    margin-left: calc(-1 * var(--space-1));
}

.btn--icon {
    padding: 7px 9px;
}

@media (pointer: coarse) {
    .btn--icon {
        min-width: 44px;
        min-height: 44px;
    }
}

.btn--primary.btn--filled {
    background: var(--color-primary);
    color: var(--color-surface);
    border-color: var(--color-primary);
}

.btn--primary.btn--filled:hover:not(:disabled):not(.btn--disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn--primary.btn--filled:active:not(:disabled):not(.btn--disabled),
.btn--primary.btn--filled:focus-visible:not(:disabled):not(.btn--disabled) {
    background: var(--color-primary-pressed);
    border-color: var(--color-primary-pressed);
}

.btn--primary.btn--filled:disabled,
.btn--primary.btn--filled.btn--disabled {
    background: var(--color-primary-disabled);
    border-color: var(--color-primary-disabled);
}

.btn--primary.btn--outlined {
    background: var(--color-surface);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--primary.btn--outlined:hover:not(:disabled):not(.btn--disabled) {
    color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn--primary.btn--outlined:active:not(:disabled):not(.btn--disabled),
.btn--primary.btn--outlined:focus-visible:not(:disabled):not(.btn--disabled) {
    color: var(--color-primary-pressed);
    border-color: var(--color-primary-pressed);
}

.btn--primary.btn--outlined:disabled,
.btn--primary.btn--outlined.btn--disabled {
    background: var(--color-header-background);
    color: var(--color-text-subtle);
    border-color: var(--color-border-strong);
}

.btn--secondary.btn--filled {
    background: var(--color-primary);
    color: var(--color-surface);
    border-color: var(--color-primary);
}

.btn--secondary.btn--filled:hover:not(:disabled):not(.btn--disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn--secondary.btn--filled:active:not(:disabled):not(.btn--disabled),
.btn--secondary.btn--filled:focus-visible:not(:disabled):not(.btn--disabled) {
    background: var(--color-primary-pressed);
    border-color: var(--color-primary-pressed);
}

.btn--secondary.btn--filled:disabled,
.btn--secondary.btn--filled.btn--disabled {
    background: var(--color-primary-disabled);
    border-color: var(--color-primary-disabled);
}

.btn--secondary.btn--outlined {
    background: var(--color-surface);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--secondary.btn--outlined:hover:not(:disabled):not(.btn--disabled) {
    color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn--secondary.btn--outlined:active:not(:disabled):not(.btn--disabled),
.btn--secondary.btn--outlined:focus-visible:not(:disabled):not(.btn--disabled) {
    color: var(--color-primary-pressed);
    border-color: var(--color-primary-pressed);
}

.btn--secondary.btn--outlined:disabled,
.btn--secondary.btn--outlined.btn--disabled {
    background: var(--color-header-background);
    color: var(--color-text-subtle);
    border-color: var(--color-border-strong);
}

.btn--tertiary.btn--outlined,
.btn--tertiary.btn--filled {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.btn--tertiary.btn--outlined:hover:not(:disabled):not(.btn--disabled),
.btn--tertiary.btn--filled:hover:not(:disabled):not(.btn--disabled) {
    background: var(--color-neutral-100);
}

.btn--tertiary.btn--outlined:active:not(:disabled):not(.btn--disabled),
.btn--tertiary.btn--outlined:focus-visible:not(:disabled):not(.btn--disabled),
.btn--tertiary.btn--filled:active:not(:disabled):not(.btn--disabled),
.btn--tertiary.btn--filled:focus-visible:not(:disabled):not(.btn--disabled) {
    background: var(--color-neutral-200);
}

.btn--tertiary.btn--outlined:disabled,
.btn--tertiary.btn--outlined.btn--disabled,
.btn--tertiary.btn--filled:disabled,
.btn--tertiary.btn--filled.btn--disabled {
    background: var(--color-header-background);
    color: var(--color-text-subtle);
}

.btn--destructive.btn--outlined {
    background: var(--color-surface);
    color: var(--color-destructive);
    border-color: var(--color-destructive-border);
}

.btn--destructive.btn--outlined:hover:not(:disabled):not(.btn--disabled) {
    background: var(--color-destructive-bg);
    color: var(--color-destructive-hover);
}

.btn--destructive.btn--outlined:active:not(:disabled):not(.btn--disabled),
.btn--destructive.btn--outlined:focus-visible:not(:disabled):not(.btn--disabled) {
    color: var(--color-destructive-pressed);
    border-color: var(--color-destructive-pressed);
}

.btn--destructive.btn--outlined:disabled,
.btn--destructive.btn--outlined.btn--disabled {
    background: var(--color-header-background);
    color: var(--color-destructive-disabled);
    border-color: var(--color-destructive-border);
}

.btn--destructive.btn--filled {
    background: var(--color-destructive);
    color: var(--color-surface);
    border-color: var(--color-destructive);
}

.btn--destructive.btn--filled:hover:not(:disabled):not(.btn--disabled) {
    background: var(--color-destructive-hover);
    border-color: var(--color-destructive-hover);
}

.btn--destructive.btn--filled:active:not(:disabled):not(.btn--disabled),
.btn--destructive.btn--filled:focus-visible:not(:disabled):not(.btn--disabled) {
    background: var(--color-destructive-pressed);
    border-color: var(--color-destructive-pressed);
}

.btn--destructive.btn--filled:disabled,
.btn--destructive.btn--filled.btn--disabled {
    background: var(--color-destructive-disabled);
    border-color: var(--color-destructive-disabled);
}

.btn__icon-circle {
    width: 24px;
    height: 24px;
    margin-right: -4px;
    border-radius: var(--radius-circle);
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    transition: transform 0.25s var(--ease-spring), background-color 0.25s var(--ease-spring);
}

.btn__icon-circle .ti {
    font-size: 15px;
    line-height: 1;
}

.btn--primary.btn--filled:hover:not(:disabled):not(.btn--disabled) .btn__icon-circle {
    transform: translate(2px, -1px) scale(1.06);
    background: rgba(255, 255, 255, 0.28);
}


.ds-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
}

.ds-modal[aria-hidden="false"] {
    pointer-events: auto;
}

.ds-modal__backdrop {
    position: fixed;
    inset: 0;
    background: var(--drawer-scrim);
    opacity: 0;
    transition: var(--drawer-fade);
}

.ds-modal[aria-hidden="false"] .ds-modal__backdrop {
    opacity: 1;
}

.ds-modal__dialog {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    max-height: 100vh;
    width: var(--drawer-width);
    max-width: 100vw;
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
    transform: translateX(100%);
    transition: var(--drawer-slide);
}

.ds-modal[aria-hidden="false"] .ds-modal__dialog {
    transform: translateX(0);
    box-shadow: var(--drawer-shadow);
}

.ds-modal--full .ds-modal__dialog {
    inset: 2.5vh 2.5vw;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: var(--radius-lg, 14px);
    transform: scale(0.985);
    opacity: 0;
    transition: var(--drawer-slide), opacity var(--drawer-fade, 0.2s ease);
}

.ds-modal[aria-hidden="false"].ds-modal--full .ds-modal__dialog {
    transform: none;
    opacity: 1;
}

.ds-popup__card.ds-popup__card--wide {
    width: 100%;
    max-width: none;
}

.ds-popup__card--wide .ds-popup__hint,
.ds-popup__card--wide .ds-popup__field {
    max-width: 720px;
}

.ds-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 0.5px solid var(--color-border);
}

.ds-modal__header h2 {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text);
}

.ds-modal__close {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ds-modal__close .ti,
.ds-modal__close svg {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ds-modal__close:hover {
    background: var(--color-neutral-100);
    color: var(--color-text);
}

.ds-modal__close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.ds-modal__body {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
}

.ds-modal__iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.ds-modal__loading {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-6);
    text-align: center;
    background: var(--color-surface);
    animation: ds-modal-loading-in 0.18s ease both;
}

.ds-modal__loading[hidden] {
    display: none;
}

.ds-modal__spinner {
    width: 34px;
    height: 34px;
    color: var(--color-primary);
    border: 3px solid currentColor;
    border-right-color: transparent;
    border-radius: var(--radius-circle);
    animation: ds-popup-spin 0.6s linear infinite;
}

.ds-modal__loading-text {
    margin: 0;
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text-muted);
}

@keyframes ds-modal-loading-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ds-modal__default-url {
    display: none;
}

body.ds-modal-open {
    overflow: hidden;
}

html.ds-popup-page,
body.ds-popup-page {
    background: var(--color-surface);
    overflow: hidden !important;
    height: 100%;
    width: 100%;
}

body.ds-popup-page #header,
body.ds-popup-page #user-tools,
body.ds-popup-page #app-sidebar,
body.ds-popup-page .content-nav {
    display: none;
}

body.ds-popup-page #container {
    padding-left: 0 !important;
}

body.ds-popup-page #content,
body.ds-popup-page #content-main {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
}

body.ds-popup-page .content-layout {
    display: block;
    height: 100%;
}

body.ds-popup-page .content-main {
    width: 100%;
}

body.ds-popup-page .ds-popup {
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: var(--color-surface);
    overflow: hidden;
}

body.popup {
    background: var(--color-surface);
}

body.popup .content-nav {
    display: none;
}

.ds-popup__card {
    width: min(600px, 100%);
    height: 100%;
    max-height: 100%;
    background: var(--color-surface);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.ds-popup__header {
    display: none;
}

.ds-popup__title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.ds-popup__subtitle {
    margin: var(--space-2) 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-label);
}

.ds-popup__body {
    flex: 1;
    min-height: 0;
    padding: var(--space-5);
    background: var(--color-surface);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ds-popup__body::-webkit-scrollbar {
    display: none;
}

.ds-popup__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.ds-popup__fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ds-popup__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.ds-popup__label {
    font-size: var(--text-label);
    color: var(--color-text-muted);
    line-height: 1.4;
}

.ds-popup__required {
    color: var(--color-destructive);
    margin-left: var(--space-1);
}

.ds-popup__control input:not([type="checkbox"]):not([type="radio"]),
.ds-popup__control select,
.ds-popup__control textarea {
    width: 100%;
    box-sizing: border-box;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-body);
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ds-popup__control input:not([type="checkbox"]):not([type="radio"]):focus,
.ds-popup__control select:focus,
.ds-popup__control textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.ds-popup__control input::placeholder,
.ds-popup__control textarea::placeholder {
    color: var(--color-text-subtle);
}

.ds-popup__control select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.ds-popup__control textarea {
    min-height: 96px;
    resize: vertical;
}

.ds-popup__help {
    margin: var(--space-1) 0 0;
    font-size: var(--text-caption);
    color: var(--color-text-subtle);
    line-height: 1.4;
}

.ds-popup__errors,
.ds-popup__nonfield-errors ul {
    list-style: none;
    margin: var(--space-1) 0 0;
    padding: 0;
    color: var(--color-destructive);
    font-size: var(--text-caption);
}

.ds-popup__nonfield-errors {
    background: var(--tone-error-bg);
    border: 0.5px solid var(--color-destructive-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: var(--tone-error-fg);
    font-size: var(--text-caption);
}

.ds-popup__field--error .ds-popup__control input,
.ds-popup__field--error .ds-popup__control select,
.ds-popup__field--error .ds-popup__control textarea {
    border-color: var(--color-destructive);
}

.ds-popup__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    padding-top: var(--space-2);
    margin-top: var(--space-2);
}

.ds-popup__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--color-header-background);
    flex-shrink: 0;
}

.ds-popup__card.is-loading {
    position: relative;
}

.ds-popup__loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-6);
    text-align: center;
    background: var(--color-surface);
    opacity: 0.97;
}

.ds-popup__card.is-loading .ds-popup__loading {
    display: flex;
}

.ds-popup__spinner {
    width: 34px;
    height: 34px;
    color: var(--color-primary);
    border: 3px solid currentColor;
    border-right-color: transparent;
    border-radius: var(--radius-circle);
    animation: ds-popup-spin 0.6s linear infinite;
}

@keyframes ds-popup-spin {
    to {
        transform: rotate(360deg);
    }
}

.ds-popup__loading-title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.ds-popup__loading-sub {
    margin: 0;
    max-width: 36ch;
    font-size: var(--text-label);
    line-height: 1.5;
    color: var(--color-text-muted);
}

.ds-popup__progress-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-2) 0;
}

.ds-popup__progress-title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.ds-popup__progress-track {
    position: relative;
    height: 8px;
    background: var(--color-surface-muted, #eef1f4);
    border-radius: 999px;
    overflow: hidden;
}

.ds-popup__progress-bar {
    width: 0;
    height: 100%;
    background: var(--color-primary, #005a9b);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.ds-popup__progress-panel.is-ok .ds-popup__progress-bar {
    background: #15803d;
}

.ds-popup__progress-track.is-indeterminate .ds-popup__progress-bar {
    width: 38%;
    transition: none;
    animation: ds-popup-indet 1.15s ease-in-out infinite;
}

.ds-popup__progress-meta {
    margin: 0;
    font-size: var(--text-label);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

.ds-popup__progress-panel.is-error .ds-popup__progress-meta {
    color: #b91c1c;
}

@keyframes ds-popup-indet {
    0% {
        margin-left: -40%;
    }

    100% {
        margin-left: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ds-popup__progress-bar {
        transition: none;
    }

    .ds-popup__progress-track.is-indeterminate .ds-popup__progress-bar {
        animation: none;
        width: 100%;
        opacity: 0.5;
    }
}

.ds-popup__submit.btn,
.ds-popup__submit.button {
    background: var(--color-primary);
    color: var(--color-surface);
    border: 0.5px solid var(--color-primary);
}

.ds-popup__submit.btn:hover,
.ds-popup__submit.button:hover,
.ds-popup__submit.btn:focus-visible,
.ds-popup__submit.button:focus-visible {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.ds-popup__submit.btn:active,
.ds-popup__submit.button:active {
    background: var(--color-primary-pressed);
    border-color: var(--color-primary-pressed);
}

.ds-popup__cancel.btn,
.ds-popup__cancel.button,
.ds-modal__cancel.btn,
.ds-modal__cancel.button {
    border: none !important;
    background: transparent !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
}

.ds-popup__cancel.btn:hover,
.ds-popup__cancel.button:hover,
.ds-popup__cancel.btn:focus-visible,
.ds-popup__cancel.button:focus-visible,
.ds-modal__cancel.btn:hover,
.ds-modal__cancel.button:hover,
.ds-modal__cancel.btn:focus-visible,
.ds-modal__cancel.button:focus-visible {
    background: var(--color-neutral-100) !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
    border: none !important;
}

.ds-modal .select2-container,
.ds-modal .select2-dropdown {
    z-index: 1200;
}

body.ds-modal-placeholder #header,
body.ds-modal-placeholder .content-title,
body.ds-modal-placeholder .object-tools,
body.ds-modal-placeholder .ds-tabs {
    display: none !important;
}

body.popup.ds-modal-placeholder {
    background: var(--color-surface);
}

body.popup.ds-modal-placeholder .content-nav {
    display: none;
}

body.popup.ds-modal-placeholder .content-main {
    width: 100%;
}

.ds-modal-placeholder__wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--color-neutral-100);
}

.ds-modal-placeholder__card {
    width: min(840px, 100%);
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
    padding: var(--space-5) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ds-modal-placeholder__title {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--color-text);
}

.ds-modal-placeholder__subtitle {
    margin: var(--space-1) 0 0;
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.ds-modal-placeholder__body p {
    margin: 0;
    font-size: var(--text-body);
    color: var(--color-text-body);
}

.ds-modal-placeholder__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--space-3);
    border-top: 0.5px solid var(--color-border);
}

.ds-modal-placeholder__alert {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.ds-modal-placeholder__alert--error {
    background: var(--tone-error-bg);
    border: 0.5px solid var(--color-destructive-border);
    color: var(--tone-error-fg);
}

.ds-modal-placeholder__fieldset {
    margin: var(--space-4) 0;
}

.ds-modal-placeholder__upload-row {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    flex-wrap: wrap;
}

.ds-modal-placeholder__field-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.ds-modal-placeholder__result {
    margin-top: var(--space-3);
    padding: var(--space-3);
    border: 0.5px solid #bfe0c5;
    background: var(--tone-success-bg);
    border-radius: var(--radius-md);
}

.ds-modal-placeholder__spaced {
    margin-top: var(--space-2);
}

.ds-modal-placeholder__debug-pre {
    white-space: pre-wrap;
}

.profile-view {
    margin-top: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.profile-view__chart {
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.profile-view__chart {
    min-height: 260px;
    max-height: 260px;
}

.profile-view__chart canvas {
    height: 100% !important;
}

.profile-view__chart-title {
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--color-text);
}

.ds-popup__days-of-week {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ds-popup__day-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    font-size: var(--text-caption);
    color: var(--color-text);
    cursor: pointer;
}

.ds-popup__day-checkbox .ds-popup__checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}



.edit-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
}

.edit-drawer[aria-hidden="false"] {
    pointer-events: auto;
}

.edit-drawer__overlay {
    position: absolute;
    inset: 0;
    background: var(--drawer-scrim);
    opacity: 0;
    transition: var(--drawer-fade);
}

.edit-drawer[aria-hidden="false"] .edit-drawer__overlay {
    opacity: 1;
}

.edit-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100vh;
    width: var(--drawer-width);
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    transform: translateX(100%);
    transition: var(--drawer-slide);
}

.edit-drawer[aria-hidden="false"] .edit-drawer__panel {
    transform: translateX(0);
    box-shadow: var(--drawer-shadow);
}

.edit-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 0.5px solid var(--color-border);
}

.edit-drawer__title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text);
}

.edit-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-1);
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
}

.edit-drawer__close .ti,
.edit-drawer__close svg {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.edit-drawer__close:hover {
    background: var(--color-neutral-100);
    color: var(--color-text);
}

.edit-drawer__close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.edit-drawer__body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.edit-drawer__iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

body.edit-drawer-open {
    overflow: hidden;
}


.ds-tabs {
    display: inline-flex;
    gap: 0;
    flex-wrap: wrap;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.ds-tabs__tab {
    position: relative;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: var(--text-label);
    white-space: nowrap;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.ds-tabs__label-wrap {
    display: inline-grid;
}

.ds-tabs__label {
    grid-area: 1 / 1;
    font-weight: 400;
}

.ds-tabs__ghost {
    grid-area: 1 / 1;
    font-weight: 600;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

.ds-tabs__tab:hover,
.ds-tabs__tab.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

.ds-tabs__tab:hover .ds-tabs__label,
.ds-tabs__tab.is-active .ds-tabs__label {
    font-weight: 600;
}

.ds-tabs__tab:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.ds-tabs__tab:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .ds-tabs {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ds-tabs__tab {
        flex: 1 1 auto;
        min-width: fit-content;
        text-align: center;
    }
}

.ds-tab-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ds-tab-content__panel {
    display: none;
    background: transparent;
    padding: 0;
}

.ds-tab-content__panel.is-active {
    display: block;
}

.ds-tab-content__placeholder {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    color: var(--color-text-body);
}

.ds-tab-content__placeholder h2 {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.ds-tab-content__placeholder p {
    margin: 0;
    font-size: var(--text-body);
}

.ds-tab-placeholder,
.ds-tab-empty {
    background: transparent;
    padding: var(--space-5);
    color: var(--color-text-muted);
    text-align: center;
}

.ds-tab-placeholder h2 {
    margin: 0 0 var(--space-2);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.ds-tab-placeholder p,
.ds-tab-empty {
    margin: 0;
    font-size: var(--text-body);
}

.ds-tab-empty.is-hidden,
.ds-tab-empty[hidden] {
    display: none;
}


.ds-tabs__more {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ds-tabs__more .header-apps-more__trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: var(--text-label);
    padding: 10px 14px;
    margin-bottom: -1px;
}

.ds-tabs__more .header-apps-more__trigger:hover,
.ds-tabs__more.is-open .header-apps-more__trigger {
    color: var(--color-primary);
}

.ds-tabs__more .header-apps-more__chevron {
    font-size: 10px;
    line-height: 1;
    transition: transform 0.15s ease;
}

.ds-tabs__more.is-open .header-apps-more__chevron {
    transform: rotate(180deg);
}

.ds-tabs__more .header-apps-more__actions {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 200px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 200;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.ds-tabs__more.is-open .header-apps-more__actions {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ds-tabs__more .header-apps-more__actions li {
    list-style: none;
}

.ds-tabs__more .header-apps-more__actions .ds-tabs__tab {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 14px;
    border-bottom: none;
    margin: 0;
}

.ds-tabs__more .header-apps-more__actions .ds-tabs__tab:hover,
.ds-tabs__more .header-apps-more__actions .ds-tabs__tab.is-active {
    color: var(--color-primary);
    background: var(--tone-accent-bg);
}

.ds-tab-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}


.ds-report {
    --rep-blue: var(--color-primary, #005a9b);
    --rep-blue-600: #024e85;
    --rep-blue-weak: #e7f0f7;
    --rep-ink: #16191d;
    --rep-muted: #5b6470;
    --rep-faint: #8a93a0;
    --rep-line: #e4e7eb;
    --rep-surface: #ffffff;
    --rep-canvas: #f4f6f8;
    --rep-panel: #fbfcfd;
    --rep-scalar: var(--color-primary, #005a9b);
    --rep-harm: #0f766e;
    --rep-collide: #b45309;
    --rep-collide-bg: #fdf3e6;
    --rep-gap: #b91c1c;
    --rep-ok: #15803d;
    --rep-r: 10px;
    --rep-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --rep-sh: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);

    color: var(--rep-ink);
    font-size: 13px;
    line-height: 1.45;
}

.ds-report * {
    box-sizing: border-box;
}

.ds-report__building {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4, 12px);
    min-height: 300px;
    padding: var(--space-6, 24px);
    text-align: center;
}

.ds-report--building .ds-report__building {
    display: flex;
}

.ds-report--building .ds-report__body {
    display: none;
}

.ds-report__summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--rep-line);
}

.ds-report .stat {
    background: var(--rep-canvas);
    border: 1px solid var(--rep-line);
    border-radius: 9px;
    padding: 6px 11px;
    min-width: 82px;
}

.ds-report .stat .n {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.ds-report .stat .l {
    font-size: 10px;
    color: var(--rep-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ds-report .stat.warn .n {
    color: var(--rep-collide);
}

.ds-report .stat.bad .n {
    color: var(--rep-gap);
}

.ds-report .stat.good .n {
    color: var(--rep-ok);
}

.ds-report .tabs {
    display: flex;
    gap: 3px;
    background: var(--rep-canvas);
    border: 1px solid var(--rep-line);
    border-radius: 9px;
    padding: 3px;
    flex-wrap: wrap;
    width: 100%;
}

.ds-report .tabs button {
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    border: 0;
    background: transparent;
    color: var(--rep-muted);
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
}

.ds-report .tabs button.on {
    background: var(--rep-surface);
    color: var(--rep-blue);
    box-shadow: var(--rep-sh);
}

.ds-report__shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    margin-top: 14px;
    align-items: start;
}

.ds-report__rail {
    border: 1px solid var(--rep-line);
    border-radius: var(--rep-r);
    background: var(--rep-surface);
    overflow: hidden;
    position: sticky;
    top: 8px;
    max-height: calc(100vh - 210px);
    display: flex;
    flex-direction: column;
}

.ds-report__rail-search {
    padding: 9px;
    border-bottom: 1px solid var(--rep-line);
    flex: none;
}

.ds-report__rail-search input {
    width: 100%;
    font: inherit;
    font-size: 12.5px;
    padding: 7px 10px;
    border: 1px solid var(--rep-line);
    border-radius: 7px;
    background: var(--rep-canvas);
    color: var(--rep-ink);
}

.ds-report #dsr-rail-list {
    overflow-y: auto;
}

.ds-report .grp {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rep-faint);
    padding: 9px 12px 3px;
    font-weight: 700;
}

.ds-report .blk {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.ds-report .blk:hover {
    background: var(--rep-canvas);
}

.ds-report .blk.sel {
    background: var(--rep-blue-weak);
    border-left-color: var(--rep-blue);
}

.ds-report .blk .code {
    font-family: var(--rep-mono);
    font-size: 12px;
    font-weight: 600;
}

.ds-report .blk .et {
    margin-left: auto;
    font-size: 10.5px;
    color: var(--rep-faint);
    white-space: nowrap;
}

.ds-report .view {
    display: none;
}

.ds-report .view.on {
    display: block;
}

.ds-report .main {
    margin-top: 0;
    min-width: 0;
}

@media (max-width: 720px) {
    .ds-report__shell {
        grid-template-columns: 1fr;
    }

    .ds-report__rail {
        position: static;
        max-height: 240px;
    }
}

.ds-report h2.sec {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rep-faint);
    margin: 0 0 10px;
    font-weight: 700;
}

.ds-report .sec.is-flush {
    margin: 0;
}

.ds-report .sec.is-spaced {
    margin-top: 16px;
}

.ds-report .card {
    background: var(--rep-surface);
    border: 1px solid var(--rep-line);
    border-radius: var(--rep-r);
    padding: 14px;
    box-shadow: var(--rep-sh);
}

.ds-report .grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.ds-report table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ds-report th {
    text-align: left;
    font-size: var(--text-caption);
    text-transform: none;
    letter-spacing: normal;
    color: var(--color-table-header);
    font-weight: 653;
    padding: 6px 8px;
    border-bottom: 1px solid var(--rep-line);
}

.ds-report td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f3f5;
    font-variant-numeric: tabular-nums;
}

.ds-report td.mono,
.ds-report .mono {
    font-family: var(--rep-mono);
}

.ds-report tr:hover td {
    background: var(--rep-panel);
}

.ds-report .scroll-x {
    overflow: auto;
}

.ds-report #vMap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--rep-surface);
    box-shadow: inset 0 -1px 0 var(--rep-line);
}

.ds-report .scroll-y {
    max-height: 280px;
    overflow: auto;
}

.ds-report .pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--rep-blue-weak);
    color: var(--rep-blue);
}

.ds-report .pill.harm {
    background: #e6f4f1;
    color: var(--rep-harm);
}

.ds-report .pill.coll {
    background: var(--rep-collide-bg);
    color: var(--rep-collide);
}

.ds-report .badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ds-report .badge.collide {
    background: var(--rep-collide-bg);
    color: var(--rep-collide);
}

.ds-report .dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: none;
}

.ds-report .dot.scalar {
    background: var(--rep-scalar);
}

.ds-report .dot.harmonic {
    background: var(--rep-harm);
}

.ds-report .dot.unknown {
    background: var(--rep-gap);
}

.ds-report .dot.ignored {
    background: var(--rep-faint);
}

.ds-report .bar-eff {
    height: 8px;
    border-radius: 5px;
    background: var(--rep-canvas);
    overflow: hidden;
    margin-top: 4px;
}

.ds-report .bar-eff i {
    display: block;
    height: 100%;
    background: var(--rep-blue);
}

.ds-report .legend {
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: var(--rep-muted);
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ds-report .legend .it {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ds-report .tlwrap {
    position: relative;
    background: var(--rep-surface);
    border: 1px solid var(--rep-line);
    border-radius: var(--rep-r);
    padding: 12px 14px;
    box-shadow: var(--rep-sh);
}

.ds-report .tlhead {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    gap: 8px;
    flex-wrap: wrap;
}

.ds-report .now {
    font-family: var(--rep-mono);
    font-size: 12px;
    color: var(--rep-blue);
    font-weight: 650;
}

.ds-report .ruler {
    position: relative;
    height: 26px;
    margin-left: 104px;
    border-bottom: 1px solid var(--rep-line);
}

.ds-report .tick {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px dashed #eef1f4;
    font-size: 9px;
    color: var(--rep-faint);
    padding-left: 3px;
    white-space: nowrap;
}

.ds-report .tick--last {
    border-left: none;
    border-right: 1px dashed #eef1f4;
    padding-left: 0;
    padding-right: 3px;
    transform: translateX(-100%);
}

.ds-report .lane {
    display: flex;
    align-items: center;
    height: 30px;
    border-bottom: 1px solid #f3f5f7;
}

.ds-report .lane .lab {
    width: 104px;
    flex: none;
    font-family: var(--rep-mono);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 8px;
    overflow: hidden;
}

.ds-report .lane .lab .nm {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ds-report .lane.coll .lab .nm {
    color: var(--rep-collide);
}

.ds-report .lane .plot {
    position: relative;
    flex: 1;
    height: 100%;
}

.ds-report .lane svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ds-report .lane .val {
    width: 62px;
    flex: none;
    text-align: right;
    font-family: var(--rep-mono);
    font-size: 11px;
    color: var(--rep-blue);
    font-weight: 600;
}

.ds-report .scrub {
    position: absolute;
    top: 38px;
    bottom: 12px;
    left: 104px;
    width: 0;
    border-left: 2px solid var(--rep-blue);
    pointer-events: none;
    z-index: 5;
}

.ds-report .heat {
    display: grid;
    gap: 1px;
    background: var(--rep-line);
    border: 1px solid var(--rep-line);
    border-radius: 6px;
    overflow: hidden;
}

.ds-report .heat .c {
    height: 6px;
}

.ds-report .bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 120px;
    padding: 8px 8px 18px;
    background: var(--rep-panel);
    border: 1px solid var(--rep-line);
    border-radius: 8px;
    margin-top: 8px;
}

.ds-report .bars .b {
    flex: 1;
    background: var(--rep-harm);
    border-radius: 2px 2px 0 0;
    min-height: 1px;
    position: relative;
}

.ds-report .bars .b:hover {
    outline: 2px solid var(--rep-blue);
    outline-offset: 1px;
}

.ds-report .bars .b span {
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 7px;
    color: var(--rep-faint);
}

.ds-report .pipe {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ds-report .stage {
    background: var(--rep-surface);
    border: 1px solid var(--rep-line);
    padding: 13px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--rep-sh);
}

.ds-report .stage:not(:last-child) {
    border-bottom: 0;
}

.ds-report .stage:first-child {
    border-radius: var(--rep-r) var(--rep-r) 0 0;
}

.ds-report .stage:last-child {
    border-radius: 0 0 var(--rep-r) var(--rep-r);
}

.ds-report .stage .hd {
    font-size: 11px;
    font-weight: 700;
    color: var(--rep-blue);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ds-report .stage .sub {
    font-size: 10px;
    color: var(--rep-faint);
    margin-bottom: 9px;
}

.ds-report .stage .arrow {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 18px;
    height: 18px;
    background: var(--rep-surface);
    border: 1px solid var(--rep-line);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rep-muted);
    font-size: 11px;
}

.ds-report .stage .arrow::before {
    content: "↓";
}

.ds-report pre.raw {
    font-family: var(--rep-mono);
    font-size: 10px;
    background: var(--rep-canvas);
    border: 1px solid var(--rep-line);
    border-radius: 7px;
    padding: 8px;
    margin: 0;
    white-space: pre-wrap;
    color: var(--rep-muted);
    max-height: 190px;
    overflow: auto;
}

.ds-report .kv {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    padding: 3px 0;
    border-bottom: 1px dashed #eef1f4;
}

.ds-report .kv .k {
    color: var(--rep-muted);
}

.ds-report .kv .v {
    font-family: var(--rep-mono);
    font-weight: 600;
    text-align: right;
}

.ds-report .minirows {
    font-family: var(--rep-mono);
    font-size: 10px;
    max-height: 190px;
    overflow: auto;
}

.ds-report .minirows .r {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
    border-bottom: 1px solid #f3f5f7;
}

.ds-report .note {
    font-size: 11px;
    color: var(--rep-muted);
    margin-top: 8px;
    line-height: 1.5;
}

.ds-report .note.warn {
    color: var(--rep-collide);
    background: var(--rep-collide-bg);
    border: 1px solid #f0dcc0;
    border-radius: 7px;
    padding: 8px;
}

.ds-report .stack {
    display: grid;
    gap: 12px;
}

@media (min-width: 720px) {
    .ds-report .ruler {
        margin-left: 128px;
    }

    .ds-report .lane .lab {
        width: 128px;
    }

    .ds-report .lane .val {
        width: 74px;
    }
}

@media (min-width: 880px) {
    .ds-report .pipe {
        flex-direction: row;
    }

    .ds-report .stage {
        flex: 1;
    }

    .ds-report .stage:not(:last-child) {
        border-bottom: 1px solid var(--rep-line);
        border-right: 0;
    }

    .ds-report .stage:first-child {
        border-radius: var(--rep-r) 0 0 var(--rep-r);
    }

    .ds-report .stage:last-child {
        border-radius: 0 var(--rep-r) var(--rep-r) 0;
    }

    .ds-report .stage .arrow {
        bottom: auto;
        top: 46px;
        left: auto;
        right: -10px;
        transform: none;
    }

    .ds-report .stage .arrow::before {
        content: "→";
    }
}


.ds-mapmgr {
    --mm-blue: var(--color-primary, #005a9b);
    --mm-blue-600: #024e85;
    --mm-blue-weak: #e7f0f7;
    --mm-ink: #16191d;
    --mm-muted: #5b6470;
    --mm-faint: #8a93a0;
    --mm-line: #e4e7eb;
    --mm-surface: #ffffff;
    --mm-canvas: #f4f6f8;
    --mm-panel: #fbfcfd;
    --mm-harm: #0f766e;
    --mm-harm-weak: #e6f4f1;
    --mm-collide: #b45309;
    --mm-collide-bg: #fdf3e6;
    --mm-collide-border: #f0dcc0;
    --mm-gap: #b91c1c;
    --mm-ok: #15803d;
    --mm-ok-bg: #e7f5ec;
    --mm-ok-border: #bfe3cb;
    --mm-r: 10px;
    --mm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --mm-sh: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
    --mm-cols: 50;

    color: var(--mm-ink);
    font-size: 13px;
    line-height: 1.45;
}

.ds-mapmgr * {
    box-sizing: border-box;
}

.ds-mapmgr .mm-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 2px 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--mm-line);
}

.ds-mapmgr .mm-top__title {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ds-mapmgr .mm-top__eyebrow {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mm-faint);
}

.ds-mapmgr .mm-top__h1 {
    font-size: 18px;
    margin: 0;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--mm-ink);
}

.ds-mapmgr .mm-top__actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ds-mapmgr .mm-dtswitch {
    display: flex;
    gap: 3px;
    background: var(--mm-canvas);
    border: 1px solid var(--mm-line);
    border-radius: 9px;
    padding: 3px;
    flex-wrap: wrap;
}

.ds-mapmgr .mm-dtswitch button {
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    border: 0;
    background: transparent;
    color: var(--mm-muted);
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
}

.ds-mapmgr .mm-dtswitch button.on {
    background: var(--mm-surface);
    color: var(--mm-blue);
    box-shadow: var(--mm-sh);
}

.ds-mapmgr .mm-dtswitch button .n {
    color: var(--mm-faint);
    font-weight: 600;
    margin-left: 5px;
    font-variant-numeric: tabular-nums;
}

.ds-mapmgr .mm-search {
    position: relative;
    display: flex;
    align-items: center;
}

.ds-mapmgr .mm-search__icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mm-faint);
    display: inline-flex;
    pointer-events: none;
}

.ds-mapmgr .mm-search__icon svg {
    width: 15px;
    height: 15px;
}

.ds-mapmgr .mm-search__input {
    font: inherit;
    font-size: 12.5px;
    padding: 8px 12px 8px 30px;
    border: 1px solid var(--mm-line);
    border-radius: 8px;
    background: var(--mm-canvas);
    color: var(--mm-ink);
    width: 248px;
    max-width: 100%;
}

.ds-mapmgr .mm-issues {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ds-mapmgr .mm-issues:empty {
    display: none;
}

.ds-mapmgr .stat {
    background: var(--mm-canvas);
    border: 1px solid var(--mm-line);
    border-radius: 9px;
    padding: 6px 12px;
    min-width: 78px;
}

.ds-mapmgr .stat .n {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.ds-mapmgr .stat .l {
    font-size: 10px;
    color: var(--mm-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ds-mapmgr .stat.harm .n {
    color: var(--mm-harm);
}

.ds-mapmgr .stat.bad .n {
    color: var(--mm-collide);
}

.ds-mapmgr .alert {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--mm-collide-bg);
    border: 1px solid var(--mm-collide-border);
    border-radius: 9px;
    padding: 8px 13px;
    color: var(--mm-collide);
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
}

.ds-mapmgr .alert.ok {
    background: var(--mm-ok-bg);
    border-color: var(--mm-ok-border);
    color: var(--mm-ok);
    cursor: default;
}

.ds-mapmgr .alert .pill-n {
    background: var(--mm-collide);
    color: #fff;
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.ds-mapmgr .alert .ifr {
    font-size: 10.5px;
    color: var(--mm-collide);
    opacity: 0.8;
}

.ds-mapmgr .mm-colldrawer {
    display: none;
    background: #fffaf3;
    border: 1px solid var(--mm-collide-border);
    border-radius: var(--mm-r);
    padding: 12px 14px;
    margin-bottom: 14px;
}

.ds-mapmgr .mm-colldrawer.open {
    display: block;
}

.ds-mapmgr .mm-colldrawer h3 {
    margin: 0 0 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mm-collide);
}

.ds-mapmgr .collgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 10px;
}

.ds-mapmgr .collcard {
    background: var(--mm-surface);
    border: 1px solid var(--mm-collide-border);
    border-radius: 9px;
    padding: 11px 13px;
    box-shadow: var(--mm-sh);
}

.ds-mapmgr .collcard .key {
    font-family: var(--mm-mono);
    font-size: 11px;
    color: var(--mm-collide);
    font-weight: 700;
}

.ds-mapmgr .collcard .codes {
    margin: 6px 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ds-mapmgr .collcard .codes .c {
    font-family: var(--mm-mono);
    font-size: 12px;
    background: var(--mm-collide-bg);
    color: var(--mm-collide);
    border-radius: 5px;
    padding: 2px 7px;
    font-weight: 600;
}

.ds-mapmgr .collcard .fixrow {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.ds-mapmgr .mm-shell {
    display: grid;
    grid-template-columns: 284px minmax(0, 1fr);
    gap: 0;
    align-items: start;
    border: 1px solid var(--mm-line);
    border-radius: var(--mm-r);
    overflow: hidden;
    background: var(--mm-surface);
}

.ds-mapmgr .mm-rail {
    border-right: 1px solid var(--mm-line);
    background: var(--mm-surface);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 8px;
    max-height: calc(100vh - 96px);
}

.ds-mapmgr .mm-rail__head {
    padding: 10px 12px;
    border-bottom: 1px solid var(--mm-line);
    flex: none;
}

.ds-mapmgr .mm-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.ds-mapmgr .chip {
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--mm-line);
    background: var(--mm-canvas);
    color: var(--mm-muted);
    border-radius: 20px;
    padding: 4px 10px;
    cursor: pointer;
}

.ds-mapmgr .chip.on {
    background: var(--mm-blue);
    border-color: var(--mm-blue);
    color: #fff;
}

.ds-mapmgr .mm-rail__search {
    margin-top: 8px;
    position: relative;
    display: flex;
    align-items: center;
}

.ds-mapmgr .mm-rail__search-input {
    width: 100%;
    font: inherit;
    font-size: 12.5px;
    padding: 7px 10px 7px 28px;
    border: 1px solid var(--mm-line);
    border-radius: 7px;
    background: var(--mm-canvas);
    color: var(--mm-ink);
}

.ds-mapmgr .mm-rail__list {
    overflow-y: auto;
    flex: 1;
}

.ds-mapmgr .grp {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mm-faint);
    padding: 11px 14px 4px;
    font-weight: 700;
    position: sticky;
    top: 0;
    background: var(--mm-surface);
    z-index: 1;
}

.ds-mapmgr .et {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.ds-mapmgr .et:hover {
    background: var(--mm-canvas);
}

.ds-mapmgr .et.sel {
    background: var(--mm-blue-weak);
    border-left-color: var(--mm-blue);
}

.ds-mapmgr .et .ecode {
    font-family: var(--mm-mono);
    font-size: 12.5px;
    font-weight: 700;
    min-width: 52px;
}

.ds-mapmgr .et .ename {
    font-size: 11.5px;
    color: var(--mm-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.ds-mapmgr .et .ecount {
    font-size: 11px;
    color: var(--mm-faint);
    font-variant-numeric: tabular-nums;
    min-width: 22px;
    text-align: right;
}

.ds-mapmgr .et .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: none;
}

.ds-mapmgr .et .dot.h {
    background: var(--mm-harm);
}

.ds-mapmgr .et .dot.s {
    background: var(--mm-blue);
}

.ds-mapmgr .et .cbadge {
    font-size: 9px;
    font-weight: 700;
    background: var(--mm-collide);
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    flex: none;
}

.ds-mapmgr .ocupy {
    display: inline-grid;
    grid-auto-flow: column;
    gap: 2px;
    flex: none;
}

.ds-mapmgr .ocupy .oc {
    width: 5px;
    height: 12px;
    border-radius: 2px;
    background: var(--mm-line);
}

.ds-mapmgr .ocupy .oc.on {
    background: var(--mm-blue);
}

.ds-mapmgr .ocupy--harm .oc.on {
    background: var(--mm-harm);
}

.ds-mapmgr .mm-detail {
    min-width: 0;
    padding: 18px 22px;
    background: var(--mm-canvas);
}

.ds-mapmgr .dhead {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.ds-mapmgr .dhead .dc {
    font-family: var(--mm-mono);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ds-mapmgr .dhead .dn {
    font-size: 14px;
    color: var(--mm-muted);
}

.ds-mapmgr .dhead .dmeta {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ds-mapmgr .dsub {
    font-size: 12px;
    color: var(--mm-faint);
    margin-bottom: 14px;
}

.ds-mapmgr .dsub b {
    color: var(--mm-collide);
}

.ds-mapmgr .tag-h {
    font-size: 10px;
    font-weight: 700;
    color: var(--mm-harm);
    background: var(--mm-harm-weak);
    padding: 2px 8px;
    border-radius: 5px;
    text-transform: uppercase;
}

.ds-mapmgr .tag-s {
    font-size: 10px;
    font-weight: 700;
    color: var(--mm-blue);
    background: var(--mm-blue-weak);
    padding: 2px 8px;
    border-radius: 5px;
    text-transform: uppercase;
}

.ds-mapmgr .card {
    background: var(--mm-surface);
    border: 1px solid var(--mm-line);
    border-radius: var(--mm-r);
    box-shadow: var(--mm-sh);
    margin-bottom: 14px;
}

.ds-mapmgr .card > h2 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mm-faint);
    margin: 0;
    padding: 13px 15px 0;
    font-weight: 700;
}

.ds-mapmgr .card .body {
    padding: 13px 15px;
}

.ds-mapmgr .card .body.is-flush {
    padding: 0;
}

.ds-mapmgr table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.ds-mapmgr th {
    text-align: left;
    font-size: var(--text-caption);
    text-transform: none;
    letter-spacing: normal;
    color: var(--color-table-header);
    font-weight: 653;
    padding: 8px 10px;
    border-bottom: 1px solid var(--mm-line);
}

.ds-mapmgr td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f3f5;
    font-variant-numeric: tabular-nums;
}

.ds-mapmgr td.mono,
.ds-mapmgr .mono {
    font-family: var(--mm-mono);
}

.ds-mapmgr td.is-strong {
    font-weight: 600;
}

.ds-mapmgr td.is-right {
    text-align: right;
}

.ds-mapmgr tr:hover td {
    background: var(--mm-panel);
}

.ds-mapmgr tr.coll td {
    background: var(--mm-collide-bg);
}

.ds-mapmgr tr.coll:hover td {
    background: #fbe6cf;
}

.ds-mapmgr .razrez {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 5px;
    background: var(--mm-canvas);
    color: var(--mm-muted);
    border: 1px solid var(--mm-line);
}

.ds-mapmgr .razrez.set {
    background: var(--mm-blue-weak);
    color: var(--mm-blue);
    border-color: transparent;
}

.ds-mapmgr .razrez.warn {
    background: var(--mm-collide-bg);
    color: var(--mm-collide);
    border-color: transparent;
}

.ds-mapmgr .dash {
    color: var(--mm-faint);
}

.ds-mapmgr tr.is-editable {
    cursor: pointer;
}

.ds-mapmgr tr.is-editable:focus-visible {
    outline: 2px solid var(--mm-blue);
    outline-offset: -2px;
}

.ds-mapmgr .mm-btn {
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    border-radius: 7px;
    padding: 6px 11px;
    cursor: pointer;
    border: 1px solid var(--mm-line);
    background: var(--mm-surface);
    color: var(--mm-ink);
    display: inline-flex;
    gap: 6px;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
}

.ds-mapmgr .mm-btn:hover {
    background: var(--mm-canvas);
    border-color: var(--mm-blue);
    color: var(--mm-blue);
}

.ds-mapmgr .mm-btn svg {
    width: 15px;
    height: 15px;
}

.ds-mapmgr .mm-btn.is-primary {
    background: var(--mm-blue);
    border-color: var(--mm-blue);
    color: #fff;
    box-shadow: var(--mm-sh);
}

.ds-mapmgr .mm-btn.is-primary:hover {
    background: var(--mm-blue-600);
    color: #fff;
}

.ds-mapmgr .mm-spectrum {
    overflow-x: auto;
    padding: 13px 15px;
}

.ds-mapmgr .spark {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 30px;
    padding: 0 0 6px;
    margin-left: 64px;
}

.ds-mapmgr .spark__bar {
    flex: 1;
    min-width: 2px;
    background: var(--mm-harm-weak);
    border-radius: 1px 1px 0 0;
    min-height: 1px;
}

.ds-mapmgr .spark__bar.is-full {
    background: var(--mm-harm);
}

.ds-mapmgr .specgrid {
    display: inline-grid;
    grid-template-columns: auto repeat(var(--mm-cols), 26px);
    gap: 2px;
    font-size: 9.5px;
}

.ds-mapmgr .specgrid .hlabel {
    font-family: var(--mm-mono);
    font-weight: 700;
    color: var(--mm-muted);
    padding: 3px 8px;
    text-align: right;
    align-self: center;
    position: sticky;
    left: 0;
    background: var(--mm-surface);
    z-index: 2;
}

.ds-mapmgr .specgrid .colh {
    color: var(--mm-faint);
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding-bottom: 2px;
    font-weight: 600;
}

.ds-mapmgr .specgrid .cell {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mm-mono);
    font-weight: 600;
}

.ds-mapmgr .specgrid .cell.on {
    background: var(--mm-harm-weak);
    color: var(--mm-harm);
}

.ds-mapmgr .specgrid .cell.off {
    background: #fafbfc;
    color: #dfe3e8;
    border: 1px dashed var(--mm-line);
}

.ds-mapmgr .specgrid .cell.coll {
    background: var(--mm-collide-bg);
    color: var(--mm-collide);
    outline: 2px solid var(--mm-collide);
    outline-offset: -1px;
}

.ds-mapmgr .speclegend {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--mm-muted);
    padding: 0 15px 13px;
    align-items: center;
    flex-wrap: wrap;
}

.ds-mapmgr .speclegend .it {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ds-mapmgr .sq {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    display: inline-block;
}

.ds-mapmgr .sq.is-on {
    background: var(--mm-harm-weak);
}

.ds-mapmgr .sq.is-off {
    background: #fafbfc;
    border: 1px dashed var(--mm-line);
}

.ds-mapmgr .sq.is-coll {
    background: var(--mm-collide-bg);
    outline: 1px solid var(--mm-collide);
    outline-offset: -1px;
}

.ds-mapmgr .note {
    font-size: 11.5px;
    color: var(--mm-muted);
    line-height: 1.5;
}

.ds-mapmgr .note.warn {
    color: var(--mm-collide);
    background: var(--mm-collide-bg);
    border: 1px solid var(--mm-collide-border);
    border-radius: 8px;
    padding: 9px 11px;
    margin: 0 15px 13px;
}

.ds-mapmgr .empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--mm-faint);
}

.ds-mapmgr .mm-unmapped {
    margin-top: 14px;
    border: 1px dashed var(--mm-line);
    border-radius: var(--mm-r);
    background: var(--mm-panel);
    padding: 16px 18px;
}

.ds-mapmgr .mm-unmapped:empty {
    display: none;
}

.ds-mapmgr .mm-unmapped__head {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mm-faint);
    font-weight: 700;
    margin-bottom: 6px;
}

.ds-mapmgr .mm-unmapped__body {
    font-size: 12px;
    color: var(--mm-muted);
    line-height: 1.5;
}

@media (max-width: 880px) {
    .ds-mapmgr .mm-shell {
        grid-template-columns: 1fr;
    }

    .ds-mapmgr .mm-rail {
        position: static;
        max-height: 320px;
        border-right: 0;
        border-bottom: 1px solid var(--mm-line);
    }
}


body.change-form:not(.app-auth) #content-main > .page-header {
    max-width: 960px;
    margin: 0 0 var(--space-5);
}

body.change-form:not(.app-auth) #content-main > .page-header .page-header__title {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--color-text);
    line-height: var(--leading-tight);
}

body.change-form:not(.app-auth) .content-main {
    max-width: 960px;
}

body.change-form:not(.app-auth) .content-main > h1 {
    margin: 0 0 var(--space-5);
    font-size: var(--text-title);
    font-weight: 600;
    color: var(--color-text);
    line-height: var(--leading-tight);
}

body.change-form:not(.app-auth) #content-main > form > div > fieldset.module.aligned,
body.change-form:not(.app-auth) #content-main > form > fieldset.module.aligned {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4) var(--space-6);
    align-items: start;
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5) var(--space-6);
    margin: 0;
    box-shadow: var(--shadow-xs);
}

body.change-form:not(.app-auth) #content-main > form fieldset.module.aligned > h2,
body.change-form:not(.app-auth) #content-main > form fieldset.module.aligned > .description {
    grid-column: 1 / -1;
    margin: 0;
}

body.change-form:not(.app-auth) #content-main > form fieldset.module.aligned > h2 {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

body.change-form:not(.app-auth) #content-main > form fieldset.module.aligned > .description {
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

body.change-form:not(.app-auth) #content-main > form fieldset.module.aligned .form-row.wide,
body.change-form:not(.app-auth) #content-main > form fieldset.module.aligned .form-row:has(textarea) {
    grid-column: 1 / -1;
}

body.change-form:not(.app-auth) fieldset.module.aligned .form-row {
    display: block;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
}

body.change-form:not(.app-auth) .form-row .field-box {
    width: 100%;
    margin: 0;
    padding: 0;
}

body.change-form:not(.app-auth) fieldset.module.aligned .form-row .flex-container {
    display: block;
}

body.change-form:not(.app-auth) fieldset.module.aligned .form-row:has(input[type="checkbox"]) .flex-container {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

body.change-form:not(.app-auth) fieldset.module.aligned .form-row:has(input[type="checkbox"]) label {
    margin: 0;
}

body.popup.change-form:not(.app-auth) #content-main > form > div > fieldset.module.aligned,
body.popup.change-form:not(.app-auth) #content-main > form > fieldset.module.aligned {
    grid-template-columns: 1fr;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

body.popup.change-form:not(.app-auth) .inline-group > fieldset.module {
    border: none;
    box-shadow: none;
    border-radius: 0;
}

body.popup .page-header {
    display: none;
}

@media (max-width: 920px) {
    body.change-form:not(.app-auth) #content-main > form > div > fieldset.module.aligned,
    body.change-form:not(.app-auth) #content-main > form > fieldset.module.aligned {
        grid-template-columns: 1fr;
    }
}

body.change-form:not(.app-auth) .submit-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    justify-content: flex-start;
    max-width: 960px;
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: var(--space-5) 0 0;
    padding: var(--space-4) var(--space-5);
    border-top: 0.5px solid var(--color-border);
    background: var(--color-header-background);
    box-shadow: none;
}

body.change-form:not(.app-auth) .form-actions__cancel {
    max-width: 960px;
    margin: 0;
    padding: 0 var(--space-5) var(--space-4);
    background: var(--color-header-background);
}

body.change-form:not(.app-auth) .form-actions__cancel-link {
    display: inline-flex;
}

body.change-form:not(.app-auth) .submit-row input[type="submit"],
body.change-form:not(.app-auth) .submit-row a.deletelink,
body.change-form:not(.app-auth) .submit-row .deletelink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    border: 0.5px solid var(--color-border-strong);
    font-size: var(--text-label);
    line-height: var(--leading-body);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.change-form:not(.app-auth) .submit-row input[type="submit"].default {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-surface);
}

body.change-form:not(.app-auth) .submit-row input[type="submit"].default:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

body.change-form:not(.app-auth) .submit-row input[type="submit"].default:active,
body.change-form:not(.app-auth) .submit-row input[type="submit"].default:focus {
    background-color: var(--color-primary-pressed);
    border-color: var(--color-primary-pressed);
}

body.change-form:not(.app-auth) .submit-row input[type="submit"]:not(.default) {
    background-color: var(--color-surface);
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

body.change-form:not(.app-auth) .submit-row input[type="submit"]:not(.default):hover {
    background-color: var(--color-neutral-100);
}

body.change-form:not(.app-auth) .submit-row a.deletelink,
body.change-form:not(.app-auth) .submit-row .deletelink {
    background-color: var(--color-surface);
    border-color: var(--color-destructive-border);
    color: var(--color-destructive);
}

body.change-form:not(.app-auth) .submit-row a.deletelink:hover,
body.change-form:not(.app-auth) .submit-row .deletelink:hover {
    background-color: var(--color-destructive-bg);
    color: var(--color-destructive-hover);
}

body.change-form:not(.app-auth) .submit-row input[type="submit"]:focus-visible,
body.change-form:not(.app-auth) .submit-row a.deletelink:focus-visible,
body.change-form:not(.app-auth) .submit-row .deletelink:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

body.change-form:not(.app-auth) .inline-group {
    grid-column: 1 / -1;
    margin: var(--space-5) 0 0;
}

body.change-form:not(.app-auth) .inline-group > fieldset.module {
    display: block;
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    background: var(--color-surface);
}

body.change-form:not(.app-auth) .inline-group .inline-heading {
    margin: 0 0 var(--space-4);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

body.change-form:not(.app-auth) .inline-group table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-body);
}

body.change-form:not(.app-auth) .inline-group thead th {
    padding: var(--space-2) var(--space-3);
    text-align: left;
    font-size: var(--text-caption);
    text-transform: none;
    font-weight: 653;
    color: var(--color-table-header);
    border-bottom: 0.5px solid var(--color-border-strong);
    white-space: nowrap;
}

body.change-form:not(.app-auth) .inline-group tbody td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 0.5px solid var(--color-border);
    vertical-align: top;
}

body.change-form:not(.app-auth) .inline-group tbody tr:hover td {
    background: var(--color-neutral-100);
}

body.change-form:not(.app-auth) .inline-group .inline-related + .inline-related {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 0.5px solid var(--color-border);
}

body.change-form:not(.app-auth) .inline-group .inline-related > h3 {
    margin: 0 0 var(--space-3);
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text-muted);
}

body.app-facility.model-facility.change-form .changeform-navigation,
body.app-facility.model-facility.change-form .changeform-navigation.initialized,
body.app-facility.model-facility.change-form .object-tools,
body.app-facility.model-facility.change-form .object-tools.initialized,
body.app-facility.model-facility.change-form ul.object-tools,
body.app-facility.model-facility.change-form ul.object-tools.initialized,
body.app-facility.model-facilitytype.change-form .changeform-navigation,
body.app-facility.model-facilitytype.change-form .changeform-navigation.initialized,
body.app-facility.model-facilitytype.change-form .object-tools,
body.app-facility.model-facilitytype.change-form .object-tools.initialized,
body.app-facility.model-facilitytype.change-form ul.object-tools,
body.app-facility.model-facilitytype.change-form ul.object-tools.initialized {
    display: none !important;
}


body.change-form fieldset.module.aligned .form-row label,
body.change-form fieldset.module.aligned .aligned label {
    float: none;
    display: block;
    width: auto;
    min-width: 0;
    margin: 0 0 var(--space-1);
    padding: 0;
    text-align: left;
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
}

body.change-form fieldset.module.aligned .form-row label.required::after {
    content: " *";
    color: var(--color-destructive);
    font-weight: 600;
}

body.change-form .form-row input.vTextField,
body.change-form .form-row input[type="text"],
body.change-form .form-row input[type="number"],
body.change-form .form-row input[type="email"],
body.change-form .form-row input[type="url"],
body.change-form .form-row input[type="password"],
body.change-form .form-row input[type="date"],
body.change-form .form-row input[type="datetime-local"],
body.change-form .form-row input[type="time"],
body.change-form .form-row select,
body.change-form .form-row textarea,
body.change-form .form-row textarea.vLargeTextField {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: var(--text-body);
    line-height: var(--leading-body);
    height: 36px;
    padding: 0 0.625rem;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.change-form .form-row input.vTextField:focus,
body.change-form .form-row input[type="text"]:focus,
body.change-form .form-row input[type="number"]:focus,
body.change-form .form-row input[type="email"]:focus,
body.change-form .form-row input[type="url"]:focus,
body.change-form .form-row input[type="password"]:focus,
body.change-form .form-row input[type="date"]:focus,
body.change-form .form-row input[type="datetime-local"]:focus,
body.change-form .form-row input[type="time"]:focus,
body.change-form .form-row select:focus,
body.change-form .form-row textarea:focus,
body.change-form .form-row textarea.vLargeTextField:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

body.change-form .form-row input:disabled,
body.change-form .form-row select:disabled,
body.change-form .form-row textarea:disabled {
    background-color: var(--color-neutral-100);
    color: var(--color-text-subtle);
    cursor: not-allowed;
}

body.change-form .form-row input::placeholder,
body.change-form .form-row textarea::placeholder {
    color: var(--color-text-subtle);
}

body.change-form .form-row select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2364748b'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%209l6%206l6%20-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
}

body.change-form .form-row select[multiple],
body.change-form .form-row select[size] {
    background-image: none;
    padding-right: 0.75rem;
}

body.change-form .form-row textarea,
body.change-form .form-row textarea.vLargeTextField {
    height: auto;
    min-height: 7.5rem;
    padding: 0.5rem 0.625rem;
    resize: vertical;
}

body.change-form .form-row input[type="checkbox"],
body.change-form .form-row input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
    vertical-align: middle;
}

body.change-form .form-row.errors input,
body.change-form .form-row.errors select,
body.change-form .form-row.errors textarea {
    border-color: var(--color-destructive);
}

body.change-form .form-row.errors input:focus,
body.change-form .form-row.errors select:focus,
body.change-form .form-row.errors textarea:focus {
    box-shadow: 0 0 0 3px rgba(242, 46, 46, 0.2);
}

body.change-form .form-row .errorlist {
    margin: var(--space-1) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-caption);
    line-height: 1.4;
    color: var(--color-destructive);
}

body.change-form .errornote {
    margin: 0 0 var(--space-4);
    padding: 0.625rem 0.875rem;
    border: 0.5px solid var(--color-destructive-border);
    border-radius: var(--radius-md);
    background: var(--color-destructive-bg);
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-destructive);
}

body.change-form .form-row .help,
body.change-form .form-row .helptext {
    margin: var(--space-1) 0 0;
    padding: 0;
    font-size: var(--text-caption);
    line-height: 1.4;
    color: var(--color-text-muted);
}

body.change-form .form-row .related-widget-wrapper,
body.change-form .form-row .related-widget-wrapper .select2-container {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

body.change-form .related-widget-wrapper .related-lookup,
body.change-form .related-widget-wrapper .add-related,
body.change-form .related-widget-wrapper .change-related,
body.change-form .related-widget-wrapper .delete-related,
body.change-form .related-widget-wrapper .view-related,
body.change-form .related-widget-wrapper-link.view-related {
    display: none !important;
}


.select2-container.select2-container--admin-autocomplete .select2-selection--single {
    height: 36px;
    box-sizing: border-box;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    font-size: var(--text-body);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
    line-height: 34px;
    padding-left: 0.75rem;
    padding-right: 2.25rem;
    color: var(--color-text);
}

.select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__placeholder {
    color: var(--color-text-subtle);
}

.select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
    height: 34px;
    right: 0.75rem;
    width: 16px;
}

.select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow b {
    border: none;
    width: 16px;
    height: 16px;
    margin: 0;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2364748b'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%209l6%206l6%20-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
}

.select2-container.select2-container--admin-autocomplete .select2-selection__clear {
    margin-right: 8px;
    padding: 0 2px;
    cursor: pointer;
}

.select2-container.select2-container--admin-autocomplete .select2-selection--multiple {
    min-height: 36px;
    box-sizing: border-box;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    font-size: var(--text-body);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered {
    padding: 0.25rem 0.5rem;
}

.select2-container.select2-container--admin-autocomplete .select2-selection__choice {
    background: var(--color-neutral-100);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: var(--text-label);
    padding: 0.125rem 0.5rem;
}

.select2-container.select2-container--admin-autocomplete.select2-container--focus .select2-selection--single,
.select2-container.select2-container--admin-autocomplete.select2-container--open .select2-selection--single,
.select2-container.select2-container--admin-autocomplete.select2-container--focus .select2-selection--multiple,
.select2-container.select2-container--admin-autocomplete.select2-container--open .select2-selection--multiple {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.select2-container.select2-container--admin-autocomplete .select2-dropdown {
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    background: var(--color-surface);
}

.select2-container.select2-container--admin-autocomplete .select2-search--dropdown {
    padding: var(--space-2);
}

.select2-container.select2-container--admin-autocomplete .select2-search__field {
    box-sizing: border-box;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 0.375rem 0.625rem;
    font-size: var(--text-body);
    color: var(--color-text);
    outline: none;
}

.select2-container.select2-container--admin-autocomplete .select2-search__field:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.select2-container.select2-container--admin-autocomplete .select2-results__options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.select2-container.select2-container--admin-autocomplete .select2-results__option {
    list-style: none;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-body);
    color: var(--color-text);
}

.select2-container.select2-container--admin-autocomplete .select2-results__group {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--color-text-subtle);
}

.select2-container.select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
    background: var(--color-neutral-100);
    color: var(--color-text);
}

.select2-container.select2-container--admin-autocomplete .select2-results__option[aria-selected="true"] {
    background: var(--shell-active-ground-soft);
    color: var(--color-text);
}

.select2-container.select2-container--admin-autocomplete .select2-results__message {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-caption);
    color: var(--color-text-subtle);
}

input[type="date"],
input[type="datetime-local"],
input[type="time"] {
    box-sizing: border-box;
    height: 36px;
    padding: 0 0.625rem;
    font-family: inherit;
    font-size: var(--text-body);
    line-height: var(--leading-body);
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

input[type="date"]:disabled,
input[type="datetime-local"]:disabled,
input[type="time"]:disabled {
    background-color: var(--color-neutral-100, var(--color-surface));
    color: var(--color-text-subtle);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="date"]:focus::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:focus::-webkit-calendar-picker-indicator,
input[type="time"]:hover::-webkit-calendar-picker-indicator,
input[type="time"]:focus::-webkit-calendar-picker-indicator {
    opacity: 0.9;
}


.ds-ie-toolbar {
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.ds-filterbar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}

.ds-filterbar__label {
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text-muted);
    margin-right: var(--space-1);
}

.ds-filterbar__chip {
    font-size: var(--text-label);
    line-height: 1;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.12s, background 0.12s, border-color 0.12s;
}

.ds-filterbar__chip:hover,
.ds-filterbar__chip:focus-visible {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.ds-filterbar__chip.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-surface);
}


.journal-filters {
    margin-bottom: 1rem;
}

.journal-filters__grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.journal-filters__grid input[type="text"] {
    flex: 0 1 240px;
    min-width: 200px;
}

.journal-filters__grid select,
.journal-filters__grid input[type="date"] {
    min-width: 170px;
}

.journal-filters__grid input[type="text"] {
    box-sizing: border-box;
    height: 36px;
    padding: 0 0.625rem;
    font-family: inherit;
    font-size: var(--text-body);
    line-height: var(--leading-body);
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.journal-filters__grid input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.journal-filters__grid input[type="text"]::placeholder {
    color: var(--color-text-subtle);
}

.journal-filters__grid input[type="date"].is-empty::-webkit-datetime-edit {
    color: var(--color-text-subtle);
}

.journal-filters__grid select[name="object_type"] {
    min-width: 240px;
}

.journal-filters__grid .select2-container {
    min-width: 170px;
}

.journal-filters__grid .journal-search {
    position: relative;
    display: inline-flex;
    flex: 0 1 240px;
    min-width: 200px;
}

.journal-search__icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    line-height: 0;
    opacity: 0.5;
    pointer-events: none;
}

.journal-filters__grid .journal-search input[type="text"] {
    width: 100%;
    padding-left: 34px;
}

.journal-filters ~ .ds-table-wrapper .ds-table tbody tr {
    cursor: pointer;
}

.ds-table tbody tr[data-event-id] {
    cursor: pointer;
}

.journal-event__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    margin-bottom: 8px;
}

.journal-event__cell--full {
    grid-column: 1 / -1;
}

.journal-event__label {
    font-size: var(--text-caption);
    color: var(--color-text-subtle);
    margin-bottom: 4px;
}

.journal-event__value {
    font-size: var(--text-body);
}

.journal-event__divider {
    height: 1px;
    background: var(--color-border);
    margin: 20px 0;
}

.journal-event__section-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    margin-bottom: 12px;
}

.journal-event__empty {
    font-size: var(--text-body);
    color: var(--color-text-subtle);
}

.journal-event__diff {
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.journal-event__diff-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    padding: 8px 14px;
    background: var(--color-neutral-100);
}

.journal-event__diff-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
}

.journal-event__diff-body > div {
    min-width: 0;
}

.journal-event-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
}

.journal-event-modal.is-open {
    pointer-events: auto;
}

.journal-event-modal__backdrop {
    position: fixed;
    inset: 0;
    background: var(--drawer-scrim);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.journal-event-modal.is-open .journal-event-modal__backdrop {
    opacity: 1;
}

.journal-event-modal__card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.985);
    width: min(680px, 92vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
    opacity: 0;
    transition: transform 0.25s var(--ease-spring, ease), opacity 0.2s ease;
}

.journal-event-modal.is-open .journal-event-modal__card {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.journal-event-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 0.5px solid var(--color-border);
}

.journal-event-modal__title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.journal-event-modal__close {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-xs);
    display: flex;
}

.journal-event-modal__close:hover {
    background: var(--color-neutral-100);
    color: var(--color-text);
}

.journal-event-modal__close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.journal-event-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-5);
}

body.journal-event-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .journal-event-modal__card {
        width: 92vw;
    }
}

.journal-filters__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.journal-action {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill, 999px);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.journal-action--add {
    background: var(--tone-accent-bg);
    color: var(--color-primary);
}

.journal-action--change {
    background: var(--tone-warning-bg);
    color: var(--tone-warning-fg);
}

.journal-action--delete {
    background: var(--tone-error-bg);
    color: var(--tone-error-fg);
}

.journal-object {
    font-weight: 600;
}


.ds-labeled {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ds-labeled__title {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 600;
}

.ds-labeled__create-form {
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.ds-labeled__create-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
}

.ds-labeled__create-row {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
}

.ds-labeled__create-row .ds-labeled__field {
    flex: 1;
}

.ds-labeled__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 220px;
    font-size: var(--text-label);
}

.ds-labeled__field span {
    font-weight: 600;
    color: var(--color-text-strong);
}

.ds-labeled__status-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 140px;
}

.ds-labeled__status-wrap span:first-child {
    font-weight: 600;
    color: var(--color-text-strong);
}

.ds-labeled__save,
.ds-labeled__auto-segment,
.ds-labeled__intervals-add {
    min-width: 140px;
    height: 34px;
    border: 0.5px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    font-family: inherit;
    font-size: var(--text-label);
    font-weight: 600;
    padding: 0 var(--space-3);
    cursor: pointer;
}

.ds-labeled__auto-segment,
.ds-labeled__intervals-add {
    min-width: 0;
}

.ds-labeled__save:hover,
.ds-labeled__auto-segment:hover,
.ds-labeled__intervals-add:hover {
    background: var(--color-neutral-100);
}

.ds-labeled__train {
    min-width: 140px;
    height: 34px;
    border: 0.5px solid var(--tone-success-fg);
    color: var(--tone-success-fg);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    font-family: inherit;
    font-size: var(--text-label);
    font-weight: 600;
    cursor: pointer;
}

.ds-labeled__train:disabled {
    border-color: var(--color-border-strong);
    color: var(--color-text-subtle);
    cursor: not-allowed;
}

.ds-labeled__train-feedback {
    align-self: center;
    font-size: var(--text-label);
    color: var(--color-text-body);
}

.ds-labeled__train-feedback[data-tone="error"] {
    color: var(--tone-error-fg);
}

.ds-labeled__cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 34px;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text-body);
    font-family: inherit;
    font-size: var(--text-label);
    text-decoration: none;
    padding: 0 var(--space-3);
    margin-right: auto;
}

.ds-labeled__cancel:hover {
    background: var(--color-neutral-100);
}

.ds-labeled__status {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 0.5px solid var(--color-border);
    background: var(--color-header-background);
    font-size: var(--text-label);
    color: var(--color-text);
}

.ds-labeled__status[data-tone="error"] {
    background: var(--tone-error-bg);
    border-color: var(--tone-error-bg);
    color: var(--tone-error-fg);
}

.ds-labeled__chart {
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    background: var(--color-surface);
    height: 360px;
    display: flex;
    flex-direction: column;
}

.ds-labeled__chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-weight: 600;
    color: var(--color-text-strong);
}

.ds-labeled__reset-zoom {
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-link);
    font-family: inherit;
    font-size: var(--text-label);
    padding: 6px 10px;
    cursor: pointer;
}

.ds-labeled__reset-zoom:hover {
    background: var(--color-neutral-100);
}

#facility-labeled-chart {
    width: 100%;
    flex: 1;
    max-height: 320px;
}

.ds-labeled__meta {
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.ds-labeled__selection-lists {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.ds-labeled__devices,
.ds-labeled__characteristics {
    width: calc(50% - 6px);
    max-width: calc(50% - 6px);
    box-sizing: border-box;
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    background: var(--color-header-background);
}

.ds-labeled__devices-header,
.ds-labeled__characteristics-header {
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--color-text-strong);
}

.ds-labeled__characteristics-note {
    margin-bottom: var(--space-2);
    font-size: var(--text-caption);
    color: var(--color-text-muted);
}

.ds-labeled__list-search {
    width: 100%;
    box-sizing: border-box;
    height: 34px;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 0 10px;
    margin-bottom: var(--space-2);
    font-size: var(--text-label);
    font-family: inherit;
    background: var(--color-surface);
}

.ds-labeled__list-search:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-color: var(--color-primary);
}

.ds-labeled__devices-list,
.ds-labeled__characteristics-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    max-height: 168px;
    overflow-y: auto;
    padding-right: 2px;
}

.ds-labeled__device-item,
.ds-labeled__characteristic-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    gap: var(--space-2);
    font-size: var(--text-label);
    line-height: var(--leading-body);
    cursor: pointer;
}

.ds-labeled__device-item input[type="checkbox"],
.ds-labeled__characteristic-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-xs);
    accent-color: var(--color-primary);
    flex-shrink: 0;
    appearance: checkbox;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    display: inline-block;
    visibility: visible;
    opacity: 1;
    cursor: pointer;
}

.ds-labeled__devices-empty,
.ds-labeled__devices-loading,
.ds-labeled__devices-error,
.ds-labeled__characteristics-empty,
.ds-labeled__characteristics-loading,
.ds-labeled__characteristics-error {
    font-size: var(--text-label);
    margin-bottom: var(--space-2);
    color: var(--color-text-muted);
}

.ds-labeled__devices-error,
.ds-labeled__characteristics-error {
    color: var(--tone-error-fg);
}

.ds-labeled__intervals {
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    padding: var(--space-3);
}

.ds-labeled__intervals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-weight: 600;
    color: var(--color-text-strong);
}

.ds-labeled__intervals-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ds-labeled__intervals-i-threshold {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    font-size: var(--text-label);
    color: var(--color-text-body);
}

.ds-labeled__intervals-i-threshold span {
    white-space: nowrap;
}

.ds-labeled__intervals-i-threshold input {
    width: 5.5rem;
    height: 34px;
    box-sizing: border-box;
    padding: 0 var(--space-2);
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    font-size: var(--text-label);
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}

.ds-labeled__interval-connection-place-cell {
    display: none;
}

.ds-labeled--show-connection-place .ds-labeled__interval-connection-place-cell {
    display: table-cell;
}

.ds-labeled__interval-color {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.ds-labeled__interval-color-swatch {
    width: 14px;
    height: 14px;
    border-radius: var(--radius-xs);
    border: 0.5px solid var(--color-border-strong);
    display: inline-block;
    flex-shrink: 0;
}

.ds-labeled__intervals-delete {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-circle);
    border: 0.5px solid var(--color-border-strong);
    background: var(--color-neutral-100);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.ds-labeled__intervals-delete:hover {
    background: var(--tone-error-bg);
    border-color: var(--tone-error-bg);
    color: var(--tone-error-fg);
}

.ds-labeled__intervals-delete svg,
.ds-labeled__intervals-delete .ti {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
}

.ds-labeled__footer {
    position: sticky;
    bottom: 0;
    margin: var(--space-4) calc(-1 * var(--space-4)) 0;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border-top: 0.5px solid var(--color-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    z-index: 5;
}

#time-data-markup-save-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    background: rgba(255, 255, 255, 0.82);
    cursor: wait;
}

#time-data-markup-save-overlay[hidden] {
    display: none;
}

#time-data-markup-save-overlay .tdm-spinner {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-circle);
    border: 4px solid var(--color-neutral-100);
    border-top-color: var(--color-primary);
    animation: tdm-save-spin 0.9s linear infinite;
}

#time-data-markup-save-overlay .tdm-text {
    font-size: var(--text-body);
    color: var(--color-text);
    font-weight: 600;
}

@keyframes tdm-save-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


.reports-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.reports-dashboard__filters {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.reports-dashboard__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(208px, 1fr));
    gap: var(--space-4);
    margin: 0;
}

.reports-dashboard__metric {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: 16px 18px;
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
}

.reports-dashboard__metric-label {
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-caps);
}

.reports-dashboard__metric-value {
    font-size: var(--text-title);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.reports-dashboard__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-4);
    align-items: start;
}

.reports-dashboard__columns > article {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: 16px 18px;
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
}

.reports-dashboard__subtitle {
    margin: 0;
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
}

.reports-dashboard__list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: var(--text-body);
    color: var(--color-text-body);
}

.reports-dashboard__list--compact {
    font-size: var(--text-label);
}

.reports-dashboard__charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-4);
    align-items: start;
}

.reports-dashboard__chart-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: 16px 18px;
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
}

.reports-dashboard__chart-title {
    margin: 0;
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
}

.reports-dashboard__chart-canvas {
    position: relative;
    width: 100%;
    min-height: 260px;
}

.reports-dashboard__chart-canvas canvas {
    width: 100% !important;
    height: auto;
    display: block;
}

.reports-dashboard__current-report {
    color: var(--color-text);
    font-weight: 600;
}

.reports-dashboard__export-dropdown {
    position: relative;
}

.reports-dashboard__export-trigger {
    list-style: none;
}

.reports-dashboard__export-trigger::-webkit-details-marker {
    display: none;
}

.reports-dashboard__export-chevron {
    display: inline-flex;
    color: var(--color-text-subtle);
}

.reports-dashboard__export-menu {
    position: absolute;
    top: calc(100% + var(--space-1));
    right: 0;
    z-index: 20;
    min-width: 200px;
    margin: 0;
    padding: var(--space-1);
    list-style: none;
    background: var(--color-surface);
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.reports-dashboard__export-menu li {
    margin: 0;
}

.reports-dashboard__export-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: var(--text-body);
    color: var(--color-text);
}

.reports-dashboard__export-link:hover,
.reports-dashboard__export-link:focus {
    background: var(--color-neutral-100);
    color: var(--color-text);
    text-decoration: none;
}

@media (max-width: 640px) {
    .reports-dashboard__export-menu {
        right: auto;
        left: 0;
    }
}


.constructor {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.constructor__tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 0.5px solid var(--color-border);
}

.constructor__tab {
    appearance: none;
    border: none;
    background: transparent;
    padding: 9px 14px;
    font-family: inherit;
    font-size: var(--text-label);
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -0.5px;
}

.constructor__tab:hover {
    color: var(--color-text);
}

.constructor__tab.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

.constructor__panel {
    display: none;
}

.constructor__panel.is-active {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.constructor__panel-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.constructor__title {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text);
}

.constructor__hint {
    margin: 0;
    font-size: var(--text-body);
    color: var(--color-text-muted);
}

.constructor__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.constructor__grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-5);
    align-items: start;
}

.constructor__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.constructor__sources {
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    overflow: hidden;
}

.constructor__sources-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 13px 16px;
    background: var(--color-header-background);
    border-bottom: 0.5px solid var(--color-border);
}

.constructor__counter {
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-neutral-100);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 1px 8px;
    font-variant-numeric: tabular-nums;
}

.constructor__sources-list {
    display: flex;
    flex-direction: column;
    max-height: 360px;
    overflow-y: auto;
}

.constructor__source-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 16px;
    border-bottom: 0.5px solid var(--color-border);
    font-size: var(--text-label);
    cursor: pointer;
}

.constructor__source-row:last-child {
    border-bottom: none;
}

.constructor__source-row:hover {
    background: var(--color-neutral-100);
}

.constructor__source-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    flex: 0 0 auto;
}

.constructor__source-row__meta {
    font-size: var(--text-caption);
    color: var(--color-text-muted);
}

.constructor__sources-empty {
    margin: 0;
    padding: 24px 16px;
    text-align: center;
    font-size: var(--text-label);
    color: var(--color-text-subtle);
}

.constructor__status {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-label);
}

.constructor__status[hidden] {
    display: none;
}

.constructor__status[data-tone="error"] {
    background: var(--tone-error-bg);
    color: var(--tone-error-fg);
}

.constructor__status[data-tone="success"] {
    background: var(--tone-success-bg);
    color: var(--tone-success-fg);
}

.constructor__actions {
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
}

@media (max-width: 920px) {
    .constructor__grid {
        grid-template-columns: 1fr;
    }
}

.profile-create {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.profile-create__card {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-5);
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.profile-create__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
}

.profile-create__grid[hidden] {
    display: none;
}

.profile-create__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.profile-create__field[hidden] {
    display: none;
}

.profile-create__radio-group {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.profile-create__radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.profile-create__radio {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 10px;
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    font-size: var(--text-label);
    cursor: pointer;
}

.profile-create__radio input[type="radio"] {
    accent-color: var(--color-primary);
}

.profile-create__status {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-label);
}

.profile-create__status[data-tone="error"] {
    background: var(--tone-error-bg);
    color: var(--tone-error-fg);
}

.profile-create__status[data-tone="info"] {
    background: var(--tone-info-bg);
    color: var(--tone-info-fg);
}

.profile-create__actions {
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
}

.profile-detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.profile-detail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}

.profile-detail__meta {
    margin-top: var(--space-1);
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.profile-detail__head-actions {
    display: flex;
    gap: var(--space-2);
    flex: 0 0 auto;
}

.profile-detail__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: var(--space-2) var(--space-5);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
}

@media (max-width: 768px) {
    .profile-detail__head {
        flex-direction: column;
    }
    .profile-detail__stats {
        grid-template-columns: 1fr;
    }
}


.typical-profile-modal,
.forecast-profile-modal,
.model-training-modal {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--color-neutral-100);
}

.typical-profile-modal__card,
.forecast-profile-modal__card,
.model-training-modal__card {
    width: min(520px, 100%);
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.typical-profile-modal__title,
.forecast-profile-modal__title,
.model-training-modal__title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text);
}

.typical-profile-modal__help,
.typical-profile-modal__hint {
    margin: 0;
    font-size: var(--text-label);
    color: var(--color-text-muted);
    line-height: 1.45;
}

.typical-profile-modal__form,
.forecast-profile-modal__form,
.model-training-modal__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.typical-profile-modal__field,
.forecast-profile-modal__field,
.model-training-modal__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.typical-profile-modal__field label,
.forecast-profile-modal__field label,
.model-training-modal__field label {
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text-muted);
}

.typical-profile-modal__field select,
.typical-profile-modal__field input[type="datetime-local"],
.typical-profile-modal__field input[type="date"],
.typical-profile-modal__field input[type="text"],
.forecast-profile-modal__field select,
.forecast-profile-modal__field input[type="datetime-local"],
.forecast-profile-modal__field input[type="date"],
.forecast-profile-modal__field input[type="text"],
.model-training-modal__field select,
.model-training-modal__field input[type="datetime-local"],
.model-training-modal__field input[type="date"],
.model-training-modal__field input[type="text"] {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-family: inherit;
    font-size: var(--text-body);
    color: var(--color-text);
    background: var(--color-surface);
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
}

.typical-profile-modal__field select:focus,
.typical-profile-modal__field input:focus,
.forecast-profile-modal__field select:focus,
.forecast-profile-modal__field input:focus,
.model-training-modal__field select:focus,
.model-training-modal__field input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.typical-profile-modal__range,
.forecast-profile-modal__range,
.model-training-modal__range {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.typical-profile-modal__range input,
.forecast-profile-modal__range input,
.model-training-modal__range input {
    flex: 1;
}

.typical-profile-modal__actions,
.forecast-profile-modal__actions,
.model-training-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

.typical-profile-modal__status,
.forecast-profile-modal__status,
.model-training-modal__status {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-label);
}

.typical-profile-modal__status[hidden],
.forecast-profile-modal__status[hidden],
.model-training-modal__status[hidden] {
    display: none;
}

.typical-profile-modal__status[data-tone="error"],
.forecast-profile-modal__status[data-tone="error"],
.model-training-modal__status[data-tone="error"] {
    background: var(--tone-error-bg);
    color: var(--tone-error-fg);
}

.typical-profile-modal__status[data-tone="info"],
.forecast-profile-modal__status[data-tone="info"],
.model-training-modal__status[data-tone="info"] {
    background: var(--tone-info-bg);
    color: var(--tone-info-fg);
}

.forecast-model-detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.forecast-model-detail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}

.forecast-model-detail__title {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text);
}

.forecast-model-detail__meta {
    margin-top: var(--space-1);
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.forecast-model-detail__actions {
    display: flex;
    gap: var(--space-2);
    flex: 0 0 auto;
}

.forecast-model-detail__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: var(--space-2) var(--space-5);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
}

.forecast-model-detail__metrics {
    padding: var(--space-4);
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
}

.forecast-model-detail__metrics h2 {
    margin: 0 0 var(--space-3);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.forecast-model-detail__metrics-warning {
    margin-bottom: var(--space-3);
    padding: 10px 14px;
    border: 0.5px solid var(--color-border);
    background: var(--tone-error-bg);
    color: var(--tone-error-fg);
    border-radius: var(--radius-md);
    font-size: var(--text-label);
}

@media (max-width: 768px) {
    .forecast-model-detail__head {
        flex-direction: column;
    }
    .forecast-model-detail__stats {
        grid-template-columns: 1fr;
    }
}


.authorization-overview {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.authorization-overview__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
}

.authorization-stat-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: 16px 18px;
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-md);
}

.authorization-stat-card__header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.authorization-stat-card__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--tone-info-bg);
    color: var(--color-primary);
}

.authorization-stat-card__icon-svg {
    width: 20px;
    height: 20px;
}

.authorization-stat-card__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.authorization-stat-card__name {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.authorization-stat-card__name-link {
    color: var(--color-link);
}

.authorization-stat-card__name-link:hover,
.authorization-stat-card__name-link:focus {
    text-decoration: underline;
}

.authorization-stat-card__badge {
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-neutral-100);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 1px 8px;
    font-variant-numeric: tabular-nums;
}

.authorization-stat-card__description {
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.authorization-panel {
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.authorization-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--color-border);
}

.authorization-panel__title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.authorization-panel__subtitle {
    margin: var(--space-1) 0 0;
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.authorization-panel__actions {
    display: flex;
    gap: var(--space-2);
    flex: 0 0 auto;
}

.authorization-panel__body {
    padding: var(--space-4) var(--space-5) var(--space-5);
}

.authorization-person {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.authorization-person__avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-circle);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tone-info-bg);
    color: var(--color-primary);
    font-size: var(--text-caption);
    font-weight: 600;
}

.authorization-person__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.authorization-person__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.authorization-person__name {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.authorization-person__meta {
    font-size: var(--text-caption);
    color: var(--color-text-muted);
}

.authorization-table__muted {
    color: var(--color-text-subtle);
}

.authorization-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: var(--text-caption);
    font-weight: 600;
    white-space: nowrap;
}

.authorization-status--success {
    background: var(--tone-success-bg);
    color: var(--tone-success-fg);
}

.authorization-status--muted {
    background: var(--tone-unknown-bg);
    color: var(--tone-unknown-fg);
}

.authorization-status--warning {
    background: var(--tone-warning-bg);
    color: var(--tone-warning-fg);
}

.authorization-status--info {
    background: var(--tone-info-bg);
    color: var(--tone-info-fg);
}

.authorization-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.authorization-tag,
.authorization-pill {
    display: inline-flex;
    align-items: center;
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-neutral-100);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 2px 9px;
}

.authorization-tag__link {
    color: var(--color-link);
}

.authorization-tag__link:hover,
.authorization-tag__link:focus {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.authorization-empty-state {
    padding: var(--space-5);
    text-align: center;
    font-size: var(--text-label);
    color: var(--color-text-subtle);
}

.access-matrix-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.access-matrix-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.access-matrix-page__actions {
    display: flex;
    gap: var(--space-2);
}

.access-matrix-tools {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.access-matrix-role-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.access-matrix-role-form__label {
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-caps);
}

.access-matrix-table-wrapper {
    overflow-x: auto;
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.access-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-label);
}

.access-matrix-table th,
.access-matrix-table td {
    padding: 10px 14px;
    border-bottom: 0.5px solid var(--color-border);
    text-align: left;
    vertical-align: middle;
}

.access-matrix-table th {
    font-size: var(--text-caption);
    text-transform: none;
    letter-spacing: normal;
    color: var(--color-table-header);
    font-weight: 653;
    background: var(--color-header-background);
}

.access-matrix-table tbody tr:last-child td {
    border-bottom: none;
}

.access-matrix-table__object-label {
    font-weight: 600;
    color: var(--color-text);
}

.access-matrix-facilities {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.access-matrix-facilities__title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.access-matrix-facilities__hint {
    margin: 0;
    font-size: var(--text-label);
    color: var(--color-text-muted);
}

.access-matrix-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

.access-level-control {
    display: inline-flex;
    gap: var(--space-1);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 2px;
    background: var(--color-neutral-100);
}

.access-level-pill {
    position: relative;
    cursor: pointer;
}

.access-level-pill__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.access-level-pill__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    padding: 0 9px;
    border-radius: var(--radius-pill);
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--color-text-muted);
    border: 1px solid transparent;
    font-variant-numeric: tabular-nums;
    transition: background 0.15s, color 0.15s;
}

.access-level-pill:hover .access-level-pill__label {
    background: var(--color-surface);
    color: var(--color-text);
}

.access-level-pill__input:focus-visible + .access-level-pill__label {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.access-level-pill--read .access-level-pill__input:checked + .access-level-pill__label {
    background: var(--tone-info-bg);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.access-level-pill--write .access-level-pill__input:checked + .access-level-pill__label {
    background: var(--tone-success-bg);
    color: var(--tone-success-fg);
    border-color: var(--tone-success-solid);
}

.access-level-pill--blocked .access-level-pill__input:checked + .access-level-pill__label {
    background: var(--tone-error-bg);
    color: var(--tone-error-fg);
    border-color: var(--tone-error-fg);
}

.access-level-pill--disabled .access-level-pill__input:checked + .access-level-pill__label,
.access-level-pill--inherit .access-level-pill__input:checked + .access-level-pill__label {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.access-matrix-form--readonly .access-level-pill {
    cursor: default;
}

.access-matrix-form--readonly .access-level-pill__input:disabled + .access-level-pill__label {
    opacity: 0.55;
}

.access-matrix-form--readonly .access-level-pill__input:checked + .access-level-pill__label {
    opacity: 1;
}

.access-level-select--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

@media (max-width: 1024px) {
    .authorization-panel__header {
        flex-direction: column;
        align-items: flex-start;
    }
    .authorization-overview__stats {
        grid-template-columns: 1fr;
    }
}


.object-history-panel {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
}

.object-history-panel__backdrop {
    position: fixed;
    inset: 0;
    background: var(--drawer-scrim);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.object-history-panel__drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: var(--drawer-width);
    max-width: 100vw;
    background: var(--color-surface);
    transform: translateX(100%);
    transition: transform 0.25s var(--ease-spring, ease);
    display: flex;
    flex-direction: column;
}

.object-history-panel.is-open {
    pointer-events: auto;
}

.object-history-panel.is-open .object-history-panel__backdrop {
    opacity: 1;
}

.object-history-panel.is-open .object-history-panel__drawer {
    transform: translateX(0);
    box-shadow: var(--drawer-shadow);
}

.object-history-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 0.5px solid var(--color-border);
}

.object-history-panel__title {
    margin: 0;
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--color-text);
}

.object-history-panel__close {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-xs);
    display: flex;
}

.object-history-panel__close:hover {
    background: var(--color-neutral-100);
    color: var(--color-text);
}

.object-history-panel__close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.object-history-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-5);
}

.object-history-panel__placeholder {
    margin: 0;
    padding: var(--space-5) 0;
    text-align: center;
    font-size: var(--text-label);
    color: var(--color-text-subtle);
}

.object-history-panel__error {
    margin: 0;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--tone-error-bg);
    color: var(--tone-error-fg);
    font-size: var(--text-label);
}

body.object-history-panel-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .object-history-panel__drawer {
        width: 100vw;
    }
}

.breadcrumbs-history {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs-history__dropdown {
    position: relative;
}

.breadcrumbs-history__toggle {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    color: var(--color-text-muted);
    cursor: pointer;
}

.breadcrumbs-history__toggle::-webkit-details-marker {
    display: none;
}

.breadcrumbs-history__toggle::marker {
    content: "";
}

.breadcrumbs-history__toggle:hover,
.breadcrumbs-history__toggle:focus {
    background: var(--color-neutral-100);
    color: var(--color-text);
}

.breadcrumbs-history__icon {
    display: inline-flex;
    color: var(--color-text-subtle);
}

.breadcrumbs-history__dropdown:not([open]) .breadcrumbs-history__menu {
    display: none;
}

.breadcrumbs-history__menu {
    position: absolute;
    top: calc(100% + var(--space-1));
    left: 0;
    z-index: 30;
    min-width: 190px;
    margin: 0;
    padding: var(--space-1);
    list-style: none;
    background: var(--color-surface);
    border: 0.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.breadcrumbs-history__menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumbs-history__action {
    appearance: none;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-body);
    color: var(--color-text);
    cursor: pointer;
}

.breadcrumbs-history__action:hover,
.breadcrumbs-history__action:focus {
    background: var(--color-neutral-100);
    color: var(--color-text);
}

.object-history-inline .object-history-panel__subtitle {
    display: none;
}


.dash-hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin: 0 0 var(--space-6);
}

.dash-hero__eyebrow {
    margin: 0;
    font-size: var(--text-caption);
    color: var(--color-text-muted);
}

.dash-hero__title {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 600;
    line-height: var(--leading-tight);
    letter-spacing: -0.01em;
    color: var(--color-text-strong);
}

.dash-hero__sub {
    margin: 0;
    font-size: var(--text-body);
    color: var(--color-text-muted);
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(208px, 1fr));
    gap: var(--space-4);
    margin: 0;
}

.dash-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-5);
    background: var(--color-surface);
    border: 0.5px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.dash-stat__value {
    font-size: var(--text-title);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text-strong);
    font-variant-numeric: tabular-nums;
}

.dash-stat__label {
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
}

.dash-stat__sub {
    font-size: var(--text-caption);
    color: var(--color-text-muted);
}

.dash-stat--alert .dash-stat__value {
    color: var(--tone-warning-fg);
}

.dash-no-roles {
    padding: var(--space-5) 0;
}

.dash-no-roles__text,
.dash-empty {
    margin: 0;
    font-size: var(--text-body);
    color: var(--color-text-muted);
}


.ds-toast-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 344px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.ds-toast {
    pointer-events: auto;
    position: relative;
    padding: 12px 34px 13px 14px;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e4e7eb);
    border-left: 3px solid var(--color-primary, #005a9b);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(16, 24, 40, 0.14);
    animation: ds-toast-in 0.22s ease both;
}

.ds-toast--ok {
    border-left-color: #15803d;
}

.ds-toast--error {
    border-left-color: #b91c1c;
}

.ds-toast__close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted, #5b6470);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}

.ds-toast__close:hover {
    background: var(--color-surface-muted, #f4f6f8);
    color: var(--color-text, #16191d);
}

.ds-toast__title {
    font-size: var(--text-body, 0.9375rem);
    font-weight: 600;
    color: var(--color-text, #16191d);
}

.ds-toast__msg {
    margin: 3px 0 9px;
    font-size: var(--text-label, 0.875rem);
    color: var(--color-text-muted, #5b6470);
    font-variant-numeric: tabular-nums;
}

.ds-toast--error .ds-toast__msg {
    color: #b91c1c;
}

.ds-toast__track {
    position: relative;
    height: 6px;
    background: var(--color-surface-muted, #eef1f4);
    border-radius: 999px;
    overflow: hidden;
}

.ds-toast__bar {
    width: 0;
    height: 100%;
    background: var(--color-primary, #005a9b);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.ds-toast--ok .ds-toast__bar {
    background: #15803d;
}

.ds-toast__track.is-indeterminate .ds-toast__bar {
    width: 38%;
    transition: none;
    animation: ds-toast-indet 1.15s ease-in-out infinite;
}

@keyframes ds-toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ds-toast-indet {
    0% {
        margin-left: -40%;
    }

    100% {
        margin-left: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ds-toast {
        animation: none;
    }

    .ds-toast__bar {
        transition: none;
    }

    .ds-toast__track.is-indeterminate .ds-toast__bar {
        animation: none;
        width: 100%;
        opacity: 0.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
