/* =============================================================
   Pro-SMV — App shell (Sidebar + Topbar)
   Drop into wwwroot/css/shell.css and reference once globally:
       <link href="css/shell.css" rel="stylesheet" />
   Everything is namespaced under .ps-shell so it can sit next to
   the existing Hyper/Bootstrap admin theme without bleeding.
   ============================================================= */

.ps-shell,
.ps-shell * {
    box-sizing: border-box;
}

/* =============================================================
   LAYOUT — fixed gradient sidebar + topbar, content scrolls
   ============================================================= */
.ps-shell {
    --ps-sidebar-w: 240px;
    --ps-sidebar-w-mini: 64px;
    --ps-topbar-h: 56px;
    --ps-grad: linear-gradient(180deg, #1e2540 0%, #151b30 50%, #0a0e1a 100%);
    --ps-grad-h: #ffffff;
    --ps-gold: #F5BB16;
    --ps-navy: #0a0e1a;
    --ps-navy-mid: #1a2454;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #0a0a0a;
}

/* =============================================================
   SIDEBAR (fixed, full height, gradient background)
   ============================================================= */
.ps-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--ps-sidebar-w);
    background: var(--ps-grad);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.25s ease, transform 0.25s ease;
    color: #ffffff;
}

    /* Decorative rings — same family as auth page */
    .ps-sidebar::before {
        content: "";
        position: absolute;
        top: -60px;
        right: -60px;
        width: 220px;
        height: 220px;
        border-radius: 50%;
        border: 0.5px solid rgba(245, 187, 22, 0.15);
        box-shadow: 0 0 0 30px rgba(245, 187, 22, 0.04), 0 0 0 60px rgba(245, 187, 22, 0.02);
        pointer-events: none;
        z-index: 0;
    }

    .ps-sidebar > * {
        position: relative;
        z-index: 1;
    }

/* ---------- Brand block (logo + tagline) ---------- */
.ps-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 0.5px solid rgba(245, 187, 22, 0.15);
    text-decoration: none;
    color: #ffffff;
}

    .ps-brand:hover {
        color: #ffffff;
    }

.ps-brand-logo {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.ps-brand-text {
    line-height: 1.1;
    overflow: hidden;
    transition: opacity 0.2s;
}

.ps-brand-name {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.1px;
    margin: 0;
}

.ps-brand-tagline {
    font-size: 8.5px;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.7px;
    text-transform: uppercase;
    margin-top: 3px;
}

/* ---------- User card ---------- */
.ps-user-card {
    margin: 10px 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    transition: background 0.15s;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
}

    .ps-user-card:hover {
        background: rgba(255, 255, 255, 0.18);
    }

.ps-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--ps-navy);
    flex-shrink: 0;
    object-fit: cover;
}

img.ps-user-avatar {
    background: #ffffff;
}

.ps-user-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ps-user-name {
    font-size: 11px;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.15;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-user-sub {
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-user-chev {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

/* ---------- User dropdown menu ---------- */
.ps-user-menu {
    margin: 4px 12px 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: none;
    backdrop-filter: blur(6px);
}

    .ps-user-menu.is-open {
        display: block;
    }

.ps-user-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #0a0a0a;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s;
}

    .ps-user-menu-item:hover {
        background: rgba(245, 187, 22, 0.08);
        color: #0a0a0a;
    }

    .ps-user-menu-item i {
        font-size: 14px;
        color: #0a0e1a;
        opacity: 0.6;
    }

    .ps-user-menu-item.is-danger {
        color: #dc2626;
    }

        .ps-user-menu-item.is-danger i {
            color: #dc2626;
        }

.ps-user-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 4px 0;
}

/* ---------- Nav list ---------- */
.ps-nav-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 8px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}

    .ps-nav-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .ps-nav-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .ps-nav-scroll::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

.ps-nav-section {
    font-size: 8.5px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1.3px;
    text-transform: uppercase;
    font-weight: 500;
    padding: 10px 12px 6px;
    margin: 0;
}

.ps-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    margin: 1px 0;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    position: relative;
}

    .ps-nav-link:hover {
        background: rgba(255, 255, 255, 0.10);
        color: #ffffff;
    }

    .ps-nav-link i {
        font-size: 16px;
        flex-shrink: 0;
        width: 18px;
        text-align: center;
        color: rgba(255, 255, 255, 0.88);
    }

    .ps-nav-link.is-active {
        background: rgba(245, 187, 22, 0.15);
        color: #ffffff;
        font-weight: 500;
    }

        .ps-nav-link.is-active i {
            color: #F5BB16;
        }

        .ps-nav-link.is-active::after {
            content: "";
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 16px;
            background: #F5BB16;
            border-radius: 2px;
        }

.ps-nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Sidebar foot (signout) ---------- */
.ps-sidebar-foot {
    padding: 10px 12px;
    border-top: 0.5px solid rgba(245, 187, 22, 0.15);
}

.ps-signout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}

    .ps-signout:hover {
        background: rgba(220, 38, 38, 0.3);
        color: #ffffff;
    }

    .ps-signout i {
        font-size: 16px;
    }

/* =============================================================
   TOPBAR (fixed, gradient, sits to the right of sidebar)
   ============================================================= */
.ps-topbar {
    position: fixed;
    top: 0;
    left: var(--ps-sidebar-w);
    right: 0;
    height: var(--ps-topbar-h);
    background: #ffffff;
    border-bottom: 0.5px solid rgba(10, 14, 26, 0.08);
    box-shadow: 0 1px 8px rgba(10, 14, 26, 0.06);
    z-index: 1040;
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 12px;
    color: #0a0e1a;
    transition: left 0.25s ease;
}

.ps-topbar-toggle {
    background: rgba(10, 14, 26, 0.05);
    border: 0.5px solid rgba(10, 14, 26, 0.10);
    color: #0a0e1a;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

    .ps-topbar-toggle:hover {
        background: rgba(10, 14, 26, 0.08);
    }

    .ps-topbar-toggle i {
        font-size: 16px;
    }

.ps-topbar-title {
    font-size: 14px;
    color: #0a0e1a;
    font-weight: 500;
    letter-spacing: -0.1px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-topbar-spacer {
    flex: 1;
    min-width: 0;
}

/* ---------- Topbar pills (translucent glass) ---------- */
.ps-topbar-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(10, 14, 26, 0.04);
    border: 0.5px solid rgba(10, 14, 26, 0.10);
    border-radius: 999px;
    color: #0a0e1a;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    backdrop-filter: blur(6px);
}

    .ps-topbar-pill:hover {
        background: rgba(10, 14, 26, 0.08);
    }

    .ps-topbar-pill i {
        font-size: 13px;
        color: #0a0e1a;
    }

    .ps-topbar-pill select {
        background: transparent;
        border: none;
        color: #0a0e1a;
        font-size: 11px;
        font-weight: 500;
        font-family: inherit;
        cursor: pointer;
        outline: none;
        padding: 0 4px;
        appearance: none;
        -webkit-appearance: none;
    }

        .ps-topbar-pill select option {
            color: #0a0a0a;
            background: #ffffff;
        }

/* Month slider (dashboard only) */
.ps-month-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(10, 14, 26, 0.04);
    border: 0.5px solid rgba(10, 14, 26, 0.10);
    border-radius: 999px;
    flex-shrink: 0;
    backdrop-filter: blur(6px);
}

.ps-month-slider-label {
    font-size: 10px;
    color: rgba(10, 14, 26, 0.6);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.ps-month-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(10, 14, 26, 0.15);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

    .ps-month-slider input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #F5BB16;
        cursor: pointer;
        border: 2px solid rgba(245, 187, 22, 0.5);
        box-shadow: 0 2px 6px rgba(245, 187, 22, 0.3);
    }

    .ps-month-slider input[type="range"]::-moz-range-thumb {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #F5BB16;
        cursor: pointer;
        border: 2px solid rgba(245, 187, 22, 0.5);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }

.ps-month-slider-value {
    font-size: 11px;
    color: #0a0e1a;
    font-weight: 600;
    min-width: 22px;
    text-align: center;
}

/* ---------- Notification button + dropdown ---------- */
.ps-topbar-icon-btn {
    position: relative;
    background: none;
    border: none;
    color: #0a0e1a;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

    .ps-topbar-icon-btn:hover {
        background: rgba(10, 14, 26, 0.06);
    }

    .ps-topbar-icon-btn i {
        font-size: 17px;
    }

.ps-notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #F5BB16;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
}

.ps-notif-dropdown {
    position: absolute;
    top: calc(var(--ps-topbar-h) + 6px);
    right: 16px;
    width: 360px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 0.5px solid rgba(0, 0, 0, 0.06);
    display: none;
    overflow: hidden;
    z-index: 1100;
}

    .ps-notif-dropdown.is-open {
        display: block;
    }

.ps-notif-head {
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ps-notif-head-title {
    font-size: 12px;
    font-weight: 500;
    color: #0a0a0a;
    letter-spacing: 0.2px;
    margin: 0;
}

.ps-notif-head-pill {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(236,72,153,0.12));
    color: #8b5cf6;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.ps-notif-list {
    max-height: 380px;
    overflow-y: auto;
}

.ps-notif-item {
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
    display: flex;
    gap: 11px;
    cursor: pointer;
    transition: background 0.12s;
}

    .ps-notif-item:hover {
        background: rgba(139, 92, 246, 0.04);
    }

    .ps-notif-item:last-child {
        border-bottom: none;
    }

.ps-notif-bullet {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
}

.ps-notif-body {
    flex: 1;
    min-width: 0;
}

.ps-notif-title {
    font-size: 11.5px;
    color: #0a0a0a;
    line-height: 1.45;
    margin: 0 0 3px;
}

    .ps-notif-title strong {
        font-weight: 600;
    }

.ps-notif-date {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.45);
}

/* =============================================================
   CONTENT AREA
   ============================================================= */
.ps-content {
    margin-left: var(--ps-sidebar-w);
    margin-top: var(--ps-topbar-h);
    min-height: calc(100vh - var(--ps-topbar-h));
    background: #f4f3ef;
    transition: margin-left 0.25s ease;
    display: flex;
    flex-direction: column;
}

.ps-content-inner {
    flex: 1;
    padding: 20px;
}

/* =============================================================
   FOOTER — pinned at bottom of content area
   ============================================================= */
.ps-footer {
    padding: 12px 20px;
    background: #ffffff;
    border-top: 0.5px solid rgba(0, 0, 0, 0.06);
    font-size: 11.5px;
    color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.ps-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ps-footer-logo {
    flex-shrink: 0;
    opacity: 0.85;
}

.ps-footer-left strong {
    color: #0a0a0a;
    font-weight: 500;
    color: #0a0e1a;
    -webkit-text-fill-color: unset;
    font-weight: 600;
}

.ps-footer-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

    .ps-footer-right a {
        color: #0a0e1a;
        opacity: 0.65;
        text-decoration: none;
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        transition: color 0.15s;
    }

        .ps-footer-right a:hover {
            color: #0a0e1a;
            opacity: 1;
        }

        .ps-footer-right a i {
            font-size: 13px;
        }

.ps-footer-version {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* Mobile — stack and center */
@media (max-width: 575px) {
    .ps-footer {
        flex-direction: column;
        text-align: center;
        padding: 14px 16px;
        gap: 8px;
    }

    .ps-footer-left {
        justify-content: center;
        flex-wrap: wrap;
    }

    .ps-footer-right {
        justify-content: center;
    }
}

/* =============================================================
   COLLAPSED STATE (icons-only sidebar) — toggled by .is-mini on .ps-shell
   ============================================================= */
.ps-shell.is-mini .ps-sidebar {
    width: var(--ps-sidebar-w-mini);
}

.ps-shell.is-mini .ps-topbar {
    left: var(--ps-sidebar-w-mini);
}

.ps-shell.is-mini .ps-content {
    margin-left: var(--ps-sidebar-w-mini);
}

.ps-shell.is-mini .ps-brand {
    justify-content: center;
    padding: 16px 0;
}

.ps-shell.is-mini .ps-brand-text {
    display: none;
}

.ps-shell.is-mini .ps-user-card {
    padding: 8px;
    justify-content: center;
}

.ps-shell.is-mini .ps-user-text,
.ps-shell.is-mini .ps-user-chev,
.ps-shell.is-mini .ps-nav-section,
.ps-shell.is-mini .ps-nav-text,
.ps-shell.is-mini .ps-signout span {
    display: none;
}

.ps-shell.is-mini .ps-nav-link {
    justify-content: center;
    padding: 10px 0;
}

    .ps-shell.is-mini .ps-nav-link.is-active::after {
        right: 4px;
    }

.ps-shell.is-mini .ps-signout {
    justify-content: center;
}

.ps-shell.is-mini .ps-user-menu {
    display: none !important;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

/* Tablet — keep mini sidebar, smaller topbar text */
@media (max-width: 1023px) {
    .ps-shell {
        --ps-sidebar-w: 64px;
        --ps-topbar-h: 48px;
    }

        .ps-shell .ps-sidebar {
            width: var(--ps-sidebar-w);
        }

        .ps-shell .ps-topbar {
            left: var(--ps-sidebar-w);
            padding: 0 12px;
            gap: 8px;
        }

        .ps-shell .ps-content {
            margin-left: var(--ps-sidebar-w);
        }

    .ps-brand {
        justify-content: center;
        padding: 14px 0;
    }

    .ps-brand-text {
        display: none;
    }

    .ps-user-card {
        padding: 8px;
        justify-content: center;
    }

    .ps-user-text, .ps-user-chev {
        display: none;
    }

    .ps-nav-section, .ps-nav-text {
        display: none;
    }

    .ps-nav-link {
        justify-content: center;
        padding: 10px 0;
    }

    .ps-signout span {
        display: none;
    }

    .ps-signout {
        justify-content: center;
    }

    .ps-topbar-title {
        font-size: 12px;
    }

    .ps-topbar-pill {
        padding: 5px 10px;
        font-size: 10px;
    }

    .ps-month-slider {
        padding: 5px 10px;
        gap: 6px;
    }

        .ps-month-slider input[type="range"] {
            width: 70px;
        }

    .ps-notif-dropdown {
        width: 320px;
        right: 8px;
    }
}

/* Mobile — sidebar becomes a slide-out drawer */
@media (max-width: 767px) {
    .ps-shell {
        --ps-sidebar-w: 0px;
        --ps-topbar-h: 52px;
    }

    .ps-sidebar {
        width: 260px !important;
        transform: translateX(-100%);
    }

    .ps-shell.is-drawer-open .ps-sidebar {
        transform: translateX(0);
    }

        .ps-shell.is-drawer-open .ps-sidebar .ps-brand-text,
        .ps-shell.is-drawer-open .ps-sidebar .ps-user-text,
        .ps-shell.is-drawer-open .ps-sidebar .ps-user-chev,
        .ps-shell.is-drawer-open .ps-sidebar .ps-nav-section,
        .ps-shell.is-drawer-open .ps-sidebar .ps-nav-text,
        .ps-shell.is-drawer-open .ps-sidebar .ps-signout span {
            display: block;
        }

        .ps-shell.is-drawer-open .ps-sidebar .ps-brand {
            justify-content: flex-start;
            padding: 16px 18px;
        }

        .ps-shell.is-drawer-open .ps-sidebar .ps-user-card {
            justify-content: flex-start;
            padding: 8px 10px;
        }

        .ps-shell.is-drawer-open .ps-sidebar .ps-nav-link {
            justify-content: flex-start;
            padding: 9px 12px;
        }

        .ps-shell.is-drawer-open .ps-sidebar .ps-signout {
            justify-content: flex-start;
        }

    .ps-topbar {
        left: 0;
        padding: 0 12px;
        gap: 8px;
    }

    .ps-content {
        margin-left: 0;
    }

    .ps-topbar-title {
        display: none;
    }

    .ps-topbar-pill {
        padding: 5px 8px;
        font-size: 10px;
    }

        .ps-topbar-pill .ps-topbar-pill-label {
            display: none;
        }

    .ps-month-slider {
        display: none;
    }

    .ps-notif-dropdown {
        width: calc(100vw - 24px);
        right: 12px;
    }

    /* Drawer scrim */
    .ps-shell.is-drawer-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1045;
        backdrop-filter: blur(2px);
    }
}

/* =============================================================
   LOADING — top progress bar (kept consistent with auth flow)
   ============================================================= */
.ps-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #f59e0b, #ec4899, #8b5cf6, #6366f1);
    background-size: 200% 100%;
    animation: ps-progress-slide 1.4s linear infinite;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

    .ps-progress.is-visible {
        opacity: 1;
    }

@keyframes ps-progress-slide {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}


/* =============================================================
   TOPBAR — User avatar button + dropdown menu
   ============================================================= */
.ps-topbar-avatar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(10, 14, 26, 0.15);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, transform 0.15s;
}

    .ps-topbar-avatar-btn:hover {
        border-color: #F5BB16;
        transform: scale(1.05);
    }

.ps-topbar-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ps-topbar-avatar-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2454, #0a0e1a);
    color: #F5BB16;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.ps-topbar-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 0.5px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    z-index: 1100;
    display: none;
}

    .ps-topbar-user-menu.is-open {
        display: block;
    }

.ps-topbar-user-menu-head {
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.04), rgba(245, 187, 22, 0.04));
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.ps-topbar-user-menu-name {
    font-size: 12.5px;
    font-weight: 500;
    color: #0a0a0a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-topbar-user-menu-sub {
    font-size: 10.5px;
    color: rgba(0, 0, 0, 0.5);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-topbar-user-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    font-size: 12px;
    color: #0a0a0a;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s;
}

    .ps-topbar-user-menu-item:hover {
        background: rgba(139, 92, 246, 0.06);
        color: #0a0a0a;
    }

    .ps-topbar-user-menu-item i {
        font-size: 15px;
        color: #0a0e1a;
        opacity: 0.6;
    }

    .ps-topbar-user-menu-item.is-danger {
        color: #dc2626;
    }

        .ps-topbar-user-menu-item.is-danger i {
            color: #dc2626;
        }

        .ps-topbar-user-menu-item.is-danger:hover {
            background: rgba(220, 38, 38, 0.06);
        }

.ps-topbar-user-menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 4px 0;
}

/* Mobile — dropdown takes more width and aligns to viewport edge */
@media (max-width: 767px) {
    .ps-topbar-user-menu {
        right: -8px;
        min-width: 240px;
    }
}


/* =============================================================
   BLAZOR ERROR UI — hidden by default, shown only when Blazor sets
   display:block on the element after an unhandled exception.
   ============================================================= */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    padding: 12px 20px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 -4px 16px rgba(220, 38, 38, 0.25);
    animation: ps-error-slide-up 0.2s ease-out;
}

    #blazor-error-ui .reload {
        color: #ffffff;
        text-decoration: underline;
        font-weight: 600;
        margin-left: 8px;
    }

        #blazor-error-ui .reload:hover {
            color: #fef2f2;
        }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        float: right;
        font-size: 16px;
        line-height: 1;
        margin-left: 12px;
        color: #ffffff;
        transition: opacity 0.15s;
    }

        #blazor-error-ui .dismiss:hover {
            opacity: 0.7;
        }

@keyframes ps-error-slide-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}


/* =============================================================
   RADZEN OVERLAY Z-INDEX FIXES
   Radzen toasts/dialogs/tooltips must sit above the fixed
   sidebar (z-index:1050) and topbar (z-index:1040).
   ============================================================= */

/* Notification toasts */
.rz-notification {
    z-index: 2000 !important;
    position: fixed !important;
}

.rz-notification-container,
.rz-notification-messages {
    z-index: 2000 !important;
    position: fixed !important;
}

/* Dialog overlays */
.rz-dialog-wrapper,
.rz-overlay {
    z-index: 1900 !important;
}

.rz-dialog {
    z-index: 1950 !important;
}

/* Tooltip */
.rz-tooltip {
    z-index: 2100 !important;
}

/* Context menu */
.rz-context-menu {
    z-index: 2050 !important;
}
