/*
|--------------------------------------------------------------------------
| Midnight GMS v2 Design System
|--------------------------------------------------------------------------
|
| This stylesheet loads after Dasho and contains every GMS-owned token,
| component and responsive override required by the foundation. Licensed
| template files remain untouched so upgrades are predictable.
|
*/

:root {
    --gms-primary: #19bcbf;
    --gms-primary-dark: #119a9d;
    --gms-primary-soft: #e8f9f9;
    --gms-voidcore: #6b57d5;
    --gms-danger: #dc3545;
    --gms-success: #198754;
    --gms-warning: #946200;
    --gms-canvas: #f3f6f8;
    --gms-surface: #ffffff;
    --gms-surface-raised: #ffffff;
    --gms-surface-muted: #f8fafb;
    --gms-surface-tint: #f2fbfb;
    --gms-row: #ffffff;
    --gms-row-alt: #f8fdfd;
    --gms-row-hover: #f1fbfb;
    --gms-border: #dfe5e9;
    --gms-border-strong: #cbd4da;
    --gms-text: #263238;
    --gms-text-muted: #66727d;
    --gms-success-soft: #eaf6ef;
    --gms-success-border: #bfe1cd;
    --gms-success-text: #12643b;
    --gms-danger-soft: #fbedef;
    --gms-danger-border: #f2c5ca;
    --gms-danger-text: #9f2432;
    --gms-radius: 10px;
    --gms-radius-sm: 7px;
    --gms-shadow: 0 8px 26px rgba(28, 43, 50, 0.07);
    --gms-focus: 0 0 0 0.2rem rgba(25, 188, 191, 0.2);
}

/* --------------------------------------------------------------------------
   Base and Bootstrap integration
   -------------------------------------------------------------------------- */

html,
body {
    min-height: 100%;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus-visible {
    border-color: var(--gms-primary);
    box-shadow: var(--gms-focus);
}

.form-label {
    color: var(--gms-text);
    font-size: 0.875rem;
    font-weight: 700;
}

.form-text {
    color: var(--gms-text-muted);
}

.gms-kicker {
    color: var(--gms-primary-dark);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Branded document loader
   -------------------------------------------------------------------------- */

body.gms-page-loader-active {
    overflow: hidden;
}

.gms-page-loader {
    align-items: center;
    background:
        radial-gradient(circle at 50% 44%, rgba(25, 188, 191, 0.12), transparent 25%),
        rgba(243, 246, 248, 0.97);
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 1;
    position: fixed;
    transition: opacity 240ms ease, visibility 240ms ease;
    visibility: visible;
    z-index: 10050;
}

.gms-page-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.gms-page-loader-panel {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    text-align: center;
}

.gms-page-loader-spinner {
    height: 112px;
    position: relative;
    width: 112px;
}

.gms-page-loader-orbit,
.gms-page-loader-core {
    border-radius: 50%;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

.gms-page-loader-orbit {
    animation: gms-loader-spin 1.35s linear infinite;
    border: 2px solid transparent;
}

.gms-page-loader-orbit-outer {
    border-right-color: rgba(25, 188, 191, 0.25);
    border-top-color: var(--gms-primary);
    height: 106px;
    width: 106px;
}

.gms-page-loader-orbit-inner {
    animation-direction: reverse;
    animation-duration: 0.95s;
    border-bottom-color: var(--gms-primary-dark);
    border-left-color: rgba(25, 188, 191, 0.22);
    height: 88px;
    width: 88px;
}

.gms-page-loader-core {
    align-items: center;
    animation: gms-loader-breathe 1.8s ease-in-out infinite;
    background: #123f46;
    box-shadow:
        0 0 0 5px rgba(25, 188, 191, 0.1),
        0 12px 30px rgba(18, 63, 70, 0.22);
    display: flex;
    height: 66px;
    justify-content: center;
    overflow: hidden;
    width: 66px;
}

.gms-page-loader-core img {
    height: 56px;
    object-fit: contain;
    width: 56px;
}

.gms-page-loader-copy {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
}

.gms-page-loader-copy strong {
    color: var(--gms-text);
    font-size: 0.94rem;
    font-weight: 800;
}

.gms-page-loader-copy span {
    color: var(--gms-text-muted);
    font-size: 0.74rem;
    margin-top: 0.2rem;
}

.gms-page-loader-dots {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.85rem;
}

.gms-page-loader-dots span {
    animation: gms-loader-dot 1.2s ease-in-out infinite;
    background: var(--gms-primary);
    border-radius: 50%;
    height: 5px;
    width: 5px;
}

.gms-page-loader-dots span:nth-child(2) {
    animation-delay: 140ms;
}

.gms-page-loader-dots span:nth-child(3) {
    animation-delay: 280ms;
}

@keyframes gms-loader-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes gms-loader-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(0.96); }
    50% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes gms-loader-dot {
    0%, 60%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* --------------------------------------------------------------------------
   Authenticated Dasho mini-menu shell
   -------------------------------------------------------------------------- */

.gms-skip-link {
    background: var(--gms-primary);
    border-radius: 0 0 var(--gms-radius-sm) 0;
    color: #082f30;
    font-weight: 800;
    left: 0;
    padding: 0.7rem 1rem;
    position: fixed;
    top: -80px;
    transition: top 150ms ease;
    z-index: 9999;
}

.gms-skip-link:focus {
    color: #082f30;
    top: 0;
}

.gms-theme-toggle {
    align-items: center;
    background: transparent !important;
    border: 0;
    color: var(--gms-text-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    height: 70px;
    justify-content: center;
    overflow: visible;
    padding: 0 14px;
    position: relative;
    transition: color 180ms ease;
    width: 48px;
}

/* Dasho colours top-bar list items on hover. Keep the theme switch visually
 * icon-only so the full-height navigation cell never becomes a coloured block. */
.pcoded-header .navbar-nav > .gms-theme-toggle-item,
.pcoded-header .navbar-nav > .gms-theme-toggle-item:hover,
.pcoded-header .navbar-nav > .gms-theme-toggle-item:focus-within {
    background: transparent !important;
}

.gms-theme-toggle::before {
    border: 2px solid transparent;
    border-radius: 50%;
    content: "";
    height: 34px;
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.82);
    transition: border-color 160ms ease, opacity 160ms ease, transform 220ms ease;
    width: 34px;
}

.gms-theme-toggle > i {
    display: block;
    line-height: 1;
    margin: 0 !important;
    transform-origin: center;
    transition: color 180ms ease, filter 180ms ease, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
    width: auto !important;
}

.gms-theme-toggle:hover,
.gms-theme-toggle:focus-visible {
    background: transparent !important;
    color: var(--gms-primary-dark);
    outline: 0;
}

.gms-theme-toggle:hover > i {
    filter: drop-shadow(0 0 5px rgba(25, 188, 191, 0.42));
    transform: rotate(-14deg) scale(1.14);
}

.gms-theme-toggle[aria-pressed="true"]:hover > i {
    transform: rotate(32deg) scale(1.14);
}

.gms-theme-toggle:focus-visible {
    box-shadow: none;
}

.gms-theme-toggle:focus-visible::before {
    border-color: var(--gms-primary);
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
}

.gms-theme-toggle.is-changing > i {
    animation: gms-theme-icon-swap 460ms cubic-bezier(0.22, 0.8, 0.22, 1);
}

@keyframes gms-theme-icon-swap {
    0% {
        filter: drop-shadow(0 0 0 rgba(25, 188, 191, 0));
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
    42% {
        filter: drop-shadow(0 0 7px rgba(25, 188, 191, 0.55));
        opacity: 0;
        transform: rotate(110deg) scale(0.35);
    }
    58% {
        filter: drop-shadow(0 0 7px rgba(25, 188, 191, 0.55));
        opacity: 0;
        transform: rotate(235deg) scale(0.35);
    }
    100% {
        filter: drop-shadow(0 0 0 rgba(25, 188, 191, 0));
        opacity: 1;
        transform: rotate(360deg) scale(1);
    }
}

/* Dasho owns shell geometry, colours and transitions. These rules only size
   the supplied GMS artwork and real account content inside Dasho's markup. */
.gms-brand-logo,
.gms-brand-logo-thumb {
    height: 42px;
    object-fit: contain;
    object-position: center;
    width: 42px;
}

.gms-brand-logo-thumb {
    height: 38px;
    width: 38px;
}

.pcoded-navbar .navbar-brand .b-brand {
    align-items: center;
    display: inline-flex;
    min-width: 0;
}

.gms-brand-patch {
    display: flex;
    flex-direction: column;
    margin-left: 0.75rem;
    min-width: 0;
    white-space: nowrap;
}

.gms-brand-patch strong {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.gms-brand-patch small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.61rem;
    line-height: 1.3;
    margin-top: 0.12rem;
}

/* The collapsed mini rail retains the crest; the release label returns when
   Dasho expands the desktop navigation or opens the mobile drawer. */
.pcoded-navbar.navbar-collapsed .gms-brand-patch {
    display: none;
}

.pcoded-navbar.navbar-collapsed:hover .gms-brand-patch,
.pcoded-navbar.mob-open .gms-brand-patch {
    display: flex;
}

/* Dasho keeps the active child submenu open in its DOM. On the collapsed
   desktop rail that content must be completely clipped until deliberate hover,
   otherwise fragments of the child icon and active marker leak past 70px. */
@media (min-width: 992px) {
    .pcoded-navbar.navbar-collapsed:not(.mob-open):not(:hover) {
        overflow: hidden;
        width: 70px;
    }

    .pcoded-navbar.navbar-collapsed:not(.mob-open):not(:hover) .navbar-wrapper,
    .pcoded-navbar.navbar-collapsed:not(.mob-open):not(:hover) .navbar-content {
        overflow: hidden !important;
        width: 70px !important;
    }

    .pcoded-navbar.navbar-collapsed:not(.mob-open):not(:hover) .pcoded-submenu,
    .pcoded-navbar.navbar-collapsed:not(.mob-open):not(:hover) .pcoded-mtext,
    .pcoded-navbar.navbar-collapsed:not(.mob-open):not(:hover) .pcoded-menu-caption label {
        display: none !important;
    }
}

.pcoded-header .b-brand .gms-brand-logo,
.pcoded-header .b-brand .gms-brand-logo-thumb {
    height: 36px;
    width: 36px;
}

/* The former Dasho demo search is replaced by useful current-page context. */
.gms-header-context {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    gap: 0.8rem;
    min-height: 42px;
    padding: 0 1rem;
    white-space: nowrap;
}

.gms-header-context strong {
    color: var(--gms-text);
    font-size: 0.92rem;
    font-weight: 800;
}

.gms-header-context > span:last-child {
    font-size: 0.78rem;
    font-weight: 500;
}

.gms-header-context-divider {
    background: var(--gms-primary);
    height: 18px;
    opacity: 0.75;
    width: 2px;
}

/* Account trigger and menu deliberately override Dasho's generic profile
   dropdown while retaining Bootstrap's native dropdown behaviour. */
.pcoded-header .gms-account-trigger {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
    justify-content: center;
    min-width: 54px;
}

.pcoded-header .gms-account-trigger::after {
    display: none;
}

.gms-account-trigger-avatar {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.38);
    border-radius: 50%;
    color: #0d7476;
    display: inline-flex;
    flex: 0 0 32px;
    font-size: 0.78rem;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    transition: background-color 150ms ease, color 150ms ease;
    width: 32px;
}

.pcoded-header .gms-account-trigger > i {
    color: var(--gms-text-muted);
    font-size: 0.67rem;
    transition: transform 150ms ease;
}

.pcoded-header .gms-account-trigger[aria-expanded="true"] .gms-account-trigger-avatar,
.pcoded-header .gms-account-trigger:hover .gms-account-trigger-avatar {
    background: var(--gms-primary);
    color: #073b3c;
}

.pcoded-header .gms-account-trigger[aria-expanded="true"] > i {
    transform: rotate(180deg);
}

.pcoded-header .profile-notification.gms-account-menu {
    border: 1px solid var(--gms-border-strong);
    border-radius: var(--gms-radius);
    box-shadow: 0 14px 36px rgba(28, 43, 50, 0.18);
    overflow: hidden;
    padding: 0;
    width: 320px;
}

.gms-account-summary {
    align-items: center;
    background: linear-gradient(135deg, #123f46 0%, #0d5960 100%);
    color: #fff;
    display: flex;
    gap: 0.85rem;
    padding: 1.15rem 1.2rem;
}

.gms-account-avatar {
    align-items: center;
    background: var(--gms-primary);
    border: 3px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #073b3c;
    display: inline-flex;
    flex: 0 0 48px;
    font-size: 1rem;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.gms-account-identity {
    display: flex;
    line-height: 1.25;
    min-width: 0;
    flex-direction: column;
}

.gms-account-identity strong,
.gms-account-identity > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gms-account-identity strong {
    color: #fff;
    font-size: 0.93rem;
    font-weight: 800;
}

.gms-account-identity > span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
}

.gms-account-identity small {
    align-items: center;
    color: #aef0e5;
    display: flex;
    font-size: 0.68rem;
    font-weight: 700;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.gms-account-identity small i {
    color: #52d9a6;
    font-size: 0.42rem;
}

.gms-account-section-label {
    color: var(--gms-text-muted);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    padding: 0.85rem 1rem 0.35rem;
    text-transform: uppercase;
}

.profile-notification .pro-body.gms-account-links {
    padding: 0 0.55rem 0.65rem;
}

.profile-notification .pro-body.gms-account-links > li {
    margin: 0.15rem 0;
}

.profile-notification .pro-body .gms-account-menu-item {
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text);
    display: flex;
    gap: 0.75rem;
    min-height: 58px;
    padding: 0.55rem 0.65rem;
    transition: background-color 150ms ease, border-color 150ms ease;
    width: 100%;
}

.profile-notification .pro-body .gms-account-menu-item:hover,
.profile-notification .pro-body .gms-account-menu-item:focus,
.profile-notification .pro-body .gms-account-menu-item.is-active {
    background: var(--gms-primary-soft);
    border-left-color: var(--gms-primary);
    color: var(--gms-text);
}

.gms-account-menu-icon,
.gms-account-signout-icon {
    align-items: center;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: 8px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 36px;
    font-size: 0.95rem;
    height: 36px;
    justify-content: center;
    transition: background-color 150ms ease, color 150ms ease;
    width: 36px;
}

.gms-account-menu-icon {
    background: var(--gms-primary);
    border-color: var(--gms-primary);
    color: #fff;
}

/* Dasho gives dropdown icons a right margin by default. Reset it inside our
   fixed icon tiles so every glyph is geometrically centred in its square. */
.gms-account-menu-icon > i,
.gms-account-signout-icon > i {
    display: block;
    line-height: 1;
    margin: 0 !important;
    width: auto !important;
}

.gms-account-menu-item:hover .gms-account-menu-icon,
.gms-account-menu-item:focus .gms-account-menu-icon,
.gms-account-menu-item.is-active .gms-account-menu-icon {
    background: var(--gms-primary-dark);
    border-color: var(--gms-primary-dark);
    color: #fff;
}

.gms-account-menu-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.gms-account-menu-copy strong,
.gms-account-signout strong {
    font-size: 0.8rem;
    font-weight: 800;
}

.gms-account-menu-copy small,
.gms-account-signout small {
    color: var(--gms-text-muted);
    display: block;
    font-size: 0.69rem;
    margin-top: 0.1rem;
}

.gms-account-menu-arrow {
    color: var(--gms-border-strong);
    font-size: 0.68rem;
    margin-left: auto;
}

.gms-account-menu-item:hover .gms-account-menu-arrow,
.gms-account-menu-item:focus .gms-account-menu-arrow,
.gms-account-menu-item.is-active .gms-account-menu-arrow {
    color: var(--gms-primary-dark);
}

.gms-account-signout {
    background: var(--gms-surface-muted);
    border-top: 1px solid var(--gms-border);
    margin: 0;
    padding: 0.65rem;
}

.gms-account-signout button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text);
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    text-align: left;
    transition: background-color 150ms ease, color 150ms ease;
    width: 100%;
}

.gms-account-signout button:hover,
.gms-account-signout button:focus-visible {
    background: var(--gms-danger-soft);
    color: var(--gms-danger-text);
    outline: none;
}

.gms-account-signout-icon {
    color: var(--gms-danger);
}

.gms-account-signout button:hover .gms-account-signout-icon,
.gms-account-signout button:focus-visible .gms-account-signout-icon {
    background: var(--gms-danger);
    border-color: var(--gms-danger);
    color: #fff;
}

@media (max-width: 420px) {
    .pcoded-header .profile-notification.gms-account-menu {
        max-width: calc(100vw - 24px);
        width: 320px;
    }
}

.gms-notification-empty {
    color: var(--gms-text-muted);
    padding: 1.5rem;
    text-align: center;
}

.gms-notification-empty i {
    font-size: 1.5rem;
}

.gms-notification-empty p {
    margin: 0.5rem 0 0;
}

.gms-message-panel-heading {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
}

.gms-message-panel-heading h5,
.gms-message-panel-heading p {
    margin: 0;
}

.gms-message-panel-heading p {
    color: var(--gms-text-muted);
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.gms-message-panel-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.gms-message-panel-body {
    align-items: center;
    display: flex;
    min-height: calc(100vh - 105px);
    padding: 1.5rem;
}

.gms-message-empty {
    color: var(--gms-text-muted);
    text-align: center;
    width: 100%;
}

.gms-message-empty > i {
    color: var(--gms-primary-dark);
    font-size: 2rem;
}

.gms-message-empty h6 {
    color: var(--gms-text);
    margin: 0.75rem 0 0.35rem;
}

.gms-message-empty p {
    margin: 0;
}

/* Every navigation record, including second-level records, owns an icon. */
.pcoded-navbar .pcoded-submenu > li > a.gms-nav-child-link {
    align-items: center;
    display: flex;
    gap: 0;
    min-height: 44px;
    padding-bottom: 10px;
    padding-top: 10px;
}

.pcoded-navbar .pcoded-submenu > li > a.gms-nav-child-link::before {
    display: none;
}

.gms-nav-child-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 20px;
    justify-content: center;
    margin-right: 12px;
    width: 20px;
}

.gms-nav-child-icon i {
    font-size: 0.8rem;
}

.gms-nav-child-text {
    line-height: 1.25;
    min-width: 0;
}

/* A nested route needs its own current-page signal in addition to the active
   parent group. The right marker stays visible in Dasho's expanded submenu. */
.pcoded-navbar .pcoded-submenu > li.active > a.gms-nav-child-link {
    background: rgba(25, 188, 191, 0.12);
    color: #fff;
    font-weight: 600;
    position: relative;
}

.pcoded-navbar .pcoded-submenu > li.active > a.gms-nav-child-link::after {
    background: var(--gms-primary);
    border-radius: 2px 0 0 2px;
    bottom: 10px;
    content: "";
    position: absolute;
    right: 0;
    top: 10px;
    width: 3px;
}

.pcoded-navbar .pcoded-submenu > li.active > a.gms-nav-child-link .gms-nav-child-icon {
    color: var(--gms-primary);
}

.gms-page-description {
    margin: -18px 0 22px;
}

.gms-page-actions {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

.gms-alert {
    align-items: center;
    display: flex;
    gap: 0.65rem;
}

/* Server flash messages use an unobtrusive top-right stack instead of
   changing page layout with full-width banners. */
.gms-toast-stack {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-height: calc(100dvh - 6.5rem);
    overflow: hidden auto;
    padding: .15rem;
    pointer-events: none;
    position: fixed;
    right: 1.5rem;
    top: 5.35rem;
    width: min(410px, calc(100vw - 2rem));
    z-index: 1095;
}

.gms-toast {
    align-items: center;
    background: var(--gms-surface-raised);
    border: 1px solid var(--gms-border);
    border-left: 4px solid var(--gms-primary);
    border-radius: .75rem;
    box-shadow: 0 18px 44px rgba(19, 34, 41, .18);
    color: var(--gms-text);
    display: grid;
    gap: .85rem;
    grid-template-columns: 42px minmax(0, 1fr) 30px;
    min-height: 82px;
    overflow: hidden;
    padding: .9rem .85rem .9rem 1rem;
    pointer-events: auto;
    position: relative;
    transform: translateX(28px) scale(.98);
    transition: opacity 180ms ease, transform 240ms cubic-bezier(.2, .8, .2, 1);
    width: 100%;
}

.gms-toast.showing,
.gms-toast.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.gms-toast.hide {
    transform: translateX(20px) scale(.98);
}

.gms-toast-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .26);
    border-radius: .7rem;
    color: var(--gms-primary-dark);
    display: inline-flex;
    font-size: 1.05rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.gms-toast-copy {
    min-width: 0;
}

.gms-toast-copy strong {
    color: var(--gms-text);
    display: block;
    font-size: .86rem;
    font-weight: 800;
    margin-bottom: .18rem;
}

.gms-toast-copy p {
    color: var(--gms-text-muted);
    font-size: .78rem;
    line-height: 1.4;
    margin: 0;
    overflow-wrap: anywhere;
}

.gms-toast-close {
    align-items: center;
    align-self: start;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--gms-text-muted);
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    transition: color 150ms ease, transform 150ms ease;
    width: 30px;
}

.gms-toast-close:hover,
.gms-toast-close:focus-visible {
    color: var(--gms-text);
    outline: 0;
    transform: rotate(8deg) scale(1.08);
}

.gms-toast-close:focus-visible {
    box-shadow: var(--gms-focus);
}

.gms-toast-progress {
    background: var(--gms-primary);
    bottom: 0;
    height: 3px;
    left: 0;
    position: absolute;
    transform-origin: left center;
    width: 100%;
}

.gms-toast.show .gms-toast-progress {
    animation: gms-toast-progress var(--gms-toast-duration, 6000ms) linear forwards;
}

.gms-toast.is-success { border-left-color: var(--gms-success); }
.gms-toast.is-success .gms-toast-icon { background: var(--gms-success-soft); border-color: var(--gms-success-border); color: var(--gms-success-text); }
.gms-toast.is-success .gms-toast-progress { background: var(--gms-success); }
.gms-toast.is-warning { border-left-color: #d79a16; }
.gms-toast.is-warning .gms-toast-icon { background: #fff7df; border-color: #efd89d; color: #805a05; }
.gms-toast.is-warning .gms-toast-progress { background: #d79a16; }
.gms-toast.is-danger { border-left-color: var(--gms-danger); }
.gms-toast.is-danger .gms-toast-icon { background: var(--gms-danger-soft); border-color: var(--gms-danger-border); color: var(--gms-danger-text); }
.gms-toast.is-danger .gms-toast-progress { background: var(--gms-danger); }

@keyframes gms-toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .gms-toast { transition: none; }
    .gms-toast.show .gms-toast-progress { animation: none; }
}

/* Roles & permissions: shared filter, modal and controlled-change contract. */
.gms-role-catalogue-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px 24px;border-bottom:1px solid var(--gms-border,#dce4e8);background:var(--gms-surface-soft,#f8fdfd)}
.gms-role-filter-chips{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px;min-height:0}
.gms-role-filter-chips:empty{display:none}
.gms-role-filter-chip,.gms-role-filter-clear{border-radius:999px;padding:5px 10px;font-size:12px;line-height:1.2;transition:border-color .15s ease,background .15s ease,transform .15s ease}
.gms-role-filter-chip{border:1px solid color-mix(in srgb,var(--gms-primary) 38%,transparent);background:color-mix(in srgb,var(--gms-primary) 10%,transparent);color:var(--gms-primary);font-weight:700}
.gms-role-filter-chip:hover{transform:translateY(-1px);background:color-mix(in srgb,var(--gms-primary) 16%,transparent)}
.gms-role-filter-chip i{margin-left:5px}.gms-role-filter-clear{border:1px solid var(--gms-border,#dce4e8);background:transparent;color:var(--gms-text-muted,#687784)}
.gms-role-table-count{display:inline-flex;min-width:72px;flex-direction:column;align-items:flex-end;font-variant-numeric:tabular-nums}.gms-role-table-count strong{font-size:14px}.gms-role-table-count small{font-size:10px;color:var(--gms-text-muted,#71808c)}
.gms-controlled-change{border-color:color-mix(in srgb,var(--gms-primary) 36%,var(--gms-border,#dce4e8))!important;background:color-mix(in srgb,var(--gms-primary) 4%,var(--gms-surface,#fff))!important}
.gms-controlled-change-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.gms-controlled-change-grid span{display:flex;align-items:center;gap:7px;padding:9px;border:1px solid var(--gms-border,#dce4e8);border-radius:6px;background:var(--gms-surface,#fff);font-size:11px;font-weight:700}.gms-controlled-change-grid i{color:var(--gms-primary)}
.gms-role-permission-modal .modal-dialog{max-width:1220px}.gms-role-permission-intro{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;margin-bottom:14px;padding:15px 17px;border:1px solid color-mix(in srgb,var(--gms-primary) 35%,var(--gms-border,#dce4e8));border-left:3px solid var(--gms-primary);border-radius:7px;background:color-mix(in srgb,var(--gms-primary) 5%,var(--gms-surface,#fff))}.gms-role-permission-intro>span{width:42px;height:42px;display:grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--gms-primary) 12%,transparent);color:var(--gms-primary);font-size:17px}.gms-role-permission-intro p{margin:2px 0 0;color:var(--gms-text-muted,#687784);font-size:12px}.gms-role-permission-intro>div:last-child{text-align:center;padding-left:16px;border-left:1px solid var(--gms-border,#dce4e8)}.gms-role-permission-intro>div:last-child strong,.gms-role-permission-intro>div:last-child small{display:block}.gms-role-permission-intro>div:last-child strong{color:var(--gms-primary);font-size:22px;font-variant-numeric:tabular-nums}.gms-role-permission-hint{font-size:11px;color:var(--gms-text-muted,#687784)}.gms-role-permission-hint i{color:var(--gms-primary);margin-right:5px}
html[data-gms-theme=dark] .gms-role-catalogue-filters{--gms-border:#2c4149;--gms-surface-soft:#142127}html[data-gms-theme=dark] .gms-controlled-change,html[data-gms-theme=dark] .gms-role-permission-intro{--gms-border:#30474f;--gms-surface:#17262c;--gms-text-muted:#9db0b7}html[data-gms-theme=dark] .gms-controlled-change-grid span{--gms-border:#30474f;--gms-surface:#101c21}
@media(max-width:767.98px){.gms-role-catalogue-filters{grid-template-columns:1fr;padding:15px}.gms-role-filter-chips{grid-column:auto}.gms-controlled-change-grid{grid-template-columns:1fr}.gms-role-permission-intro{grid-template-columns:auto 1fr}.gms-role-permission-intro>div:last-child{grid-column:1/-1;border-left:0;border-top:1px solid var(--gms-border,#dce4e8);padding:10px 0 0;text-align:left}.gms-role-permission-hint{display:none}}

/* Roles landing page wizard and workspace polish. */
.gms-role-workspace{display:grid;gap:18px}.gms-role-workspace>.gms-role-journey-hero,.gms-role-workspace>.gms-role-health,.gms-role-workspace>.gms-role-blueprints,.gms-role-workspace>.gms-role-catalogue{margin-bottom:0}
.gms-role-workspace>.gms-role-health,.gms-role-workspace-section{background:var(--gms-surface);border:1px solid var(--gms-border);border-radius:var(--gms-radius);box-shadow:0 8px 24px rgba(12,49,55,.045);padding:20px}
.gms-role-workspace>.gms-role-catalogue{padding:0;overflow:hidden}.gms-role-workspace>.gms-role-health>header,.gms-role-workspace-section>.gms-section-heading{padding-bottom:13px;border-bottom:1px solid var(--gms-border);margin-bottom:15px}
.gms-role-wizard-steps{background:var(--gms-surface);border:1px solid var(--gms-border);border-radius:var(--gms-radius);box-shadow:0 7px 20px rgba(12,49,55,.04);overflow:hidden}
.gms-role-wizard-steps ul{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));list-style:none;margin:0;padding:0}
.gms-role-wizard-steps li{min-width:0;position:relative}.gms-role-wizard-steps li:not(:last-child):after{content:"";position:absolute;right:-11px;top:50%;width:22px;height:22px;background:inherit;border-right:1px solid var(--gms-border);border-top:1px solid var(--gms-border);transform:translateY(-50%) rotate(45deg);z-index:2}
.gms-role-wizard-steps a{align-items:center;color:var(--gms-text-muted);display:grid;gap:12px;grid-template-columns:48px minmax(0,1fr);min-height:86px;padding:14px 24px;text-decoration:none;transition:background .18s ease,color .18s ease}
.gms-role-wizard-steps .number{display:none}.gms-role-wizard-steps .num-icon{align-items:center;background:var(--gms-surface-muted);border:1px solid var(--gms-border);border-radius:50%;color:var(--gms-text-muted);display:flex;font-size:16px;height:44px;justify-content:center;position:relative;width:44px;z-index:3}
.gms-role-wizard-steps a>span:last-child{font-size:11px;line-height:1.35;min-width:0}.gms-role-wizard-steps b{color:var(--gms-text);display:block;font-size:13px;margin-bottom:2px}
.gms-role-wizard-steps li.complete a{background:color-mix(in srgb,var(--gms-success-soft) 65%,var(--gms-surface))}.gms-role-wizard-steps li.complete .num-icon{background:var(--gms-success-soft);border-color:var(--gms-success-border);color:var(--gms-success-text)}
.gms-role-wizard-steps li.current a{background:var(--gms-primary);color:#eaffff}.gms-role-wizard-steps li.current b{color:#fff}.gms-role-wizard-steps li.current .num-icon{background:#fff;border-color:#fff;color:var(--gms-primary-dark);box-shadow:0 0 0 6px rgba(255,255,255,.13)}.gms-role-wizard-steps li.current:not(:last-child):after{background:var(--gms-primary);border-color:var(--gms-primary)}
.gms-role-wizard-steps li.disabled a{cursor:default}.gms-role-wizard-steps li:not(.disabled) a:hover{filter:brightness(.985)}
.gms-role-health-grid article{transition:transform .18s ease,box-shadow .18s ease}.gms-role-health-grid article:hover{box-shadow:var(--gms-shadow);transform:translateY(-2px)}
.gms-role-blueprint-card{min-height:10.5rem}.gms-role-catalogue-header{background:var(--gms-surface);padding:20px 24px}.gms-role-catalogue .gms-datatable-shell{padding:20px 24px}
.gms-role-catalogue{scroll-margin-top:88px}.gms-role-catalogue.is-scroll-target{animation:gms-role-catalogue-focus 1.35s ease}@keyframes gms-role-catalogue-focus{0%,100%{box-shadow:0 8px 24px rgba(12,49,55,.045)}35%{border-color:var(--gms-primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--gms-primary) 18%,transparent),0 14px 34px rgba(12,49,55,.12)}}
html[data-gms-theme=dark] .gms-role-workspace>.gms-role-health,html[data-gms-theme=dark] .gms-role-workspace-section,html[data-gms-theme=dark] .gms-role-wizard-steps{box-shadow:none}
@media(max-width:1199.98px){.gms-role-wizard-steps ul{grid-template-columns:repeat(3,minmax(0,1fr))}.gms-role-wizard-steps li:nth-child(3):after{display:none}}
@media(max-width:767.98px){.gms-role-workspace>.gms-role-health,.gms-role-workspace-section{padding:15px}.gms-role-wizard-steps ul{grid-template-columns:1fr}.gms-role-wizard-steps li:not(:last-child):after{display:none}.gms-role-wizard-steps a{min-height:70px;padding:11px 16px}.gms-role-catalogue .gms-datatable-shell,.gms-role-catalogue-header{padding:15px}}
@media(prefers-reduced-motion:reduce){.gms-role-wizard-steps a,.gms-role-health-grid article{transition:none}.gms-role-catalogue.is-scroll-target{animation:none}}

/* Roles landing parity with the Users workspace. */
.gms-role-workspace>.gms-role-health{background:transparent;border:0;border-radius:0;box-shadow:none;padding:0}
.gms-role-stat-ribbon{background:var(--gms-primary);border-radius:var(--gms-radius);color:#fff;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}
.gms-role-stat-ribbon article{align-items:center;display:flex;flex-direction:column;justify-content:center;min-height:108px;padding:14px;text-align:center}
.gms-role-stat-ribbon article:not(:last-child){border-right:1px solid rgba(255,255,255,.22)}
.gms-role-stat-ribbon article>span{align-items:center;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.3);border-radius:8px;display:flex;height:31px;justify-content:center;margin-bottom:5px;width:31px}
.gms-role-stat-ribbon strong{color:#fff;font-size:20px;font-variant-numeric:tabular-nums;line-height:1.1}.gms-role-stat-ribbon small{color:#fff;font-size:12px;font-weight:700;margin-top:3px}
.gms-role-filter-card{margin-bottom:0}.gms-role-filter-card .card-header{padding:18px 24px}.gms-role-filter-card .card-header h5{margin:0 0 3px}.gms-role-filter-card .card-header p{font-size:12px}
.gms-role-filter-card .card-body{padding:18px 24px}.gms-role-filter-card .gms-role-catalogue-filters{background:transparent;border:0;padding:0}.gms-role-filter-card .gms-role-filter-chips{grid-column:auto;margin-top:14px}
.gms-role-workspace.is-catalogue-focus>.gms-role-journey-hero,.gms-role-workspace.is-catalogue-focus>.gms-role-wizard-steps,.gms-role-workspace.is-catalogue-focus>.gms-role-health,.gms-role-workspace.is-catalogue-focus>.gms-role-blueprints{display:none}
.gms-role-workspace.is-catalogue-focus{gap:16px}.gms-role-filter-card{scroll-margin-top:88px}
.gms-role-workspace>.gms-role-filter-card{order:3}.gms-role-workspace>.gms-role-catalogue{order:4}.gms-role-workspace>.gms-role-blueprints{order:5}
.gms-role-filter-card.is-scroll-target{animation:gms-role-catalogue-focus 1.35s ease}
.gms-role-blueprints .gms-role-blueprint-grid{gap:12px}.gms-role-blueprints .gms-role-blueprint-card{min-height:9.5rem;padding:14px}.gms-role-blueprints .gms-role-blueprint-icon{height:42px;width:42px}
html[data-gms-theme=dark] .gms-role-stat-ribbon{background:#137f84}
@media(max-width:767.98px){.gms-role-stat-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))}.gms-role-stat-ribbon article:nth-child(2){border-right:0}.gms-role-stat-ribbon article:nth-child(-n+2){border-bottom:1px solid rgba(255,255,255,.22)}.gms-role-filter-card .card-header{align-items:flex-start!important;flex-direction:column}.gms-role-filter-card .card-body,.gms-role-filter-card .card-header{padding:15px}}
@media(prefers-reduced-motion:reduce){.gms-role-filter-card.is-scroll-target{animation:none}}

/* --------------------------------------------------------------------------
   Navigation Management journey
   -------------------------------------------------------------------------- */

.gms-navigation-hero {
    align-items: center;
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-top: 4px solid var(--gms-primary);
    border-radius: var(--gms-radius);
    box-shadow: var(--gms-shadow);
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(20rem, .85fr) minmax(38rem, 1.4fr);
    margin-bottom: 1rem;
    overflow: hidden;
    padding: 2rem;
}

.gms-navigation-hero h1,
.gms-navigation-health h2,
.gms-navigation-map h2,
.gms-navigation-catalogue h2 {
    color: var(--gms-text);
    font-size: 1.35rem;
    font-weight: 800;
    margin: .3rem 0 .45rem;
}

.gms-navigation-hero-copy > p,
.gms-navigation-map .gms-section-heading p,
.gms-navigation-catalogue .card-header p {
    color: var(--gms-text-muted);
    margin: 0;
}

.gms-navigation-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.2rem;
}

.gms-navigation-flow {
    align-items: center;
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(7, auto);
    justify-content: end;
}

.gms-navigation-flow > div {
    align-items: center;
    color: var(--gms-text);
    display: flex;
    flex-direction: column;
    min-width: 7rem;
    text-align: center;
}

.gms-navigation-flow > div > span {
    align-items: center;
    background: var(--gms-surface-tint);
    border: 1px solid rgba(25, 188, 191, .28);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: flex;
    font-size: 1.15rem;
    height: 3.3rem;
    justify-content: center;
    margin-bottom: .55rem;
    width: 3.3rem;
}

.gms-navigation-flow > div.is-primary > span {
    background: var(--gms-primary);
    box-shadow: 0 0 0 .42rem rgba(25, 188, 191, .13);
    color: #fff;
}

.gms-navigation-flow strong { font-size: .78rem; }
.gms-navigation-flow small { color: var(--gms-text-muted); font-size: .62rem; }
.gms-navigation-flow > i { color: var(--gms-border-strong); }

.gms-navigation-steps {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.gms-navigation-steps li {
    align-items: center;
    border-right: 1px solid var(--gms-border);
    display: flex;
    gap: .65rem;
    min-width: 0;
    padding: .9rem 1rem;
}

.gms-navigation-steps li:last-child { border-right: 0; }
.gms-navigation-steps li > span {
    align-items: center;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: 50%;
    color: var(--gms-text-muted);
    display: flex;
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 800;
    height: 1.8rem;
    justify-content: center;
    width: 1.8rem;
}

.gms-navigation-steps li.is-complete > span,
.gms-navigation-steps li.is-current > span { background: var(--gms-primary); border-color: var(--gms-primary); color: #fff; }
.gms-navigation-steps li.is-current { background: var(--gms-surface-tint); }
.gms-navigation-steps div { display: flex; flex-direction: column; min-width: 0; }
.gms-navigation-steps strong { color: var(--gms-text); font-size: .72rem; }
.gms-navigation-steps small { color: var(--gms-text-muted); font-size: .59rem; }

.gms-navigation-health,
.gms-navigation-map {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius);
    box-shadow: var(--gms-shadow);
    margin-bottom: 1rem;
}

.gms-navigation-health > header,
.gms-navigation-map > header,
.gms-navigation-catalogue > header {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    justify-content: space-between;
    padding: 1.1rem 1.3rem;
}

.gms-navigation-health > header > span,
.gms-navigation-map .gms-section-heading > span {
    color: var(--gms-text-muted);
    font-size: .68rem;
}

.gms-navigation-health > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gms-navigation-health article {
    align-items: center;
    border-right: 1px solid var(--gms-border);
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    text-align: center;
}

.gms-navigation-health article:last-child { border-right: 0; }
.gms-navigation-health article > span {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-primary-dark);
    display: flex;
    height: 2rem;
    justify-content: center;
    margin-bottom: .35rem;
    width: 2rem;
}
.gms-navigation-health article.needs-attention > span { background: var(--gms-danger-soft); color: var(--gms-danger-text); }
.gms-navigation-health article strong { color: var(--gms-text); font-size: 1.05rem; }
.gms-navigation-health article small { color: var(--gms-text-muted); font-size: .65rem; }

.gms-navigation-map-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1.2rem;
}

.gms-navigation-root {
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-left: 3px solid var(--gms-primary);
    border-radius: var(--gms-radius-sm);
    overflow: hidden;
}

.gms-navigation-root.is-disabled,
.gms-navigation-child.is-disabled { opacity: .64; }

.gms-navigation-root > header {
    align-items: flex-start;
    display: grid;
    gap: .75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 1rem;
}

.gms-navigation-node-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .28);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-primary-dark);
    display: flex;
    flex: 0 0 auto;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.gms-navigation-root > header div > span {
    color: var(--gms-primary-dark);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gms-navigation-root h3 { color: var(--gms-text); font-size: .9rem; font-weight: 800; margin: .05rem 0 .1rem; }
.gms-navigation-root > header p { color: var(--gms-text-muted); font-size: .63rem; margin: 0; }
.gms-navigation-state {
    background: var(--gms-success-soft);
    border: 1px solid var(--gms-success-border);
    border-radius: 99px;
    color: var(--gms-success-text);
    display: inline-flex;
    font-size: .58rem;
    font-weight: 800;
    padding: .25rem .5rem;
}
.gms-navigation-state.is-disabled { background: var(--gms-danger-soft); border-color: var(--gms-danger-border); color: var(--gms-danger-text); }

.gms-navigation-node-meta {
    border-bottom: 1px solid var(--gms-border);
    border-top: 1px solid var(--gms-border);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gms-navigation-node-meta span {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    font-size: .6rem;
    gap: .4rem;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: .6rem 1rem;
}
.gms-navigation-node-meta span + span { border-left: 1px solid var(--gms-border); }
.gms-navigation-node-meta i { color: var(--gms-primary-dark); }

.gms-navigation-children { padding: .65rem; }
.gms-navigation-child {
    align-items: center;
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    display: grid;
    gap: .65rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: .5rem;
    padding: .65rem;
}
.gms-navigation-child:last-child { margin-bottom: 0; }
.gms-navigation-child > div { display: flex; flex-direction: column; min-width: 0; }
.gms-navigation-child strong { color: var(--gms-text); font-size: .72rem; }
.gms-navigation-child small { color: var(--gms-text-muted); font-size: .58rem; }
.gms-navigation-child em { color: var(--gms-primary-dark); font-size: .54rem; font-style: normal; }
.gms-navigation-child-actions { display: flex; gap: .3rem; }
.gms-navigation-move,
.gms-navigation-edit {
    align-items: center;
    background: var(--gms-primary);
    border: 1px solid var(--gms-primary);
    color: #fff;
    display: inline-flex;
    height: 1.9rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 1.9rem;
}
.gms-navigation-move > i,
.gms-navigation-edit > i { color: inherit; display: block; line-height: 1; margin: 0; }
.gms-navigation-move:hover,
.gms-navigation-edit:hover { background: var(--gms-primary-dark); border-color: var(--gms-primary-dark); color: #fff; }
.gms-navigation-move:disabled {
    background: var(--gms-surface-muted);
    border-color: var(--gms-border);
    color: var(--gms-text-muted);
    opacity: .45;
}

.gms-navigation-empty-branch {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    font-size: .62rem;
    gap: .5rem;
    justify-content: center;
    min-height: 4.5rem;
    padding: .8rem;
}
.gms-navigation-empty-branch i { color: var(--gms-primary-dark); }

.gms-navigation-root > footer {
    align-items: center;
    border-top: 1px solid var(--gms-border);
    display: flex;
    justify-content: space-between;
    padding: .65rem 1rem;
}
.gms-navigation-root > footer > span { color: var(--gms-text-muted); font-size: .58rem; }
.gms-navigation-root > footer > div { display: flex; gap: .35rem; }

.gms-navigation-catalogue { overflow: hidden; }
.gms-navigation-catalogue > header { background: var(--gms-surface); }
.gms-navigation-filters {
    background: var(--gms-surface-muted);
    border-bottom: 1px solid var(--gms-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem 1.3rem;
}
.gms-navigation-table-name { align-items: center; display: flex; gap: .65rem; }
.gms-navigation-table-name > i { color: var(--gms-primary-dark); font-size: 1rem; width: 1.25rem; }
.gms-navigation-table-name > span { display: flex; flex-direction: column; }
.gms-navigation-table-name strong { color: var(--gms-text); font-size: .7rem; }
.gms-navigation-table-name small { color: var(--gms-text-muted); font-size: .56rem; }

.gms-navigation-icon-input { align-items: stretch; display: flex; }
.gms-navigation-icon-input > span {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid var(--gms-border-strong);
    border-radius: var(--gms-radius-sm) 0 0 var(--gms-radius-sm);
    color: var(--gms-primary-dark);
    display: flex;
    flex: 0 0 2.8rem;
    justify-content: center;
}
.gms-navigation-icon-input .form-control { border-radius: 0 var(--gms-radius-sm) var(--gms-radius-sm) 0; }
.gms-navigation-modal-facts { display: grid; gap: .55rem; margin-top: 1.2rem; }
.gms-navigation-modal-facts span { align-items: center; background: rgba(255,255,255,.08); border-radius: var(--gms-radius-sm); display: flex; gap: .55rem; padding: .65rem; }
.gms-navigation-modal-facts i { color: var(--gms-primary); width: 1rem; }
.gms-navigation-modal-facts b { color: inherit; font-size: .62rem; overflow-wrap: anywhere; }

html[data-gms-theme="dark"] .gms-navigation-flow > div.is-primary > span,
html[data-gms-theme="dark"] .gms-navigation-steps li.is-complete > span,
html[data-gms-theme="dark"] .gms-navigation-steps li.is-current > span { color: #062d31; }
html[data-gms-theme="dark"] .gms-navigation-node-icon,
html[data-gms-theme="dark"] .gms-navigation-flow > div > span,
html[data-gms-theme="dark"] .gms-navigation-health article > span,
html[data-gms-theme="dark"] .gms-navigation-icon-input > span { background: #12343a; border-color: #1b5c63; color: #43d7da; }
html[data-gms-theme="dark"] .gms-navigation-root { background: #14242a; }
html[data-gms-theme="dark"] .gms-navigation-child { background: #17282e; }
html[data-gms-theme="dark"] .gms-navigation-state.is-active { background: #113b2b; border-color: #1f6b4b; color: #6ce6a7; }
html[data-gms-theme="dark"] .gms-navigation-state.is-disabled { background: #3b2026; border-color: #70303b; color: #ff9baa; }

@media (max-width: 1399.98px) {
    .gms-navigation-hero { grid-template-columns: 1fr; }
    .gms-navigation-flow { justify-content: center; }
}

@media (max-width: 991.98px) {
    .gms-navigation-map-grid { grid-template-columns: 1fr; }
    .gms-navigation-steps { grid-template-columns: 1fr; }
    .gms-navigation-steps li { border-bottom: 1px solid var(--gms-border); border-right: 0; }
    .gms-navigation-steps li:last-child { border-bottom: 0; }
}

@media (max-width: 767.98px) {
    .gms-navigation-hero { min-width: 0; padding: 1.2rem; }
    .gms-navigation-flow { grid-template-columns: 1fr; }
    .gms-navigation-flow > i { transform: rotate(90deg); }
    .gms-navigation-health > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gms-navigation-health article:nth-child(2) { border-right: 0; }
    .gms-navigation-health article:nth-child(-n+2) { border-bottom: 1px solid var(--gms-border); }
    .gms-navigation-filters { grid-template-columns: 1fr; }
    .gms-navigation-root > header { grid-template-columns: auto minmax(0, 1fr); }
    .gms-navigation-root > header .gms-navigation-state { grid-column: 2; justify-self: start; }
    .gms-navigation-child { grid-template-columns: auto minmax(0, 1fr); }
    .gms-navigation-child-actions { grid-column: 2; }
    .gms-navigation-root > footer { align-items: flex-start; flex-direction: column; gap: .6rem; }
}

/* Navigation Management: established Dasho/GMS presentation. */
.gms-navigation-summary {
    margin-bottom: 1.5rem;
}

.gms-navigation-structure,
.gms-navigation-catalogue {
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.gms-navigation-filter-card {
    margin-bottom: 1.5rem;
}

.gms-navigation-filter-card > .card-header {
    background: var(--gms-surface);
}

.gms-navigation-filter-bar,
.gms-navigation-filter-bar.is-datatable-ready {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.gms-navigation-structure > .card-header,
.gms-navigation-catalogue > .card-header {
    background: var(--gms-surface);
    border-bottom: 1px solid var(--gms-border);
    min-height: 4.35rem;
    padding: 1rem 1.5rem;
}

.gms-navigation-structure > .card-header h5,
.gms-navigation-catalogue > .card-header h5 {
    color: var(--gms-text);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .2rem;
}

.gms-navigation-structure > .card-header p,
.gms-navigation-catalogue > .card-header p {
    color: var(--gms-text-muted) !important;
    font-size: .72rem;
}

.gms-navigation-structure > .card-body {
    background: var(--gms-surface);
    padding: 1.25rem 1.5rem 1.5rem;
}

.gms-navigation-guide {
    align-items: stretch;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    margin-bottom: 1.25rem;
}

.gms-navigation-guide > div {
    align-items: center;
    display: grid;
    gap: .05rem .65rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: .75rem 1rem;
}

.gms-navigation-guide > div > span {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .28);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-primary-dark);
    display: flex;
    grid-row: 1 / 3;
    height: 2.15rem;
    justify-content: center;
    width: 2.15rem;
}

.gms-navigation-guide > div strong {
    color: var(--gms-text);
    font-size: .72rem;
}

.gms-navigation-guide > div small {
    color: var(--gms-text-muted);
    font-size: .61rem;
}

.gms-navigation-guide > i {
    align-self: center;
    color: var(--gms-border-strong);
    font-size: .65rem;
}

.gms-navigation-tree {
    border: 1px solid var(--gms-border);
}

.gms-navigation-tree-group + .gms-navigation-tree-group {
    border-top: 1px solid var(--gms-border);
}

.gms-navigation-tree-row {
    align-items: center;
    display: grid;
    gap: .85rem;
    grid-template-columns: auto minmax(12rem, 1.1fr) minmax(17rem, .9fr) auto auto;
    min-width: 0;
    padding: .8rem 1rem;
}

.gms-navigation-tree-row.is-root {
    background: var(--gms-surface-muted);
    border-left: 3px solid var(--gms-primary);
}

.gms-navigation-tree-group.is-disabled > .gms-navigation-tree-row,
.gms-navigation-tree-row.is-disabled {
    opacity: .62;
}

.gms-navigation-tree-identity {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-navigation-tree-kind {
    color: var(--gms-primary-dark);
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: .08rem;
    text-transform: uppercase;
}

.gms-navigation-tree-identity strong {
    color: var(--gms-text);
    font-size: .76rem;
}

.gms-navigation-tree-identity small {
    color: var(--gms-text-muted);
    font-size: .61rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gms-navigation-tree-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-navigation-tree-details span {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    font-size: .59rem;
    gap: .4rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.gms-navigation-tree-details i {
    color: var(--gms-primary-dark);
    flex: 0 0 1rem;
    text-align: center;
}

.gms-navigation-row-actions {
    display: flex;
    gap: .35rem;
}

.gms-navigation-tree-children {
    background: var(--gms-surface);
    border-left: 3px solid var(--gms-border);
    margin-left: 2.1rem;
}

.gms-navigation-tree-row.is-child {
    border-top: 1px solid var(--gms-border);
    grid-template-columns: 1.2rem auto minmax(12rem, 1.1fr) minmax(17rem, .9fr) auto auto;
    position: relative;
}

.gms-navigation-tree-row.is-child:first-child {
    border-top: 0;
}

.gms-navigation-branch {
    border-bottom: 1px solid var(--gms-border-strong);
    height: 1px;
    width: 1.2rem;
}

.gms-navigation-tree-child-empty {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    font-size: .63rem;
    gap: .5rem;
    min-height: 3rem;
    padding: .7rem 1rem;
}

.gms-navigation-tree-child-empty i {
    color: var(--gms-primary-dark);
    width: 1rem;
}

.gms-navigation-tree-empty {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    text-align: center;
}

.gms-navigation-tree-empty > span {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-primary-dark);
    display: flex;
    height: 2.75rem;
    justify-content: center;
    margin-bottom: .6rem;
    width: 2.75rem;
}

.gms-navigation-tree-empty strong { color: var(--gms-text); }
.gms-navigation-tree-empty small { font-size: .65rem; }

.gms-navigation-modal .select2-container {
    width: 100% !important;
}

.gms-navigation-modal .select2-container--default .select2-selection--single {
    background: var(--gms-surface);
    border-color: var(--gms-border-strong);
    min-height: 42px;
}

.gms-navigation-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--gms-text);
    line-height: 40px;
}

.gms-navigation-modal select.is-invalid + .select2-container .select2-selection--single {
    border-color: var(--gms-danger);
}

.gms-navigation-modal select.is-invalid + .select2-container--focus .select2-selection--single,
.gms-navigation-modal select.is-invalid + .select2-container--open .select2-selection--single {
    box-shadow: 0 0 0 .2rem rgba(225, 75, 88, .15);
}

.select2-container--open .select2-dropdown .select2-search--dropdown {
    background: var(--gms-surface-muted);
    border-bottom: 1px solid var(--gms-border);
    padding: .65rem;
}

.select2-container--open .select2-dropdown .select2-search__field {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border-strong);
    border-radius: 4px;
    color: var(--gms-text);
    min-height: 38px;
    padding: .4rem .65rem;
}

.select2-container--open .select2-dropdown .select2-search__field:focus {
    border-color: var(--gms-primary);
    box-shadow: var(--gms-focus);
    outline: 0;
}

.select2-container--default .select2-results__group {
    color: var(--gms-primary-dark);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .05em;
    padding: .7rem .8rem .35rem;
    text-transform: uppercase;
}

html[data-gms-theme="dark"] .gms-navigation-guide > div > span,
html[data-gms-theme="dark"] .gms-navigation-tree-empty > span {
    background: #12343a;
    border-color: #1b5c63;
    color: #43d7da;
}

html[data-gms-theme="dark"] .gms-navigation-guide,
html[data-gms-theme="dark"] .gms-navigation-tree-row.is-root {
    background: var(--gms-surface-muted);
}

@media (max-width: 1199.98px) {
    .gms-navigation-tree-row,
    .gms-navigation-tree-row.is-child {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }

    .gms-navigation-tree-row.is-child .gms-navigation-branch { display: none; }
    .gms-navigation-tree-details { display: none; }
}

@media (max-width: 767.98px) {
    .gms-navigation-structure > .card-header {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .gms-navigation-guide {
        grid-template-columns: 1fr;
    }

    .gms-navigation-guide > i { display: none; }
    .gms-navigation-guide > div + div { border-top: 1px solid var(--gms-border); }

    .gms-navigation-tree-row,
    .gms-navigation-tree-row.is-child {
        align-items: start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .gms-navigation-tree-row .gms-navigation-state,
    .gms-navigation-row-actions {
        grid-column: 2;
        justify-self: start;
    }

    .gms-navigation-tree-children { margin-left: 1rem; }
    .gms-navigation-filter-bar,
    .gms-navigation-filter-bar.is-datatable-ready { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Roles and permissions: access-design journey
   -------------------------------------------------------------------------- */

.gms-role-journey-hero {
    align-items: center;
    background: var(--gms-secondary, #0d3137);
    border: 1px solid color-mix(in srgb, var(--gms-primary) 40%, transparent);
    border-radius: var(--gms-radius);
    color: #fff;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1.1fr) minmax(32rem, .9fr);
    margin-bottom: 1rem;
    overflow: hidden;
    padding: clamp(1.4rem, 3vw, 2.4rem);
    position: relative;
}

.gms-role-journey-hero::after {
    background: var(--gms-primary);
    content: "";
    height: 5px;
    inset: auto 0 0;
    position: absolute;
}

.gms-role-journey-copy .gms-kicker { color: #78e7e9; }
.gms-role-journey-copy h1 { color: #fff; font-size: clamp(1.75rem, 3vw, 2.7rem); margin: .45rem 0 .65rem; }
.gms-role-journey-copy > p { color: #c5d7dc; font-size: 1rem; line-height: 1.7; margin: 0; max-width: 48rem; }
.gms-role-journey-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; }
.gms-role-journey-actions .btn-outline-secondary { border-color: #6f858c; color: #fff; }
.gms-role-journey-actions .btn-outline-secondary:hover { background: #fff; border-color: #fff; color: #15353a; }

.gms-access-flow { align-items: center; display: grid; gap: .55rem; grid-template-columns: 1fr auto 1fr auto 1fr; }
.gms-access-flow > i { color: #72cfd2; }
.gms-access-flow-node { align-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--gms-radius-sm); display: flex; flex-direction: column; min-height: 9.5rem; padding: 1rem .55rem; text-align: center; }
.gms-access-flow-node > span { align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 50%; display: flex; font-size: 1.25rem; height: 3.2rem; justify-content: center; margin-bottom: .75rem; width: 3.2rem; }
.gms-access-flow-node strong { color: #fff; font-size: .92rem; }
.gms-access-flow-node small { color: #a9c1c7; font-size: .72rem; margin-top: .25rem; }
.gms-access-flow-node.is-primary { background: #134c53; border-color: var(--gms-primary); }
.gms-access-flow-node.is-primary > span { background: var(--gms-primary); color: #06383c; }

.gms-role-journey-steps,
.gms-role-detail-journey { background: var(--gms-surface); border: 1px solid var(--gms-border); border-radius: var(--gms-radius); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; margin: 0 0 1.5rem; padding: 0; }
.gms-role-journey-steps li,
.gms-role-detail-journey li { align-items: center; display: flex; gap: .75rem; min-width: 0; padding: 1rem; position: relative; }
.gms-role-journey-steps li:not(:last-child)::after,
.gms-role-detail-journey li:not(:last-child)::after { background: var(--gms-border); content: ""; height: 1px; position: absolute; right: -.4rem; top: 50%; width: .8rem; }
.gms-role-journey-steps li > span,
.gms-role-detail-journey li > span { align-items: center; background: var(--gms-surface-muted); border: 1px solid var(--gms-border); border-radius: 50%; color: var(--gms-text-muted); display: flex; flex: 0 0 auto; font-size: .78rem; font-weight: 800; height: 2rem; justify-content: center; width: 2rem; }
.gms-role-journey-steps li div,
.gms-role-detail-journey li div { display: flex; flex-direction: column; min-width: 0; }
.gms-role-journey-steps li strong,
.gms-role-detail-journey li strong { color: var(--gms-text); font-size: .78rem; }
.gms-role-journey-steps li small,
.gms-role-detail-journey li small { color: var(--gms-text-muted); font-size: .67rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gms-role-journey-steps li.is-complete > span,
.gms-role-detail-journey li.is-complete > span { background: var(--gms-success-soft); border-color: var(--gms-success-border); color: var(--gms-success-text); }
.gms-role-journey-steps li.is-current,
.gms-role-detail-journey li.is-current { background: var(--gms-surface-tint); }
.gms-role-journey-steps li.is-current > span,
.gms-role-detail-journey li.is-current > span { background: var(--gms-primary); border-color: var(--gms-primary); color: #fff; }

.gms-role-health,
.gms-role-blueprints { margin-bottom: 1.5rem; }
.gms-role-health > header,
.gms-section-heading { align-items: flex-end; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: .85rem; }
.gms-role-health h2,
.gms-section-heading h2 { color: var(--gms-text); font-size: 1.2rem; margin: .25rem 0 0; }
.gms-role-health-score { align-items: center; background: var(--gms-surface-tint); border: 1px solid color-mix(in srgb, var(--gms-primary) 35%, var(--gms-border)); border-radius: 999px; color: var(--gms-text-muted); display: flex; font-size: .76rem; gap: .35rem; padding: .45rem .75rem; }
.gms-role-health-score strong { color: var(--gms-primary-dark); }
.gms-role-health-grid { display: grid; gap: .85rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gms-role-health-grid article { align-items: center; background: var(--gms-surface); border: 1px solid var(--gms-border); border-top: 3px solid var(--gms-primary); border-radius: var(--gms-radius-sm); display: grid; gap: .15rem .8rem; grid-template-columns: auto 1fr; padding: 1rem; }
.gms-role-health-grid article > span { align-items: center; background: var(--gms-primary-soft); border-radius: var(--gms-radius-sm); color: var(--gms-primary-dark); display: flex; grid-row: 1 / 3; height: 2.65rem; justify-content: center; width: 2.65rem; }
.gms-role-health-grid article strong { color: var(--gms-text); font-size: 1.25rem; }
.gms-role-health-grid article small { color: var(--gms-text-muted); }
.gms-role-health-grid article.needs-attention { border-top-color: #e2a11c; }
.gms-role-health-grid article.needs-attention > span { background: #fff5dc; color: #946200; }

.gms-section-heading > span { color: var(--gms-text-muted); font-size: .78rem; }
.gms-role-blueprint-grid { display: grid; gap: .9rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gms-role-blueprint-card { background: var(--gms-surface); border: 1px solid var(--gms-border); border-left: 4px solid var(--gms-role-accent); border-radius: var(--gms-radius); color: var(--gms-text); display: flex; gap: 1rem; min-height: 12rem; padding: 1.1rem; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.gms-role-blueprint-card:hover { border-color: var(--gms-role-accent); box-shadow: var(--gms-shadow); color: var(--gms-text); transform: translateY(-2px); }
.gms-role-blueprint-icon { align-items: center; background: color-mix(in srgb, var(--gms-role-accent) 14%, var(--gms-surface)); border: 1px solid color-mix(in srgb, var(--gms-role-accent) 35%, var(--gms-border)); border-radius: var(--gms-radius-sm); color: var(--gms-role-accent); display: flex; flex: 0 0 auto; height: 3rem; justify-content: center; width: 3rem; }
.gms-role-blueprint-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.gms-role-blueprint-meta { align-items: center; display: flex; justify-content: space-between; }
.gms-role-blueprint-meta em { color: var(--gms-text-muted); font-size: .65rem; font-style: normal; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.gms-role-blueprint-meta b { border-radius: 999px; font-size: .64rem; padding: .18rem .45rem; }
.gms-role-blueprint-meta b.is-active { background: var(--gms-success-soft); color: var(--gms-success-text); }
.gms-role-blueprint-meta b.is-inactive { background: var(--gms-danger-soft); color: var(--gms-danger-text); }
.gms-role-blueprint-copy > strong { font-size: 1.05rem; margin: .5rem 0 .25rem; }
.gms-role-blueprint-copy > small { color: var(--gms-text-muted); display: -webkit-box; line-height: 1.5; min-height: 2.9em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.gms-role-blueprint-stats { display: flex; gap: .75rem; margin-top: auto; padding-top: .75rem; }
.gms-role-blueprint-stats span { color: var(--gms-text-muted); font-size: .67rem; }
.gms-role-blueprint-stats b { color: var(--gms-text); margin-right: .15rem; }
.gms-role-blueprint-next { align-items: center; color: var(--gms-primary-dark); display: flex; font-size: .72rem; font-weight: 800; justify-content: space-between; margin-top: .65rem; }

.gms-role-catalogue-header { align-items: center; display: flex; justify-content: space-between; }
.gms-role-catalogue-header h2 { font-size: 1.15rem; margin: .2rem 0; }
.gms-role-catalogue-header p { color: var(--gms-text-muted); margin: 0; }
.gms-role-catalogue-filters { background: var(--gms-surface-muted); border-bottom: 1px solid var(--gms-border); display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1rem 1.5rem; }
.gms-role-table-identity { align-items: center; display: flex; gap: .7rem; }
.gms-role-table-identity > i { background: var(--gms-role-colour); border: 4px solid color-mix(in srgb, var(--gms-role-colour) 14%, var(--gms-surface)); border-radius: 50%; height: 1rem; width: 1rem; }
.gms-role-table-identity > span { display: flex; flex-direction: column; }
.gms-role-table-identity small { color: var(--gms-text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.gms-role-type-badge { align-items: center; background: var(--gms-surface-muted); border: 1px solid var(--gms-border); border-radius: 999px; color: var(--gms-text-muted); display: inline-flex; font-size: .72rem; gap: .35rem; padding: .28rem .55rem; }
.gms-role-type-badge.is-system { background: var(--gms-primary-soft); border-color: color-mix(in srgb, var(--gms-primary) 30%, var(--gms-border)); color: var(--gms-primary-dark); }
.gms-role-table-count { display: flex; flex-direction: column; }
.gms-role-table-count small { color: var(--gms-text-muted); font-size: .65rem; }

.gms-role-detail-hero { align-items: center; border-bottom: 1px solid var(--gms-border); display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; padding: .6rem 0 1.25rem; position: relative; }
.gms-role-detail-hero::after { background: var(--gms-role-accent); bottom: -1px; content: ""; height: 3px; left: 0; position: absolute; width: 6rem; }
.gms-role-detail-identity { align-items: center; display: flex; gap: 1rem; }
.gms-role-detail-mark { align-items: center; background: color-mix(in srgb, var(--gms-role-accent) 14%, var(--gms-surface)); border: 1px solid color-mix(in srgb, var(--gms-role-accent) 40%, var(--gms-border)); border-radius: 50%; color: var(--gms-role-accent); display: flex; flex: 0 0 auto; font-size: 1.35rem; height: 4.5rem; justify-content: center; width: 4.5rem; }
.gms-role-detail-identity h1 { color: var(--gms-text); font-size: 1.6rem; margin: .2rem 0; }
.gms-role-detail-identity p { color: var(--gms-text-muted); margin: 0 0 .45rem; max-width: 55rem; }
.gms-role-detail-badges { align-items: center; display: flex; flex-wrap: wrap; gap: .45rem; }
.gms-role-detail-badges > span:not(.gms-status-badge) { align-items: center; background: var(--gms-surface-muted); border: 1px solid var(--gms-border); border-radius: 999px; color: var(--gms-text-muted); display: inline-flex; font-size: .7rem; gap: .3rem; padding: .25rem .55rem; }
.gms-role-detail-actions { display: flex; flex: 0 0 auto; gap: .55rem; }
.gms-role-detail-journey { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gms-role-detail-tabs { margin-bottom: 0; }
.gms-role-detail-content { background: var(--gms-surface); border: 1px solid var(--gms-border); border-top: 0; padding: 1.5rem; }
.gms-role-next-step { align-items: center; background: var(--gms-surface-tint); border: 1px solid color-mix(in srgb, var(--gms-primary) 32%, var(--gms-border)); border-left: 4px solid var(--gms-primary); border-radius: var(--gms-radius); display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; padding: 1.15rem; }
.gms-role-next-step > div { align-items: center; display: flex; gap: 1rem; }
.gms-role-next-step h2 { font-size: 1.15rem; margin: .2rem 0; }
.gms-role-next-step p { color: var(--gms-text-muted); margin: 0; }
.gms-role-next-icon { align-items: center; background: var(--gms-primary); border-radius: 50%; color: #fff; display: flex; flex: 0 0 auto; height: 3.5rem; justify-content: center; width: 3.5rem; }
.gms-role-overview-grid { display: grid; gap: .85rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gms-role-overview-grid article { background: var(--gms-surface-muted); border: 1px solid var(--gms-border); border-top: 3px solid var(--gms-primary); border-radius: var(--gms-radius-sm); display: flex; flex-direction: column; padding: 1rem; }
.gms-role-overview-grid article header { align-items: center; display: flex; gap: .7rem; }
.gms-role-overview-grid article header > span { align-items: center; background: var(--gms-primary-soft); border-radius: var(--gms-radius-sm); color: var(--gms-primary-dark); display: flex; height: 2.6rem; justify-content: center; width: 2.6rem; }
.gms-role-overview-grid article header div { display: flex; flex-direction: column; }
.gms-role-overview-grid article header small { color: var(--gms-text-muted); }
.gms-role-overview-grid article header strong { font-size: 1.1rem; }
.gms-role-overview-grid article p { color: var(--gms-text-muted); flex: 1; font-size: .78rem; line-height: 1.5; margin: .8rem 0; }
.gms-role-overview-grid article button { align-items: center; background: transparent; border: 0; color: var(--gms-primary-dark); display: flex; font-size: .72rem; font-weight: 800; justify-content: space-between; padding: 0; text-align: left; }
.gms-role-guardrail { align-items: flex-start; background: var(--gms-surface-muted); border: 1px solid var(--gms-border); border-radius: var(--gms-radius-sm); display: flex; gap: .8rem; margin-top: 1rem; padding: 1rem; }
.gms-role-guardrail > i { color: var(--gms-primary-dark); font-size: 1.15rem; margin-top: .1rem; }
.gms-role-guardrail div { display: flex; flex-direction: column; }
.gms-role-guardrail span { color: var(--gms-text-muted); font-size: .76rem; margin-top: .2rem; }

.gms-role-tab-heading { align-items: center; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }
.gms-role-tab-heading h2 { font-size: 1.25rem; margin: .2rem 0; }
.gms-role-tab-heading p { color: var(--gms-text-muted); margin: 0; }
.gms-role-permission-summary { background: var(--gms-secondary, #0d3137); border-radius: var(--gms-radius-sm); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; }
.gms-role-permission-summary > div { align-items: center; display: flex; flex-direction: column; padding: 1rem; text-align: center; }
.gms-role-permission-summary > div:not(:last-child) { border-right: 1px solid rgba(255,255,255,.14); }
.gms-role-permission-summary strong { color: #fff; font-size: 1.25rem; }
.gms-role-permission-summary span { color: #b9d1d6; font-size: .72rem; }
.gms-role-permission-search { display: block; margin-bottom: .8rem; position: relative; }
.gms-role-permission-search i { color: var(--gms-primary-dark); left: 1rem; position: absolute; top: 50%; transform: translateY(-50%); }
.gms-role-permission-search input { padding-left: 2.7rem; }
.gms-role-permission-browser { border: 1px solid var(--gms-border); border-radius: var(--gms-radius-sm); padding: 1rem; }
.gms-role-permission-browser .accordion-item { background: var(--gms-surface); border-color: var(--gms-border); }
.gms-role-permission-browser .accordion-button { background: var(--gms-surface); color: var(--gms-text); gap: .75rem; }
.gms-role-permission-browser .accordion-button:not(.collapsed) { background: var(--gms-surface-tint); color: var(--gms-text); }
.gms-role-module-progress { color: var(--gms-text-muted); font-size: .72rem; margin-left: auto; margin-right: 1rem; }
.gms-role-module-progress b { color: var(--gms-primary-dark); }
.gms-role-permission-list { display: grid; gap: .5rem; }
.gms-role-permission-list > div { align-items: center; background: var(--gms-surface-muted); border: 1px solid var(--gms-border); border-radius: var(--gms-radius-sm); display: grid; gap: .7rem; grid-template-columns: auto minmax(0, 1fr) auto; padding: .7rem; }
.gms-role-permission-list > div > span { color: var(--gms-text-muted); }
.gms-role-permission-list > div.is-assigned { background: var(--gms-surface-tint); border-color: color-mix(in srgb, var(--gms-primary) 35%, var(--gms-border)); }
.gms-role-permission-list > div.is-assigned > span { color: var(--gms-primary-dark); }
.gms-role-permission-list > div > div { display: flex; flex-direction: column; }
.gms-role-permission-list small { color: var(--gms-text-muted); }
.gms-role-permission-list code,
.gms-role-correlation { color: var(--gms-primary-dark); font-size: .68rem; }

.gms-role-modal-stat { align-items: baseline; border-bottom: 1px solid rgba(255,255,255,.16); display: flex; gap: .4rem; padding: .7rem 0; }
.gms-role-modal-stat strong { color: #fff; font-size: 1.3rem; }
.gms-role-modal-stat span { color: #b9d1d6; font-size: .72rem; }
.gms-role-impact-note { align-items: center; background: var(--gms-surface-tint); border: 1px solid color-mix(in srgb, var(--gms-primary) 32%, var(--gms-border)); border-radius: var(--gms-radius-sm); display: flex; gap: .7rem; margin-top: 1rem; padding: .8rem; }
.gms-role-impact-note > i { color: var(--gms-primary-dark); }
.gms-role-impact-note span { display: flex; flex-direction: column; }
.gms-role-impact-note small { color: var(--gms-text-muted); }
.gms-role-permission-modal-toolbar { align-items: center; background: var(--gms-surface-tint); border: 1px solid var(--gms-border); border-radius: var(--gms-radius-sm); display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; padding: .8rem; }
.gms-role-permission-modal-toolbar label { flex: 1; position: relative; }
.gms-role-permission-modal-toolbar label > i { color: var(--gms-primary-dark); left: .9rem; position: absolute; top: 50%; transform: translateY(-50%); }
.gms-role-permission-modal-toolbar input { padding-left: 2.5rem; }
.gms-role-permission-modal-toolbar > div { align-items: flex-end; display: flex; flex-direction: column; min-width: 8rem; }
.gms-role-permission-modal-toolbar > div strong { color: var(--gms-primary-dark); font-size: 1.2rem; }
.gms-role-permission-modal-toolbar > div span { color: var(--gms-text-muted); font-size: .68rem; }
.gms-role-permission-editor { display: grid; gap: .8rem; }
.gms-role-permission-editor > section { background: var(--gms-surface); border: 1px solid var(--gms-border); border-radius: var(--gms-radius-sm); overflow: hidden; }
.gms-role-permission-editor > section > header { align-items: center; background: var(--gms-surface-muted); border-bottom: 1px solid var(--gms-border); display: flex; gap: .7rem; padding: .75rem; }
.gms-role-permission-editor > section > header > span { align-items: center; background: var(--gms-primary-soft); border-radius: var(--gms-radius-sm); color: var(--gms-primary-dark); display: flex; height: 2.35rem; justify-content: center; width: 2.35rem; }
.gms-role-permission-editor > section > header > div { flex: 1; }
.gms-role-permission-editor h3 { font-size: .9rem; margin: 0; }
.gms-role-permission-editor header p { color: var(--gms-text-muted); font-size: .7rem; margin: 0; }
.gms-role-permission-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gms-role-permission-check { border-bottom: 1px solid var(--gms-border); display: flex; flex-direction: column; min-height: 7rem; padding: .8rem; }
.gms-role-permission-check:nth-child(odd) { border-right: 1px solid var(--gms-border); }
.gms-role-permission-check small { color: var(--gms-text-muted); font-size: .72rem; line-height: 1.45; margin: .3rem 0 auto 1.6rem; }
.gms-role-permission-check code { color: var(--gms-primary-dark); font-size: .66rem; margin-left: 1.6rem; }

html[data-gms-theme="dark"] .gms-role-health-grid article.needs-attention > span { background: #3c321d; color: #ffd982; }
html[data-gms-theme="dark"] .gms-role-blueprint-card,
html[data-gms-theme="dark"] .gms-role-permission-editor > section,
html[data-gms-theme="dark"] .gms-role-permission-browser .accordion-item,
html[data-gms-theme="dark"] .gms-role-permission-browser .accordion-button { background: var(--gms-surface); }
html[data-gms-theme="dark"] .gms-role-journey-actions .btn-outline-secondary:hover { color: #0d3137; }

@media (max-width: 1199.98px) {
    .gms-role-journey-hero { grid-template-columns: 1fr; }
    .gms-role-blueprint-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gms-role-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .gms-role-journey-steps,
    .gms-role-detail-journey { grid-template-columns: 1fr; }
    .gms-role-journey-steps li:not(:last-child)::after,
    .gms-role-detail-journey li:not(:last-child)::after { bottom: -.4rem; height: .8rem; left: 2rem; right: auto; top: auto; width: 1px; }
    .gms-role-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gms-role-detail-hero,
    .gms-role-next-step { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 767.98px) {
    .gms-access-flow { grid-template-columns: 1fr; }
    .gms-access-flow > i { transform: rotate(90deg); }
    .gms-access-flow-node { min-height: 0; }
    .gms-role-blueprint-grid,
    .gms-role-health-grid,
    .gms-role-overview-grid,
    .gms-role-catalogue-filters,
    .gms-role-permission-checks { grid-template-columns: 1fr; }
    .gms-role-permission-check:nth-child(odd) { border-right: 0; }
    .gms-role-detail-identity { align-items: flex-start; }
    .gms-role-detail-actions { width: 100%; }
    .gms-role-detail-actions .btn { flex: 1; }
    .gms-role-permission-summary { grid-template-columns: 1fr; }
    .gms-role-permission-summary > div:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,.14); border-right: 0; }
    .gms-role-tab-heading,
    .gms-role-permission-modal-toolbar { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .gms-role-blueprint-card { transition: none; }
}

@media (max-width: 575.98px) {
    .gms-toast-stack {
        left: .75rem;
        max-height: calc(100dvh - 5.5rem);
        right: .75rem;
        top: 4.65rem;
        width: auto;
    }

    .gms-toast {
        grid-template-columns: 38px minmax(0, 1fr) 28px;
        min-height: 74px;
        padding: .75rem .7rem .75rem .85rem;
    }

    .gms-toast-icon {
        border-radius: .6rem;
        height: 38px;
        width: 38px;
    }
}

/* --------------------------------------------------------------------------
   Shared module components
   -------------------------------------------------------------------------- */

.gms-summary-item {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    min-width: 0;
    padding: 0;
}

.gms-stat-card .card-body {
    padding: 1.25rem;
}

/* Dasho-style compact statistics strip used by the Users reference module. */
.gms-user-stats-bar {
    border: 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.gms-user-stats-bar .card-footer {
    background-color: var(--gms-primary) !important;
    border: 0;
    padding: 1rem 0;
}

.gms-user-stat {
    padding: 0.15rem 1rem;
}

.gms-user-stat + .gms-user-stat {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.gms-user-stat-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: center;
    margin: 0 auto;
    width: max-content;
}

.gms-user-stat-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 6px;
    display: inline-flex;
    flex: 0 0 28px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.gms-user-stat-icon i {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1;
}

.gms-user-stat-copy {
    align-items: center;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: center;
}

.gms-user-stat-copy strong {
    color: #fff;
    font-size: 1.08rem;
    font-weight: 800;
}

.gms-user-stat-copy > span {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.18rem;
}

@media (max-width: 991.98px) {
    .gms-user-stat:nth-child(3) {
        border-left: 0;
    }

    .gms-user-stat:nth-child(n + 3) {
        border-top: 1px solid rgba(255, 255, 255, 0.28);
        margin-top: 0.75rem;
        padding-top: 0.9rem;
    }
}

.gms-summary-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 8px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
}

.gms-summary-copy strong,
.gms-summary-copy span {
    display: block;
}

.gms-summary-copy strong {
    font-size: 1.05rem;
    line-height: 1.1;
}

.gms-summary-copy span {
    color: var(--gms-text-muted);
    font-size: 0.73rem;
    margin-top: 0.15rem;
}

.gms-filter-bar {
    align-items: end;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(150px, 1fr));
}

.gms-filter-bar.is-datatable-ready {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.gms-filter-bar.is-datatable-ready [data-gms-fallback-search] {
    display: none;
}

.gms-filter-chips {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.9rem;
}

.gms-filter-chips[hidden] {
    display: none;
}

.gms-filter-chip,
.gms-filter-clear {
    align-items: center;
    border: 1px solid var(--gms-border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.45rem;
    line-height: 1;
    min-height: 30px;
    padding: 0.38rem 0.7rem;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.gms-filter-chip {
    background: var(--gms-primary-soft);
    border-color: rgba(25, 188, 191, 0.35);
    color: var(--gms-primary-dark);
}

.gms-filter-chip:hover,
.gms-filter-chip:focus-visible {
    background: var(--gms-primary);
    border-color: var(--gms-primary);
    color: #fff;
}

.gms-filter-clear {
    background: transparent;
    color: var(--gms-text-muted);
    margin-top: 0.9rem;
}

.gms-filter-clear:hover,
.gms-filter-clear:focus-visible {
    background: var(--gms-danger-soft);
    border-color: var(--gms-danger-border);
    color: var(--gms-danger-text);
}

.gms-filter-clear:disabled,
.gms-role-filter-clear:disabled {
    opacity: .48;
    cursor: not-allowed;
    transform: none;
}

.gms-filter-clear[hidden] {
    display: none;
}

/* --------------------------------------------------------------------------
   Shared Select2 treatment
   -------------------------------------------------------------------------- */

.select2-container {
    max-width: 100%;
}

.select2-container--default .select2-selection--single {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border-strong);
    border-radius: 4px;
    height: 42px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--gms-text);
    line-height: 40px;
    padding-left: 0.8rem;
    padding-right: 2.25rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 0.45rem;
}

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

.select2-container--default.select2-container--disabled .select2-selection--single {
    background: var(--gms-surface-muted);
    color: var(--gms-text-muted);
}

.select2-dropdown {
    background: var(--gms-surface);
    border-color: var(--gms-border-strong);
    border-radius: 4px;
    box-shadow: var(--gms-shadow);
    overflow: hidden;
    z-index: 1060;
}

.select2-results__option {
    font-size: 0.875rem;
    padding: 0.6rem 0.8rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--gms-primary);
    color: #fff;
}

.gms-filter-bar .select2-container {
    width: 100% !important;
}

.gms-table-card {
    overflow: hidden;
}

.gms-table-card .table-responsive {
    min-height: 180px;
}

.gms-datatable-shell {
    min-height: 180px;
    padding: 1.25rem;
}

.gms-datatable-error {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    margin: 1rem 1rem 0;
}

.gms-datatable-shell .dt-container {
    width: 100%;
}

.gms-datatable-shell .dt-container > .row,
.gms-datatable-shell .dt-layout-row {
    margin: 0;
}

.gms-datatable-shell .dt-container > .row:not(.dt-layout-table),
.gms-datatable-shell .dt-layout-row:not(.dt-layout-table) {
    align-items: center;
    padding: 0;
}

.gms-datatable-shell .dt-container > .row:first-child:not(.dt-layout-table),
.gms-datatable-shell .dt-layout-row:first-child:not(.dt-layout-table) {
    border-bottom: 0;
    margin-bottom: 1rem;
}

.gms-datatable-shell .dt-container > .row:last-child:not(.dt-layout-table),
.gms-datatable-shell .dt-layout-row:last-child:not(.dt-layout-table) {
    background: transparent;
    border-top: 0;
    margin-top: 1rem;
}

.gms-datatable-shell .dt-layout-table {
    border: 0;
    border-radius: 0;
    overflow: hidden;
}

.gms-datatable-shell .dt-layout-table > div,
.gms-datatable-shell .dt-layout-table > .dt-layout-cell {
    overflow-x: auto;
    padding: 0;
}

.gms-datatable-shell .dt-length {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    font-size: 0.875rem;
}

.gms-datatable-shell .dt-length label {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
    margin: 0;
}

.gms-datatable-shell .dt-length select {
    border-color: var(--gms-border-strong);
    border-radius: 2px;
    box-shadow: none;
    height: 38px;
    margin: 0 !important;
    min-width: 96px;
    padding-bottom: 0.375rem;
    padding-top: 0.375rem;
    width: auto;
}

.gms-datatable-shell .dt-length .select2-container {
    min-width: 96px;
    width: 96px !important;
}

.gms-datatable-shell .dt-search {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    font-size: 0.875rem;
    gap: 0.5rem;
}

.gms-datatable-shell .dt-search label {
    margin: 0;
}

.gms-datatable-shell .dt-search input.form-control {
    border-color: var(--gms-border-strong);
    border-radius: 4px;
    height: 38px;
    margin-left: 0 !important;
    width: 164px;
}

.gms-datatable-shell .dt-info {
    color: var(--gms-text-muted);
    font-size: 0.8rem;
    padding: 0;
}

.gms-datatable-shell .pagination {
    margin: 0;
}

.gms-datatable-shell .page-link {
    align-items: center;
    border-color: var(--gms-border);
    color: var(--gms-primary-dark);
    display: inline-flex;
    font-size: 0.875rem;
    justify-content: center;
    min-height: 36px;
    min-width: 36px;
    padding: 0.45rem 0.75rem;
}

.gms-datatable-shell .page-item.disabled .page-link {
    background: var(--gms-surface);
    color: #9aa5ad;
}

.gms-datatable-shell .page-item.active .page-link {
    background: var(--gms-primary);
    border-color: var(--gms-primary);
    color: #fff;
}

.gms-datatable-shell .dt-processing {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    box-shadow: var(--gms-shadow);
    color: var(--gms-text);
    padding: 0.8rem 1rem;
}

.gms-table-card.is-datatable-ready .gms-table-footer-fallback,
.gms-table-card.is-datatable-ready [data-gms-fallback-empty] {
    display: none;
}

.gms-table {
    border: 1px solid var(--gms-border);
    border-collapse: collapse !important;
    margin-bottom: 0;
    vertical-align: middle;
}

.gms-datatable-shell table.dataTable {
    margin: 0 !important;
    width: 100% !important;
}

.gms-table thead th {
    background: var(--gms-surface-muted);
    border-color: var(--gms-border);
    border-style: solid;
    border-width: 1px;
    color: var(--gms-text);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    padding: 0.9rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.gms-datatable-shell table.dataTable thead > tr > th.dt-orderable-asc,
.gms-datatable-shell table.dataTable thead > tr > th.dt-orderable-desc,
.gms-datatable-shell table.dataTable thead > tr > th.dt-ordering-asc,
.gms-datatable-shell table.dataTable thead > tr > th.dt-ordering-desc {
    padding-right: 2.5rem;
}

.gms-datatable-shell table.dataTable thead > tr > th .dt-column-order {
    right: 0.9rem;
}

.gms-datatable-shell table.dataTable thead > tr > th .dt-column-order::before,
.gms-datatable-shell table.dataTable thead > tr > th .dt-column-order::after {
    color: #9babb5;
}

.gms-datatable-shell table.dataTable thead > tr > th.dt-ordering-asc .dt-column-order::before,
.gms-datatable-shell table.dataTable thead > tr > th.dt-ordering-desc .dt-column-order::after {
    color: var(--gms-primary-dark);
    opacity: 1;
}

.gms-table tbody td {
    border-color: var(--gms-border);
    border-style: solid;
    border-width: 1px;
    padding: 0.9rem 1rem;
}

.gms-table.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: var(--gms-row-alt);
    --bs-table-bg-type: var(--gms-row-alt);
    --dt-row-stripe: var(--gms-row-alt);
    background-color: var(--gms-row-alt) !important;
    box-shadow: none !important;
}

.gms-table.table-striped > tbody > tr:nth-of-type(even) > * {
    --bs-table-accent-bg: var(--gms-row);
    --bs-table-bg-type: var(--gms-row);
    --dt-row-stripe: var(--gms-row);
    background-color: var(--gms-row) !important;
    box-shadow: none !important;
}

.gms-table.table-striped > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(25, 188, 191, 0.045);
    background-color: var(--gms-row-hover) !important;
}

.gms-user-cell {
    align-items: center;
    display: flex;
    gap: 0.7rem;
    min-width: 220px;
}

.gms-user-avatar {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.3);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 36px;
    font-weight: 800;
    height: 36px;
    justify-content: center;
}

.gms-user-cell strong,
.gms-user-cell small {
    display: block;
}

.gms-user-cell small {
    color: var(--gms-text-muted);
}

.gms-role-badge,
.gms-status-badge {
    align-items: center;
    border: 1px solid var(--gms-border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.3rem;
    margin: 0.1rem 0.15rem 0.1rem 0;
    padding: 0.25rem 0.55rem;
}

.gms-role-badges {
    display: flex;
    flex-wrap: wrap;
}

.gms-role-dot {
    background: var(--gms-role-colour, var(--gms-primary));
    border-radius: 50%;
    height: 8px;
    width: 8px;
}

.gms-status-badge.is-active {
    background: var(--gms-success-soft);
    border-color: var(--gms-success-border);
    color: var(--gms-success-text);
}

.gms-status-badge.is-suspended {
    background: var(--gms-danger-soft);
    border-color: var(--gms-danger-border);
    color: var(--gms-danger-text);
}

.gms-table-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

.gms-icon-button {
    align-items: center;
    color: #fff;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 36px;
}

.gms-icon-button:hover,
.gms-icon-button:focus-visible {
    color: #fff;
}

.gms-icon-button > i {
    display: block;
    line-height: 1;
    margin: 0 !important;
    width: auto !important;
}

.gms-user-avatar-lg {
    flex: 0 0 56px;
    font-size: 1.1rem;
    height: 56px;
    width: 56px;
}

.gms-table-footer {
    align-items: center;
    background: var(--gms-surface-muted);
    border-top: 1px solid var(--gms-border);
    color: var(--gms-text-muted);
    display: flex;
    font-size: 0.8rem;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.gms-datatable-shell table.dataTable > tbody > tr.child ul.dtr-details {
    display: block;
    width: 100%;
}

.gms-datatable-shell table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
    background: var(--gms-primary);
}

.gms-empty-state {
    margin: 0 auto;
    max-width: 520px;
    padding: 3rem 1rem;
    text-align: center;
}

.gms-empty-state-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 16px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    font-size: 1.7rem;
    height: 64px;
    justify-content: center;
    margin-bottom: 1rem;
    width: 64px;
}

.gms-empty-state h2,
.gms-empty-state h3 {
    font-size: 1.15rem;
}

.gms-empty-state p {
    color: var(--gms-text-muted);
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */

.modal-content {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(16, 28, 34, 0.2);
    overflow: hidden;
}

.gms-modal-header {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
}

/* Users is the modal reference implementation: strong primary identity,
   calm form surface and selectable role cards with an unmistakable state. */
.gms-user-modal {
    border-top: 4px solid var(--gms-primary);
}

.gms-user-modal .gms-modal-header {
    background: #123b43;
    border-bottom: 0;
    padding: 1.15rem 1.35rem;
}

.gms-user-modal .gms-modal-icon {
    background: var(--gms-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    height: 46px;
    flex-basis: 46px;
}

.gms-user-modal .gms-modal-heading h2,
.gms-user-modal .gms-modal-heading p {
    color: #fff;
}

.gms-user-modal .gms-modal-heading h2 {
    font-size: 1.12rem;
    font-weight: 800;
}

.gms-user-modal .gms-modal-heading p {
    opacity: 0.72;
}

.gms-user-modal .gms-modal-close {
    align-items: center;
    background: transparent !important;
    border: 0;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 38px;
    font-size: 1.1rem;
    height: 38px;
    justify-content: center;
    margin-left: auto;
    opacity: 1;
    padding: 0;
    transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
    width: 38px;
}

.gms-user-modal .gms-modal-close i {
    color: currentColor;
    line-height: 1;
}

.gms-user-modal .gms-modal-close:hover,
.gms-user-modal .gms-modal-close:focus-visible {
    background: var(--gms-danger) !important;
    color: #fff;
    outline: 0;
    transform: rotate(90deg);
}

.gms-user-modal .gms-modal-close:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.gms-user-modal-body {
    background: var(--gms-surface-muted);
    padding: 1.5rem;
}

.gms-user-modal-body .form-control,
.gms-user-modal-body .form-select {
    background-color: var(--gms-surface);
    min-height: 42px;
}

.gms-user-modal .gms-role-option {
    background: var(--gms-surface);
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.gms-user-modal .gms-role-option:hover {
    border-color: var(--gms-primary);
    box-shadow: 0 5px 16px rgba(25, 188, 191, 0.1);
    transform: translateY(-1px);
}

.gms-user-modal .gms-role-option:has(.form-check-input:checked) {
    background: var(--gms-primary-soft);
    border-color: var(--gms-primary);
    box-shadow: inset 3px 0 0 var(--gms-primary);
}

.gms-user-modal .modal-footer {
    padding: 0.9rem 1.35rem;
}

.gms-user-modal .modal-footer .btn {
    min-width: 120px;
}

.gms-user-modal-layout {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 240px minmax(0, 1fr);
}

.gms-user-modal-aside {
    align-self: stretch;
    background: #123b43;
    border-radius: var(--gms-radius-sm);
    color: #fff;
    padding: 1.4rem;
}

.gms-user-modal-crest {
    display: block;
    height: 78px;
    margin: 0 auto 1rem;
    object-fit: contain;
    width: 78px;
}

.gms-user-modal-aside .gms-kicker {
    color: var(--gms-primary);
    text-align: center;
}

.gms-user-modal-aside > h3 {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0.4rem 0 0.35rem;
    text-align: center;
}

.gms-user-modal-aside > p {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    line-height: 1.55;
    margin: 0 0 1.25rem;
    text-align: center;
}

.gms-modal-steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gms-modal-steps li {
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0;
}

.gms-modal-steps li > i {
    color: var(--gms-primary);
    flex: 0 0 20px;
    text-align: center;
}

.gms-modal-steps li > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-modal-steps strong {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.gms-modal-steps small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.68rem;
    margin-top: 0.15rem;
}

.gms-user-modal-form {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.gms-modal-form-section {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    padding: 1.1rem;
}

.gms-modal-form-section > header {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    gap: 0.7rem;
    margin: -0.1rem 0 1rem;
    padding-bottom: 0.8rem;
}

.gms-modal-form-section > header > span {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 6px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
}

.gms-modal-form-section h3,
.gms-modal-form-section header p {
    margin: 0;
}

.gms-modal-form-section h3 {
    color: var(--gms-text);
    font-size: 0.9rem;
    font-weight: 800;
}

.gms-modal-form-section header p {
    color: var(--gms-text-muted);
    font-size: 0.72rem;
    margin-top: 0.12rem;
}

.gms-role-checks {
    display: grid;
    gap: 0.6rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gms-role-check {
    border-bottom: 1px solid var(--gms-border);
    padding: 0.55rem 0.2rem 0.65rem;
}

.gms-role-check .form-check {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    margin-bottom: 0.25rem !important;
    min-height: 20px;
    padding-left: 0;
}

.gms-role-check .form-check-input {
    flex: 0 0 auto;
    float: none;
    margin: 0;
}

.gms-role-check .form-check-label {
    color: var(--gms-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.form-check-input.input-primary:checked {
    background-color: var(--gms-primary);
    border-color: var(--gms-primary);
}

.form-check-input.input-primary:focus {
    border-color: var(--gms-primary);
    box-shadow: var(--gms-focus);
}

.gms-role-check > p {
    color: var(--gms-text-muted);
    font-size: 0.7rem;
    line-height: 1.45;
    margin: 0 0 0 1.75rem;
}

.gms-user-modal .select2-container {
    width: 100% !important;
}

.gms-modal-footer-note {
    color: var(--gms-text-muted);
    font-size: 0.72rem;
    margin-right: auto;
}

.gms-modal-footer-note i {
    color: var(--gms-primary-dark);
    margin-right: 0.35rem;
}

/* Edit-user is a compact operational workspace rather than a long undivided
 * form. Every surface is token-driven so light and dark modes share the same
 * hierarchy, validation and interaction states. */
.gms-edit-user-workspace .gms-user-modal-body {
    padding: 1.25rem;
}

.gms-edit-user-aside {
    display: flex;
    flex-direction: column;
}

.gms-edit-user-aside .gms-user-modal-crest {
    height: 64px;
    margin-bottom: 0.85rem;
    width: 64px;
}

.gms-edit-user-identity {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    min-width: 0;
}

.gms-edit-user-identity .gms-user-avatar {
    background: rgba(25, 188, 191, 0.17);
    border-color: rgba(55, 225, 229, 0.45);
    color: #fff;
}

.gms-edit-user-identity > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-edit-user-identity strong,
.gms-edit-user-identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gms-edit-user-identity strong {
    color: #fff;
    font-size: 0.92rem;
}

.gms-edit-user-identity small {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.7rem;
    margin-top: 0.12rem;
}

.gms-edit-user-aside > .gms-status-badge {
    align-self: flex-start;
    margin: 0 0 1rem 68px;
}

.gms-edit-user-tabs {
    border-bottom: 2px solid rgba(25, 188, 191, 0.22);
    gap: 0.2rem;
}

.gms-edit-user-tabs .nav-link {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px 6px 0 0;
    color: var(--gms-text-muted);
    display: inline-flex;
    font-size: 0.73rem;
    font-weight: 700;
    gap: 0.45rem;
    margin-bottom: -2px;
    padding: 0.8rem 1rem;
}

.gms-edit-user-tabs .nav-link i {
    color: var(--gms-primary-dark);
    font-size: 0.9rem;
}

.gms-edit-user-tabs .nav-link:hover,
.gms-edit-user-tabs .nav-link:focus-visible {
    background: var(--gms-primary-soft);
    color: var(--gms-primary-dark);
}

.gms-edit-user-tabs .nav-link.active {
    background: var(--gms-primary);
    box-shadow: inset 0 -3px rgba(0, 0, 0, 0.09);
    color: #fff;
}

.gms-edit-user-tabs .nav-link.active i {
    color: #fff;
}

.gms-edit-user-tab-content {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-top: 0;
    border-radius: 0 0 var(--gms-radius-sm) var(--gms-radius-sm);
    min-height: 380px;
    padding: 1.15rem;
}

.gms-edit-section-heading {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    gap: 0.7rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.gms-edit-section-heading > span {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.2);
    border-radius: 7px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
}

.gms-edit-section-heading h3,
.gms-edit-section-heading p {
    margin: 0;
}

.gms-edit-section-heading h3 {
    color: var(--gms-text);
    font-size: 0.92rem;
    font-weight: 800;
}

.gms-edit-section-heading h3:focus {
    outline: 0;
}

.gms-edit-section-heading p {
    color: var(--gms-text-muted);
    font-size: 0.72rem;
    margin-top: 0.15rem;
}

.gms-edit-user-tab-content .form-text {
    color: var(--gms-text-muted);
    font-size: 0.68rem;
}

.gms-edit-user-tab-content .input-group-text {
    background: var(--gms-surface-muted);
    border-color: var(--gms-border-strong);
    color: var(--gms-primary-dark);
}

.gms-edit-status-row {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
    margin-bottom: 1.2rem;
}

.gms-edit-access-note {
    align-items: flex-start;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.25);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text-muted);
    display: flex;
    font-size: 0.72rem;
    gap: 0.55rem;
    line-height: 1.5;
    min-height: 42px;
    padding: 0.7rem 0.8rem;
}

.gms-edit-access-note i {
    color: var(--gms-primary-dark);
    margin-top: 0.12rem;
}

.gms-edit-role-fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.gms-edit-role-fieldset legend {
    align-items: center;
    color: var(--gms-text);
    display: flex;
    font-size: 0.8rem;
    font-weight: 700;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.gms-edit-role-fieldset legend span {
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.25);
    border-radius: 999px;
    color: var(--gms-primary-dark);
    font-size: 0.65rem;
    font-variant-numeric: tabular-nums;
    padding: 0.22rem 0.55rem;
}

.gms-edit-user-workspace .gms-role-check {
    background: var(--gms-row-alt);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    padding: 0.75rem;
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.gms-edit-user-workspace .gms-role-check:hover {
    border-color: rgba(25, 188, 191, 0.55);
    transform: translateY(-1px);
}

.gms-edit-user-workspace .gms-role-check:has(.form-check-input:checked) {
    background: var(--gms-primary-soft);
    border-color: var(--gms-primary);
    box-shadow: inset 3px 0 0 var(--gms-primary);
}

.gms-edit-user-workspace .gms-role-check .form-check-label {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.gms-edit-security-facts {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gms-edit-security-facts > div {
    align-items: center;
    background: var(--gms-row-alt);
    border: 1px solid var(--gms-border);
    border-left: 3px solid var(--gms-primary);
    border-radius: var(--gms-radius-sm);
    display: flex;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.85rem;
}

.gms-edit-security-facts > div > i {
    color: var(--gms-primary-dark);
    flex: 0 0 20px;
    text-align: center;
}

.gms-edit-security-facts span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-edit-security-facts small {
    color: var(--gms-text-muted);
    font-size: 0.65rem;
}

.gms-edit-security-facts strong {
    color: var(--gms-text);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    margin-top: 0.16rem;
}

.gms-edit-security-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.gms-edit-security-footnote {
    align-items: flex-start;
    border-top: 1px solid var(--gms-border);
    color: var(--gms-text-muted);
    display: flex;
    font-size: 0.7rem;
    gap: 0.5rem;
    line-height: 1.5;
    margin: 1rem 0 0;
    padding-top: 0.85rem;
}

.gms-edit-security-footnote i {
    color: var(--gms-success);
    margin-top: 0.1rem;
}

.gms-edit-review {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-top: 3px solid var(--gms-primary);
    border-radius: var(--gms-radius-sm);
    min-height: 380px;
    padding: 1.15rem;
}

.gms-edit-review-risk {
    align-items: flex-start;
    background: var(--gms-warning-soft, rgba(255, 193, 7, 0.1));
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text);
    display: flex;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding: 0.8rem;
}

.gms-edit-review-risk > i {
    color: #d99500;
    margin-top: 0.15rem;
}

.gms-edit-review-risk > div {
    display: flex;
    flex-direction: column;
}

.gms-edit-review-risk strong {
    font-size: 0.78rem;
}

.gms-edit-review-risk span {
    color: var(--gms-text-muted);
    font-size: 0.7rem;
    margin-top: 0.12rem;
}

.gms-edit-review-list {
    display: grid;
    gap: 0.6rem;
}

.gms-edit-review-item {
    align-items: center;
    background: var(--gms-row-alt);
    border: 1px solid var(--gms-border);
    border-left: 3px solid var(--gms-primary);
    border-radius: var(--gms-radius-sm);
    display: grid;
    gap: 1rem;
    grid-template-columns: 140px minmax(0, 1fr);
    padding: 0.75rem 0.85rem;
}

.gms-edit-review-item > strong {
    color: var(--gms-text);
    font-size: 0.75rem;
}

.gms-edit-review-values {
    align-items: center;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
    min-width: 0;
}

.gms-edit-review-values span {
    border-radius: 5px;
    font-size: 0.72rem;
    overflow-wrap: anywhere;
    padding: 0.45rem 0.55rem;
}

.gms-edit-review-values .is-before {
    background: var(--gms-surface-muted);
    color: var(--gms-text-muted);
    text-decoration: line-through;
}

.gms-edit-review-values .is-after {
    background: var(--gms-primary-soft);
    color: var(--gms-primary-dark);
    font-weight: 700;
}

.gms-edit-review-values i {
    color: var(--gms-primary-dark);
    text-align: center;
}

.gms-edit-review-audit {
    color: var(--gms-text-muted);
    font-size: 0.7rem;
    line-height: 1.5;
    margin: 1rem 0 0;
}

.gms-edit-review-audit i {
    color: var(--gms-success);
    margin-right: 0.35rem;
}

.gms-edit-user-workspace.is-reviewing .gms-modal-footer-note {
    color: var(--gms-primary-dark);
}

@media (max-width: 991.98px) {
    .gms-user-modal-layout {
        grid-template-columns: 1fr;
    }

    .gms-user-modal-aside {
        display: none;
    }

    .gms-edit-user-tab-content,
    .gms-edit-review {
        min-height: 0;
    }
}

@media (max-width: 575.98px) {
    .gms-role-checks {
        grid-template-columns: 1fr;
    }

    .gms-modal-footer-note {
        display: none;
    }

    .gms-edit-user-tabs .nav-link {
        gap: 0.3rem;
        padding-inline: 0.65rem;
    }

    .gms-edit-status-row,
    .gms-edit-security-facts,
    .gms-edit-review-item {
        grid-template-columns: 1fr;
    }

    .gms-edit-review-values {
        grid-template-columns: 1fr;
    }

    .gms-edit-review-values i {
        transform: rotate(90deg);
    }
}

@media (max-width: 767.98px) {
    .gms-header-context > span:last-child,
    .gms-header-context-divider {
        display: none;
    }

    .gms-header-context {
        padding-left: 0.5rem;
    }
}

/* --------------------------------------------------------------------------
   Database-backed Settings workspace
   -------------------------------------------------------------------------- */

.gms-settings-summary .gms-user-stat-content {
    min-height: 5.65rem;
}

.gms-settings-layout {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
}

.gms-settings-groups {
    position: sticky;
    top: 5.8rem;
}

.gms-settings-groups .card-header,
.gms-settings-workspace-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.gms-settings-groups .card-header p,
.gms-settings-workspace-header p,
.gms-settings-heading p {
    color: var(--gms-text-muted);
    font-size: .78rem;
    margin: .25rem 0 0;
}

.gms-settings-group-nav {
    display: grid;
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
    padding: .55rem;
}

.gms-settings-group-link {
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text);
    display: grid;
    gap: .7rem;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    padding: .65rem .7rem;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.gms-settings-group-link:hover {
    background: var(--gms-surface-tint);
    color: var(--gms-primary-dark);
}

.gms-settings-group-link.is-active {
    background: var(--gms-primary-soft);
    border-left-color: var(--gms-primary);
    color: var(--gms-primary-dark);
}

.gms-settings-group-icon,
.gms-settings-heading > span {
    align-items: center;
    background: var(--gms-surface-tint);
    border: 1px solid rgba(25, 188, 191, .22);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-primary-dark);
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.gms-settings-group-link.is-active .gms-settings-group-icon {
    background: var(--gms-primary);
    color: #fff;
}

.gms-settings-group-copy {
    min-width: 0;
}

.gms-settings-group-copy strong,
.gms-settings-group-copy small {
    display: block;
}

.gms-settings-group-copy strong {
    font-size: .82rem;
}

.gms-settings-group-copy small {
    color: var(--gms-text-muted);
    font-size: .68rem;
    line-height: 1.35;
    margin-top: .15rem;
}

.gms-settings-group-count,
.gms-settings-count-badge {
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: 999px;
    color: var(--gms-text-muted);
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    padding: .4rem .55rem;
}

.gms-settings-heading {
    align-items: center;
    display: flex;
    gap: .8rem;
}

.gms-settings-heading > span {
    background: var(--gms-primary);
    color: #fff;
    height: 2.7rem;
    width: 2.7rem;
}

.gms-settings-boundary-notice {
    align-items: flex-start;
    background: var(--gms-surface-tint);
    border-bottom: 1px solid rgba(25, 188, 191, .3);
    color: var(--gms-text);
    display: flex;
    gap: .75rem;
    padding: .85rem 1.25rem;
}

.gms-settings-boundary-notice > i {
    color: var(--gms-primary-dark);
    font-size: 1rem;
    margin-top: .15rem;
}

.gms-settings-boundary-notice strong {
    font-size: .8rem;
}

.gms-settings-boundary-notice p {
    color: var(--gms-text-muted);
    font-size: .74rem;
    margin: .2rem 0 0;
}

.gms-settings-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.gms-settings-search {
    align-items: center;
    border: 1px solid var(--gms-border-strong);
    border-radius: var(--gms-radius-sm);
    display: flex;
    gap: .55rem;
    max-width: 25rem;
    padding: .6rem .75rem;
    width: 100%;
}

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

.gms-settings-search i {
    color: var(--gms-primary-dark);
}

.gms-settings-search input {
    background: transparent;
    border: 0;
    color: var(--gms-text);
    min-width: 0;
    outline: 0;
    width: 100%;
}

.gms-settings-toolbar > span {
    color: var(--gms-text-muted);
    font-size: .72rem;
    font-weight: 700;
}

.gms-settings-toolbar > span.is-dirty {
    color: var(--gms-warning);
}

.gms-settings-fields {
    display: grid;
}

.gms-setting-field {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(14rem, .9fr) minmax(18rem, 1.1fr);
    padding: 1rem 1.25rem;
}

.gms-setting-field[hidden] {
    display: none;
}

.gms-setting-field:hover {
    background: var(--gms-surface-muted);
}

.gms-setting-field-copy label {
    color: var(--gms-text);
    display: block;
    font-size: .84rem;
    font-weight: 800;
}

.gms-setting-field-copy p {
    color: var(--gms-text-muted);
    font-size: .74rem;
    line-height: 1.5;
    margin: .2rem 0 .35rem;
}

.gms-setting-field-copy code {
    color: var(--gms-primary-dark);
    font-size: .66rem;
}

.gms-setting-control {
    min-width: 0;
}

.gms-setting-control .form-control,
.gms-setting-control .form-select,
.gms-setting-control .select2-container {
    width: 100% !important;
}

.gms-setting-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .76rem;
    resize: vertical;
}

.gms-setting-switch {
    align-items: center;
    display: inline-flex;
    gap: .65rem;
    min-height: 2.4rem;
    padding-left: 3.2rem;
}

.gms-setting-switch .form-check-input {
    height: 1.35rem;
    margin-left: -3.2rem;
    width: 2.5rem;
}

.gms-setting-switch .form-check-label {
    color: var(--gms-text);
    font-size: .8rem;
    font-weight: 750;
}

.gms-setting-readonly {
    align-items: center;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text-muted);
    display: flex;
    gap: .5rem;
    padding: .7rem .8rem;
}

.gms-colour-control {
    align-items: center;
    display: flex;
    gap: .65rem;
}

.gms-colour-swatch {
    background: var(--gms-setting-colour);
    border: 1px solid var(--gms-border-strong);
    border-radius: var(--gms-radius-sm);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
    flex: 0 0 2.65rem;
    height: 2.65rem;
}

.gms-settings-actions {
    align-items: center;
    background: var(--gms-surface-muted);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.gms-settings-actions > span {
    color: var(--gms-text-muted);
    font-size: .72rem;
}

.gms-settings-actions > span i {
    color: var(--gms-primary-dark);
    margin-right: .35rem;
}

.gms-settings-empty {
    color: var(--gms-text-muted);
    padding: 4rem 2rem;
    text-align: center;
}

.gms-settings-empty > i {
    color: var(--gms-primary-dark);
    font-size: 2rem;
}

html[data-gms-theme="dark"] .gms-settings-group-link.is-active,
html[data-gms-theme="dark"] .gms-settings-boundary-notice {
    background: #123b43;
}

html[data-gms-theme="dark"] .gms-settings-group-icon,
html[data-gms-theme="dark"] .gms-settings-group-count,
html[data-gms-theme="dark"] .gms-settings-count-badge,
html[data-gms-theme="dark"] .gms-setting-readonly {
    background: var(--gms-surface-muted);
}

.gms-secret-settings {
    border-top: .25rem solid var(--gms-primary);
    margin-top: 1.25rem;
}

.gms-secret-settings-header {
    align-items: center;
    background: linear-gradient(90deg, var(--gms-surface-tint), var(--gms-surface));
    border-bottom: 1px solid var(--gms-border);
    display: grid;
    gap: .8rem;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    padding: 1rem 1.25rem;
}

.gms-secret-settings-header > span:first-child {
    align-items: center;
    background: var(--gms-primary);
    border-radius: var(--gms-radius-sm);
    color: #fff;
    display: flex;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.gms-secret-settings-header h6,
.gms-secret-settings-header p {
    margin: 0;
}

.gms-secret-settings-header h6 {
    color: var(--gms-text);
    font-weight: 800;
}

.gms-secret-settings-header p {
    color: var(--gms-text-muted);
    font-size: .74rem;
    margin-top: .2rem;
}

.gms-setting-field.is-secret {
    background: color-mix(in srgb, var(--gms-primary-soft) 22%, var(--gms-surface));
}

.gms-secret-status {
    align-items: center;
    color: var(--gms-warning);
    display: flex;
    font-size: .7rem;
    font-weight: 800;
    gap: .35rem;
    margin-bottom: .45rem;
}

.gms-secret-status.is-configured {
    color: var(--gms-success);
}

.gms-secret-input-group {
    display: block;
    position: relative;
}

.gms-secret-input-group .form-control {
    border-radius: var(--gms-radius-sm) !important;
    padding-right: 3.15rem;
    width: 100%;
}

.gms-secret-visibility-toggle {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .28);
    border-radius: .4rem;
    color: var(--gms-primary-dark);
    display: inline-flex;
    height: 2.15rem;
    justify-content: center;
    position: absolute;
    right: .35rem;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
    width: 2.15rem;
    z-index: 4;
}

.gms-secret-visibility-toggle:hover,
.gms-secret-visibility-toggle:focus-visible,
.gms-secret-visibility-toggle.is-revealed {
    background: var(--gms-primary);
    color: #fff;
}

.gms-secret-visibility-toggle:hover {
    transform: translateY(-50%) scale(1.04);
}

.gms-secret-visibility-toggle:disabled {
    cursor: wait;
    opacity: .72;
}

.gms-secret-clear-check {
    margin-top: .65rem;
}

.gms-secret-clear-check .form-check-label {
    color: var(--gms-text-muted);
    font-size: .7rem;
}

html[data-gms-theme="dark"] .gms-secret-settings-header {
    background: linear-gradient(90deg, #123b43, var(--gms-surface));
}

html[data-gms-theme="dark"] .gms-setting-field.is-secret {
    background: rgba(25, 188, 191, .035);
}

html[data-gms-theme="dark"] .gms-secret-visibility-toggle {
    background: #123b43;
    border-color: #1b5c63;
    color: #43d7da;
}

html[data-gms-theme="dark"] .gms-secret-visibility-toggle:hover,
html[data-gms-theme="dark"] .gms-secret-visibility-toggle:focus-visible,
html[data-gms-theme="dark"] .gms-secret-visibility-toggle.is-revealed {
    background: var(--gms-primary);
    color: #fff;
}

@media (max-width: 1199.98px) {
    .gms-settings-layout {
        grid-template-columns: 1fr;
    }

    .gms-settings-groups {
        position: static;
    }

    .gms-settings-group-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .gms-settings-group-nav,
    .gms-setting-field {
        grid-template-columns: 1fr;
    }

    .gms-settings-toolbar,
    .gms-settings-actions,
    .gms-settings-workspace-header {
        align-items: stretch;
        flex-direction: column;
    }

    .gms-settings-search {
        max-width: none;
    }

    .gms-secret-settings-header {
        grid-template-columns: 2.5rem minmax(0, 1fr);
    }

    .gms-secret-settings-header .gms-settings-count-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* --------------------------------------------------------------------------
   Self-service account workspace
   -------------------------------------------------------------------------- */
.gms-account-page-hero {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.gms-account-page-identity {
    align-items: center;
    display: flex;
    gap: 1rem;
    min-width: 0;
}

.gms-account-page-identity h2 {
    font-size: 1.45rem;
    margin: .15rem 0 .2rem;
}

.gms-account-page-identity p {
    color: var(--gms-text-muted);
    margin: 0;
}

.gms-account-tabs-content {
    background: transparent !important;
    border: 0 !important;
}

.gms-account-tabs-content > .tab-pane {
    background: transparent !important;
    border: 0 !important;
    padding: 1rem 0 0 !important;
}

.gms-account-overview-grid {
    align-items: stretch;
    margin-left: -.5rem;
    margin-right: -.5rem;
}

.gms-account-overview-grid > [class*="col-"] {
    display: flex;
    padding-left: .5rem;
    padding-right: .5rem;
}

.gms-account-overview-grid .gms-detail-card {
    min-height: 15.75rem;
    width: 100%;
}

.gms-account-profile-card .card-header,
.gms-account-discord-card .card-header,
.gms-account-password-card .card-header,
.gms-account-permissions .card-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.gms-account-profile-card .card-header small,
.gms-account-discord-card .card-header small,
.gms-account-password-card .card-header small,
.gms-account-permissions .card-header small {
    color: var(--gms-text-muted);
}

.gms-account-profile-card .card-body {
    display: flex;
    padding: 1rem;
}

.gms-account-facts {
    align-content: stretch;
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
}

.gms-account-facts > div {
    background: var(--gms-row-alt);
    border: 1px solid var(--gms-border);
    border-left: 3px solid color-mix(in srgb, var(--gms-primary) 72%, transparent);
    border-radius: .65rem;
    display: grid;
    gap: .35rem;
    min-width: 0;
    padding: .9rem 1rem;
}

.gms-account-facts span {
    color: var(--gms-text-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.gms-account-facts span i {
    color: var(--gms-primary);
    margin-right: .45rem;
    text-align: center;
    width: 1rem;
}

.gms-account-facts strong {
    color: var(--gms-text);
    font-size: .86rem;
    overflow-wrap: anywhere;
}

.gms-discord-mark,
.gms-discord-identity > span {
    align-items: center;
    background: #5865f2;
    border-radius: .65rem;
    color: #fff;
    display: inline-flex;
    justify-content: center;
}

.gms-discord-mark { height: 2.25rem; width: 2.25rem; }
.gms-discord-identity { align-items: center; display: flex; gap: 1rem; margin: .5rem 0 1.35rem; }
.gms-discord-identity > span { font-size: 1.35rem; height: 3.4rem; width: 3.4rem; }
.gms-discord-identity div { display: grid; gap: .25rem; min-width: 0; }
.gms-discord-identity strong { color: var(--gms-text); font-size: 1rem; }
.gms-discord-identity code { color: var(--gms-text-muted); overflow-wrap: anywhere; }

.gms-account-support-copy {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .3);
    border-radius: .6rem;
    color: var(--gms-text-muted);
    display: flex;
    gap: .6rem;
    margin: 0;
    padding: .75rem;
}
.gms-account-support-copy i { color: var(--gms-primary); }

.gms-account-empty {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    flex-direction: column;
    gap: .4rem;
    justify-content: center;
    min-height: 9rem;
    text-align: center;
}
.gms-account-empty > i { color: var(--gms-primary); font-size: 1.65rem; }
.gms-account-empty strong { color: var(--gms-text); }

.gms-account-role-list { display: grid; gap: 1rem; }
.gms-account-role-list article { border-bottom: 1px solid var(--gms-border); padding-bottom: 1rem; }
.gms-account-role-list article:last-child { border-bottom: 0; padding-bottom: 0; }
.gms-account-role-list p { color: var(--gms-text-muted); font-size: .82rem; margin: .5rem 0 0; }

.gms-account-access-summary .card-body {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 1.25rem 0;
}
.gms-account-access-summary .card-body > div { align-items: center; border-right: 1px solid var(--gms-border); display: flex; flex-direction: column; gap: .35rem; justify-content: center; }
.gms-account-access-summary .card-body > div:last-child { border-right: 0; }
.gms-account-access-summary .card-body span { align-items: center; background: var(--gms-primary-soft); border-radius: .7rem; color: var(--gms-primary); display: inline-flex; height: 2.7rem; justify-content: center; width: 2.7rem; }
.gms-account-access-summary .card-body strong { color: var(--gms-text); font-size: 1.4rem; font-variant-numeric: tabular-nums; line-height: 1; }
.gms-account-access-summary .card-body small { color: var(--gms-text-muted); }

.gms-account-password-card .card-header > span { align-items: center; background: var(--gms-primary-soft); border-radius: .75rem; color: var(--gms-primary); display: inline-flex; font-size: 1.15rem; height: 2.8rem; justify-content: center; width: 2.8rem; }
.gms-account-password-state { background: var(--gms-surface-muted); border-left: 3px solid var(--gms-primary); border-radius: .55rem; display: grid; gap: .35rem; margin-bottom: 1rem; padding: 1rem; }
.gms-account-password-state span, .gms-account-password-state small { color: var(--gms-text-muted); }
.gms-account-password-state strong { color: var(--gms-text); }

/* The global table-action button intentionally uses a white glyph. Session
   revocation is an outlined destructive control, so it needs its own visible
   resting state and only changes to white over a solid danger hover. */
.gms-session-revoke-button {
    background: var(--gms-danger-soft) !important;
    border-color: var(--gms-danger-border) !important;
    color: var(--gms-danger-text) !important;
}

.gms-session-revoke-button:hover,
.gms-session-revoke-button:focus-visible {
    background: var(--bs-danger) !important;
    border-color: var(--bs-danger) !important;
    color: #fff !important;
}

.gms-account-modal-body { display: grid; gap: 1rem; }
.gms-account-security-note { align-items: center; background: var(--gms-primary-soft); border: 1px solid rgba(25, 188, 191, .3); border-radius: .65rem; display: flex; gap: .8rem; padding: .9rem 1rem; }
.gms-account-security-note > i { color: var(--gms-primary); font-size: 1.35rem; }
.gms-account-security-note span { display: grid; gap: .15rem; }
.gms-account-security-note strong { color: var(--gms-text); }
.gms-account-security-note small { color: var(--gms-text-muted); }

html[data-gms-theme="dark"] .gms-account-tabs-content,
html[data-gms-theme="dark"] .gms-account-tabs-content > .tab-pane {
    background: transparent !important;
    border-color: transparent !important;
}

html[data-gms-theme="dark"] .gms-account-profile-card,
html[data-gms-theme="dark"] .gms-account-discord-card,
html[data-gms-theme="dark"] .gms-account-password-card,
html[data-gms-theme="dark"] .gms-account-permissions {
    background: var(--gms-surface);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .gms-account-facts > div,
html[data-gms-theme="dark"] .gms-account-discord-state {
    background: color-mix(in srgb, var(--gms-surface-muted) 82%, #071116);
    border-color: var(--gms-border);
}

@media (max-width: 767.98px) {
    .gms-account-page-hero { align-items: flex-start; }
    .gms-account-facts { grid-template-columns: 1fr; }
    .gms-account-tabs-content > .tab-pane { padding-top: .75rem !important; }
    .gms-account-profile-card .card-header,
    .gms-account-password-card .card-header,
    .gms-session-card .card-header { align-items: flex-start; flex-direction: column; }
}

/* --------------------------------------------------------------------------
   Users bulk actions
   --------------------------------------------------------------------------

   Selection remains visually subordinate to the account identity while the
   contextual toolbar and review modal make a broad access change explicit.
   Every colour consumes semantic theme tokens for equal light/dark support.
*/

#users-table .gms-select-column,
#users-table th.gms-select-column {
    text-align: center !important;
    vertical-align: middle;
    width: 48px !important;
}

.gms-row-check {
    display: inline-flex;
    margin: 0;
    min-height: 1rem;
    padding: 0;
}

.gms-row-check .form-check-input {
    cursor: pointer;
    float: none;
    margin: 0;
}

#users-table tbody tr:has([data-user-select]:checked) > * {
    background-color: var(--gms-primary-soft) !important;
}

.gms-bulk-toolbar {
    align-items: center;
    background: var(--gms-surface-tint);
    border-bottom: 1px solid var(--gms-border);
    border-left: 3px solid var(--gms-primary);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .75rem 1.5rem;
    position: relative;
}

.gms-bulk-toolbar[hidden] {
    display: none !important;
}

.gms-bulk-toolbar-summary {
    align-items: center;
    display: flex;
    gap: .75rem;
    min-width: 210px;
}

.gms-bulk-toolbar-icon {
    align-items: center;
    background: var(--gms-primary);
    border-radius: .5rem;
    color: #fff;
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
}

.gms-bulk-toolbar-summary strong,
.gms-bulk-toolbar-summary small {
    display: block;
}

.gms-bulk-toolbar-summary strong {
    color: var(--gms-text);
    font-size: .86rem;
}

.gms-bulk-toolbar-summary small {
    color: var(--gms-text-muted);
    font-size: .72rem;
    margin-top: .1rem;
}

.gms-bulk-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.gms-bulk-toolbar-actions .btn {
    align-items: center;
    display: inline-flex;
    gap: .4rem;
}

.gms-bulk-clear {
    color: var(--gms-text-muted);
    text-decoration: none;
}

.gms-bulk-limit {
    bottom: -.3rem;
    color: var(--gms-danger-text);
    font-size: .7rem;
    margin: 0;
    position: absolute;
    right: 1.5rem;
    transform: translateY(100%);
    z-index: 2;
}

.gms-bulk-user-body {
    background: var(--gms-surface-muted);
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.gms-bulk-review,
.gms-bulk-impact {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: .65rem;
}

.gms-bulk-review {
    padding: 1rem;
}

.gms-bulk-review > header,
.gms-bulk-impact {
    align-items: center;
    display: flex;
    gap: .8rem;
}

.gms-bulk-review > header {
    margin-bottom: .85rem;
}

.gms-bulk-review-icon,
.gms-bulk-impact > span {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .28);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}

.gms-bulk-review h3 {
    color: var(--gms-text);
    font-size: 1rem;
    margin: .15rem 0 0;
}

.gms-bulk-user-list {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gms-bulk-user-chip {
    align-items: center;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: .5rem;
    display: flex;
    gap: .6rem;
    min-width: 0;
    padding: .55rem .65rem;
}

.gms-bulk-user-chip > span:first-child {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .3);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 30px;
    height: 30px;
    justify-content: center;
    text-transform: uppercase;
}

.gms-bulk-user-chip > span:last-child {
    min-width: 0;
}

.gms-bulk-user-chip strong,
.gms-bulk-user-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gms-bulk-user-chip strong {
    color: var(--gms-text);
    font-size: .78rem;
}

.gms-bulk-user-chip small {
    color: var(--gms-text-muted);
    font-size: .68rem;
}

.gms-bulk-user-more {
    align-items: center;
    border: 1px dashed var(--gms-border-strong);
    border-radius: .5rem;
    color: var(--gms-text-muted);
    display: flex;
    font-size: .75rem;
    justify-content: center;
    min-height: 48px;
}

.gms-bulk-role-field[hidden] {
    display: none !important;
}

.gms-bulk-impact {
    padding: .85rem 1rem;
}

.gms-bulk-impact strong,
.gms-bulk-impact p {
    display: block;
    margin: 0;
}

.gms-bulk-impact strong {
    color: var(--gms-primary-dark);
    font-size: .82rem;
}

.gms-bulk-impact p {
    color: var(--gms-text-muted);
    font-size: .74rem;
    margin-top: .15rem;
}

.gms-bulk-impact.is-risk {
    background: var(--gms-danger-soft);
    border-color: var(--gms-danger-border);
}

.gms-bulk-impact.is-risk > span {
    background: var(--gms-danger-soft);
    border-color: var(--gms-danger-border);
    color: var(--gms-danger-text);
}

.gms-bulk-impact.is-risk strong {
    color: var(--gms-danger-text);
}

.gms-bulk-user-modal.is-risk [data-bulk-submit] {
    background: var(--bs-danger, #dc3545);
    border-color: var(--bs-danger, #dc3545);
    color: #fff;
}

html[data-gms-theme="dark"] .gms-bulk-toolbar-actions .btn-outline-secondary,
html[data-gms-theme="dark"] .gms-bulk-user-modal .btn-outline-secondary {
    border-color: var(--gms-border-strong);
    color: var(--gms-text);
}

@media (max-width: 991.98px) {
    .gms-bulk-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .gms-bulk-toolbar-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .gms-bulk-toolbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .gms-bulk-toolbar-actions .btn:not(.gms-bulk-clear) {
        justify-content: center;
        width: calc(50% - .25rem);
    }

    .gms-bulk-user-list {
        grid-template-columns: 1fr;
    }
}

.gms-modal-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 9px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
}

.gms-modal-heading h2,
.gms-modal-heading p {
    margin: 0;
}

.gms-modal-heading h2 {
    font-size: 1.05rem;
}

.gms-modal-heading p {
    color: var(--gms-text-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.gms-modal-header .btn-close {
    border-radius: 50%;
    margin-left: auto;
    padding: 0.7rem;
    transition: background-color 150ms ease, filter 150ms ease;
}

.gms-modal-header .btn-close:hover,
.gms-modal-header .btn-close:focus-visible {
    background-color: var(--gms-danger);
    filter: invert(1) grayscale(1) brightness(3);
}

.modal-footer {
    background: var(--gms-surface-muted);
    border-top-color: var(--gms-border);
}

.gms-role-options {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gms-role-option {
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    padding: 0.7rem;
}

.gms-role-option:has(.form-check-input:checked) {
    background: var(--gms-primary-soft);
    border-color: var(--gms-primary);
}

/* --------------------------------------------------------------------------
   User details: scalable effective-access browser
   -------------------------------------------------------------------------- */

.gms-user-detail-tabs {
    border-bottom: 2px solid rgba(25, 188, 191, 0.24);
    gap: 0.2rem;
}

.gms-user-detail-tabs .nav-link {
    align-items: center;
    border: 0;
    border-radius: 6px 6px 0 0;
    color: var(--gms-text-muted);
    display: inline-flex;
    font-weight: 600;
    gap: 0.25rem;
    margin-bottom: -2px;
    padding: 0.85rem 1.15rem;
}

.gms-user-detail-tabs .nav-link:hover,
.gms-user-detail-tabs .nav-link:focus {
    background: var(--gms-primary-soft);
    color: var(--gms-primary-dark);
}

.gms-user-detail-tabs .nav-link.active {
    background: var(--gms-primary);
    box-shadow: inset 0 -3px rgba(0, 0, 0, 0.08);
    color: #fff;
}

.gms-user-detail-tabs .nav-link:not(.active) i {
    color: var(--gms-primary-dark);
}

.gms-detail-card {
    border-top: 3px solid var(--gms-primary);
    overflow: hidden;
}

.gms-detail-card > .card-header {
    background: var(--gms-surface-tint);
}

.gms-detail-fact {
    background: var(--gms-row-alt);
    border: 1px solid rgba(25, 188, 191, 0.22);
    border-left: 3px solid var(--gms-primary);
    border-radius: var(--gms-radius-sm);
    height: 100%;
    padding: 0.85rem 1rem;
}

.gms-detail-fact strong {
    color: var(--gms-primary-dark);
    font-variant-numeric: tabular-nums;
}

.gms-assigned-role-list {
    display: grid;
    gap: 0.75rem;
}

.gms-access-card {
    border-top-color: var(--gms-primary);
    overflow: hidden;
}

.gms-access-card > .card-header {
    background: var(--gms-surface-tint);
}

.gms-count-badge,
.gms-access-summary-item strong,
.gms-permission-result-count,
.gms-permission-count-badge {
    font-variant-numeric: tabular-nums;
}

.gms-count-badge {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 28px;
}

.gms-assigned-role {
    align-items: flex-start;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.75rem;
}

.gms-assigned-role:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.gms-assigned-role > small {
    color: var(--gms-text-muted);
    line-height: 1.45;
}

.gms-assigned-role .gms-role-badge {
    background: var(--gms-primary-soft);
    border-color: rgba(25, 188, 191, 0.3);
    color: var(--gms-primary-dark);
}

.gms-access-summary {
    align-items: stretch;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
}

.gms-access-summary-item {
    align-items: center;
    border-right: 1px solid var(--gms-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 145px;
    padding: 1.25rem;
    text-align: center;
}

.gms-access-summary-item:last-child {
    border-right: 0;
}

.gms-access-summary-item > i {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 10px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    font-size: 1rem;
    height: 38px;
    justify-content: center;
    margin-bottom: 0.55rem;
    width: 38px;
}

.gms-access-summary-item:nth-child(2) > i {
    background: var(--gms-primary-soft);
    color: var(--gms-primary-dark);
}

.gms-access-summary-item:nth-child(3) > i {
    background: var(--gms-primary-soft);
    color: var(--gms-primary-dark);
}

.gms-access-summary-item strong {
    color: var(--gms-text);
    font-size: 1.25rem;
    line-height: 1.2;
}

.gms-access-summary-item span {
    color: var(--gms-text-muted);
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.gms-permission-result-count {
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.28);
    border-radius: 999px;
    color: var(--gms-primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.42rem 0.75rem;
    white-space: nowrap;
}

.gms-permission-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    background: var(--gms-row-alt);
}

.gms-permission-search {
    flex: 1 1 520px;
    max-width: 680px;
    position: relative;
}

.gms-permission-search > i {
    color: var(--gms-text-muted);
    left: 0.9rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.gms-permission-search .form-control {
    padding-left: 2.55rem;
}

.gms-permission-groups .accordion-item {
    border-left: 3px solid rgba(25, 188, 191, 0.24);
    border-right: 0;
}

.gms-permission-groups .accordion-button {
    align-items: center;
    background: var(--gms-row);
    box-shadow: none;
    color: var(--gms-text);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 72px 20px;
    padding: 0.9rem 1.25rem;
    column-gap: 0.75rem;
}

.gms-permission-groups .accordion-button:not(.collapsed) {
    background: var(--gms-primary-soft);
    color: var(--gms-primary-dark);
}

.gms-permission-groups .accordion-button.collapsed:hover {
    background: var(--gms-row-alt);
}

.gms-permission-groups .accordion-button::after {
    grid-column: 4;
    justify-self: end;
    margin-left: 0;
}

.gms-permission-module-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.3);
    border-radius: 9px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    margin-right: 0;
}

.gms-permission-module-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-permission-count-badge {
    align-items: center;
    display: inline-flex;
    grid-column: 3;
    justify-content: center;
    justify-self: center;
    min-width: 44px;
    text-align: center;
    white-space: nowrap;
}

.gms-permission-module-copy strong {
    font-size: 0.9rem;
}

.gms-permission-module-copy small {
    color: var(--gms-text-muted);
    font-size: 0.72rem;
}

.gms-permission-groups .accordion-body {
    padding: 0;
}

.gms-permission-list {
    background: var(--gms-row);
}

.gms-permission-item {
    align-items: center;
    background: var(--gms-row);
    border-top: 1px solid var(--gms-border);
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 34px minmax(0, 1fr) minmax(150px, auto);
    padding: 0.85rem 1.25rem;
}

.gms-permission-item:nth-child(odd) {
    background: var(--gms-row-alt);
}

.gms-permission-state {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.gms-permission-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-permission-copy strong {
    color: var(--gms-text);
    font-size: 0.85rem;
}

.gms-permission-copy code {
    color: var(--gms-primary-dark);
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

.gms-permission-copy small {
    color: var(--gms-text-muted);
    line-height: 1.4;
    margin-top: 0.25rem;
}

.gms-permission-source {
    align-items: center;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: 999px;
    color: var(--gms-text-muted);
    display: inline-flex;
    font-size: 0.72rem;
    gap: 0.4rem;
    justify-self: end;
    max-width: 260px;
    padding: 0.38rem 0.65rem;
    text-align: right;
}

.gms-permission-empty {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 3rem 1.25rem;
    text-align: center;
}

.gms-permission-empty > i {
    color: var(--gms-primary);
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

[data-permission-group][hidden],
[data-permission-item][hidden] {
    display: none !important;
}

.gms-security-card {
    border-top-color: var(--gms-primary);
}

.gms-security-card > .card-header {
    background: var(--gms-surface-tint);
}

.gms-security-facts {
    background: var(--gms-row-alt);
    border: 1px solid rgba(25, 188, 191, 0.2);
    border-left: 3px solid var(--gms-primary);
    border-radius: var(--gms-radius-sm);
    margin-left: 0;
    margin-right: 0;
    padding: 0.55rem 0.75rem;
}

.gms-security-facts dt,
.gms-security-facts dd {
    border-bottom: 1px solid rgba(25, 188, 191, 0.14);
    margin-bottom: 0;
    padding-bottom: 0.6rem;
    padding-top: 0.6rem;
}

.gms-security-facts dt:last-of-type,
.gms-security-facts dd:last-of-type {
    border-bottom: 0;
}

.gms-security-facts dd {
    color: var(--gms-primary-dark);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.gms-security-card .table thead th {
    background: var(--gms-surface-tint);
    color: var(--gms-primary-dark);
}

/* Session control is intentionally token-driven: the same hierarchy and
   status language remains legible in both light and dark presentation. */
.gms-security-health,
.gms-session-total,
.gms-session-current {
    align-items: center;
    background: var(--gms-success-soft);
    border: 1px solid var(--gms-success-border);
    border-radius: 999px;
    color: var(--gms-success-text);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    gap: 0.35rem;
    line-height: 1;
    padding: 0.42rem 0.65rem;
}

.gms-security-health.has-warning {
    background: var(--gms-danger-soft);
    border-color: var(--gms-danger-border);
    color: var(--gms-danger-text);
}

.gms-session-card > .card-header > div small {
    color: var(--gms-text-muted);
    display: block;
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.gms-session-total {
    background: var(--gms-primary-soft);
    border-color: rgba(25, 188, 191, 0.28);
    color: var(--gms-primary-dark);
    font-variant-numeric: tabular-nums;
}

.gms-session-summary {
    background: var(--gms-surface-tint);
    border: 1px solid rgba(25, 188, 191, 0.2);
    border-radius: var(--gms-radius-sm);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
    overflow: hidden;
}

.gms-session-summary > div {
    align-items: center;
    border-right: 1px solid rgba(25, 188, 191, 0.18);
    display: grid;
    gap: 0.12rem 0.65rem;
    grid-template-columns: 34px auto;
    justify-content: center;
    min-height: 72px;
    padding: 0.75rem;
}

.gms-session-summary > div:last-child {
    border-right: 0;
}

.gms-session-summary i {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.24);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    grid-row: 1 / span 2;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.gms-session-summary strong {
    color: var(--gms-text);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
}

.gms-session-summary span {
    color: var(--gms-text-muted);
    font-size: 0.72rem;
}

.gms-session-list {
    display: grid;
    gap: 0.75rem;
}

.gms-session-item {
    align-items: center;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-left: 3px solid var(--gms-border-strong);
    border-radius: var(--gms-radius-sm);
    display: grid;
    gap: 0.9rem;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 0.9rem 1rem;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.gms-session-item.is-active {
    border-left-color: var(--gms-success);
}

.gms-session-item.is-current {
    background: var(--gms-surface-tint);
    border-color: rgba(25, 188, 191, 0.42);
    border-left-color: var(--gms-primary);
    box-shadow: inset 0 0 0 1px rgba(25, 188, 191, 0.08);
}

.gms-session-item.is-revoked,
.gms-session-item.is-expired {
    opacity: 0.82;
}

.gms-session-item.is-revoked {
    border-left-color: var(--gms-danger);
}

.gms-session-device {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.28);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-primary-dark);
    display: inline-flex;
    font-size: 1.05rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.gms-session-main {
    min-width: 0;
}

.gms-session-heading {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.gms-session-heading strong,
.gms-session-heading small {
    display: block;
}

.gms-session-heading strong {
    color: var(--gms-text);
    font-size: 0.88rem;
}

.gms-session-heading small {
    color: var(--gms-text-muted);
    font-size: 0.72rem;
    margin-top: 0.18rem;
}

.gms-session-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.gms-session-current {
    background: var(--gms-primary-soft);
    border-color: rgba(25, 188, 191, 0.28);
    color: var(--gms-primary-dark);
    padding: 0.35rem 0.55rem;
}

.gms-session-meta {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0.75rem 0 0;
}

.gms-session-meta div {
    border-left: 1px solid var(--gms-border);
    min-width: 0;
    padding-left: 0.65rem;
}

.gms-session-meta dt {
    color: var(--gms-text-muted);
    font-size: 0.66rem;
    font-weight: 700;
    margin-bottom: 0.12rem;
    text-transform: uppercase;
}

.gms-session-meta dd {
    color: var(--gms-text);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    margin: 0;
}

.gms-session-reason {
    align-items: flex-start;
    color: var(--gms-danger-text);
    display: flex;
    font-size: 0.72rem;
    gap: 0.4rem;
    margin: 0.7rem 0 0;
}

.gms-session-action,
.gms-session-protected {
    align-self: center;
}

.gms-session-protected {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, 0.28);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-primary-dark);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.gms-session-empty {
    align-items: center;
    border: 1px dashed var(--gms-border-strong);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 2.5rem 1rem;
    text-align: center;
}

.gms-session-empty > i {
    color: var(--gms-primary-dark);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.gms-session-empty strong {
    color: var(--gms-text);
}

.gms-session-control-modal .modal-body {
    background: var(--gms-surface-muted);
    padding: 1.6rem;
    text-align: center;
}

.gms-session-confirm-icon {
    align-items: center;
    background: var(--gms-danger-soft);
    border: 1px solid var(--gms-danger-border);
    border-radius: 50%;
    color: var(--gms-danger-text);
    display: inline-flex;
    font-size: 1.35rem;
    height: 62px;
    justify-content: center;
    margin-bottom: 1rem;
    width: 62px;
}

.gms-session-control-modal [data-session-confirm-copy] {
    color: var(--gms-text);
    line-height: 1.55;
    margin: 0 auto 1rem;
    max-width: 400px;
}

.gms-session-confirm-note {
    align-items: center;
    background: var(--gms-surface-tint);
    border: 1px solid rgba(25, 188, 191, 0.22);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text-muted);
    display: flex;
    font-size: 0.75rem;
    gap: 0.6rem;
    margin: 0 auto;
    max-width: 420px;
    padding: 0.75rem 0.85rem;
    text-align: left;
}

.gms-session-confirm-note i {
    color: var(--gms-primary-dark);
    font-size: 1rem;
}

.gms-audit-card,
.gms-audit-filter-card {
    border-top-color: var(--gms-primary);
}

.gms-audit-card > .card-header,
.gms-audit-filter-card > .card-header,
.gms-audit-card .table thead th {
    background: var(--gms-surface-tint);
    color: var(--gms-primary-dark);
}

.gms-audit-filter-card {
    margin-bottom: 1rem;
}

.gms-audit-filter-bar,
.gms-audit-filter-bar.is-datatable-ready {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.gms-audit-card code {
    color: var(--gms-primary-dark);
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Authentication screen
   -------------------------------------------------------------------------- */

.gms-auth-page {
    background:
        radial-gradient(circle at 8% 8%, rgba(25, 188, 191, 0.13), transparent 27%),
        radial-gradient(circle at 92% 92%, rgba(107, 87, 213, 0.09), transparent 29%),
        var(--gms-canvas);
    color: var(--gms-text);
    margin: 0;
    overflow-x: hidden;
}

.gms-auth-wrapper.auth-wrapper {
    align-items: center;
    background: transparent;
    display: flex;
    justify-content: center;
    min-height: 100dvh;
    padding: clamp(1rem, 3vw, 2.5rem);
    position: relative;
}

.gms-auth-container.auth-content {
    max-width: 1160px;
    padding: 0;
    position: relative;
    width: 100%;
    z-index: 2;
}

.gms-auth-card {
    background: var(--gms-surface);
    border: 1px solid rgba(25, 188, 191, 0.18);
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(22, 39, 46, 0.2);
    display: block;
    margin: 0;
    overflow: hidden;
}

.gms-auth-card > .row {
    min-height: 690px;
}

.gms-auth-form-column {
    background: var(--gms-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4.25rem);
}

.gms-auth-brand {
    align-items: center;
    display: flex;
    gap: 0.9rem;
}

.gms-auth-brand-image {
    filter: drop-shadow(0 8px 12px rgba(3, 56, 60, 0.16));
    height: 58px;
    object-fit: contain;
    width: 58px;
}

.gms-auth-brand strong {
    color: var(--gms-text);
    display: block;
    font-size: 1rem;
    font-weight: 800;
}

.gms-auth-copy {
    margin: clamp(2.6rem, 6vh, 4rem) 0 1.5rem;
}

.gms-auth-copy h1 {
    color: var(--gms-text);
    font-size: clamp(2rem, 3.5vw, 2.65rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin: 0 0 0.7rem;
}

.gms-auth-copy h1 span {
    color: var(--gms-primary-dark);
}

.gms-auth-copy p {
    color: var(--gms-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
    max-width: 430px;
}

.gms-auth-eyebrow {
    color: var(--gms-primary-dark);
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.gms-auth-alert {
    align-items: center;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-left: 3px solid currentColor;
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text);
    display: grid;
    font-size: 0.8rem;
    gap: 0.75rem;
    grid-template-columns: 34px minmax(0, 1fr);
    line-height: 1.45;
    margin-bottom: 1rem;
    padding: 0.75rem;
}

.gms-auth-alert.alert-success { border-left-color: var(--gms-success); }
.gms-auth-alert.alert-info { border-left-color: var(--gms-primary); }
.gms-auth-alert.alert-warning { border-left-color: #d79a16; }
.gms-auth-alert.alert-danger { border-left-color: var(--gms-danger); }

.gms-auth-alert-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.gms-auth-alert.alert-success .gms-auth-alert-icon {
    background: var(--gms-success-soft);
    color: var(--gms-success-text);
}

.gms-auth-alert.alert-danger .gms-auth-alert-icon {
    background: var(--gms-danger-soft);
    color: var(--gms-danger-text);
}

.gms-auth-form {
    margin-top: 0.25rem;
}

.gms-auth-form .form-label {
    margin-bottom: 0.55rem;
}

.gms-input-icon {
    position: relative;
}

.gms-input-icon > i {
    color: var(--gms-text-muted);
    font-size: 0.92rem;
    left: 1rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: color 160ms ease;
    z-index: 2;
}

.gms-input-icon .form-control {
    background: var(--gms-surface-raised);
    border-color: var(--gms-border-strong);
    border-radius: 8px;
    color: var(--gms-text);
    min-height: 50px;
    padding-left: 2.75rem;
}

.gms-input-icon .form-control::placeholder {
    color: var(--gms-text-muted);
    opacity: 0.68;
}

.gms-input-icon:focus-within > i {
    color: var(--gms-primary-dark);
}

.gms-auth-submit {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-weight: 700;
    gap: 0.75rem;
    justify-content: center;
    min-height: 50px;
    overflow: hidden;
    position: relative;
}

.gms-auth-submit i {
    line-height: 1;
    margin: 0 !important;
    transition: transform 180ms ease;
}

.gms-auth-submit:hover i,
.gms-auth-submit:focus-visible i {
    transform: translateX(3px);
}

.gms-auth-help {
    align-items: flex-start;
    border-top: 1px solid var(--gms-border);
    color: var(--gms-text-muted);
    display: flex;
    font-size: 0.75rem;
    gap: 0.75rem;
    line-height: 1.5;
    margin-top: 1.6rem;
    padding-top: 1.25rem;
}

.gms-auth-help > i {
    color: var(--gms-primary-dark);
    font-size: 1rem;
    margin-top: 0.15rem;
}

.gms-auth-help p {
    margin: 0;
}

.gms-auth-help strong {
    color: var(--gms-text);
    display: block;
}

.gms-auth-theme-toggle {
    background: transparent !important;
    border: 0;
    box-shadow: none;
    height: 44px;
    padding: 0;
    position: fixed;
    right: 1.5rem;
    top: 1.5rem;
    width: 44px;
    z-index: 20;
}

.gms-auth-visual {
    align-items: center;
    background:
        linear-gradient(145deg, rgba(8, 57, 63, 0.98), rgba(9, 32, 40, 0.99)),
        #0d3137;
    color: #ffffff;
    isolation: isolate;
    justify-content: center;
    overflow: hidden;
    padding: clamp(2.5rem, 5vw, 4.5rem);
    position: relative;
}

.gms-auth-visual::before,
.gms-auth-visual::after {
    content: "";
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.gms-auth-visual::before {
    background-image:
        linear-gradient(rgba(90, 227, 229, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(90, 227, 229, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    inset: 0;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 92%);
}

.gms-auth-visual::after {
    background: rgba(25, 188, 191, 0.23);
    border-radius: 50%;
    filter: blur(28px);
    height: 280px;
    right: -100px;
    top: -80px;
    width: 280px;
}

.gms-auth-visual-content {
    max-width: 430px;
    position: relative;
    width: 100%;
    z-index: 2;
}

.gms-auth-visual-crest {
    align-items: center;
    display: flex;
    height: 150px;
    justify-content: center;
    margin-bottom: 1.75rem;
    position: relative;
    width: 150px;
}

.gms-auth-visual-crest span {
    animation: gms-auth-crest-pulse 4.5s ease-in-out infinite;
    border: 1px solid rgba(78, 220, 223, 0.35);
    border-radius: 50%;
    box-shadow: 0 0 0 18px rgba(25, 188, 191, 0.045);
    inset: 7px;
    position: absolute;
}

.gms-auth-visual-crest img {
    filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.36));
    height: 134px;
    object-fit: contain;
    position: relative;
    width: 134px;
    z-index: 1;
}

.gms-auth-visual-kicker {
    color: #65e0e2;
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.gms-auth-visual h2 {
    color: #ffffff;
    font-size: clamp(1.75rem, 2.5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin-bottom: 0.8rem;
}

.gms-auth-visual-content > p {
    color: #b9ced3;
    font-size: 0.88rem;
    line-height: 1.65;
    margin: 0;
}

.gms-auth-features {
    display: grid;
    gap: 0.7rem;
    list-style: none;
    margin: 1.75rem 0;
    padding: 0;
}

.gms-auth-features li {
    align-items: center;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(114, 219, 222, 0.13);
    border-radius: 9px;
    color: #c5d8dc;
    display: grid;
    font-size: 0.76rem;
    gap: 0.75rem;
    grid-template-columns: 36px minmax(0, 1fr);
    line-height: 1.4;
    padding: 0.72rem 0.8rem;
}

.gms-auth-features li > i {
    align-items: center;
    background: rgba(25, 188, 191, 0.14);
    border-radius: 8px;
    color: #6ee1e3;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.gms-auth-features strong {
    color: #ffffff;
}

.gms-auth-patch {
    align-items: center;
    border-top: 1px solid rgba(135, 207, 211, 0.15);
    display: flex;
    gap: 0.75rem;
    padding-top: 1.1rem;
}

.gms-auth-patch > i {
    color: #65e0e2;
    font-size: 1rem;
}

.gms-auth-patch span {
    display: flex;
    flex-direction: column;
}

.gms-auth-patch small {
    color: #8da9af;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gms-auth-patch strong {
    color: #ffffff;
    font-size: 0.78rem;
}

.gms-auth-visual-orbit {
    border: 1px solid rgba(50, 211, 214, 0.1);
    border-radius: 50%;
    pointer-events: none;
    position: absolute;
}

.gms-auth-visual-orbit-one {
    height: 470px;
    right: -235px;
    top: 70px;
    width: 470px;
}

.gms-auth-visual-orbit-two {
    bottom: -220px;
    height: 420px;
    left: -210px;
    width: 420px;
}

@keyframes gms-auth-crest-pulse {
    0%, 100% { opacity: 0.7; transform: scale(0.97); }
    50% { opacity: 1; transform: scale(1.04); }
}

@media (max-width: 991.98px) {
    .gms-auth-container.auth-content {
        max-width: 620px;
    }

    .gms-auth-card > .row {
        min-height: 0;
    }

    .gms-auth-form-column {
        min-height: min(720px, calc(100dvh - 2rem));
    }
}

@media (max-width: 575.98px) {
    .gms-auth-wrapper.auth-wrapper {
        align-items: stretch;
        padding: 0;
    }

    .gms-auth-card {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        min-height: 100dvh;
    }

    .gms-auth-form-column {
        justify-content: flex-start;
        min-height: 100dvh;
        padding: 2rem 1.25rem;
    }

    .gms-auth-copy {
        margin-top: 2.5rem;
    }

    .gms-auth-theme-toggle {
        right: 0.75rem;
        top: 0.75rem;
    }

    .gms-auth-brand {
        padding-right: 3.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gms-auth-visual-crest span {
        animation: none;
    }

    .gms-auth-submit i,
    .gms-input-icon > i {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Global dark theme
   --------------------------------------------------------------------------

   Components consume the same semantic tokens in both modes. The explicit
   Dasho/Bootstrap selectors below bridge template surfaces that predate those
   tokens, keeping module CSS theme-neutral as the application grows.
*/

html[data-gms-theme="dark"] {
    --gms-primary-dark: #58dadd;
    --gms-primary-soft: #173b3e;
    --gms-canvas: #0d1519;
    --gms-surface: #142027;
    --gms-surface-raised: #18252c;
    --gms-surface-muted: #1c2a31;
    --gms-surface-tint: #15353a;
    --gms-row: #18252c;
    --gms-row-alt: #1c2a31;
    --gms-row-hover: #20383a;
    --gms-border: #2b3c44;
    --gms-border-strong: #3b505a;
    --gms-text: #edf4f6;
    --gms-text-muted: #a5b5bd;
    --gms-success-soft: #17382a;
    --gms-success-border: #286342;
    --gms-success-text: #75d8a2;
    --gms-danger-soft: #3a2025;
    --gms-danger-border: #71313a;
    --gms-danger-text: #ff98a4;
    --gms-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
    --gms-focus: 0 0 0 0.2rem rgba(25, 188, 191, 0.28);
    --bs-body-bg: var(--gms-canvas);
    --bs-body-color: var(--gms-text);
    --bs-border-color: var(--gms-border);
}

html[data-gms-theme="dark"] body,
html[data-gms-theme="dark"] body.gms-admin,
html[data-gms-theme="dark"] .pcoded-main-container,
html[data-gms-theme="dark"] .pcoded-content,
html[data-gms-theme="dark"] .pcoded-inner-content,
html[data-gms-theme="dark"] .main-body,
html[data-gms-theme="dark"] .page-wrapper {
    background-color: var(--gms-canvas) !important;
    color: var(--gms-text);
}

html[data-gms-theme="dark"] h1,
html[data-gms-theme="dark"] h2,
html[data-gms-theme="dark"] h3,
html[data-gms-theme="dark"] h4,
html[data-gms-theme="dark"] h5,
html[data-gms-theme="dark"] h6,
html[data-gms-theme="dark"] strong,
html[data-gms-theme="dark"] label,
html[data-gms-theme="dark"] dt {
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .text-muted,
html[data-gms-theme="dark"] .breadcrumb-item.active,
html[data-gms-theme="dark"] .form-text {
    color: var(--gms-text-muted) !important;
}

html[data-gms-theme="dark"] .pcoded-header,
html[data-gms-theme="dark"] .pcoded-header .navbar-collapse {
    background: var(--gms-surface) !important;
    border-bottom-color: var(--gms-border);
}

html[data-gms-theme="dark"] .pcoded-header {
    box-shadow: 0 1px 0 var(--gms-border);
}

html[data-gms-theme="dark"] .pcoded-navbar,
html[data-gms-theme="dark"] .pcoded-navbar .navbar-wrapper,
html[data-gms-theme="dark"] .pcoded-navbar .navbar-content {
    background: #121e25 !important;
}

html[data-gms-theme="dark"] .pcoded-navbar .navbar-brand.header-logo {
    background: #16252d !important;
    border-bottom: 1px solid var(--gms-border);
}

html[data-gms-theme="dark"] .pcoded-navbar .pcoded-inner-navbar > li > a,
html[data-gms-theme="dark"] .pcoded-navbar .pcoded-submenu > li > a {
    color: #aab8c0 !important;
}

html[data-gms-theme="dark"] .pcoded-navbar .pcoded-inner-navbar > li.active > a,
html[data-gms-theme="dark"] .pcoded-navbar .pcoded-inner-navbar > li.pcoded-trigger > a,
html[data-gms-theme="dark"] .pcoded-navbar .pcoded-submenu > li.active > a {
    background: rgba(25, 188, 191, 0.12) !important;
    color: #fff !important;
}

html[data-gms-theme="dark"] .pcoded-header a,
html[data-gms-theme="dark"] .pcoded-header .dropdown-toggle,
html[data-gms-theme="dark"] .pcoded-header .displayChatbox,
html[data-gms-theme="dark"] #mobile-header {
    color: var(--gms-text-muted);
}

html[data-gms-theme="dark"] .card,
html[data-gms-theme="dark"] .modal-content,
html[data-gms-theme="dark"] .dropdown-menu,
html[data-gms-theme="dark"] .header-user-list,
html[data-gms-theme="dark"] .notification,
html[data-gms-theme="dark"] .accordion-item,
html[data-gms-theme="dark"] .list-group-item {
    background-color: var(--gms-surface-raised) !important;
    border-color: var(--gms-border) !important;
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

html[data-gms-theme="dark"] .card > .card-header {
    background-color: var(--gms-surface-muted) !important;
    border-bottom-color: var(--gms-border) !important;
}

html[data-gms-theme="dark"] .gms-detail-card > .card-header,
html[data-gms-theme="dark"] .gms-access-card > .card-header,
html[data-gms-theme="dark"] .gms-security-card > .card-header,
html[data-gms-theme="dark"] .gms-audit-card > .card-header,
html[data-gms-theme="dark"] .gms-audit-filter-card > .card-header {
    background-color: var(--gms-surface-tint) !important;
}

html[data-gms-theme="dark"] .card .card-header h1,
html[data-gms-theme="dark"] .card .card-header h2,
html[data-gms-theme="dark"] .card .card-header h3,
html[data-gms-theme="dark"] .card .card-header h4,
html[data-gms-theme="dark"] .card .card-header h5,
html[data-gms-theme="dark"] .card .card-header h6,
html[data-gms-theme="dark"] .card .card-header .card-title {
    color: var(--gms-text) !important;
}

html[data-gms-theme="dark"] .card .card-header p {
    color: var(--gms-text-muted) !important;
}

html[data-gms-theme="dark"] #user-details-tabs-content {
    background: transparent !important;
    border: 0 !important;
    color: var(--gms-text);
    padding: 1.5rem 0 0 !important;
}

html[data-gms-theme="dark"] #user-details-tabs-content > .tab-pane {
    background: transparent !important;
}

html[data-gms-theme="dark"] .card-header,
html[data-gms-theme="dark"] .card-footer,
html[data-gms-theme="dark"] .modal-header,
html[data-gms-theme="dark"] .modal-footer,
html[data-gms-theme="dark"] .noti-head {
    border-color: var(--gms-border);
}

html[data-gms-theme="dark"] .modal-footer,
html[data-gms-theme="dark"] .gms-account-signout {
    background: var(--gms-surface-muted);
}

html[data-gms-theme="dark"] .modal-content {
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

html[data-gms-theme="dark"] .gms-user-modal-body,
html[data-gms-theme="dark"] .gms-modal-form-section,
html[data-gms-theme="dark"] .gms-user-modal .gms-role-option {
    background-color: var(--gms-surface) !important;
}

html[data-gms-theme="dark"] .form-control,
html[data-gms-theme="dark"] .form-select,
html[data-gms-theme="dark"] .form-check-input,
html[data-gms-theme="dark"] .dt-input {
    background-color: var(--gms-surface);
    border-color: var(--gms-border-strong);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .form-control::placeholder,
html[data-gms-theme="dark"] .dt-input::placeholder {
    color: #788991;
    opacity: 1;
}

html[data-gms-theme="dark"] .form-select {
    color-scheme: dark;
}

html[data-gms-theme="dark"] .select2-container--default .select2-selection--single,
html[data-gms-theme="dark"] .select2-dropdown,
html[data-gms-theme="dark"] .select2-search__field {
    background: var(--gms-surface);
    border-color: var(--gms-border-strong);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-gms-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
    background: var(--gms-surface-muted);
}

html[data-gms-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--gms-primary);
    color: #062f30;
}

html[data-gms-theme="dark"] .btn-outline-secondary {
    border-color: var(--gms-border-strong);
    color: var(--gms-text-muted);
}

html[data-gms-theme="dark"] .btn-outline-secondary:hover,
html[data-gms-theme="dark"] .btn-outline-secondary:focus-visible {
    background: var(--gms-surface-muted);
    border-color: var(--gms-primary);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .nav-tabs {
    border-bottom-color: var(--gms-border);
}

html[data-gms-theme="dark"] .nav-tabs .nav-link:not(.active) {
    color: var(--gms-text-muted);
}

html[data-gms-theme="dark"] .nav-tabs:not(.gms-user-detail-tabs) .nav-link.active {
    background: var(--gms-surface);
    border-color: var(--gms-border) var(--gms-border) var(--gms-surface);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--gms-text);
    --bs-table-border-color: var(--gms-border);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    border-color: var(--gms-border);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .table-striped:not(.gms-table) > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--gms-row-alt);
}

html[data-gms-theme="dark"] .gms-table thead th,
html[data-gms-theme="dark"] .gms-security-card .table thead th,
html[data-gms-theme="dark"] .gms-audit-card .table thead th {
    --bs-table-bg: var(--gms-surface-tint);
    background-color: var(--gms-surface-tint) !important;
    box-shadow: none !important;
    color: var(--gms-primary-dark) !important;
}

html[data-gms-theme="dark"] .gms-table tbody td,
html[data-gms-theme="dark"] .gms-security-card .table tbody td {
    color: var(--gms-text) !important;
}

html[data-gms-theme="dark"] .gms-datatable-shell table.dataTable thead > tr > th .dt-column-order::before,
html[data-gms-theme="dark"] .gms-datatable-shell table.dataTable thead > tr > th .dt-column-order::after {
    color: var(--gms-text-muted);
}

html[data-gms-theme="dark"] .gms-datatable-shell .page-link {
    background: var(--gms-surface);
    border-color: var(--gms-border);
    color: var(--gms-primary-dark);
}

html[data-gms-theme="dark"] .gms-datatable-shell .page-item.active .page-link {
    background: var(--gms-primary);
    border-color: var(--gms-primary);
    color: #062f30;
}

html[data-gms-theme="dark"] .gms-datatable-shell .page-item.disabled .page-link {
    background: var(--gms-surface-muted);
    color: #6f7d84;
}

html[data-gms-theme="dark"] .profile-notification .pro-body .gms-account-menu-item,
html[data-gms-theme="dark"] .dropdown-item {
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .dropdown-item:hover,
html[data-gms-theme="dark"] .dropdown-item:focus {
    background: var(--gms-primary-soft);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .gms-account-trigger-avatar {
    color: var(--gms-primary-dark);
}

html[data-gms-theme="dark"] .gms-page-loader {
    background:
        radial-gradient(circle at 50% 44%, rgba(25, 188, 191, 0.14), transparent 26%),
        rgba(15, 22, 26, 0.98);
}

html[data-gms-theme="dark"] .gms-user-detail-tabs .nav-link:not(.active) {
    color: #adc0c8;
}

html[data-gms-theme="dark"] .gms-user-detail-tabs .nav-link:not(.active):hover,
html[data-gms-theme="dark"] .gms-user-detail-tabs .nav-link:not(.active):focus {
    background: var(--gms-primary-soft);
    color: var(--gms-primary-dark);
}

html[data-gms-theme="dark"] .gms-detail-fact,
html[data-gms-theme="dark"] .gms-security-facts {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

html[data-gms-theme="dark"] .gms-permission-groups .accordion-button {
    border-bottom: 1px solid var(--gms-border);
}

html[data-gms-theme="dark"] .gms-permission-groups .accordion-button::after {
    filter: invert(1) grayscale(1);
    opacity: 0.65;
}

html[data-gms-theme="dark"] .tooltip .tooltip-inner {
    background: #24343c;
    border: 1px solid var(--gms-border-strong);
    box-shadow: var(--gms-shadow);
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #24343c;
}

html[data-gms-theme="dark"] * {
    scrollbar-color: #3b505a #101a1f;
}

html[data-gms-theme="dark"] .gms-auth-page {
    background:
        radial-gradient(circle at 8% 8%, rgba(25, 188, 191, 0.1), transparent 27%),
        radial-gradient(circle at 92% 92%, rgba(107, 87, 213, 0.08), transparent 29%),
        var(--gms-canvas);
}

html[data-gms-theme="dark"] .gms-auth-card {
    border-color: var(--gms-border-strong);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

html[data-gms-theme="dark"] .gms-auth-form-column,
html[data-gms-theme="dark"] .gms-auth-card {
    background: var(--gms-surface);
}

html[data-gms-theme="dark"] .gms-auth-alert {
    background: var(--gms-surface-muted);
    border-color: var(--gms-border-strong);
}

html[data-gms-theme="dark"] .gms-auth-theme-toggle {
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

html[data-gms-theme="dark"] .alert {
    border-color: var(--gms-border-strong);
}

html[data-gms-theme="dark"] .gms-toast {
    background: var(--gms-surface-raised);
    border-color: var(--gms-border-strong);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .42);
}

html[data-gms-theme="dark"] .gms-toast.is-success .gms-toast-icon {
    background: #123b2d;
    border-color: #1f6448;
    color: #72deb0;
}

html[data-gms-theme="dark"] .gms-toast.is-warning .gms-toast-icon {
    background: #3b3014;
    border-color: #665327;
    color: #f0c761;
}

html[data-gms-theme="dark"] .gms-toast.is-danger .gms-toast-icon {
    background: #421d25;
    border-color: #6e2c38;
    color: #ff8795;
}

html[data-gms-theme="dark"] code {
    color: var(--gms-primary-dark);
}

html[data-gms-theme="dark"] ::selection {
    background: rgba(25, 188, 191, 0.35);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Responsive contracts: 1080p, 1440p, 4K and mobile administration
   -------------------------------------------------------------------------- */

@media (min-width: 2560px) {
    .gms-table thead th,
    .gms-table tbody td {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }
}

@media (max-width: 1199.98px) {
    .gms-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .gms-page-actions {
        justify-content: stretch;
        margin-top: 0.4rem;
    }

    .gms-page-actions .btn {
        width: 100%;
    }

    .gms-filter-bar,
    .gms-role-options {
        grid-template-columns: 1fr;
    }

    .gms-table-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.6rem;
    }

    .gms-datatable-shell {
        padding: 1rem;
    }

    .gms-datatable-shell .dt-container > .row:not(.dt-layout-table),
    .gms-datatable-shell .dt-layout-row:not(.dt-layout-table) {
        gap: 0.75rem;
    }

    .gms-datatable-shell .dt-paging {
        overflow-x: auto;
        width: 100%;
    }

    .gms-datatable-shell .pagination {
        justify-content: flex-start !important;
    }

    .gms-access-summary {
        grid-template-columns: 1fr;
    }

    .gms-access-summary-item {
        border-bottom: 1px solid var(--gms-border);
        border-right: 0;
        min-height: 110px;
    }

    .gms-access-summary-item:last-child {
        border-bottom: 0;
    }

    .gms-permission-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .gms-permission-search {
        flex-basis: auto;
        max-width: none;
    }

    .gms-permission-toolbar .btn-group {
        display: flex;
    }

    .gms-permission-toolbar .btn-group .btn {
        flex: 1 1 50%;
    }

    .gms-permission-item {
        align-items: start;
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .gms-permission-source {
        grid-column: 2;
        justify-self: start;
        max-width: 100%;
        text-align: left;
    }

    .gms-session-summary {
        grid-template-columns: 1fr;
    }

    .gms-session-summary > div {
        border-bottom: 1px solid rgba(25, 188, 191, 0.18);
        border-right: 0;
    }

    .gms-session-summary > div:last-child {
        border-bottom: 0;
    }

    .gms-session-item {
        align-items: start;
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 0.85rem;
    }

    .gms-session-device {
        height: 40px;
        width: 40px;
    }

    .gms-session-heading {
        flex-direction: column;
    }

    .gms-session-badges {
        justify-content: flex-start;
    }

    .gms-session-meta {
        grid-template-columns: 1fr;
    }

    .gms-session-action,
    .gms-session-protected {
        grid-column: 2;
        justify-self: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .gms-page-loader-orbit,
    .gms-page-loader-core,
    .gms-page-loader-dots span {
        animation: none !important;
    }

    .gms-page-loader-orbit-outer {
        border-color: rgba(25, 188, 191, 0.35);
        border-top-color: var(--gms-primary);
    }

    .gms-page-loader-orbit-inner {
        border-color: rgba(25, 188, 191, 0.2);
        border-bottom-color: var(--gms-primary-dark);
    }
}

/* --------------------------------------------------------------------------
   Discord invitations
   -------------------------------------------------------------------------- */

.gms-invitations-card {
    margin-top: 1.5rem;
    overflow: hidden;
}

.gms-invitations-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.gms-invitations-heading {
    align-items: center;
    display: flex;
    gap: .85rem;
    min-width: 0;
}

.gms-invitations-heading h5 { margin: 0; }
.gms-invitations-heading p { color: var(--gms-text-muted); margin: .18rem 0 0; }
.gms-discord-brand-mark {
    align-items: center;
    background: #5865f2;
    border: 1px solid #4752c4;
    border-radius: 11px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 42px;
    font-size: 1rem;
    height: 42px;
    justify-content: center;
}
.gms-count-pill,
.gms-invite-status,
.gms-delivery-status { align-items: center; border: 1px solid var(--gms-border); border-radius: 999px; display: inline-flex; font-size: .75rem; font-weight: 800; gap: .35rem; line-height: 1; padding: .38rem .66rem; white-space: nowrap; }
.gms-count-pill { background: var(--gms-primary-soft); border-color: rgba(25,188,191,.35); color: var(--gms-primary-dark); }
.gms-invitation-empty { align-items: center; display: flex; gap: 1rem; padding: 2rem; }
.gms-invitation-empty > span { align-items: center; background: #eef0ff; border-radius: 12px; color: #5865f2; display: flex; font-size: 1.25rem; height: 48px; justify-content: center; width: 48px; }
.gms-invitation-empty p { color: var(--gms-text-muted); margin: .2rem 0 0; }
.gms-invitations-table-wrap { overflow: visible; }
.gms-invitations-table { table-layout: fixed; }
.gms-invitations-table .gms-invite-col-member { width: 32%; }
.gms-invitations-table .gms-invite-col-access { width: 16%; }
.gms-invitations-table .gms-invite-col-status { width: 11%; }
.gms-invitations-table .gms-invite-col-delivery { width: 12%; }
.gms-invitations-table .gms-invite-col-expires { width: 18%; }
.gms-invitations-table .gms-invite-col-actions { width: 11%; }
.gms-invitations-table th { background: var(--gms-surface-muted); border-color: var(--gms-border); color: var(--gms-text-muted); font-size: .7rem; font-weight: 900; letter-spacing: .055em; padding: .85rem 1rem; text-transform: uppercase; }
.gms-invitations-table td { background: var(--gms-row); border-color: var(--gms-border); color: var(--gms-text); padding: .9rem 1rem; vertical-align: middle; }
.gms-invitations-table tbody tr:nth-child(even) td { background: var(--gms-row-alt); }
.gms-invitations-table tbody tr { box-shadow: inset 3px 0 0 transparent; transition: box-shadow 150ms ease; }
.gms-invitations-table tbody tr:hover { box-shadow: inset 3px 0 0 #5865f2; }
.gms-discord-member,
.gms-discord-result { align-items: center; display: flex; gap: .75rem; min-width: 0; }
.gms-discord-member > span,
.gms-discord-result > span { align-items: center; background: #eef0ff; border: 1px solid #d7dcff; border-radius: 10px; color: #5865f2; display: flex; flex: 0 0 38px; height: 38px; justify-content: center; }
.gms-discord-member div,
.gms-discord-result div { display: flex; flex-direction: column; min-width: 0; }
.gms-discord-member strong,
.gms-discord-result strong { color: var(--gms-text); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gms-discord-member small,
.gms-discord-result small { color: var(--gms-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gms-discord-member .gms-invite-creator { font-size: .7rem; margin-top: .12rem; opacity: .86; }
.gms-invite-role-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.gms-invite-role-chip { align-items: center; background: var(--gms-primary-soft); border: 1px solid rgba(25,188,191,.28); border-radius: 999px; color: var(--gms-primary-dark); display: inline-flex; font-size: .72rem; font-weight: 800; gap: .3rem; max-width: 100%; padding: .34rem .58rem; }
.gms-invite-role-chip.is-empty { background: var(--gms-surface-muted); border-color: var(--gms-border); color: var(--gms-text-muted); }
.gms-invite-status.is-pending { background: #fff7df; border-color: #ead79a; color: #765500; }
.gms-invite-status.is-accepted { background: var(--gms-success-soft); border-color: var(--gms-success-border); color: var(--gms-success-text); }
.gms-invite-status.is-expired,
.gms-invite-status.is-revoked { background: var(--gms-surface-muted); color: var(--gms-text-muted); }
.gms-delivery-status.is-sent { background: var(--gms-success-soft); border-color: var(--gms-success-border); color: var(--gms-success-text); }
.gms-delivery-status.is-failed { background: var(--gms-danger-soft); border-color: var(--gms-danger-border); color: var(--gms-danger-text); }
.gms-delivery-status.is-queued { background: #fff7df; border-color: #ead79a; color: #765500; }
.gms-invite-delivery-error { color: var(--gms-danger-text); display: block; font-size: .7rem; line-height: 1.35; margin-top: .35rem; }
.gms-invite-expiry { align-items: center; color: var(--gms-text); display: inline-flex; font-size: .8rem; gap: .45rem; white-space: nowrap; }
.gms-invite-expiry > i { color: var(--gms-primary-dark); }
.gms-invite-actions { align-items: center; flex-wrap: nowrap; }
.gms-table-actions form { margin: 0; }
.gms-invite-action { align-items: center; border: 1px solid transparent; border-radius: 6px; color: #fff; display: inline-flex; font-size: .9rem; height: 36px; justify-content: center; padding: 0; transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; width: 36px; }
.gms-invite-action:hover,
.gms-invite-action:focus-visible { color: #fff; outline: 0; transform: translateY(-1px); }
.gms-invite-action.is-resend { background: #5865f2; border-color: #4752c4; }
.gms-invite-action.is-resend:hover,
.gms-invite-action.is-resend:focus-visible { background: #4752c4; box-shadow: 0 0 0 .2rem rgba(88,101,242,.18); }
.gms-invite-action.is-revoke { background: var(--gms-danger); border-color: var(--gms-danger); }
.gms-invite-action.is-revoke:hover,
.gms-invite-action.is-revoke:focus-visible { background: #b92938; border-color: #b92938; box-shadow: 0 0 0 .2rem rgba(220,53,69,.18); }
.gms-no-actions { color: var(--gms-text-muted); display: inline-block; text-align: center; width: 36px; }

.gms-invite-modal-body { background: var(--gms-surface-muted); display: grid; gap: 1rem; padding: 1.25rem; }
.gms-invite-step { align-items: start; background: var(--gms-surface); border: 1px solid var(--gms-border); border-radius: var(--gms-radius); display: grid; gap: 1rem; grid-template-columns: 36px 1fr; padding: 1.1rem; }
.gms-invite-step > div,
.gms-invite-step fieldset { min-width: 0; }
.gms-invite-step h3,
.gms-invite-step legend { color: var(--gms-text); font-size: 1rem; font-weight: 800; margin: 0 0 .2rem; }
.gms-invite-step p { color: var(--gms-text-muted); margin: 0 0 1rem; }
.gms-invite-step-number { align-items: center; background: var(--gms-primary); border-radius: 50%; color: white; display: flex; font-weight: 900; height: 36px; justify-content: center; width: 36px; }
.gms-invite-role-checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
.gms-invite-assurance { align-items: center; background: var(--gms-primary-soft); border: 1px solid rgba(25,188,191,.35); border-radius: var(--gms-radius); color: var(--gms-primary-dark); display: flex; gap: .8rem; padding: .9rem 1rem; }
.gms-invite-assurance > i { font-size: 1.35rem; }
.gms-invite-assurance div { display: flex; flex-direction: column; }
.gms-invite-assurance span { color: var(--gms-text-muted); }
.gms-discord-invite-modal .select2-container--default .select2-selection--single { min-height: 48px; }
.gms-discord-invite-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    align-items: center;
    display: flex;
    height: 46px;
    line-height: normal;
    overflow: hidden;
    padding: 0 42px 0 14px;
}
.gms-discord-invite-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    right: 8px;
}
.gms-discord-selection {
    align-items: center;
    display: flex;
    gap: .55rem;
    min-width: 0;
    width: 100%;
}
.gms-discord-selection > i { color: #5865f2; flex: 0 0 auto; }
.gms-discord-selection > strong {
    color: var(--gms-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gms-discord-selection > small {
    color: var(--gms-text-muted);
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gms-discord-invite-modal .form-text {
    align-items: flex-start;
    display: flex;
    gap: .35rem;
    line-height: 1.45;
    margin-top: .45rem;
}
.gms-discord-invite-modal .form-text > i { flex: 0 0 auto; margin-top: .14rem; }

/* Select2 renders its results outside the selection control. Keep the member
   identity readable in every result state instead of inheriting Dasho's
   generic muted colour over the primary highlight. */
.gms-discord-invite-modal .select2-dropdown {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 14px 32px rgba(20, 35, 43, .16);
    overflow: hidden;
}
.gms-discord-invite-modal .select2-search--dropdown { background: var(--gms-surface-muted); border-bottom: 1px solid var(--gms-border); padding: .55rem; }
.gms-discord-invite-modal .select2-search--dropdown .select2-search__field { background: var(--gms-surface); border: 1px solid var(--gms-border); border-radius: 6px; color: var(--gms-text); min-height: 38px; padding: .45rem .65rem; }
.gms-discord-invite-modal .select2-results__options { padding: .3rem; }
.gms-discord-invite-modal .select2-results__option { border-radius: 7px; color: var(--gms-text); margin: .15rem 0; padding: .55rem .65rem; }
.gms-discord-invite-modal .select2-results__option--highlighted[aria-selected],
.gms-discord-invite-modal .select2-results__option--selected[aria-selected] {
    background: #5865f2;
    color: #fff;
}
.gms-discord-invite-modal .select2-results__option--highlighted[aria-selected] .gms-discord-result strong,
.gms-discord-invite-modal .select2-results__option--highlighted[aria-selected] .gms-discord-result small,
.gms-discord-invite-modal .select2-results__option--selected[aria-selected] .gms-discord-result strong,
.gms-discord-invite-modal .select2-results__option--selected[aria-selected] .gms-discord-result small { color: #fff; }
.gms-discord-invite-modal .select2-results__option--highlighted[aria-selected] .gms-discord-result small,
.gms-discord-invite-modal .select2-results__option--selected[aria-selected] .gms-discord-result small { opacity: .82; }
.gms-discord-invite-modal .select2-results__option--highlighted[aria-selected] .gms-discord-result > span,
.gms-discord-invite-modal .select2-results__option--selected[aria-selected] .gms-discord-result > span { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
.gms-discord-invite-modal .select2-results__message { color: var(--gms-text-muted); padding: .8rem; text-align: center; }

.gms-revoke-invite-modal { border-top-color: var(--gms-danger); }
.gms-user-modal .gms-modal-icon.is-danger { background: var(--gms-danger); }
.gms-revoke-invite-body { background: var(--gms-surface-muted); display: grid; gap: 1rem; padding: 1.25rem; }
.gms-revoke-invite-member { align-items: center; background: var(--gms-surface); border: 1px solid var(--gms-border); border-left: 4px solid #5865f2; border-radius: var(--gms-radius); display: flex; gap: .8rem; padding: .9rem 1rem; }
.gms-revoke-invite-member > span { align-items: center; background: #eef0ff; border: 1px solid #d7dcff; border-radius: 10px; color: #5865f2; display: inline-flex; flex: 0 0 40px; height: 40px; justify-content: center; }
.gms-revoke-invite-member > div { display: flex; flex-direction: column; min-width: 0; }
.gms-revoke-invite-member strong { color: var(--gms-text); font-weight: 800; }
.gms-revoke-invite-member small { color: var(--gms-text-muted); }
.gms-revoke-invite-warning { align-items: flex-start; background: var(--gms-danger-soft); border: 1px solid var(--gms-danger-border); border-radius: var(--gms-radius); color: var(--gms-danger-text); display: flex; gap: .8rem; padding: 1rem; }
.gms-revoke-invite-warning > i { font-size: 1.25rem; margin-top: .12rem; }
.gms-revoke-invite-warning p { color: var(--gms-text-muted); line-height: 1.5; margin: .2rem 0 0; }
.gms-revoke-invite-facts { background: var(--gms-surface); border: 1px solid var(--gms-border); border-radius: var(--gms-radius); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }
.gms-revoke-invite-facts > div { padding: .85rem 1rem; }
.gms-revoke-invite-facts > div + div { border-left: 1px solid var(--gms-border); }
.gms-revoke-invite-facts dt { color: var(--gms-text-muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; margin-bottom: .4rem; text-transform: uppercase; }
.gms-revoke-invite-facts dd { color: var(--gms-text); font-weight: 700; margin: 0; }

.gms-invite-accept-shell { align-items: center; display: flex; justify-content: center; min-height: 100vh; padding: 2rem 1rem; }
.gms-invite-accept-card { background: var(--gms-surface); border: 1px solid var(--gms-border); border-top: 4px solid var(--gms-primary); border-radius: 14px; box-shadow: var(--gms-shadow); color: var(--gms-text); max-width: 720px; padding: 2rem; width: 100%; }
.gms-invite-accept-card > header { align-items: center; border-bottom: 1px solid var(--gms-border); display: flex; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.25rem; }
.gms-invite-accept-card > header img { height: 72px; object-fit: contain; width: 72px; }
.gms-invite-accept-card h1 { color: var(--gms-text); font-size: 1.8rem; margin: .15rem 0; }
.gms-invite-accept-card header p,
.gms-invite-privacy { color: var(--gms-text-muted); margin: 0; }
.gms-invite-member { align-items: center; background: var(--gms-surface-muted); border: 1px solid var(--gms-border); border-left: 4px solid #5865f2; border-radius: var(--gms-radius); display: flex; gap: 1rem; margin-bottom: 1rem; padding: 1rem; }
.gms-invite-member > span { color: #5865f2; font-size: 1.6rem; }
.gms-invite-member div { display: flex; flex-direction: column; }
.gms-invite-member strong { font-size: 1.1rem; }
.gms-invite-member p { color: var(--gms-text-muted); margin: .15rem 0 0; }
.gms-invite-privacy { font-size: .8rem; margin-top: 1rem; text-align: center; }
.gms-invite-verified { align-items: center; background: var(--gms-success-soft); border: 1px solid var(--gms-success-border); border-radius: var(--gms-radius); color: var(--gms-success-text); display: flex; gap: .7rem; margin-bottom: 1.25rem; padding: .8rem 1rem; }
.gms-invite-verified > i { font-size: 1.3rem; }
.gms-invite-verified span { display: flex; flex-direction: column; }
.gms-invite-state { padding: 1.5rem 0; text-align: center; }
.gms-invite-state > span { align-items: center; background: var(--gms-danger-soft); border-radius: 50%; color: var(--gms-danger-text); display: flex; font-size: 1.4rem; height: 58px; justify-content: center; margin: 0 auto 1rem; width: 58px; }
.gms-invite-state p { color: var(--gms-text-muted); margin: .5rem auto 1.25rem; max-width: 480px; }

html[data-gms-theme="dark"] .gms-discord-member > span,
html[data-gms-theme="dark"] .gms-discord-result > span { background: #242b57; border-color: #3c477f; color: #aeb6ff; }
html[data-gms-theme="dark"] .gms-invite-status.is-pending { background: #3b3218; border-color: #6f5e27; color: #f0d77c; }
html[data-gms-theme="dark"] .gms-delivery-status.is-queued { background: #3b3218; border-color: #6f5e27; color: #f0d77c; }
html[data-gms-theme="dark"] .gms-invite-role-chip { background: #123b43; border-color: #1c5c65; color: #55dadd; }
html[data-gms-theme="dark"] .gms-invitation-empty > span,
html[data-gms-theme="dark"] .gms-revoke-invite-member > span { background: #242b57; border-color: #3c477f; color: #aeb6ff; }
html[data-gms-theme="dark"] .gms-invite-step,
html[data-gms-theme="dark"] .gms-invite-accept-card { background: var(--gms-surface); }

@media (max-width: 767.98px) {
    .gms-invitations-header { align-items: flex-start; }
    .gms-invitations-heading { align-items: flex-start; }
    .gms-invitations-heading p { line-height: 1.4; }
    .gms-revoke-invite-facts { grid-template-columns: 1fr; }
    .gms-revoke-invite-facts > div + div { border-left: 0; border-top: 1px solid var(--gms-border); }
    .gms-invite-role-checks { grid-template-columns: 1fr; }
    .gms-invite-step { grid-template-columns: 1fr; }
    .gms-invite-accept-card { padding: 1.25rem; }
    .gms-invite-accept-card > header { align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   Audit Logs module
   -------------------------------------------------------------------------- */

.gms-audit-filter-card .card-header,
.gms-audit-log-card .card-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.gms-audit-filter-card .card-header p,
.gms-audit-log-card .card-header p {
    color: var(--gms-text-muted);
    font-size: .8rem;
    margin-top: .2rem;
}

.gms-audit-filter-bar {
    grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(160px, 1fr));
}

.gms-audit-filter-bar.is-datatable-ready {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.gms-audit-integrity-badge {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .35);
    border-radius: 999px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .72rem;
    font-weight: 800;
    gap: .45rem;
    padding: .45rem .7rem;
}

.gms-audit-actor {
    align-items: center;
    display: inline-flex;
    gap: .55rem;
}

.gms-audit-actor > span {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid rgba(25, 188, 191, .35);
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 30px;
    font-size: .72rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.gms-audit-actor strong {
    color: var(--gms-text);
    font-size: .82rem;
    font-weight: 750;
}

.gms-audit-area-badge,
.gms-audit-event-badge {
    border: 1px solid var(--gms-border);
    border-radius: 999px;
    display: inline-flex;
    font-size: .7rem;
    font-weight: 800;
    line-height: 1;
    padding: .42rem .6rem;
    white-space: nowrap;
}

.gms-audit-area-badge {
    background: var(--gms-surface-tint);
    color: var(--gms-primary-dark);
}

.gms-audit-event-badge {
    background: #f2f0ff;
    border-color: #dcd7fa;
    color: #5543b1;
}

.gms-audit-description {
    color: var(--gms-text);
    min-width: 280px;
    white-space: normal;
}

.gms-audit-record {
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: 5px;
    color: var(--gms-primary-dark);
    display: inline-block;
    font-size: .72rem;
    max-width: 160px;
    overflow: hidden;
    padding: .3rem .45rem;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

/* Keep large audit snapshots inside the viewport. The dialog remains content-
   sized for short events, while the body becomes the only scrolling region
   once the modal reaches the available screen height. */
#audit-event-modal .modal-dialog {
    height: calc(100vh - 2rem);
    height: min(820px, calc(100dvh - 2rem));
    margin-bottom: 1rem;
    margin-top: 1rem;
    max-height: none;
}

#audit-event-modal .gms-audit-event-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: none;
    min-height: 0;
}

#audit-event-modal .gms-modal-header,
#audit-event-modal .modal-footer {
    flex: 0 0 auto;
}

.gms-audit-event-body {
    background: var(--gms-surface-muted);
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1rem;
    max-height: calc(100vh - 12rem);
    max-height: calc(100dvh - 12rem);
    min-height: 0;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 1.25rem;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

/* Audit sections must retain their content height. If they are allowed to
   shrink, the change comparison clips its rows instead of overflowing the
   modal body and no scrollbar can be created. */
.gms-audit-event-body > * {
    flex: 0 0 auto;
}

.gms-audit-event-hero {
    align-items: center;
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-left: 4px solid var(--gms-primary);
    border-radius: var(--gms-radius);
    display: flex;
    gap: 1rem;
    padding: 1rem 1.1rem;
}

.gms-audit-event-hero-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border-radius: 10px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    flex: 0 0 46px;
    font-size: 1.1rem;
    height: 46px;
    justify-content: center;
}

.gms-audit-event-hero > div > span {
    color: var(--gms-primary-dark);
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.gms-audit-event-hero h3 {
    color: var(--gms-text);
    font-size: 1.08rem;
    margin: .15rem 0;
}

.gms-audit-event-hero p {
    color: var(--gms-text-muted);
    margin: 0;
}

.gms-audit-fact-grid {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    overflow: hidden;
}

.gms-audit-fact-grid > div {
    border-bottom: 1px solid var(--gms-border);
    min-width: 0;
    padding: .85rem 1rem;
}

.gms-audit-fact-grid > div:not(:nth-child(3n + 1)) {
    border-left: 1px solid var(--gms-border);
}

.gms-audit-fact-grid > div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.gms-audit-fact-grid dt,
.gms-audit-change-grid dt {
    color: var(--gms-text-muted);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .04em;
    margin-bottom: .35rem;
    text-transform: uppercase;
}

.gms-audit-fact-grid dd {
    color: var(--gms-text);
    font-size: .8rem;
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}

.gms-audit-fact-grid code {
    color: var(--gms-primary-dark);
    font-size: .72rem;
}

.gms-audit-change-section {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius);
    overflow: hidden;
}

.gms-audit-change-section > header {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    justify-content: space-between;
    padding: .9rem 1rem;
}

.gms-audit-change-section h3 {
    color: var(--gms-text);
    font-size: .95rem;
    margin: 0;
}

.gms-audit-change-section header p {
    color: var(--gms-text-muted);
    font-size: .75rem;
    margin: .2rem 0 0;
}

.gms-audit-change-empty {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    gap: .65rem;
    padding: 1rem;
}

.gms-audit-change-empty > i {
    color: var(--gms-primary-dark);
}

.gms-audit-change-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gms-audit-change-grid[hidden] {
    display: none;
}

.gms-audit-change-grid > article + article {
    border-left: 1px solid var(--gms-border);
}

.gms-audit-change-grid h4 {
    align-items: center;
    background: var(--gms-surface-muted);
    border-bottom: 1px solid var(--gms-border);
    color: var(--gms-text);
    display: flex;
    font-size: .78rem;
    font-weight: 850;
    gap: .45rem;
    margin: 0;
    padding: .7rem 1rem;
    text-transform: uppercase;
}

.gms-audit-change-grid h4 i {
    color: var(--gms-primary-dark);
}

.gms-audit-change-grid dl {
    margin: 0;
}

.gms-audit-change-grid dl > div {
    padding: .7rem 1rem;
}

.gms-audit-change-grid dl > div + div {
    border-top: 1px solid var(--gms-border);
}

.gms-audit-change-grid dd {
    color: var(--gms-text);
    font-size: .78rem;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.gms-audit-change-grid dd.is-structured {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .7rem;
}

.gms-audit-snapshot-empty {
    color: var(--gms-text-muted);
    font-size: .78rem;
    padding: 1rem;
}

html[data-gms-theme="dark"] .gms-audit-event-badge {
    background: #292645;
    border-color: #45406d;
    color: #c9c2ff;
}

html[data-gms-theme="dark"] .gms-audit-area-badge,
html[data-gms-theme="dark"] .gms-audit-integrity-badge,
html[data-gms-theme="dark"] .gms-audit-actor > span,
html[data-gms-theme="dark"] .gms-audit-event-hero-icon {
    background: #123b43;
    border-color: #1c5c65;
    color: #55dadd;
}

html[data-gms-theme="dark"] .gms-audit-record {
    background: var(--gms-surface-muted);
    border-color: var(--gms-border);
    color: #55dadd;
}

html[data-gms-theme="dark"] .gms-audit-event-body,
html[data-gms-theme="dark"] .gms-audit-change-grid h4 {
    background: var(--gms-surface-muted);
}

html[data-gms-theme="dark"] .gms-audit-event-hero,
html[data-gms-theme="dark"] .gms-audit-fact-grid,
html[data-gms-theme="dark"] .gms-audit-change-section {
    background: var(--gms-surface);
}

@media (max-width: 991.98px) {
    .gms-audit-filter-bar,
    .gms-audit-filter-bar.is-datatable-ready {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gms-audit-fact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gms-audit-fact-grid > div:not(:nth-child(3n + 1)) {
        border-left: 0;
    }

    .gms-audit-fact-grid > div:nth-child(even) {
        border-left: 1px solid var(--gms-border);
    }

    .gms-audit-fact-grid > div:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--gms-border);
    }

    .gms-audit-fact-grid > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    #audit-event-modal .modal-dialog,
    #audit-event-modal .gms-audit-event-modal {
        height: calc(100vh - 1rem);
        height: calc(100dvh - 1rem);
        max-height: none;
    }

    #audit-event-modal .modal-dialog {
        margin-bottom: .5rem;
        margin-top: .5rem;
    }

    .gms-audit-event-body {
        max-height: calc(100vh - 10rem);
        max-height: calc(100dvh - 10rem);
    }

    .gms-audit-filter-bar,
    .gms-audit-filter-bar.is-datatable-ready,
    .gms-audit-fact-grid,
    .gms-audit-change-grid {
        grid-template-columns: 1fr;
    }

    .gms-audit-fact-grid > div,
    .gms-audit-fact-grid > div:nth-child(even),
    .gms-audit-change-grid > article + article {
        border-left: 0;
    }

    .gms-audit-fact-grid > div:not(:last-child) {
        border-bottom: 1px solid var(--gms-border);
    }

    .gms-audit-filter-card .card-header,
    .gms-audit-log-card .card-header,
    .gms-audit-change-section > header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Settings sits after vendor/module rules so its two-theme hierarchy wins. */
.gms-settings-groups .card-header h5,
.gms-settings-workspace-header h5,
.gms-settings-empty h5 {
    color: var(--gms-text);
}

html[data-gms-theme="dark"] .gms-settings-workspace,
html[data-gms-theme="dark"] .gms-settings-groups,
html[data-gms-theme="dark"] .gms-setting-field,
html[data-gms-theme="dark"] .gms-settings-toolbar,
html[data-gms-theme="dark"] .gms-settings-actions {
    background: var(--gms-surface);
    border-color: var(--gms-border);
}

html[data-gms-theme="dark"] .gms-setting-field:hover,
html[data-gms-theme="dark"] .gms-settings-actions {
    background: var(--gms-surface-muted);
}

html[data-gms-theme="dark"] .gms-settings-search,
html[data-gms-theme="dark"] .gms-setting-control .form-control,
html[data-gms-theme="dark"] .gms-setting-control .form-select {
    background-color: var(--gms-surface-muted);
    border-color: var(--gms-border-strong);
    color: var(--gms-text);
}

.gms-setting-readonly-value {
    align-items: center;
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    min-height: 2.65rem;
    overflow-wrap: anywhere;
    padding: .55rem .7rem;
}

.gms-setting-readonly-value > span {
    color: var(--gms-text);
    font-size: .78rem;
}

.gms-setting-readonly-value .gms-setting-readonly {
    flex: 0 0 auto;
    margin: 0;
}

/*
|--------------------------------------------------------------------------
| In-application documentation workspace
|--------------------------------------------------------------------------
|
| The knowledge base uses the same semantic surfaces in both themes. Solid
| colour blocks preserve the restrained administration style while teal
| landmarks make scanning a long technical article substantially easier.
|
*/
.gms-doc-reading-progress {
    background: transparent;
    height: 3px;
    left: var(--gms-sidebar-collapsed-width, 70px);
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1090;
}

.gms-doc-reading-progress > span {
    background: var(--gms-primary);
    display: block;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 100ms linear;
}

.gms-doc-hero {
    align-items: stretch;
    background: var(--gms-secondary);
    border: 1px solid rgba(25, 188, 191, .45);
    border-left: 4px solid var(--gms-primary);
    border-radius: var(--gms-radius-md);
    color: #fff;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 1.15rem;
    overflow: visible;
    padding: 1.75rem;
    position: relative;
    z-index: 5;
}

.gms-doc-hero-copy {
    max-width: 58rem;
}

.gms-doc-hero .gms-kicker {
    color: #6ee8ea;
    display: inline-flex;
    font-size: .69rem;
    gap: .45rem;
    letter-spacing: .11em;
    margin-bottom: .5rem;
    text-transform: uppercase;
}

.gms-doc-hero h1 {
    color: #fff;
    font-size: clamp(1.45rem, 2.2vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.15;
    margin: 0;
}

.gms-doc-hero-copy > p {
    color: #bad1d5;
    font-size: .88rem;
    line-height: 1.6;
    margin: .55rem 0 1.15rem;
}

.gms-doc-search-wrap {
    max-width: 42rem;
    position: relative;
    z-index: 20;
}

.gms-doc-search {
    align-items: center;
    background: #fff;
    border: 1px solid #fff;
    border-radius: var(--gms-radius-sm);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .17);
    color: #506170;
    display: flex;
    gap: .7rem;
    min-height: 3rem;
    padding: 0 .75rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.gms-doc-search:focus-within {
    border-color: #64e5e8;
    box-shadow: 0 0 0 3px rgba(25, 188, 191, .22), 0 14px 30px rgba(0, 0, 0, .2);
}

.gms-doc-search > i {
    color: var(--gms-primary-dark);
    font-size: 1rem;
}

.gms-doc-search input {
    background: transparent;
    border: 0;
    color: #13242b;
    flex: 1 1 auto;
    font-size: .83rem;
    min-width: 0;
    outline: 0;
}

.gms-doc-search input::placeholder {
    color: #85939e;
}

.gms-doc-search kbd {
    background: #eef5f6;
    border: 1px solid #d2e0e2;
    border-bottom-width: 2px;
    border-radius: .28rem;
    color: #60717c;
    font-family: inherit;
    font-size: .62rem;
    font-weight: 700;
    padding: .25rem .4rem;
}

.gms-doc-search-results {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    box-shadow: 0 18px 42px rgba(4, 23, 29, .28);
    left: 0;
    max-height: min(30rem, 62vh);
    overflow: auto;
    padding: .45rem;
    position: absolute;
    right: 0;
    top: calc(100% + .45rem);
    z-index: 1080;
}

.gms-doc-search-results[hidden] {
    display: none;
}

.gms-doc-search-results > a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: .42rem;
    color: var(--gms-text);
    display: grid;
    gap: .7rem;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    padding: .65rem;
    text-decoration: none;
}

.gms-doc-search-results > a:hover,
.gms-doc-search-results > a.is-keyboard-active {
    background: var(--gms-surface-tint);
    border-color: rgba(25, 188, 191, .28);
}

.gms-doc-search-result-icon {
    align-items: center;
    background: rgba(25, 188, 191, .12);
    border: 1px solid rgba(25, 188, 191, .25);
    border-radius: .45rem;
    color: var(--gms-primary-dark);
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.gms-doc-search-result-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.gms-doc-search-result-copy em {
    color: var(--gms-primary-dark);
    font-size: .58rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gms-doc-search-result-copy strong {
    color: var(--gms-text);
    font-size: .78rem;
    margin: .08rem 0;
}

.gms-doc-search-result-copy small {
    color: var(--gms-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gms-doc-search-results > a > i {
    color: var(--gms-primary-dark);
}

.gms-doc-search-hint,
.gms-doc-search-empty {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    font-size: .75rem;
    gap: .7rem;
    justify-content: center;
    min-height: 5rem;
    padding: .85rem;
    text-align: center;
}

.gms-doc-search-hint i,
.gms-doc-search-empty > i {
    color: var(--gms-primary-dark);
    font-size: 1.15rem;
}

.gms-doc-search-empty div {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.gms-doc-search-empty strong {
    color: var(--gms-text);
}

.gms-doc-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    margin-top: .85rem;
}

.gms-doc-hero-meta span {
    align-items: center;
    color: #a9c5ca;
    display: inline-flex;
    font-size: .68rem;
    gap: .38rem;
}

.gms-doc-hero-meta i {
    color: #44d7da;
}

.gms-doc-hero-stats {
    align-self: stretch;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: var(--gms-radius-sm);
    display: grid;
    grid-template-columns: repeat(3, minmax(5.5rem, 1fr));
    min-width: 18rem;
}

.gms-doc-hero-stats > div {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: .85rem .75rem;
    text-align: center;
}

.gms-doc-hero-stats > div + div {
    border-left: 1px solid rgba(255, 255, 255, .12);
}

.gms-doc-hero-stats strong {
    color: #fff;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.gms-doc-hero-stats span {
    color: #9bbac0;
    font-size: .62rem;
    margin-top: .12rem;
    text-transform: uppercase;
}

.gms-doc-mobile-actions {
    display: none;
    gap: .6rem;
    margin-bottom: .8rem;
}

.gms-doc-mobile-actions .btn {
    align-items: center;
    display: inline-flex;
    font-size: .72rem;
    gap: .45rem;
}

.gms-doc-layout {
    align-items: start;
    display: grid;
    gap: 1.1rem;
    grid-template-columns: 16rem minmax(0, 1fr) 14.5rem;
    margin-bottom: 2rem;
}

.gms-doc-navigation,
.gms-doc-toc,
.gms-doc-article {
    background: var(--gms-surface);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-md);
}

.gms-doc-navigation,
.gms-doc-toc {
    max-height: calc(100vh - 2rem);
    overflow: auto;
    position: sticky;
    scrollbar-color: var(--gms-border-strong) transparent;
    scrollbar-width: thin;
    top: 1rem;
}

.gms-doc-panel-heading {
    align-items: center;
    border-bottom: 1px solid var(--gms-border);
    display: flex;
    justify-content: space-between;
    padding: .9rem 1rem;
}

.gms-doc-panel-heading > div {
    display: flex;
    flex-direction: column;
}

.gms-doc-panel-heading span {
    color: var(--gms-primary-dark);
    font-size: .57rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gms-doc-panel-heading strong {
    color: var(--gms-text);
    font-size: .83rem;
}

.gms-doc-panel-heading button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--gms-text-muted);
    display: none;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.gms-doc-navigation nav {
    padding: .45rem;
}

.gms-doc-nav-group {
    border-bottom: 1px solid var(--gms-border-soft, var(--gms-border));
}

.gms-doc-nav-group:last-child {
    border-bottom: 0;
}

.gms-doc-nav-group summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: .55rem;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    list-style: none;
    padding: .65rem .55rem;
    user-select: none;
}

.gms-doc-nav-group summary::-webkit-details-marker {
    display: none;
}

.gms-doc-nav-group summary:hover {
    background: var(--gms-surface-muted);
}

.gms-doc-nav-group-icon {
    align-items: center;
    background: rgba(25, 188, 191, .1);
    border: 1px solid rgba(25, 188, 191, .2);
    border-radius: .38rem;
    color: var(--gms-primary-dark);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.gms-doc-nav-group summary > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-doc-nav-group summary strong {
    color: var(--gms-text);
    font-size: .72rem;
}

.gms-doc-nav-group summary small {
    color: var(--gms-text-muted);
    font-size: .6rem;
}

.gms-doc-nav-group summary > i {
    color: var(--gms-text-faint, var(--gms-text-muted));
    font-size: .63rem;
    transition: transform .18s ease;
}

.gms-doc-nav-group[open] summary > i {
    transform: rotate(180deg);
}

.gms-doc-nav-group > div {
    padding: 0 .2rem .45rem 2.75rem;
}

.gms-doc-nav-group > div a {
    align-items: center;
    border-left: 2px solid var(--gms-border);
    color: var(--gms-text-muted);
    display: flex;
    font-size: .68rem;
    gap: .4rem;
    justify-content: space-between;
    line-height: 1.35;
    padding: .42rem .5rem;
    text-decoration: none;
}

.gms-doc-nav-group > div a:hover {
    border-left-color: var(--gms-primary);
    color: var(--gms-primary-dark);
}

.gms-doc-nav-group > div a.is-active {
    background: var(--gms-surface-tint);
    border-left-color: var(--gms-primary);
    color: var(--gms-primary-dark);
    font-weight: 750;
}

.gms-doc-nav-group > div a i {
    font-size: .58rem;
}

.gms-doc-article {
    min-width: 0;
    overflow: hidden;
}

.gms-doc-article-header {
    border-bottom: 1px solid var(--gms-border);
    border-top: 3px solid var(--gms-primary);
    padding: 1.6rem clamp(1.25rem, 3vw, 2.5rem) 1.35rem;
}

.gms-doc-breadcrumbs {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    font-size: .65rem;
    gap: .45rem;
    margin-bottom: .85rem;
}

.gms-doc-breadcrumbs a {
    color: var(--gms-primary-dark);
}

.gms-doc-breadcrumbs > i {
    font-size: .5rem;
}

.gms-doc-category {
    align-items: center;
    background: var(--gms-surface-tint);
    border: 1px solid rgba(25, 188, 191, .25);
    border-radius: 999px;
    color: var(--gms-primary-dark);
    display: inline-flex;
    font-size: .6rem;
    font-weight: 800;
    gap: .35rem;
    letter-spacing: .065em;
    padding: .3rem .55rem;
    text-transform: uppercase;
}

.gms-doc-article-header h1 {
    color: var(--gms-text);
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    letter-spacing: -.025em;
    line-height: 1.18;
    margin: .65rem 0 .45rem;
}

.gms-doc-article-header > p {
    color: var(--gms-text-muted);
    font-size: .84rem;
    line-height: 1.6;
    margin: 0;
    max-width: 50rem;
}

.gms-doc-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1rem;
    margin-top: .95rem;
}

.gms-doc-article-meta span {
    align-items: center;
    color: var(--gms-text-muted);
    display: inline-flex;
    font-size: .64rem;
    gap: .35rem;
}

.gms-doc-article-meta i {
    color: var(--gms-primary-dark);
}

.gms-doc-prose {
    color: var(--gms-text);
    font-size: .82rem;
    line-height: 1.72;
    padding: 1.6rem clamp(1.25rem, 3vw, 2.5rem) 2rem;
}

.gms-doc-prose > :first-child {
    margin-top: 0;
}

.gms-doc-prose > :last-child {
    margin-bottom: 0;
}

.gms-doc-prose p {
    color: var(--gms-text-muted);
    margin: 0 0 1rem;
}

.gms-doc-prose strong {
    color: var(--gms-text);
    font-weight: 750;
}

.gms-doc-prose .gms-doc-heading {
    color: var(--gms-text);
    font-weight: 750;
    letter-spacing: -.015em;
    line-height: 1.28;
    position: relative;
    scroll-margin-top: 1rem;
}

.gms-doc-prose h2 {
    border-bottom: 1px solid var(--gms-border);
    font-size: 1.18rem;
    margin: 2rem 0 .9rem;
    padding-bottom: .55rem;
}

.gms-doc-prose h3 {
    font-size: .98rem;
    margin: 1.55rem 0 .65rem;
}

.gms-doc-prose h4,
.gms-doc-prose h5,
.gms-doc-prose h6 {
    font-size: .86rem;
    margin: 1.25rem 0 .55rem;
}

.gms-doc-prose .gms-doc-heading > a {
    color: var(--gms-primary);
    font-size: .72em;
    left: -1.05rem;
    opacity: 0;
    position: absolute;
    text-decoration: none;
    top: .14em;
    transition: opacity .16s ease;
}

.gms-doc-prose .gms-doc-heading:hover > a,
.gms-doc-prose .gms-doc-heading > a:focus {
    opacity: 1;
}

.gms-doc-prose > ul,
.gms-doc-prose > ol {
    color: var(--gms-text-muted);
    margin: 0 0 1.1rem;
    padding-left: 1.35rem;
}

.gms-doc-prose li {
    margin: .3rem 0;
    padding-left: .15rem;
}

.gms-doc-prose li::marker {
    color: var(--gms-primary-dark);
    font-weight: 800;
}

.gms-doc-prose a {
    color: var(--gms-primary-dark);
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: rgba(25, 188, 191, .35);
    text-underline-offset: .15em;
}

.gms-doc-prose a:hover {
    color: var(--gms-primary);
    text-decoration-color: currentColor;
}

.gms-doc-prose a > i {
    font-size: .65em;
    margin-left: .22rem;
}

.gms-doc-prose :not(pre) > code {
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: .28rem;
    color: var(--gms-primary-dark);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .78em;
    overflow-wrap: anywhere;
    padding: .12rem .28rem;
}

.gms-doc-prose blockquote {
    align-items: flex-start;
    background: var(--gms-surface-tint);
    border: 1px solid rgba(25, 188, 191, .28);
    border-left: 3px solid var(--gms-primary);
    border-radius: var(--gms-radius-sm);
    display: flex;
    gap: .7rem;
    margin: 1rem 0 1.25rem;
    padding: .85rem 1rem;
}

.gms-doc-prose blockquote > i {
    color: var(--gms-primary-dark);
    margin-top: .2rem;
}

.gms-doc-prose blockquote p {
    margin: 0;
}

.gms-doc-prose hr {
    border-color: var(--gms-border);
    margin: 1.75rem 0;
    opacity: 1;
}

.gms-doc-table-wrap {
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    margin: .85rem 0 1.3rem;
    overflow: auto;
}

.gms-doc-table-wrap table {
    border-collapse: collapse;
    min-width: 34rem;
    width: 100%;
}

.gms-doc-table-wrap th,
.gms-doc-table-wrap td {
    border-bottom: 1px solid var(--gms-border);
    border-right: 1px solid var(--gms-border);
    padding: .62rem .7rem;
    text-align: left;
    vertical-align: top;
}

.gms-doc-table-wrap th:last-child,
.gms-doc-table-wrap td:last-child {
    border-right: 0;
}

.gms-doc-table-wrap tr:last-child td {
    border-bottom: 0;
}

.gms-doc-table-wrap th {
    background: var(--gms-surface-muted);
    color: var(--gms-text);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.gms-doc-table-wrap tbody tr:nth-child(odd) td {
    background: #f8fdfd;
}

.gms-doc-table-wrap td {
    color: var(--gms-text-muted);
    font-size: .73rem;
}

.gms-doc-code {
    background: #0d191e;
    border: 1px solid #23363d;
    border-radius: var(--gms-radius-sm);
    box-shadow: 0 10px 24px rgba(7, 21, 26, .12);
    margin: .85rem 0 1.3rem;
    overflow: hidden;
}

.gms-doc-code > div {
    align-items: center;
    background: #14262d;
    border-bottom: 1px solid #263b43;
    color: #8fb0ba;
    display: flex;
    font-size: .6rem;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: .06em;
    min-height: 2.25rem;
    padding: .35rem .45rem .35rem .75rem;
    text-transform: uppercase;
}

.gms-doc-code > div > span {
    align-items: center;
    display: inline-flex;
    gap: .4rem;
}

.gms-doc-code > div > span i {
    color: #3dd7da;
}

.gms-doc-code button {
    align-items: center;
    background: transparent;
    border: 1px solid #38505a;
    border-radius: .3rem;
    color: #b6cbd1;
    display: inline-flex;
    font-size: .6rem;
    gap: .35rem;
    padding: .28rem .5rem;
    text-transform: none;
}

.gms-doc-code button:hover,
.gms-doc-code button.is-copied {
    background: #173d43;
    border-color: #2bbfc2;
    color: #54e5e7;
}

.gms-doc-code pre {
    color: #d6e2e5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .71rem;
    line-height: 1.65;
    margin: 0;
    max-height: 35rem;
    overflow: auto;
    padding: 1rem;
    tab-size: 4;
}

.gms-doc-code code {
    color: inherit;
    white-space: pre;
}

.gms-doc-neighbours {
    border-top: 1px solid var(--gms-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1.25rem clamp(1.25rem, 3vw, 2.5rem);
}

.gms-doc-neighbours a {
    background: var(--gms-surface-muted);
    border: 1px solid var(--gms-border);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-text);
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-height: 4.5rem;
    padding: .75rem .85rem;
    text-decoration: none;
    transition: border-color .16s ease, transform .16s ease;
}

.gms-doc-neighbours a:last-child {
    align-items: flex-end;
    text-align: right;
}

.gms-doc-neighbours a:hover {
    border-color: var(--gms-primary);
    transform: translateY(-2px);
}

.gms-doc-neighbours a span {
    color: var(--gms-primary-dark);
    display: inline-flex;
    font-size: .6rem;
    font-weight: 800;
    gap: .4rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.gms-doc-neighbours a strong {
    font-size: .76rem;
    line-height: 1.35;
}

.gms-doc-toc nav {
    display: flex;
    flex-direction: column;
    padding: .7rem .7rem .9rem;
}

.gms-doc-toc nav a {
    border-left: 2px solid var(--gms-border);
    color: var(--gms-text-muted);
    font-size: .66rem;
    line-height: 1.35;
    padding: .38rem .55rem;
    text-decoration: none;
}

.gms-doc-toc nav a.is-level-3 {
    padding-left: 1rem;
}

.gms-doc-toc nav a:hover,
.gms-doc-toc nav a.is-active {
    border-left-color: var(--gms-primary);
    color: var(--gms-primary-dark);
}

.gms-doc-toc nav a.is-active {
    background: var(--gms-surface-tint);
    font-weight: 750;
}

.gms-doc-toc-empty {
    align-items: center;
    color: var(--gms-text-muted);
    display: flex;
    flex-direction: column;
    font-size: .68rem;
    gap: .5rem;
    padding: 1.25rem;
    text-align: center;
}

.gms-doc-toc-empty i {
    color: var(--gms-primary-dark);
    font-size: 1.1rem;
}

.gms-doc-source-note {
    align-items: flex-start;
    background: var(--gms-surface-muted);
    border-top: 1px solid var(--gms-border);
    display: flex;
    gap: .6rem;
    padding: .85rem;
}

.gms-doc-source-note > i {
    color: var(--gms-primary-dark);
    margin-top: .1rem;
}

.gms-doc-source-note > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gms-doc-source-note strong {
    color: var(--gms-text);
    font-size: .65rem;
}

.gms-doc-source-note span {
    color: var(--gms-text-muted);
    font-size: .58rem;
    overflow-wrap: anywhere;
}

.gms-doc-source-note code {
    color: var(--gms-primary-dark);
}

.gms-doc-mobile-backdrop {
    background: rgba(5, 16, 21, .6);
    inset: 0;
    position: fixed;
    z-index: 1070;
}

.gms-doc-mobile-backdrop[hidden] {
    display: none;
}

html[data-gms-theme="dark"] .gms-doc-hero {
    background: #10252b;
    border-color: #1a555c;
}

html[data-gms-theme="dark"] .gms-doc-search-results,
html[data-gms-theme="dark"] .gms-doc-navigation,
html[data-gms-theme="dark"] .gms-doc-toc,
html[data-gms-theme="dark"] .gms-doc-article {
    background: var(--gms-surface);
    border-color: var(--gms-border);
}

html[data-gms-theme="dark"] .gms-doc-table-wrap tbody tr:nth-child(odd) td {
    background: #17262c;
}

html[data-gms-theme="dark"] .gms-doc-table-wrap tbody tr:nth-child(even) td {
    background: #1a2a30;
}

html[data-gms-theme="dark"] .gms-doc-prose a,
html[data-gms-theme="dark"] .gms-doc-prose li::marker,
html[data-gms-theme="dark"] .gms-doc-category,
html[data-gms-theme="dark"] .gms-doc-article-meta i,
html[data-gms-theme="dark"] .gms-doc-breadcrumbs a,
html[data-gms-theme="dark"] .gms-doc-nav-group > div a.is-active,
html[data-gms-theme="dark"] .gms-doc-toc nav a.is-active,
html[data-gms-theme="dark"] .gms-doc-source-note code {
    color: #43d7da;
}

html[data-gms-theme="dark"] .gms-doc-category,
html[data-gms-theme="dark"] .gms-doc-nav-group > div a.is-active,
html[data-gms-theme="dark"] .gms-doc-toc nav a.is-active,
html[data-gms-theme="dark"] .gms-doc-search-results > a:hover,
html[data-gms-theme="dark"] .gms-doc-search-results > a.is-keyboard-active {
    background: #12343a;
    border-color: #1b5c63;
}

@media (max-width: 1499.98px) {
    .gms-doc-layout {
        grid-template-columns: 15.5rem minmax(0, 1fr);
    }

    .gms-doc-toc {
        bottom: 1rem;
        display: none;
        position: fixed;
        right: 1rem;
        top: auto;
        width: min(21rem, calc(100vw - 2rem));
        z-index: 1075;
    }

    .gms-doc-toc.is-mobile-open {
        display: block;
    }

    .gms-doc-toc .gms-doc-panel-heading button,
    .gms-doc-mobile-actions,
    .gms-doc-mobile-actions [data-gms-doc-toc-toggle] {
        display: flex;
    }

    .gms-doc-mobile-actions [data-gms-doc-nav-toggle] {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .gms-doc-hero {
        grid-template-columns: 1fr;
    }

    .gms-doc-hero-stats {
        min-width: 0;
    }

    .gms-doc-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .gms-doc-navigation {
        bottom: 0;
        border-radius: 0 var(--gms-radius-md) var(--gms-radius-md) 0;
        display: block;
        left: 0;
        max-height: 100vh;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
        width: min(20rem, calc(100vw - 3rem));
        z-index: 1075;
    }

    .gms-doc-navigation.is-mobile-open {
        transform: translateX(0);
    }

    .gms-doc-navigation .gms-doc-panel-heading button,
    .gms-doc-mobile-actions [data-gms-doc-nav-toggle] {
        display: flex;
    }

    body.gms-doc-panel-open {
        overflow: hidden;
    }
}

@media (max-width: 767.98px) {
    .gms-doc-reading-progress {
        left: 0;
    }

    .gms-doc-hero {
        padding: 1.2rem;
    }

    .gms-doc-search kbd {
        display: none;
    }

    .gms-doc-hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gms-doc-hero-stats > div {
        padding: .65rem .3rem;
    }

    .gms-doc-mobile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gms-doc-mobile-actions .btn {
        justify-content: center;
    }

    .gms-doc-article-header,
    .gms-doc-prose,
    .gms-doc-neighbours {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .gms-doc-prose .gms-doc-heading > a {
        display: none;
    }

    .gms-doc-article-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: .35rem;
    }

    .gms-doc-neighbours {
        grid-template-columns: 1fr;
    }

    .gms-doc-neighbours > span {
        display: none;
    }

    .gms-doc-neighbours a:last-child {
        align-items: flex-start;
        text-align: left;
    }

    .gms-doc-search-results {
        left: -.35rem;
        right: -.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gms-doc-reading-progress > span,
    .gms-doc-navigation,
    .gms-doc-neighbours a,
    .gms-doc-nav-group summary > i {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Battle.net runtime OAuth status
   -------------------------------------------------------------------------- */

.gms-oauth-runtime-status {
    align-items: center;
    background: var(--gms-surface-muted);
    border-bottom: 1px solid var(--gms-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 1rem 1.25rem;
}

.gms-oauth-runtime-status.is-ready {
    background: color-mix(in srgb, var(--gms-primary) 8%, var(--gms-surface));
}

.gms-oauth-runtime-status.is-warning {
    background: color-mix(in srgb, #d89b2b 10%, var(--gms-surface));
}

.gms-oauth-runtime-icon {
    align-items: center;
    background: var(--gms-primary-soft);
    border: 1px solid color-mix(in srgb, var(--gms-primary) 35%, var(--gms-border));
    border-radius: 50%;
    color: var(--gms-primary-dark);
    display: inline-flex;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.gms-oauth-runtime-copy > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.gms-oauth-runtime-copy strong {
    color: var(--gms-text);
}

.gms-oauth-runtime-copy p {
    color: var(--gms-text-muted);
    font-size: .75rem;
    margin: .2rem 0 0;
}

.gms-oauth-runtime-badge {
    background: var(--gms-primary-soft);
    border: 1px solid color-mix(in srgb, var(--gms-primary) 35%, var(--gms-border));
    border-radius: 999px;
    color: var(--gms-primary-dark);
    font-size: .68rem;
    font-weight: 800;
    padding: .2rem .5rem;
}

.gms-oauth-runtime-meta {
    display: grid;
    gap: .35rem 1rem;
    grid-template-columns: repeat(3, minmax(5.5rem, auto));
    margin: 0;
}

.gms-oauth-runtime-meta div {
    display: flex;
    flex-direction: column;
}

.gms-oauth-runtime-meta dt {
    color: var(--gms-text-muted);
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
}

.gms-oauth-runtime-meta dd {
    color: var(--gms-text);
    font-size: .74rem;
    font-weight: 700;
    margin: 0;
}

@media (max-width: 991.98px) {
    .gms-oauth-runtime-status {
        align-items: flex-start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .gms-oauth-runtime-meta {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .gms-oauth-runtime-meta {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Self-service Discord account linking

   The connection card is intentionally a compact account state rather than a
   full-width call-to-action strip. Discord keeps its true brand glyph while
   the surrounding surfaces remain inside the standard GMS teal system.
   -------------------------------------------------------------------------- */

.gms-account-discord-card {
    display: flex;
    flex-direction: column;
}

.gms-account-discord-card .card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1rem;
}

.gms-account-discord-state {
    align-items: center;
    background: var(--gms-row-alt);
    border: 1px solid var(--gms-border);
    border-radius: .7rem;
    display: grid;
    flex: 1 1 auto;
    gap: 1rem;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    min-height: 8.8rem;
    padding: 1.15rem;
}

.gms-account-discord-state-icon {
    align-items: center;
    align-self: center;
    background: rgba(88, 101, 242, .12);
    border: 1px solid rgba(88, 101, 242, .28);
    border-radius: .85rem;
    color: #5865f2;
    display: inline-flex;
    font-size: 1.45rem;
    height: 3.5rem;
    justify-content: center;
    width: 3.5rem;
}

.gms-account-discord-state > div {
    display: grid;
    gap: .28rem;
    min-width: 0;
}

.gms-account-discord-state .gms-kicker {
    font-size: .66rem;
    letter-spacing: .065em;
}

.gms-account-discord-state strong {
    color: var(--gms-text);
    font-size: .98rem;
}

.gms-account-discord-state p {
    color: var(--gms-text-muted);
    font-size: .78rem;
    line-height: 1.55;
    margin: 0;
}

.gms-account-discord-state code {
    color: var(--gms-text-muted);
    overflow-wrap: anywhere;
}

.gms-account-discord-footer {
    align-items: center;
    border-top: 1px solid var(--gms-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: .9rem;
    padding-top: .9rem;
}

.gms-account-discord-footer > span {
    align-items: flex-start;
    color: var(--gms-text-muted);
    display: inline-flex;
    font-size: .74rem;
    gap: .5rem;
    line-height: 1.45;
    max-width: 70%;
}

.gms-account-discord-footer > span i {
    color: var(--gms-primary);
    margin-top: .12rem;
}

.gms-account-discord-footer form {
    flex: 0 0 auto;
    margin: 0;
}

.gms-account-discord-footer .btn {
    align-items: center;
    display: inline-flex;
    gap: .5rem;
    justify-content: center;
    min-width: 8.5rem;
    white-space: nowrap;
}

.gms-account-integration-unavailable {
    align-items: flex-start;
    background: var(--gms-surface-tint);
    border: 1px solid var(--gms-border);
    border-radius: .65rem;
    color: var(--gms-text-muted);
    display: flex;
    font-size: .78rem;
    gap: .65rem;
    margin-top: .9rem;
    padding: .8rem .9rem;
}

.gms-account-integration-unavailable i {
    color: var(--gms-warning, #d89a22);
    margin-top: .1rem;
}

html[data-gms-theme="dark"] .gms-account-discord-state-icon {
    background: rgba(88, 101, 242, .18);
    border-color: rgba(130, 142, 255, .38);
    color: #aab2ff;
}

@media (max-width: 575.98px) {
    .gms-account-discord-state {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .gms-account-discord-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .gms-account-discord-footer > span {
        max-width: none;
    }

    .gms-account-discord-footer .btn {
        width: 100%;
    }
}

/* 17 Jul 2026: self-service Discord disconnection action group. */
.gms-account-discord-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.gms-account-discord-actions form {
    margin: 0;
}

.gms-account-discord-actions .btn {
    min-width: auto;
}

.gms-account-security-note.is-danger {
    background: color-mix(in srgb, var(--gms-danger, #dc3545) 8%, var(--gms-surface, #fff));
    border-color: color-mix(in srgb, var(--gms-danger, #dc3545) 32%, var(--gms-border));
}

.gms-account-security-note.is-danger > i {
    color: var(--gms-danger, #dc3545);
}

@media (max-width: 575.98px) {
    .gms-account-discord-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .gms-account-discord-actions form,
    .gms-account-discord-actions .btn {
        width: 100%;
    }
}

/* Settings hands runtime OAuth operations to the standalone Integrations domain. */
.gms-oauth-runtime-status.is-workspace-link { color: inherit; text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.gms-oauth-runtime-status.is-workspace-link:hover { background: color-mix(in srgb, var(--gms-primary) 9%, var(--gms-surface)); border-bottom-color: color-mix(in srgb, var(--gms-primary) 45%, var(--gms-border)); }
.gms-oauth-runtime-status.is-workspace-link:focus-visible { box-shadow: inset var(--gms-focus); outline: 0; }

/* GMS_SIDEBAR_HOVER_LABELS_START
|--------------------------------------------------------------------------
| Sidebar hover treatment and collapsed navigation drawer
|--------------------------------------------------------------------------
|
| Expanded navigation uses direct row feedback rather than tooltip bubbles.
| The collapsed desktop rail can still use the compact navigation drawer for
| hidden labels/children. Neither treatment changes the shell layout width.
|
*/

/* Expanded / Dasho-hover-expanded sidebar rows. Keep the feedback on the
   navigation item itself so hovering never produces a detached tooltip. */
@media (min-width: 992px) and (hover: hover) {
    #gms-sidebar .pcoded-inner-navbar > li > a,
    #gms-sidebar .pcoded-submenu > li > a.gms-nav-child-link {
        position: relative;
        transition:
            background-color 140ms ease,
            box-shadow 140ms ease,
            color 140ms ease;
    }

    #gms-sidebar .pcoded-inner-navbar > li > a .pcoded-micon,
    #gms-sidebar .pcoded-submenu > li > a.gms-nav-child-link .gms-nav-child-icon {
        transition:
            color 140ms ease,
            transform 160ms cubic-bezier(.2, .8, .2, 1);
    }

    #gms-sidebar .pcoded-inner-navbar > li:not(.active) > a:hover,
    #gms-sidebar .pcoded-inner-navbar > li:not(.active) > a:focus-visible {
        background: rgba(255, 255, 255, .055);
        box-shadow: inset 3px 0 0 var(--gms-primary, #19bcbf);
        color: #ffffff;
        outline: none;
    }

    #gms-sidebar .pcoded-inner-navbar > li:not(.active) > a:hover .pcoded-micon,
    #gms-sidebar .pcoded-inner-navbar > li:not(.active) > a:focus-visible .pcoded-micon {
        color: var(--gms-primary, #19bcbf);
        transform: translateX(1px);
    }

    #gms-sidebar .pcoded-submenu > li:not(.active) > a.gms-nav-child-link:hover,
    #gms-sidebar .pcoded-submenu > li:not(.active) > a.gms-nav-child-link:focus-visible {
        background: rgba(25, 188, 191, .095);
        box-shadow: inset 3px 0 0 var(--gms-primary, #19bcbf);
        color: #ffffff;
        outline: none;
    }

    #gms-sidebar .pcoded-submenu > li:not(.active) > a.gms-nav-child-link:hover .gms-nav-child-icon,
    #gms-sidebar .pcoded-submenu > li:not(.active) > a.gms-nav-child-link:focus-visible .gms-nav-child-icon {
        color: var(--gms-primary, #19bcbf);
        transform: translateX(1px);
    }

    #gms-sidebar .pcoded-inner-navbar > li.active > a:hover,
    #gms-sidebar .pcoded-inner-navbar > li.pcoded-trigger > a:hover,
    #gms-sidebar .pcoded-submenu > li.active > a.gms-nav-child-link:hover {
        filter: brightness(1.06);
    }
}

.gms-sidebar-hover-label {
    background: var(--gms-surface, #ffffff);
    border: 1px solid color-mix(in srgb, var(--gms-border, #dce4e8) 88%, var(--gms-primary, #19bcbf));
    border-left: 3px solid var(--gms-primary, #19bcbf);
    border-radius: .42rem .7rem .7rem .42rem;
    box-shadow:
        0 .85rem 2rem rgba(21, 39, 47, .15),
        0 .15rem .5rem rgba(21, 39, 47, .08);
    color: var(--gms-text, #263238);
    left: 0;
    max-height: calc(100vh - 1.25rem);
    opacity: 0;
    overflow: hidden;
    padding: .34rem;
    pointer-events: none;
    position: fixed;
    top: 0;
    transform: translate3d(-.55rem, 0, 0);
    transform-origin: left center;
    transition:
        opacity 120ms ease,
        transform 175ms cubic-bezier(.2, .8, .2, 1);
    visibility: hidden;
    width: 15.5rem;
    z-index: 1095;
}

.gms-sidebar-hover-label.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

.gms-sidebar-hover-label.is-leaf {
    min-width: 10rem;
    padding: .2rem .28rem;
    width: max-content;
}

.gms-sidebar-hover-label__parent {
    align-items: center;
    background: color-mix(in srgb, var(--gms-primary, #19bcbf) 7%, var(--gms-surface, #ffffff));
    border-radius: .42rem;
    display: grid;
    gap: .58rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 2.75rem;
    padding: .48rem .58rem;
}

.gms-sidebar-hover-label__parent-icon,
.gms-sidebar-hover-label__leaf-icon {
    align-items: center;
    background: color-mix(in srgb, var(--gms-primary, #19bcbf) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--gms-primary, #19bcbf) 22%, transparent);
    border-radius: .42rem;
    color: var(--gms-primary-dark, #0f8f92);
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.gms-sidebar-hover-label__parent-icon i,
.gms-sidebar-hover-label__leaf-icon i {
    font-size: .78rem;
}

.gms-sidebar-hover-label__parent-copy {
    min-width: 0;
}

.gms-sidebar-hover-label__parent-copy strong {
    color: var(--gms-text, #263238);
    display: block;
    font-size: .76rem;
    font-weight: 750;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gms-sidebar-hover-label__parent-copy small {
    color: var(--gms-text-muted, var(--bs-secondary-color, #66727d));
    display: block;
    font-size: .58rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.2;
    margin-top: .14rem;
}

.gms-sidebar-hover-label__active-dot {
    background: var(--gms-primary, #19bcbf);
    border-radius: 999px;
    height: .38rem;
    opacity: 0;
    width: .38rem;
}

.gms-sidebar-hover-label.is-active-item .gms-sidebar-hover-label__active-dot {
    box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--gms-primary, #19bcbf) 16%, transparent);
    opacity: 1;
}

.gms-sidebar-hover-label__children {
    display: grid;
    gap: .14rem;
    margin-top: .28rem;
    max-height: min(25rem, calc(100vh - 6rem));
    overflow-y: auto;
    padding: .08rem .02rem .02rem;
    scrollbar-color: color-mix(in srgb, var(--gms-primary, #19bcbf) 35%, transparent) transparent;
    scrollbar-width: thin;
}

.gms-sidebar-hover-label__child {
    align-items: center;
    border-radius: .4rem;
    color: var(--gms-text-muted, var(--bs-secondary-color, #66727d));
    display: grid;
    gap: .52rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 2.2rem;
    padding: .42rem .5rem;
    position: relative;
    text-decoration: none;
    transition:
        background-color 120ms ease,
        color 120ms ease,
        padding-left 140ms cubic-bezier(.2, .8, .2, 1);
}

.gms-sidebar-hover-label__child:hover,
.gms-sidebar-hover-label__child:focus-visible {
    background: color-mix(in srgb, var(--gms-primary, #19bcbf) 8%, transparent);
    color: var(--gms-primary-dark, #0f8f92);
    outline: none;
    padding-left: .62rem;
}

.gms-sidebar-hover-label__child:focus-visible {
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gms-primary, #19bcbf) 42%, transparent);
}

.gms-sidebar-hover-label__child.is-active {
    background: color-mix(in srgb, var(--gms-primary, #19bcbf) 11%, transparent);
    box-shadow: inset 3px 0 0 var(--gms-primary, #19bcbf);
    color: var(--gms-primary-dark, #0f8f92);
    font-weight: 750;
}

.gms-sidebar-hover-label__child-icon {
    align-items: center;
    color: currentColor;
    display: inline-flex;
    font-size: .69rem;
    height: 1.35rem;
    justify-content: center;
    opacity: .9;
    width: 1.35rem;
}

.gms-sidebar-hover-label__child-copy {
    display: block;
    font-size: .7rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gms-sidebar-hover-label__child-arrow {
    color: currentColor;
    font-size: .48rem;
    opacity: .28;
    transition: opacity 120ms ease, transform 120ms ease;
}

.gms-sidebar-hover-label__child:hover .gms-sidebar-hover-label__child-arrow,
.gms-sidebar-hover-label__child:focus-visible .gms-sidebar-hover-label__child-arrow,
.gms-sidebar-hover-label__child.is-active .gms-sidebar-hover-label__child-arrow {
    opacity: .8;
    transform: translateX(.08rem);
}

.gms-sidebar-hover-label__leaf {
    align-items: center;
    display: flex;
    gap: .55rem;
    min-height: 2.35rem;
    padding: .25rem .38rem;
}

.gms-sidebar-hover-label__leaf strong {
    color: var(--gms-text, #263238);
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.2;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gms-sidebar-hover-label.is-active-item.is-leaf {
    box-shadow:
        0 .85rem 2rem rgba(21, 39, 47, .15),
        0 .15rem .5rem rgba(21, 39, 47, .08),
        inset 0 0 0 1px color-mix(in srgb, var(--gms-primary, #19bcbf) 13%, transparent);
}

html[data-gms-theme="dark"] .gms-sidebar-hover-label {
    background: var(--gms-surface, #14242b);
    border-color: color-mix(in srgb, var(--gms-border, #29414b) 82%, var(--gms-primary, #19bcbf));
    border-left-color: var(--gms-primary, #19bcbf);
    box-shadow:
        0 .95rem 2.2rem rgba(0, 0, 0, .42),
        0 .18rem .6rem rgba(0, 0, 0, .24);
    color: var(--gms-text, #eaf5f5);
}

html[data-gms-theme="dark"] .gms-sidebar-hover-label__parent {
    background: color-mix(in srgb, var(--gms-primary, #19bcbf) 8%, var(--gms-surface, #14242b));
}

html[data-gms-theme="dark"] .gms-sidebar-hover-label__child:hover,
html[data-gms-theme="dark"] .gms-sidebar-hover-label__child:focus-visible,
html[data-gms-theme="dark"] .gms-sidebar-hover-label__child.is-active {
    color: color-mix(in srgb, var(--gms-primary, #19bcbf) 82%, #ffffff);
}

@media (max-width: 991.98px), (hover: none) {
    .gms-sidebar-hover-label {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gms-sidebar-hover-label,
    .gms-sidebar-hover-label__child,
    .gms-sidebar-hover-label__child-arrow {
        transition: none;
    }
}

/* GMS_SIDEBAR_HOVER_LABELS_END */
