:root {
    --mud-internal-toolbar-height: 64px;
    /* ── MD3 Shape tokens — defined here so they're available in ALL themes ── */
    --md-sys-shape-corner-none: 0px;
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 9999px;
    /* ── MD3 Motion tokens — available in ALL themes ─────────────────────── */
    --md-sys-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
    --md-sys-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
    --md-sys-motion-easing-emphasized-decel: cubic-bezier(0.05, 0.7, 0.1, 1);
    --md-sys-motion-duration-short4: 200ms;
    --md-sys-motion-duration-medium2: 300ms;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MATERIAL DESIGN 3 — Global Transition Standard
   Applied to all interactive MudBlazor elements via CSS cascade.
   ═══════════════════════════════════════════════════════════════════════════ */
.mud-button-root,
.mud-icon-button,
.mud-chip,
.mud-fab,
.mud-nav-link,
.mud-list-item,
.mud-table-row,
.mud-paper,
.mud-card,
.mud-input,
.mud-select,
.mud-checkbox {
    transition: background-color 200ms cubic-bezier(0.2, 0, 0, 1), box-shadow 200ms cubic-bezier(0.2, 0, 0, 1), border-color 200ms cubic-bezier(0.2, 0, 0, 1), color 200ms cubic-bezier(0.2, 0, 0, 1), transform 200ms cubic-bezier(0.2, 0, 0, 1) !important;
}

.fs-1 .mud-svg-icon {
    font-size: 1rem !important;
}

.fs-2 .mud-svg-icon {
    font-size: 2rem !important;
}

.fs-3 .mud-svg-icon {
    font-size: 3rem !important;
}

.fs-4 .mud-svg-icon {
    font-size: 4rem !important;
}

.fs-5 .mud-svg-icon {
    font-size: 5rem !important;
}

.fs-6 .mud-svg-icon {
    font-size: 6rem !important;
}


.mud-tab {
    text-transform: capitalize !important;
}

/* MD3 shape-full for buttons */
.mud-button {
    border-radius: var(--md-sys-shape-corner-full, 9999px);
}

kbd {
    padding: .2rem .4rem;
    font-size: .875em;
    color: #fff;
    background-color: #212529;
    border-radius: .2rem;
}

code, kbd, pre, samp {
    font-family: var(--bs-font-monospace);
    font-size: 1em;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.mud-list-item-icon {
    min-width: 35px;
}

.cursor-pointer .mud-input {
    cursor: pointer;
}

td.mud-table-cell .mud-input-control-boolean-input .mud-input-control-input-container {
    justify-content: center;
    align-items: center;
}

.text-center {
    text-align: center !important;
}

.text-truncate, .mud-input-input-control.text-truncate input.mud-input-root {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

th.text-center.mud-table-cell span.column-header {
    justify-content: center;
}

td.text-center input {
    text-align: center;
}

.mud-table-dense * .mud-table-row .mud-table-cell {
    padding: 6px 16px 6px 16px;
    padding-inline-start: 16px;
    padding-inline-end: 16px;
}

.mud-input-outlined .mud-input-control-boolean-input span.mud-button-root {
    padding: 4px;
}

.mud-flex-auto {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: auto !important;
}

.mud-flex-fill {
    flex: 1 0 0% !important;
    max-width: 100% !important;
}

.softmax-dropdowntree .mud-input-root-margin-dense.mud-select-input-extended {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    min-height: 2rem !important;
}

.softmax-dropdowntree .mud-input-root-margin-dense, .softmax-multiselect .mud-input-root-margin-dense {
    min-height: 2.286em !important;
    padding-top: 3.43px !important;
    padding-bottom: 0 !important;
    align-items: center;
    display: flex !important
}

.softmax-multiselect .mud-input-root-margin-dense {
    padding-top: 3.43px !important;
    padding-bottom: 0 !important;
}

.softmax-dropdowntree .mud-input-root:not(.mud-input-root-margin-dense) {
    padding-top: 17.9px !important;
    padding-bottom: 17.9px !important;
}

.softmax-dropdowntree .mud-input-label-outlined, .softmax-multiselect .mud-input-label-outlined {
    background-color: var(--mud-palette-surface);
}

.cell-auto-width {
    width: 0%;
    white-space: nowrap;
}

.softmax-dropdown .mud-input-root-outlined.mud-select-input-extended:not(.mud-input-root-margin-dense) {
    min-height: 1.4876em !important;
    padding: 17.6px 14px !important;
}

.softmax-dropdown .mud-input-root-outlined.mud-select-input-extended.mud-input-root-margin-dense {
    min-height: 1.4301em !important;
    padding: 9.99px 14px !important;
}

.notification-badge .mud-badge.mud-badge-top.right.mud-badge-overlap {
    inset: auto auto calc(100% - 23px) calc(100% - 24px) !important;
}




/* MD3 shape-extra-small (4px) for dropdown menus */
.dropdown-menu {
    width: 20rem;
    overflow: hidden;
    position: absolute;
    top: 100%;
    right: 15px;
    box-shadow: var(--mud-elevation-2);
    z-index: 99999;
    color: var(--mud-palette-text-primary);
    background-color: var(--md3-surface-1);
    border-radius: var(--md-sys-shape-corner-large, 4px);
    display: none;
    transition: opacity 200ms cubic-bezier(0.2, 0, 0, 1), transform 200ms cubic-bezier(0.2, 0, 0, 1);
}

    .dropdown-menu.show {
        display: flex;
    }

html[dir=rtl] .dropdown-menu {
    right: auto;
    left: 15px;
}

html[dir=ltr] .dropdown-menu {
    left: auto;
    right: 15px;
}

@media (max-width: 550px) {
    .dropdown-menu {
        width: 93%;
    }
}



.pure-material-progress-linear {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    height: 4px;
    color: #3F51B5;
    font-size: 16px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 99999999;
}

    .pure-material-progress-linear::-webkit-progress-bar {
        background-color: transparent;
    }

    .pure-material-progress-linear::-webkit-progress-value {
        background-color: currentColor;
        transition: all 0.2s;
    }

    .pure-material-progress-linear::-moz-progress-bar {
        background-color: currentColor;
        transition: all 0.2s;
    }

    .pure-material-progress-linear::-ms-fill {
        border: none;
        background-color: currentColor;
        transition: all 0.2s;
    }

    .pure-material-progress-linear:indeterminate {
        background-size: 200% 100%;
        background-image: linear-gradient(to right, transparent 50%, currentColor 50%, currentColor 60%, transparent 60%, transparent 71.5%, currentColor 71.5%, currentColor 84%, transparent 84%);
        animation: pure-material-progress-linear 2s infinite linear;
    }

        .pure-material-progress-linear:indeterminate::-moz-progress-bar {
            background-color: transparent;
        }

        .pure-material-progress-linear:indeterminate::-ms-fill {
            animation-name: none;
        }

@keyframes pure-material-progress-linear {
    0% {
        background-size: 200% 100%;
        background-position: left -31.25% top 0%;
    }

    50% {
        background-size: 800% 100%;
        background-position: left -49% top 0%;
    }

    100% {
        background-size: 400% 100%;
        background-position: left -102% top 0%;
    }
}

.mud-input-outlined .mud-input-root-margin-dense .mud-input-control-boolean-input span.mud-button-root {
    padding: 3.55px;
}

.mud-select-extended .mud-input-root-margin-dense.mud-select-input-extended.mud-input-slot {
    /*padding-top: 12.88px !important;*/
}

.mud-table-root .mud-table-head .mud-table-cell {
    font-weight: 700;
}
/*.mud-input-control > .mud-input-control-input-container > .mud-input-label-inputcontrol {
    font-size: 1.1rem;
}*/

.mud-table-container {
    overflow: auto !important;
    width: 100% !important;
}

table.mud-table-root {
    min-width: max-content;
}

html[dir=rtl] .mud-picker-calendar-header-day .mud-day-label {
    font-size: 8.2px !important;
}

.mud-layout {
    display: grid;
    height: 100vh;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "mud-appbar mud-appbar mud-appbar"
        "mud-drawer mud-main-content mud-main-content";
}

/* MD3 shape-medium (12px) for main content area */
.mud-main-content {
    grid-area: mud-main-content;
    padding: 1rem;
    border-radius: var(--md-sys-shape-corner-medium, 12px);
    overflow: auto;
    background-color: var(--mud-body-theme);
}

.mud-table {
    background-color: var( --mud-table-theme)
}

    .mud-table .mud-toolbar {
        background-color: var(--mud-table-header-theme);
    }

    .mud-table .mud-table-head .mud-table-cell {
        background-color: var(--mud-table-header-theme) !important;
    }

    .mud-table .mud-table-cell {
        border-radius: 0 !important;
    }

    .mud-table .mud-table-empty-row {
        background-color: var(--mud-table-theme) !important;
    }

/* MD3 shape-medium (12px) */
.rounded-lg {
    border-radius: var(--md-sys-shape-corner-medium, 12px) !important;
}

/* MD3 shape-extra-small (4px) for text-field outlined borders */
.mud-input.mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--md-sys-shape-corner-extra-small, 4px) !important;
}


.mud-alert > div {
    align-items: center;
}

.mud-height-auto {
    height: auto !important;
}

.mud-font-monospace {
    font-family: var(--bs-font-monospace) !important;
}

.mud-button-label .mud-button-icon-start.mud-button-icon-size-small {
    margin-inline-end: 4px;
}
/* Drag and drop styles */
.drag-over {
    border-color: var(--mud-palette-primary) !important;
    border-style: solid !important;
    background-color: var(--mud-palette-primary-lighten) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: scale(1.02) !important;
}

    .drag-over .mud-icon {
        color: var(--mud-palette-primary-darken) !important;
    }

    .drag-over .mud-typography {
        color: var(--mud-palette-primary-darken) !important;
        font-weight: 500 !important;
    }

.docs-mobile-dialog-search {
    height: 400px
}

.docs-mobile-dialog-search-popover {
    box-shadow: none !important;
    margin-top: 8px;
    background-color: var(--mud-palette-background-gray)
}

    .docs-mobile-dialog-search-popover .mud-list {
        background-color: var(--mud-palette-background-gray)
    }

        .docs-mobile-dialog-search-popover .mud-list .mud-list-item {
            background-color: var(--mud-palette-surface);
            margin: 6px 0;
            border-radius: var(--md-sys-shape-corner-extra-small, 4px);
        }

            .docs-mobile-dialog-search-popover .mud-list .mud-list-item .mud-typography-body2 {
                font-size: 12px;
                font-weight: 500;
                color: var(--mud-palette-text-secondary)
            }

@media(hover: hover)and (pointer: fine) {
    .docs-mobile-dialog-search-popover .mud-list .mud-list-item:hover {
        color: var(--mud-palette-primary-text);
        background-color: var(--mud-palette-primary)
    }

        .docs-mobile-dialog-search-popover .mud-list .mud-list-item:hover .mud-typography-body2 {
            color: var(--mud-palette-primary-text)
        }
}

.docs-mobile-dialog-search-popover .mud-list .mud-list-item:active {
    color: var(--mud-palette-primary-text);
    background-color: var(--mud-palette-primary)
}

    .docs-mobile-dialog-search-popover .mud-list .mud-list-item:active .mud-typography-body2 {
        color: var(--mud-palette-primary-text)
    }


.leaflet-control-attribution {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}


.mud-install-button {
    position: fixed;
    bottom: 25vh;
    z-index: 1000;
    max-width: 38px;
    white-space: nowrap;
    transition: max-width 0.3s ease;
    overflow: hidden;
}

    .mud-install-button:hover {
        max-width: 500px;
    }

html[dir=rtl] .mud-install-button {
    right: auto;
    left: 0;
}

html[dir=ltr] .mud-install-button {
    left: auto;
    right: 0;
}

.mud-nav-group > .mud-nav-link > .mud-nav-link-text {
    font-weight: normal;
}

.mud-nav-link {
    align-items: center;
}

.mud-icon-size-medium.mud-input-adornment-icon {
    font-size: 20px;
}

[class^="icon-"].mud-icon-size-small, [class*=" icon-"].mud-icon-size-small {
    font-size: 15px;
}

[class^="icon-"].mud-icon-size-medium, [class*=" icon-"].mud-icon-size-medium {
    font-size: 18px;
}

[class^="icon-"].mud-icon-size-large, [class*=" icon-"].mud-icon-size-large {
    font-size: 20px;
}

.mud-table-row-clickable {
    cursor: pointer;
}

.hide-toolbar .mud-toolbar {
    --mud-internal-toolbar-height: 0px !important;
}


mark {
    background-color: mark !important;
    color: marktext !important;
}


.mud-button-filled-primary.mud-button-soft-color {
    background-color: var(--mud-button-primary-soft-color);
    color: var(--mud-palette-primary);
    --mud-ripple-color: var(--mud-palette-primary);
}

    .mud-button-filled-primary.mud-button-soft-color:hover {
        background-color: var(--mud-button-primary-soft-color-hover);
    }

.mud-button-filled-secondary.mud-button-soft-color {
    background-color: var(--mud-button-secondary-soft-color);
    color: var(--mud-palette-secondary);
    --mud-ripple-color: var(--mud-palette-secondary);
}

    .mud-button-filled-secondary.mud-button-soft-color:hover {
        background-color: var(--mud-button-secondary-soft-color-hover);
    }

.mud-button-filled-info.mud-button-soft-color {
    background-color: var(--mud-button-info-soft-color);
    color: var(--mud-palette-info);
    --mud-ripple-color: var(--mud-palette-info);
}

    .mud-button-filled-info.mud-button-soft-color:hover {
        background-color: var(--mud-button-info-soft-color-hover);
    }

.mud-button-filled-warning.mud-button-soft-color {
    background-color: var(--mud-button-warning-soft-color);
    color: var(--mud-palette-warning);
    --mud-ripple-color: var(--mud-palette-warning);
}

    .mud-button-filled-warning.mud-button-soft-color:hover {
        background-color: var(--mud-button-warning-soft-color-hover);
    }

.mud-button-filled-error.mud-button-soft-color {
    background-color: var(--mud-button-error-soft-color);
    color: var(--mud-palette-error);
    --mud-ripple-color: var(--mud-palette-error);
}

    .mud-button-filled-error.mud-button-soft-color:hover {
        background-color: var(--mud-button-error-soft-color-hover);
    }

.mud-button-filled-success.mud-button-soft-color {
    background-color: var(--mud-button-success-soft-color);
    color: var(--mud-palette-success);
    --mud-ripple-color: var(--mud-palette-success);
}

    .mud-button-filled-success.mud-button-soft-color:hover {
        background-color: var(--mud-button-success-soft-color-hover);
    }



.mud-chip-filled.mud-chip-color-primary.mud-chip-soft-color {
    background-color: var(--mud-button-primary-soft-color);
    color: var(--mud-palette-primary);
}

.mud-chip-filled.mud-chip-color-secondary.mud-chip-soft-color {
    background-color: var(--mud-button-secondary-soft-color);
    color: var(--mud-palette-secondary);
}

.mud-chip-filled.mud-chip-color-info.mud-chip-soft-color {
    background-color: var(--mud-button-info-soft-color);
    color: var(--mud-palette-info);
}

.mud-chip-filled.mud-chip-color-warning.mud-chip-soft-color {
    background-color: var(--mud-button-warning-soft-color);
    color: var(--mud-palette-warning);
}

.mud-chip-filled.mud-chip-color-error.mud-chip-soft-color {
    background-color: var(--mud-button-error-soft-color);
    color: var(--mud-palette-error);
}

.mud-chip-filled.mud-chip-color-success.mud-chip-soft-color {
    background-color: var(--mud-button-success-soft-color);
    color: var(--mud-palette-success);
}

.mud-table-sticky-header * .mud-table-root .mud-table-head.mud-table-dense .mud-table-loading {
    top: 37px !important;
}

.mud-table-toolbar {
    height: auto !important;
    min-height: var(--mud-internal-toolbar-height)
}

html[dir=ltr] input.input-with-adornment {
    padding-right: 0 !important;
}

html[dir=rtl] input.input-with-adornment {
    padding-left: 0 !important;
}

/* =========================================================
   DASHBOARD — MD3 Expressive REVAMP
   ========================================================= */

/* ── Keyframes ─────────────────────────────────────────── */
@keyframes dashReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes dashPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }

    70% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes dashSecBlink {
    0%, 100% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.2;
    }
}

@keyframes dashShimmer {
    0% {
        opacity: .25;
    }

    50% {
        opacity: .55;
    }

    100% {
        opacity: .25;
    }
}

@keyframes dashChipIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashTileIn {
    from {
        opacity: 0;
        transform: scale(.95) translateY(12px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes dashFeedIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes dashTagPop {
    0% {
        opacity: 0;
        transform: scale(.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes dashAvatarRing {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

/* ── Page wrapper ──────────────────────────────────────── */
.dash-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    min-height: calc(100vh - 64px);
    box-sizing: border-box;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    animation: dashFadeIn .3s ease both;
}

/* ── Hero ──────────────────────────────────────────────── */
.dash-hero {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%), linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 30%, #061124) 0%, color-mix(in srgb, var(--md-sys-color-primary) 40%, #071933) 50%, color-mix(in srgb, var(--md-sys-color-primary) 20%, #030e14) 100%);
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(0, 0, 0, 0.12);
    animation: dashReveal 0.5s cubic-bezier(0.2, 0, 0, 1) both;
    isolation: isolate;
}

.dash-hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
    opacity: 0.15;
}

.dash-hero-orb--1 {
    width: 450px;
    height: 450px;
    right: -80px;
    top: -120px;
    background: var(--md-sys-color-primary);
}

.dash-hero-orb--2 {
    width: 280px;
    height: 280px;
    right: 120px;
    top: -40px;
    background: var(--md-sys-color-secondary);
}

.dash-hero-orb--3 {
    width: 380px;
    height: 380px;
    left: -80px;
    bottom: -120px;
    background: var(--md-sys-color-primary);
}

.dash-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Left side */
.dash-hero-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.dash-hero-ident {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.dash-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
    user-select: none;
    position: relative;
}

.dash-hero-avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: dashAvatarRing 3s ease-in-out infinite;
}

.dash-hero-avatar-letter {
    position: relative;
    z-index: 2;
}

.dash-hero-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dash-hero-greeting {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
    display: block;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dash-hero-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.3;
    display: block;
}

/* Glassmorphism Chips */
.dash-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: dashChipIn 0.3s cubic-bezier(0.2, 0, 0, 1) both;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    cursor: default;
}

    .dash-chip:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }

.dash-hero-chips > :nth-child(1) {
    animation-delay: .05s;
}

.dash-hero-chips > :nth-child(2) {
    animation-delay: .10s;
}

.dash-hero-chips > :nth-child(3) {
    animation-delay: .15s;
}

.dash-hero-chips > :nth-child(4) {
    animation-delay: .20s;
}

.dash-hero-chips > :nth-child(5) {
    animation-delay: .25s;
}

.dash-hero-chips > :nth-child(6) {
    animation-delay: .30s;
}

.dash-chip--alert {
    background: rgba(255, 183, 77, 0.15);
    border-color: rgba(255, 183, 77, 0.25);
    color: #ffe082;
}

    .dash-chip--alert:hover {
        background: rgba(255, 183, 77, 0.22);
    }

.dash-chip--success {
    background: rgba(102, 187, 106, 0.15);
    border-color: rgba(102, 187, 106, 0.25);
    color: #c8e6c9;
}

    .dash-chip--success:hover {
        background: rgba(102, 187, 106, 0.22);
    }

.dash-chip--muted {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}

.dash-chip--login {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.dash-chip--roles {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.dash-chip--orgs {
    background: rgba(144, 202, 249, 0.15);
    border-color: rgba(144, 202, 249, 0.25);
    color: #e3f2fd;
}

    .dash-chip--orgs:hover {
        background: rgba(144, 202, 249, 0.22);
    }

/* Tooltip lists */
.dash-tt-list {
    display: flex;
    flex-direction: column;
    gap: .28rem;
    padding: .1rem .05rem;
    min-width: 110px;
    max-width: 210px;
}

.dash-tt-item {
    display: flex;
    align-items: center;
    gap: .42rem;
    font-size: .74rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-tt-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-tt-dot--role {
    background: var(--mud-palette-primary);
}

.dash-tt-dot--org {
    background: var(--mud-palette-info);
}

/* Right side: clock */
.dash-hero-right {
    flex-shrink: 0;
}

.dash-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .18rem;
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 112px;
    backdrop-filter: blur(4px);
}

.dash-clock-time {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.dash-clock-sec {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: .55;
    animation: dashSecBlink 1s ease-in-out infinite;
    display: inline-block;
}

.dash-clock-ampm {
    font-size: .55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: .14em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    padding: .05rem .5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

/* ── Quick Insights ────────────────────────────────────── */
.dash-insights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    width: 100%;
    animation: dashReveal 0.5s cubic-bezier(0.2, 0, 0, 1) both;
    animation-delay: 0.06s;
}

.dash-insight-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    background: var(--md-sys-color-surface-container-low, var(--mud-palette-background-grey));
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
    overflow: hidden;
    cursor: default;
}

    .dash-insight-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    }

.dash-insight-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-insight-icon--primary {
    background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
    color: var(--md-sys-color-primary);
}

.dash-insight-icon--warning {
    background: color-mix(in srgb, var(--mud-palette-warning) 12%, transparent);
    color: var(--mud-palette-warning);
}

.dash-insight-icon--success {
    background: color-mix(in srgb, var(--mud-palette-success) 12%, transparent);
    color: var(--mud-palette-success);
}

.dash-insight-icon--muted {
    background: color-mix(in srgb, var(--md-sys-color-outline-variant) 30%, transparent);
    color: var(--md-sys-color-on-surface-variant);
}

.dash-insight-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.dash-insight-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--md-sys-color-on-surface);
    line-height: 1.1;
}

.dash-insight-value--sm {
    font-size: 1.15rem;
    font-weight: 750;
}

.dash-insight-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-insight-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    background: var(--mud-palette-error);
    color: #ffffff;
    animation: dashTagPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Layout ────────────────────────────────────────────── */
.dash-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Panel card ────────────────────────────────────────── */
.dash-panel {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    background: var(--md-sys-color-surface-container-low, var(--mud-palette-surface));
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.25s cubic-bezier(0.2, 0, 0, 1), transform 0.25s cubic-bezier(0.2, 0, 0, 1);
    animation: dashReveal 0.5s cubic-bezier(0.2, 0, 0, 1) both;
    position: relative;
}

.dash-panel--modules {
    animation-delay: .08s;
}

.dash-panel--notifications {
    animation-delay: .12s;
}

/* top accent strip */
.dash-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 24px 24px 0 0;
    z-index: 1;
}

.dash-panel--modules::before {
    background: linear-gradient(90deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
}

.dash-panel--notifications::before {
    background: linear-gradient(90deg, var(--mud-palette-warning), var(--mud-palette-error));
}

.dash-panel:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* ── Panel header ──────────────────────────────────────── */
.dash-panel-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.dash-panel-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}

.dash-panel:hover .dash-panel-icon-badge {
    transform: scale(1.1) rotate(-3deg);
}

.dash-panel-icon-badge--modules {
    background: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent);
    color: var(--md-sys-color-primary);
}

.dash-panel-icon-badge--notifications {
    background: color-mix(in srgb, var(--mud-palette-warning) 14%, transparent);
    color: var(--mud-palette-warning);
}

.dash-panel-header-text {
    display: flex;
    flex-direction: column;
    gap: .02rem;
    flex: 1;
    min-width: 0;
}

.dash-panel-title {
    font-weight: 700;
    font-size: 0.95rem !important;
    letter-spacing: .01em;
    color: var(--md-sys-color-on-surface);
    margin: 0;
    line-height: 1.3;
}

.dash-panel-subtitle {
    font-size: .75rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.2;
}

.dash-panel-action {
    margin-inline-start: auto;
}

/* ── Module grid ───────────────────────────────────────── */
.dash-modules-grid-wrap {
    padding: 1.25rem;
}

.dash-modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.dash-mod-menu,
.dash-mod-menu > .mud-menu,
.dash-mod-menu > .mud-menu > .mud-menu-activator {
    display: block;
    width: 100%;
}

/* stagger delays */
.dash-modules-grid > :nth-child(1) {
    --td: .05s;
}

.dash-modules-grid > :nth-child(2) {
    --td: .08s;
}

.dash-modules-grid > :nth-child(3) {
    --td: .11s;
}

.dash-modules-grid > :nth-child(4) {
    --td: .14s;
}

.dash-modules-grid > :nth-child(5) {
    --td: .17s;
}

.dash-modules-grid > :nth-child(6) {
    --td: .20s;
}

.dash-modules-grid > :nth-child(7) {
    --td: .23s;
}

.dash-modules-grid > :nth-child(8) {
    --td: .26s;
}

.dash-modules-grid > :nth-child(9) {
    --td: .29s;
}

.dash-modules-grid > :nth-child(10) {
    --td: .32s;
}

.dash-modules-grid > :nth-child(11) {
    --td: .35s;
}

.dash-modules-grid > :nth-child(12) {
    --td: .38s;
}

/* MD3 tonal module card */
.dash-mod-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem;
    border-radius: 18px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-high, var(--mud-palette-surface-grey));
    cursor: pointer;
    user-select: none;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    transition: background-color 0.25s cubic-bezier(0.2, 0, 0, 1), border-color 0.25s cubic-bezier(0.2, 0, 0, 1), transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s cubic-bezier(0.2, 0, 0, 1);
    animation: dashTileIn 0.4s cubic-bezier(0.2, 0, 0, 1) both;
    animation-delay: var(--td, 0.05s);
}

    .dash-mod-card:hover, .dash-mod-card:focus {
        background: color-mix(in srgb, var(--md-sys-color-primary) 6%, var(--md-sys-color-surface-container-high));
        border-color: color-mix(in srgb, var(--md-sys-color-primary) 30%, var(--md-sys-color-outline-variant));
        transform: translateY(-3px) scale(1.015);
        box-shadow: 0 8px 24px color-mix(in srgb, var(--md-sys-color-primary) 8%, rgba(0, 0, 0, 0.08));
    }

    .dash-mod-card:active {
        transform: translateY(-1px) scale(0.99);
        box-shadow: 0 4px 12px color-mix(in srgb, var(--md-sys-color-primary) 4%, rgba(0, 0, 0, 0.06));
    }

/* M3 state layer */
.dash-mod-card-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
}

.dash-mod-card:hover .dash-mod-card-glow,
.dash-mod-card:focus .dash-mod-card-glow {
    opacity: 1;
}

.dash-mod-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--md-sys-color-primary) 10%, var(--md-sys-color-surface-container-highest));
    color: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.25s cubic-bezier(0.2, 0, 0, 1), transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.dash-mod-card:hover .dash-mod-card-icon,
.dash-mod-card:focus .dash-mod-card-icon {
    background: color-mix(in srgb, var(--md-sys-color-primary) 16%, var(--md-sys-color-surface-container-highest));
    transform: scale(1.08);
}

.dash-mod-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    width: 100%;
    min-width: 0;
}

.dash-mod-card-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.dash-mod-card-type {
    font-size: .72rem;
    font-weight: 550;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.2;
}

.dash-mod-card-arrow {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 0.95rem !important;
    color: var(--md-sys-color-on-surface-variant);
    opacity: 0.4;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), color 0.25s cubic-bezier(0.2, 0, 0, 1), opacity 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.dash-mod-card:hover .dash-mod-card-arrow,
.dash-mod-card:focus .dash-mod-card-arrow {
    color: var(--md-sys-color-primary);
    opacity: 1;
    transform: translateX(4px);
}

html[dir="rtl"] .dash-mod-card:hover .dash-mod-card-arrow,
html[dir="rtl"] .dash-mod-card:focus .dash-mod-card-arrow {
    transform: translateX(-4px);
}

/* module card skeleton */
.dash-mod-card--skeleton {
    pointer-events: none;
    border-color: transparent;
    background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 50%, transparent);
}

.dash-mod-card-icon-sk {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
    animation: dashShimmer 1.4s infinite;
    flex-shrink: 0;
}

.dash-mod-card-lines-sk {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    align-items: center;
}

.dash-mod-sk-line {
    height: 10px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
    animation: dashShimmer 1.4s infinite;
}

.dash-mod-sk-line--short {
    height: 8px;
}

/* ── Panel body scroll ─────────────────────────────────── */
.dash-panel-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--md-sys-color-outline-variant) transparent;
    max-height: 480px;
}

    .dash-panel-body::-webkit-scrollbar {
        width: 6px;
    }

    .dash-panel-body::-webkit-scrollbar-thumb {
        background: var(--md-sys-color-outline-variant);
        border-radius: 6px;
    }

/* ── Notification timeline ─────────────────────────────── */
.dash-notif-timeline {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    gap: 0.75rem;
}

    .dash-notif-timeline > :nth-child(1) {
        animation: dashFeedIn .28s .04s cubic-bezier(.2,0,0,1) both;
    }

    .dash-notif-timeline > :nth-child(2) {
        animation: dashFeedIn .28s .08s cubic-bezier(.2,0,0,1) both;
    }

    .dash-notif-timeline > :nth-child(3) {
        animation: dashFeedIn .28s .12s cubic-bezier(.2,0,0,1) both;
    }

    .dash-notif-timeline > :nth-child(4) {
        animation: dashFeedIn .28s .16s cubic-bezier(.2,0,0,1) both;
    }

    .dash-notif-timeline > :nth-child(5) {
        animation: dashFeedIn .28s .20s cubic-bezier(.2,0,0,1) both;
    }

    .dash-notif-timeline > :nth-child(6) {
        animation: dashFeedIn .28s .24s cubic-bezier(.2,0,0,1) both;
    }

    .dash-notif-timeline > :nth-child(7) {
        animation: dashFeedIn .28s .28s cubic-bezier(.2,0,0,1) both;
    }

    .dash-notif-timeline > :nth-child(8) {
        animation: dashFeedIn .28s .32s cubic-bezier(.2,0,0,1) both;
    }

.dash-notif {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: var(--md-sys-color-surface-container-highest, var(--mud-palette-surface-grey));
    border: 1px solid var(--md-sys-color-outline-variant);
    cursor: default;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    position: relative;
    box-sizing: border-box;
}

    .dash-notif[role="button"] {
        cursor: pointer;
    }

        .dash-notif[role="button"]:hover,
        .dash-notif[role="button"]:focus {
            background: color-mix(in srgb, var(--md-sys-color-primary) 8%, var(--md-sys-color-surface-container-highest));
            border-color: color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent);
            outline: none;
            transform: translateY(-1px);
        }

.dash-notif--unread {
    background: color-mix(in srgb, var(--mud-palette-warning) 8%, var(--md-sys-color-surface-container-highest));
    border-color: color-mix(in srgb, var(--mud-palette-warning) 30%, transparent);
}

.dash-notif-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 14px;
    padding-top: 5px;
}

.dash-notif-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--md-sys-color-outline);
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s;
    position: relative;
    z-index: 1;
}

.dash-notif-dot--active {
    background: var(--mud-palette-warning);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--mud-palette-warning) 22%, transparent);
    animation: dashPulse 2s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.dash-notif:hover .dash-notif-dot {
    transform: scale(1.25);
}

.dash-notif-line {
    width: 2px;
    flex: 1;
    min-height: 16px;
    background: var(--md-sys-color-outline-variant);
    margin-top: 4px;
}

.dash-notif-timeline > :last-child .dash-notif-line {
    display: none;
}

.dash-notif-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dash-notif-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    line-height: 1.35;
}

.dash-notif-title--bold {
    font-weight: 800;
}

.dash-notif-desc {
    font-size: 0.78rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.4;
}

.dash-notif-meta {
    font-size: 0.7rem;
    color: var(--md-sys-color-on-surface-variant);
    opacity: 0.8;
    margin-top: 0.1rem;
}

.dash-notif-go {
    font-size: 1rem !important;
    color: var(--md-sys-color-on-surface-variant);
    flex-shrink: 0;
    align-self: center;
    transition: transform 0.2s, color 0.2s;
    opacity: 0.5;
}

.dash-notif[role="button"]:hover .dash-notif-go {
    transform: translateX(4px);
    color: var(--mud-palette-warning);
    opacity: 1;
}

/* notification skeleton */
.dash-notif-sk {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0.75rem 1rem;
    background: var(--md-sys-color-surface-container-highest);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 14px;
    margin-bottom: 0.5rem;
}

.dash-notif-sk-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
    animation: dashShimmer 1.4s infinite;
    flex-shrink: 0;
}

.dash-notif-sk-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dash-notif-sk-line {
    height: 10px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
    animation: dashShimmer 1.4s infinite;
}

/* ── Empty state ───────────────────────────────────────── */
.dash-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding: 2.5rem 1rem;
}

.dash-empty-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-empty-text {
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    font-size: .82rem;
    font-weight: 500;
}


.theme-swatches-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--swatch-color, #1f75cb);
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    position: relative;
    outline: none;
    transition: transform 200ms var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)), border-color 150ms var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)), box-shadow 150ms var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
}

    .theme-swatch:hover {
        transform: scale(1.25);
    }

    .theme-swatch:focus-visible {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch-color, #1f75cb) 40%, transparent);
    }

.theme-swatch--active {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px var(--swatch-color, #1f75cb);
    transform: scale(1.15);
}

    .theme-swatch--active::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
    }


/* ── Empty state ───────────────────────────────────────── */
.dash-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 2.4rem 1rem;
}

.dash-empty-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--mud-palette-action-disabled-background);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-empty-text {
    color: var(--mud-palette-text-secondary);
    text-align: center;
    font-size: .80rem;
}

.mud-dialog-container.mud-dialog-topcenter {
    padding-top: 10px !important;
}

.mud-dialog-width-full {
    width: calc(100% - 15px) !important;
}

@media(min-width: 1280px) {
    .mud-drawer-open-responsive-lg-left .mud-main-content {
        margin-left: calc(var(--mud-drawer-width-left) + 5px)
    }

    .mud-drawer-open-responsive-lg-right .mud-main-content {
        margin-right: calc(var(--mud-drawer-width-right) + 5px)
    }

    .mud-drawer-open-responsive-lg-left.mud-drawer-open-responsive-lg-right .mud-main-content {
        margin-right: calc(var(--mud-drawer-width-right) + 5px);
        margin-left: calc(var(--mud-drawer-width-left) + 5px)
    }
}

@media(min-width: 1920px) {
    .mud-drawer-open-responsive-xl-left .mud-main-content {
        margin-left: calc(var(--mud-drawer-width-left) + 5px)
    }

    .mud-drawer-open-responsive-xl-right .mud-main-content {
        margin-right: calc(var(--mud-drawer-width-right) + 5px)
    }

    .mud-drawer-open-responsive-xl-left.mud-drawer-open-responsive-xl-right .mud-main-content {
        margin-right: calc(var(--mud-drawer-width-right) + 5px);
        margin-left: calc(var(--mud-drawer-width-left) + 5px)
    }
}

@media(min-width: 2560px) {
    .mud-drawer-open-responsive-xxl-left .mud-main-content {
        margin-left: calc(var(--mud-drawer-width-left) + 5px)
    }

    .mud-drawer-open-responsive-xxl-right .mud-main-content {
        margin-right: calc(var(--mud-drawer-width-right) + 5px)
    }

    .mud-drawer-open-responsive-xxl-left.mud-drawer-open-responsive-xxl-right .mud-main-content {
        margin-right: calc(var(--mud-drawer-width-right) + 5px);
        margin-left: calc(var(--mud-drawer-width-left) + 5px)
    }
}

.mud-dialog {
    max-height: calc(100dvh - 1.3rem);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MATERIAL DESIGN 3 — Component Shape & Elevation Overrides
   Applied on top of MudBlazor's MD2 base via CSS specificity.
   Shape tokens defined in app.main.theme-default.css.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Dialog — shape-extra-large (28px) ───────────────────────────────────── */
.mud-dialog {
    border-radius: var(--md-sys-shape-corner-extra-large, 28px) !important;
    overflow: hidden;
}

.mud-dialog-title {
    padding-block: 1.5rem 0;
    padding-inline: 1.5rem;
    font-size: var(--md-sys-typescale-title-large-size, 22px);
    font-weight: var(--md-sys-typescale-title-large-weight, 400);
    line-height: var(--md-sys-typescale-title-large-line, 28px);
}

.mud-dialog-content {
    padding-block: 1rem;
    padding-inline: 1.5rem;
}

.mud-dialog-actions {
    padding: 0.75rem 1.5rem 1.5rem;
    gap: 0.5rem;
}

/* ── Card — shape-medium (12px) ──────────────────────────────────────────── */
.mud-card {
    border-radius: var(--md-sys-shape-corner-medium, 12px) !important;
}

/* ── Alert — shape-medium (12px) ─────────────────────────────────────────── */
.mud-alert {
    border-radius: var(--md-sys-shape-corner-medium, 12px) !important;
}

/* ── List items in popovers — subtle shape ───────────────────────────────── */
.mud-list-item {
    border-radius: var(--md-sys-shape-corner-none, 0px);
}

/* ── FAB — shape-large (16px) for regular; shape-medium for small ─────────── */
.mud-fab {
    border-radius: var(--md-sys-shape-corner-large, 16px) !important;
}

    .mud-fab.mud-fab-size-small {
        border-radius: var(--md-sys-shape-corner-medium, 12px) !important;
    }

    .mud-fab.mud-fab-size-large {
        border-radius: var(--md-sys-shape-corner-extra-large, 28px) !important;
    }

/* ── Navigation Drawer — shape-large on trailing end corners ─────────────── */
.mud-drawer-paper {
    border-start-end-radius: var(--md-sys-shape-corner-large, 16px) !important;
    border-end-end-radius: var(--md-sys-shape-corner-large, 16px) !important;
    border-start-start-radius: 0 !important;
    border-end-start-radius: 0 !important;
}

html[dir=rtl] .mud-drawer-paper {
    border-start-start-radius: var(--md-sys-shape-corner-large, 16px) !important;
    border-end-start-radius: var(--md-sys-shape-corner-large, 16px) !important;
    border-start-end-radius: 0 !important;
    border-end-end-radius: 0 !important;
}

/* Right drawer */
.mud-drawer--right .mud-drawer-paper {
    border-start-start-radius: var(--md-sys-shape-corner-large, 16px) !important;
    border-end-start-radius: var(--md-sys-shape-corner-large, 16px) !important;
    border-start-end-radius: 0 !important;
    border-end-end-radius: 0 !important;
}

/* ── Chip — shape-small (8px) ────────────────────────────────────────────── */
.mud-chip {
    border-radius: var(--md-sys-shape-corner-small, 8px) !important;
}

/* ── Switch — shape-full ─────────────────────────────────────────────────── */
.mud-switch-thumb {
    border-radius: var(--md-sys-shape-corner-full, 9999px) !important;
}

/* ── Progress bars — shape-full ──────────────────────────────────────────── */
.mud-progress-linear {
    border-radius: var(--md-sys-shape-corner-full, 9999px) !important;
    overflow: hidden;
}

/* ── Badge — shape-full ──────────────────────────────────────────────────── */
.mud-badge {
    border-radius: var(--md-sys-shape-corner-full, 9999px) !important;
}

/* ── TextField outlined — shape-extra-small (4px) top-only for filled ─────── */
.mud-input.mud-input-filled {
    border-radius: var(--md-sys-shape-corner-extra-small, 4px) var(--md-sys-shape-corner-extra-small, 4px) 0 0 !important;
}

/* ── Select Extended (custom dropdowns) ─────────────────────────────────── */
.mud-select-extended .mud-input-root {
    border-radius: var(--md-sys-shape-corner-extra-small, 4px) !important;
}

/* ── AppBar — no radius (MD3 spec) ───────────────────────────────────────── */
header.mud-appbar {
    border-radius: 0 !important;
}

/* ── TableCell — no radius ───────────────────────────────────────────────── */
.mud-table .mud-table-cell {
    border-radius: 0 !important;
}

/* ── MD3 Elevation 0 — surface container (tonal surface, no shadow) ─────── */
.mud-elevation-0 {
    box-shadow: none !important;
}

/* ── MD3 State Layer on nav links ────────────────────────────────────────── */
.mud-nav-link {
    border-radius: var(--md-sys-shape-corner-full, 9999px) !important;
    transition: background-color 200ms cubic-bezier(0.2, 0, 0, 1), color 200ms cubic-bezier(0.2, 0, 0, 1) !important;
}

    .mud-nav-link:hover {
        background-color: var(--md3-state-hover-primary, rgba(31,117,203,0.08)) !important;
    }

    .mud-nav-link.active,
    .mud-nav-link:focus {
        background-color: var(--md-sys-color-secondary-container, #D7E3F7);
        color: var(--md-sys-color-on-secondary-container, #0F1D2B);
    }

/* ── MD3 Typography helper classes ───────────────────────────────────────── */
.md3-display-large {
    font-size: var(--md-sys-typescale-display-large-size);
    font-weight: var(--md-sys-typescale-display-large-weight);
    line-height: var(--md-sys-typescale-display-large-line);
    letter-spacing: var(--md-sys-typescale-display-large-track);
}

.md3-display-medium {
    font-size: var(--md-sys-typescale-display-medium-size);
    font-weight: var(--md-sys-typescale-display-medium-weight);
    line-height: var(--md-sys-typescale-display-medium-line);
    letter-spacing: var(--md-sys-typescale-display-medium-track);
}

.md3-display-small {
    font-size: var(--md-sys-typescale-display-small-size);
    font-weight: var(--md-sys-typescale-display-small-weight);
    line-height: var(--md-sys-typescale-display-small-line);
    letter-spacing: var(--md-sys-typescale-display-small-track);
}

.md3-headline-large {
    font-size: var(--md-sys-typescale-headline-large-size);
    font-weight: var(--md-sys-typescale-headline-large-weight);
    line-height: var(--md-sys-typescale-headline-large-line);
    letter-spacing: var(--md-sys-typescale-headline-large-track);
}

.md3-headline-medium {
    font-size: var(--md-sys-typescale-headline-medium-size);
    font-weight: var(--md-sys-typescale-headline-medium-weight);
    line-height: var(--md-sys-typescale-headline-medium-line);
    letter-spacing: var(--md-sys-typescale-headline-medium-track);
}

.md3-headline-small {
    font-size: var(--md-sys-typescale-headline-small-size);
    font-weight: var(--md-sys-typescale-headline-small-weight);
    line-height: var(--md-sys-typescale-headline-small-line);
    letter-spacing: var(--md-sys-typescale-headline-small-track);
}

.md3-title-large {
    font-size: var(--md-sys-typescale-title-large-size);
    font-weight: var(--md-sys-typescale-title-large-weight);
    line-height: var(--md-sys-typescale-title-large-line);
    letter-spacing: var(--md-sys-typescale-title-large-track);
}

.md3-title-medium {
    font-size: var(--md-sys-typescale-title-medium-size);
    font-weight: var(--md-sys-typescale-title-medium-weight);
    line-height: var(--md-sys-typescale-title-medium-line);
    letter-spacing: var(--md-sys-typescale-title-medium-track);
}

.md3-title-small {
    font-size: var(--md-sys-typescale-title-small-size);
    font-weight: var(--md-sys-typescale-title-small-weight);
    line-height: var(--md-sys-typescale-title-small-line);
    letter-spacing: var(--md-sys-typescale-title-small-track);
}

.md3-body-large {
    font-size: var(--md-sys-typescale-body-large-size);
    font-weight: var(--md-sys-typescale-body-large-weight);
    line-height: var(--md-sys-typescale-body-large-line);
    letter-spacing: var(--md-sys-typescale-body-large-track);
}

.md3-body-medium {
    font-size: var(--md-sys-typescale-body-medium-size);
    font-weight: var(--md-sys-typescale-body-medium-weight);
    line-height: var(--md-sys-typescale-body-medium-line);
    letter-spacing: var(--md-sys-typescale-body-medium-track);
}

.md3-body-small {
    font-size: var(--md-sys-typescale-body-small-size);
    font-weight: var(--md-sys-typescale-body-small-weight);
    line-height: var(--md-sys-typescale-body-small-line);
    letter-spacing: var(--md-sys-typescale-body-small-track);
}

.md3-label-large {
    font-size: var(--md-sys-typescale-label-large-size);
    font-weight: var(--md-sys-typescale-label-large-weight);
    line-height: var(--md-sys-typescale-label-large-line);
    letter-spacing: var(--md-sys-typescale-label-large-track);
}

.md3-label-medium {
    font-size: var(--md-sys-typescale-label-medium-size);
    font-weight: var(--md-sys-typescale-label-medium-weight);
    line-height: var(--md-sys-typescale-label-medium-line);
    letter-spacing: var(--md-sys-typescale-label-medium-track);
}

.md3-label-small {
    font-size: var(--md-sys-typescale-label-small-size);
    font-weight: var(--md-sys-typescale-label-small-weight);
    line-height: var(--md-sys-typescale-label-small-line);
    letter-spacing: var(--md-sys-typescale-label-small-track);
}


.mud-navmenu.mud-navmenu-bordered .mud-nav-link.active:not(.mud-nav-link-disabled) {
    border: none;
}

.mud-navmenu {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.mud-nav-link .mud-nav-link-text {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* ============================================================
   MD3 EXPRESSIVE CO-PLANAR LAYOUT SYSTEM
   ============================================================ */

.md3-layout {
    display: flex;
    min-height: 100dvh;
    background-color: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
}

/* ── Navigation Drawer ────────────────────────────────────────────── */
.md3-nav-drawer {
    width: 280px;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--md-sys-color-surface-container-low);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    border-right: none;
    box-sizing: border-box;
    transition: width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    will-change: width, transform;
}

/* RTL Support for Nav Drawer position */
html[dir="rtl"] .md3-nav-drawer {
    left: auto;
    right: 0;
}

/* Brand/Logo Area */
.md3-nav-drawer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
    padding: 0 16px;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    box-sizing: border-box;
    flex-shrink: 0;
    margin: 0 12px 8px;
    width: calc(100% - 24px);
    transition: padding var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), gap var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    will-change: padding, gap;
}

.md3-nav-drawer__brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--md-sys-shape-corner-medium);
    background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-secondary-container, var(--md-sys-color-primary-container)));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--md-sys-color-on-primary-container);
}

.md3-nav-drawer__brand-text {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    opacity: 1;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), max-width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    will-change: opacity, max-width;
}

/* Divider styling */
.md3-nav-drawer__divider {
    height: 1px;
    background-color: var(--md-sys-color-outline-variant);
    margin: 8px 24px;
    flex-shrink: 0;
    transition: margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

/* Section label styling */
.md3-nav-drawer__section-label {
    padding: 16px 16px 8px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    max-height: 48px;
    flex-shrink: 0;
    opacity: 1;
    margin: 0 12px;
    width: calc(100% - 24px);
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), max-height var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    will-change: opacity, max-height;
}

/* Drawer Nav List wrapper */
.md3-nav-drawer__list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    scrollbar-width: none;
}

    .md3-nav-drawer__list::-webkit-scrollbar {
        display: none;
    }

/* Navigation items styling */
.md3-nav-drawer__item {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--md-sys-shape-corner-full);
    cursor: pointer;
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin: 0 12px 2px;
    box-sizing: border-box;
    width: calc(100% - 24px);
    flex-shrink: 0;
    transition: color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

    .md3-nav-drawer__item::before {
        content: '';
        position: absolute;
        z-index: -1;
        inset: 0;
        border-radius: var(--md-sys-shape-corner-full);
        background-color: transparent;
        transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
    }

    .md3-nav-drawer__item:hover::before {
        background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
    }

    .md3-nav-drawer__item.active {
        color: var(--md-sys-color-on-primary-container);
    }

        .md3-nav-drawer__item.active::before {
            background-color: var(--md-sys-color-primary-container);
        }

        .md3-nav-drawer__item.active:hover::before {
            background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, var(--md-sys-color-primary-container));
        }

.md3-nav-drawer__item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 24px;
    flex-shrink: 0;
    transition: transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__item-text {
    white-space: nowrap;
    opacity: 1;
    margin-left: 12px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), max-width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    will-change: opacity, max-width, margin;
}

html[dir="rtl"] .md3-nav-drawer__item-text {
    margin-left: 0;
    margin-right: 12px;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), max-width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    will-change: opacity, max-width, margin;
}

/* Accordion Collapsible Group */
.md3-nav-drawer__group {
    display: flex;
    flex-direction: column;
}

.md3-nav-drawer__group-header {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 16px;
    border-radius: var(--md-sys-shape-corner-full);
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    position: relative;
    overflow: hidden;
    margin: 0 12px 2px;
    box-sizing: border-box;
    width: calc(100% - 24px);
    text-align: left;
    transition: color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), padding var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

html[dir="rtl"] .md3-nav-drawer__group-header {
    text-align: right;
}

.md3-nav-drawer__group-header::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: var(--md-sys-shape-corner-full);
    background-color: transparent;
    transition: background-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__group-header:hover::before {
    background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
}

.md3-nav-drawer__group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 24px;
    flex-shrink: 0;
}

.md3-nav-drawer__group-title {
    flex: 1;
    white-space: nowrap;
    margin-left: 12px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), max-width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

html[dir="rtl"] .md3-nav-drawer__group-title {
    margin-left: 0;
    margin-right: 12px;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), max-width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__group-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    max-width: 24px;
    color: var(--md-sys-color-on-surface-variant);
    transition: transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), max-width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__group-items {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), padding var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

html[dir="rtl"] .md3-nav-drawer__group-items {
    padding-left: 0;
    padding-right: 16px;
    transition: max-height var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), padding var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__group-items.show {
    max-height: 2000px;
    opacity: 1;
}

/* Footer & Avatar styling */
.md3-nav-drawer__footer {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 0.1px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    background-color: transparent;
    flex-shrink: 0;
    transition: padding var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__avatar-row {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    margin: 0 12px 2px;
    gap: 12px;
    border-radius: var(--md-sys-shape-corner-full);
    color: var(--md-sys-color-on-surface);
    width: calc(100% - 24px);
    transition: color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__avatar-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    margin-inline-start: 12px;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), max-width var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), margin var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__logout-form {
    width: 100%;
    margin: 0;
}

.md3-nav-drawer__logout-btn {
    margin: 0 12px 2px !important;
    width: calc(100% - 24px) !important;
    padding: 0 16px !important;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.md3-nav-drawer__avatar-row .mud-button-icon-start {
    margin: 0 !important;
}

.md3-nav-drawer__logout-btn:hover::before {
    background-color: color-mix(in srgb, var(--md-sys-color-error, #BA1A1A) 10%, transparent);
}

.md3-nav-drawer__logout-btn:hover {
    color: var(--md-sys-color-error, #BA1A1A) !important;
}

/* ── Main Content Container ───────────────────────────────────────── */
.md3-main {
    margin-left: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    transition: margin-left var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    will-change: margin-left;
}

html[dir="rtl"] .md3-main {
    margin-left: 0;
    margin-right: 280px;
    transition: margin-right var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    will-change: margin-right;
}

/* ── Top App Bar ──────────────────────────────────────────────────── */
.md3-top-app-bar {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 16px;
    background-color: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: none;
    transition: background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.md3-top-app-bar__title {
    flex: 1;
    font-size: 22px;
    font-weight: 400;
    line-height: 28px;
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.md3-top-app-bar__actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Standard M3 Icon Button for toggling */
.md3-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-corner-full);
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--md-sys-color-on-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    transition: background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

    .md3-icon-btn:hover {
        background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
    }

    .md3-icon-btn .mud-icon-button {
        padding: 0;
    }

.nav-toggle {
    margin-right: 8px;
}

html[dir="rtl"] .nav-toggle {
    margin-right: 0;
    margin-left: 8px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--md-outline-variant);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--md-outline);
    }


.md3-content-wrapper {
    flex: 1;
    border-radius: var(--md-sys-shape-corner-extra-large);
    margin: 0 17px 17px 2px;
    box-shadow: var(--mud-elevation-1);
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

[dir="rtl"] .md3-content-wrapper {
    margin: 0 0 17px 17px;
}

/* ── No Sidebar Overrides ────────────────────────────────────────── */
.md3-main.no-sidebar {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

    .md3-main.no-sidebar .md3-content-wrapper {
        margin: 0 17px 17px 17px;
    }

/* ── Content Body ────────────────────────────────────────────── */
.md3-content {
    background-color: var(--md-sys-color-surface-container-lowest);
    padding: 0;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

    .md3-content.dashboard-page {
        background-color: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    /* Custom premium scrollbar for co-planar content container */
    .md3-content::-webkit-scrollbar {
        width: 12px;
    }

    .md3-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .md3-content::-webkit-scrollbar-thumb {
        background-color: color-mix(in srgb, var(--md-on-surface) 12%, transparent);
        border-radius: 9999px;
        border: 4px solid transparent; /* Offset spacer */
        background-clip: padding-box;
    }

        .md3-content::-webkit-scrollbar-thumb:hover {
            background-color: color-mix(in srgb, var(--md-on-surface) 24%, transparent);
        }

    .md3-content::-webkit-scrollbar-button {
        display: none;
        width: 0;
        height: 0;
    }

    .md3-content::-webkit-scrollbar-corner {
        background: transparent;
    }

/* ── Collapsed Desktop Drawer Styles ──────────────────────────────── */
@media (min-width: 961px) {
    .md3-nav-drawer.collapsed {
        width: 80px;
    }

    .md3-main.collapsed {
        margin-left: 80px;
    }

    html[dir="rtl"] .md3-main.collapsed {
        margin-left: 0;
        margin-right: 80px;
    }

    /* Brand Collapse */
    .md3-nav-drawer.collapsed .md3-nav-drawer__brand {
        padding: 0;
        justify-content: center;
        gap: 0;
    }

    .md3-nav-drawer.collapsed .md3-nav-drawer__brand-text {
        opacity: 0;
        max-width: 0;
    }

    /* Divider Collapse */
    .md3-nav-drawer.collapsed .md3-nav-drawer__divider {
        margin: 8px 12px;
    }

    /* Section Label Collapse */
    .md3-nav-drawer.collapsed .md3-nav-drawer__section-label {
        opacity: 0;
        max-height: 0;
        pointer-events: none;
    }

    /* Item Collapse */
    .md3-nav-drawer.collapsed .md3-nav-drawer__item {
        margin: 0 12px 12px;
    }

    .md3-nav-drawer.collapsed .md3-nav-drawer__item-text {
        opacity: 0;
        max-width: 0;
        margin-left: 0;
        margin-right: 0;
    }

    /* Avatar Collapse */
    .md3-nav-drawer.collapsed .md3-nav-drawer__avatar-row {
        margin: 0 12px 12px;
    }

    .md3-nav-drawer.collapsed .md3-nav-drawer__avatar-name {
        opacity: 0;
        max-width: 0;
        margin-inline-start: 0;
        margin-left: 0;
        margin-right: 0;
    }

    /* Group Collapse */
    .md3-nav-drawer.collapsed .md3-nav-drawer__group-header {
        margin: 0 12px 12px;
    }

    .md3-nav-drawer.collapsed .md3-nav-drawer__group-title,
    .md3-nav-drawer.collapsed .md3-nav-drawer__group-arrow {
        opacity: 0;
        max-width: 0;
        margin: 0;
    }

    .md3-nav-drawer.collapsed .md3-nav-drawer__group-items {
        padding-left: 0;
        padding-right: 0;
    }

    /* Logout Collapse */
    .md3-nav-drawer.collapsed .md3-nav-drawer__logout-btn {
        margin: 0 12px 12px !important;
    }
}

/* ── Mobile Layout & Mobile Open Styles ───────────────────────────── */
.md3-drawer-scrim {
    position: fixed;
    inset: 0;
    background-color: var(--md-sys-color-scrim, #000000);
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    transition: opacity var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard), visibility var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
}

.md3-drawer-scrim.show {
    opacity: 0.32;
    visibility: visible;
}

@media (max-width: 960px) {
    .md3-nav-drawer {
        transform: translateX(-100%);
        box-shadow: var(--mud-elevation-16);
    }

    html[dir="rtl"] .md3-nav-drawer {
        transform: translateX(100%);
    }

    .md3-nav-drawer.mobile-open {
        transform: translateX(0);
    }

    html[dir="rtl"] .md3-nav-drawer.mobile-open {
        transform: translateX(0);
    }

    .md3-main {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .md3-content-wrapper {
        margin: 0 10px 10px 10px !important;
    }

    .md3-content {
        margin: 0;
        border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MATERIAL DESIGN 3 — LIGHT COLOR SCHEME (default)
   Seed: #1f75cb (Blue ~213°) | Tone mapping per MD3 HCT spec
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* ── MD3 Ref: Primary tonal palette ───────────────────────────────────── */
    --md-ref-palette-primary0: #000000;
    --md-ref-palette-primary10: #001B3D;
    --md-ref-palette-primary20: #003062;
    --md-ref-palette-primary30: #074888;
    --md-ref-palette-primary40: #1f75cb;
    --md-ref-palette-primary50: #3B8EE3;
    --md-ref-palette-primary60: #60AAFF;
    --md-ref-palette-primary70: #7EBCFF;
    --md-ref-palette-primary80: #A3C9FF;
    --md-ref-palette-primary90: #D1E4FF;
    --md-ref-palette-primary95: #EBF2FF;
    --md-ref-palette-primary99: #FDFCFF;
    --md-ref-palette-primary100: #FFFFFF;
    /* ── MD3 Sys: Light color tokens ──────────────────────────────────────── */
    --md-sys-color-primary: #415F91;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #D6E3FF;
    --md-sys-color-on-primary-container: #284777;
    --md-sys-color-secondary: #565F71;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #DAE2F9;
    --md-sys-color-on-secondary-container: #3E4759;
    --md-sys-color-tertiary: #705575;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #FAD8FD;
    --md-sys-color-on-tertiary-container: #573E5C;
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    --md-sys-color-on-error-container: #93000A;
    --md-sys-color-background: #F9F9FF;
    --md-sys-color-on-background: #191C20;
    --md-sys-color-surface: #F9F9FF;
    --md-sys-color-on-surface: #191C20;
    --md-sys-color-surface-variant: #E0E2EC;
    --md-sys-color-on-surface-variant: #44474E;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F3F3FA;
    --md-sys-color-surface-container: #EDEDF4;
    --md-sys-color-surface-container-high: #E7E8EE;
    --md-sys-color-surface-container-highest: #E2E2E9;
    --md-sys-color-inverse-surface: #2E3036;
    --md-sys-color-inverse-on-surface: #F0F0F7;
    --md-sys-color-inverse-primary: var(--md-ref-palette-primary80); /* #A3C9FF */
    --md-sys-color-shadow: #000000;
    --md-sys-color-scrim: #000000;
    --md-sys-color-outline: #74777F;
    --md-sys-color-outline-variant: #C4C6D0;
    /* ── Theme shorthand ─────────────────────────────────────────────────── */
    --theme-color: var(--md-sys-color-primary);
    --gl-background-color-default: var(--md-sys-color-background);
    /* ── MD3 surface tint — keyed to brand primary color ── */
    --md3-surface-tint-color: var(--md-sys-color-primary);
    --md3-surface-1: color-mix(in srgb, var(--md3-surface-tint-color) 5%, var(--md-sys-color-surface));
    --md3-surface-2: color-mix(in srgb, var(--md3-surface-tint-color) 8%, var(--md-sys-color-surface));
    --md3-surface-3: color-mix(in srgb, var(--md3-surface-tint-color) 11%, var(--md-sys-color-surface));
    --md3-surface-4: color-mix(in srgb, var(--md3-surface-tint-color) 12%, var(--md-sys-color-surface));
    --md3-surface-5: color-mix(in srgb, var(--md3-surface-tint-color) 14%, var(--md-sys-color-surface));
    /* ── App-level aliases ────────────────────────────────────────────────── */
    --super-sidebar-bg: var(--md3-surface-2);
    --mud-body-theme: var(--md3-surface-1);
    --mud-table-theme: var(--md-sys-color-surface-container-lowest);
    --mud-table-header-theme: var(--md-sys-color-surface-container-lowest);
    --mud-palette-appbar-background: transparent;
    --mud-palette-drawer-background: transparent;
    /* ── State layers ─────────────────────────────────────────────────────── */
    --md3-state-hover-primary: rgba(65, 95, 145, 0.08);
    --md3-state-focus-primary: rgba(65, 95, 145, 0.12);
    --md3-state-pressed-primary: rgba(65, 95, 145, 0.12);
    --md3-state-drag-primary: rgba(65, 95, 145, 0.16);
    /* ── Shadows (MD3 — very soft) ────────────────────────────────────────── */
    --gl-shadow-color-default: rgba(5, 5, 6, 0.14);
    --tw-drop-shadow: drop-shadow(0 0 0.5px rgba(5,5,6, 0.10)) drop-shadow(0 0.5px 1px rgba(5,5,6, 0.10)) drop-shadow(0 1px 3px rgba(5,5,6, 0.10));
    /* ── Tonal button / chip soft-color utilities ─────────────────────────── */
    --mud-button-primary-soft-color: rgba(var(--mud-palette-primary-rgb), 0.08);
    --mud-button-primary-soft-color-hover: rgba(var(--mud-palette-primary-rgb), 0.16);
    --mud-button-secondary-soft-color: rgba(var(--mud-palette-secondary-rgb), 0.08);
    --mud-button-secondary-soft-color-hover: rgba(var(--mud-palette-secondary-rgb), 0.16);
    --mud-button-info-soft-color: rgba(var(--mud-palette-info-rgb), 0.08);
    --mud-button-info-soft-color-hover: rgba(var(--mud-palette-info-rgb), 0.16);
    --mud-button-warning-soft-color: rgba(var(--mud-palette-warning-rgb), 0.08);
    --mud-button-warning-soft-color-hover: rgba(var(--mud-palette-warning-rgb), 0.16);
    --mud-button-error-soft-color: rgba(var(--mud-palette-error-rgb), 0.08);
    --mud-button-error-soft-color-hover: rgba(var(--mud-palette-error-rgb), 0.16);
    --mud-button-success-soft-color: rgba(var(--mud-palette-success-rgb), 0.08);
    --mud-button-success-soft-color-hover: rgba(var(--mud-palette-success-rgb), 0.16);
    --md-on-surface: #1C1B1F;
    --md-on-surface-variant: #49454F;
    --md-outline: #79747E;
    --md-outline-variant: #CAC4D0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MATERIAL DESIGN 3 — DARK COLOR SCHEME
   Activated via html[dark-mode="true"] attribute on the document root.
   ═══════════════════════════════════════════════════════════════════════════ */
html[dark-mode="true"] {
    /* ── MD3 Sys: Dark color tokens ───────────────────────────────────────── */
    --md-sys-color-primary: #AAC7FF;
    --md-sys-color-on-primary: #0A305F;
    --md-sys-color-primary-container: #284777;
    --md-sys-color-on-primary-container: #D6E3FF;
    --md-sys-color-secondary: #BEC6DC;
    --md-sys-color-on-secondary: #283141;
    --md-sys-color-secondary-container: #3E4759;
    --md-sys-color-on-secondary-container: #DAE2F9;
    --md-sys-color-tertiary: #DDBCE0;
    --md-sys-color-on-tertiary: #3F2844;
    --md-sys-color-tertiary-container: #573E5C;
    --md-sys-color-on-tertiary-container: #FAD8FD;
    --md-sys-color-error: #FFB4AB;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000A;
    --md-sys-color-on-error-container: #FFDAD6;
    --md-sys-color-background: #111318;
    --md-sys-color-on-background: #E2E2E9;
    --md-sys-color-surface: #111318;
    --md-sys-color-on-surface: #E2E2E9;
    --md-sys-color-surface-variant: #44474E;
    --md-sys-color-on-surface-variant: #C4C6D0;
    --md-sys-color-surface-container-lowest: #0C0E13;
    --md-sys-color-surface-container-low: #191C20;
    --md-sys-color-surface-container: #1D2024;
    --md-sys-color-surface-container-high: #282A2F;
    --md-sys-color-surface-container-highest: #33353A;
    --md-sys-color-inverse-surface: #E2E2E9;
    --md-sys-color-inverse-on-surface: #2E3036;
    --md-sys-color-inverse-primary: #415F91;
    --md-sys-color-shadow: #000000;
    --md-sys-color-scrim: #000000;
    --md-sys-color-outline: #8E9099;
    --md-sys-color-outline-variant: #44474E;
    /* ── Theme shorthand ─────────────────────────────────────────────────── */
    --theme-color: var(--md-sys-color-primary);
    --gl-background-color-default: var(--md-sys-color-background);
    /* ── MD3 surface tint ─────────────────────────────────────────────────── */
    --md3-surface-tint-color: var(--md-sys-color-primary);
    --md3-surface-1: color-mix(in srgb, var(--md3-surface-tint-color) 5%, var(--md-sys-color-surface));
    --md3-surface-2: color-mix(in srgb, var(--md3-surface-tint-color) 8%, var(--md-sys-color-surface));
    --md3-surface-3: color-mix(in srgb, var(--md3-surface-tint-color) 11%, var(--md-sys-color-surface));
    --md3-surface-4: color-mix(in srgb, var(--md3-surface-tint-color) 12%, var(--md-sys-color-surface));
    --md3-surface-5: color-mix(in srgb, var(--md3-surface-tint-color) 14%, var(--md-sys-color-surface));
    /* ── App-level aliases ────────────────────────────────────────────────── */
    --super-sidebar-bg: var(--md3-surface-2);
    --mud-body-theme: var(--md3-surface-1);
    --mud-table-theme: var(--md-sys-color-surface);
    --mud-table-header-theme: var(--md-sys-color-surface);
    --mud-palette-appbar-background: transparent;
    --mud-palette-drawer-background: transparent;
    --mud-palette-action-default-hover: rgba(170, 199, 255, 0.10);
    /* ── State layers (dark) ─────────────────────────────────────────────── */
    --md3-state-hover-primary: rgba(170, 199, 255, 0.08);
    --md3-state-focus-primary: rgba(170, 199, 255, 0.12);
    --md3-state-pressed-primary: rgba(170, 199, 255, 0.12);
    --md3-state-drag-primary: rgba(170, 199, 255, 0.16);
    /* ── Shadows (dark — stronger) ───────────────────────────────────────── */
    --gl-shadow-color-default: rgba(5, 5, 6, 0.42);
    --tw-drop-shadow: drop-shadow(0 0 0.5px rgba(0,0,0, 0.28)) drop-shadow(0 0.5px 1px rgba(0,0,0, 0.28)) drop-shadow(0 1px 3px rgba(0,0,0, 0.28));
    /* ── Soft-color tonal button/chip utilities ──────────────────────────── */
    --mud-button-primary-soft-color: rgba(var(--mud-palette-primary-rgb), 0.10);
    --mud-button-primary-soft-color-hover: rgba(var(--mud-palette-primary-rgb), 0.18);
    --mud-button-secondary-soft-color: rgba(var(--mud-palette-secondary-rgb), 0.10);
    --mud-button-secondary-soft-color-hover: rgba(var(--mud-palette-secondary-rgb), 0.18);
    --mud-button-info-soft-color: rgba(var(--mud-palette-info-rgb), 0.10);
    --mud-button-info-soft-color-hover: rgba(var(--mud-palette-info-rgb), 0.18);
    --mud-button-warning-soft-color: rgba(var(--mud-palette-warning-rgb), 0.10);
    --mud-button-warning-soft-color-hover: rgba(var(--mud-palette-warning-rgb), 0.18);
    --mud-button-error-soft-color: rgba(var(--mud-palette-error-rgb), 0.10);
    --mud-button-error-soft-color-hover: rgba(var(--mud-palette-error-rgb), 0.18);
    --mud-button-success-soft-color: rgba(var(--mud-palette-success-rgb), 0.10);
    --mud-button-success-soft-color-hover: rgba(var(--mud-palette-success-rgb), 0.18);
    /* Override MudBlazor text color token */
    --mud-palette-text-primary: #E2E2E9 !important;
    --md-on-surface: #E6E0E9 !important;
    --md-on-surface-variant: #CAC4D0 !important;
    --md-outline: #938F99 !important;
    --md-outline-variant: #49454F !important;
}

    /* ── Dark mode component overrides ───────────────────────────────────────── */
    html[dark-mode="true"] body {
        background-color: var(--super-sidebar-bg);
        background-image: radial-gradient(ellipse 80% 30% at 50% 0%, color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent), transparent), linear-gradient(180deg, var(--md3-surface-1) 0%, var(--md3-surface-1) 100%);
    }

    html[dark-mode="true"] header.mud-appbar {
        backdrop-filter: blur(12px) saturate(1.3);
        -webkit-backdrop-filter: blur(12px) saturate(1.3);
        background-color: color-mix(in srgb, var(--md3-surface-2) 80%, transparent) !important;
        border-bottom: 1px solid var(--md-sys-color-outline-variant) !important;
    }

    html[dark-mode="true"] aside.mud-drawer {
        background-color: var(--md3-surface-2) !important;
        border-inline-end: 1px solid var(--md-sys-color-outline-variant);
    }

    html[dark-mode="true"] .mud-paper:not(.mud-appbar):not(.mud-drawer-paper) {
        background-color: var(--md3-surface-1) !important;
    }

    html[dark-mode="true"] .mud-paper.mud-elevation-4,
    html[dark-mode="true"] .mud-paper.mud-elevation-8 {
        background-color: var(--md3-surface-2) !important;
    }

    html[dark-mode="true"] .mud-dialog {
        background-color: var(--md3-surface-3) !important;
    }

    html[dark-mode="true"] .mud-popover-paper {
        background-color: var(--md3-surface-2) !important;
    }

    html[dark-mode="true"] .mud-input.mud-input-filled {
        background-color: var(--md-sys-color-surface-container-high);
    }

        html[dark-mode="true"] .mud-input.mud-input-filled:hover {
            background-color: var(--md-sys-color-surface-container-highest);
        }

    html[dark-mode="true"] .mud-table {
        background-color: var(--mud-table-theme) !important;
    }

    html[dark-mode="true"] .mud-table-row-clickable:hover {
        background-color: var(--md3-state-hover-primary) !important;
    }

    html[dark-mode="true"] .mud-user-profile-popover {
        background-color: var(--md3-surface-3);
        color: var(--md-sys-color-on-surface);
        filter: var(--tw-drop-shadow);
        box-shadow: none !important;
    }

@media (max-width: 959px) {
    html[dark-mode="true"] .mud-drawer.mud-drawer-mini.mud-drawer-md,
    html[dark-mode="true"] .mud-drawer.mud-drawer-responsive.mud-drawer-md {
        background-color: var(--md3-surface-2) !important;
        background-image: radial-gradient(ellipse 80% 30% at 50% 0%, color-mix(in srgb, var(--md-sys-color-primary) 18%, transparent), transparent);
    }
}

/* ── Dashboard dark mode overrides ───────────────────────────────────────── */
html[dark-mode="true"] .dash-hero {
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%), linear-gradient(135deg, color-mix(in srgb, var(--md-sys-color-primary) 18%, #030814) 0%, color-mix(in srgb, var(--md-sys-color-primary) 24%, #040f22) 40%, color-mix(in srgb, var(--md-sys-color-primary) 14%, #02090f) 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
}

html[dark-mode="true"] .dash-hero-avatar {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

html[dark-mode="true"] .dash-insight-card {
    background: var(--md-sys-color-surface-container-low);
    border-color: var(--md-sys-color-outline-variant);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

    html[dark-mode="true"] .dash-insight-card:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

html[dark-mode="true"] .dash-panel {
    background: var(--md-sys-color-surface-container);
    border-color: var(--md-sys-color-outline-variant);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

    html[dark-mode="true"] .dash-panel:hover {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    }

html[dark-mode="true"] .dash-panel-header {
    border-color: var(--md-sys-color-outline-variant);
}

html[dark-mode="true"] .dash-mod-card {
    background: var(--md-sys-color-surface-container-high);
    border-color: var(--md-sys-color-outline-variant);
}

    html[dark-mode="true"] .dash-mod-card:hover,
    html[dark-mode="true"] .dash-mod-card:focus {
        background: color-mix(in srgb, var(--md-sys-color-primary) 10%, var(--md-sys-color-surface-container-high));
        border-color: color-mix(in srgb, var(--md-sys-color-primary) 30%, var(--md-sys-color-outline-variant));
        box-shadow: 0 8px 24px color-mix(in srgb, var(--md-sys-color-primary) 12%, rgba(0, 0, 0, 0.24));
    }

html[dark-mode="true"] .dash-mod-card--skeleton {
    background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 55%, transparent);
}

html[dark-mode="true"] .dash-notif {
    background: var(--md-sys-color-surface-container-low);
}

    html[dark-mode="true"] .dash-notif[role="button"]:hover {
        background: color-mix(in srgb, var(--md-sys-color-primary) 6%, var(--md-sys-color-surface-container-low));
    }

html[dark-mode="true"] .dash-notif--unread {
    background: color-mix(in srgb, var(--mud-palette-warning) 8%, var(--md-sys-color-surface-container-low));
}

html[dark-mode="true"] .dash-notif-dot--active {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--mud-palette-warning) 28%, transparent);
}

/* ============================================================
   MOBILE DASHBOARD OPTIMIZATIONS
   ============================================================ */
@media (max-width: 768px) {
    .dash-page {
        padding: 0.25rem 0;
        gap: 1rem;
    }

    .dash-hero-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .dash-hero-left {
        width: 100%;
        gap: 1.25rem;
    }

    .dash-hero-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .dash-clock {
        width: 100%;
        max-width: 240px;
        padding: 0.6rem 1rem;
    }

    .dash-insights {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .dash-insight-card {
        padding: 1rem 1.25rem;
        gap: 0.75rem;
        border-radius: 16px;
    }
}

@media (max-width: 550px) {
    .dash-modules-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .dash-mod-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0.75rem 1rem;
        gap: 1rem;
        border-radius: 16px;
        min-height: auto;
    }

    html[dir="rtl"] .dash-mod-card {
        text-align: right;
    }

    .dash-mod-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .dash-mod-card-body {
        align-items: flex-start;
        text-align: left;
    }

    html[dir="rtl"] .dash-mod-card-body {
        align-items: flex-start;
        text-align: right;
    }

    .dash-mod-card-name {
        font-size: 0.95rem;
        text-align: left;
    }

    html[dir="rtl"] .dash-mod-card-name {
        text-align: right;
    }

    .dash-mod-card-arrow {
        position: static;
        margin-inline-start: auto;
        opacity: 0.6;
        transform: none !important;
    }

    .dash-mod-card:hover .dash-mod-card-arrow,
    .dash-mod-card:focus .dash-mod-card-arrow {
        transform: none !important;
    }

    /* Skeleton layout on mobile */
    .dash-mod-card-lines-sk {
        align-items: flex-start;
    }

    /* Chips adjustment */
    .dash-chip {
        padding: 0.25rem 0.65rem;
        font-size: 0.72rem;
    }

    /* Spacing optimizations for timeline */
    .dash-notif-timeline {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .dash-notif {
        padding: 0.6rem 0.85rem;
        gap: 0.6rem;
    }
}

/* Force clock digits direction in LTR for both LTR/RTL layouts */
.dash-clock-time {
    direction: ltr;
    display: inline-flex;
    align-items: baseline;
}
