.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.mud-tab-badge {
    margin-right: 10px !important;
}

/* ========== Splash / Loading Screen ========== */

#app-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#app-splash.splash-hide {
    opacity: 0;
    pointer-events: none;
}

#app-splash .splash-logo {
    width: 200px;
    height: auto;
    animation: splash-fade-in 0.6s ease-out both;
}

#app-splash .splash-title {
    margin-top: 1.25rem;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    animation: splash-fade-in 0.6s 0.2s ease-out both;
}

#app-splash .splash-bar-track {
    margin-top: 2.5rem;
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1px;
    overflow: hidden;
    animation: splash-fade-in 0.6s 0.4s ease-out both;
}

#app-splash .splash-bar-fill {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, #5EC4E6, transparent);
    border-radius: 1px;
    animation: splash-bar-slide 1.4s ease-in-out infinite;
}

#app-splash .splash-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 107, 223, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: splash-glow-pulse 3s ease-in-out infinite;
}

@keyframes splash-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splash-bar-slide {
    0% {
        transform: translateX(-200%);
    }
    100% {
        transform: translateX(400%);
    }
}

@keyframes splash-glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

/* In-app loading screen (Blazor MainLayout) */

.app-loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 0;
    animation: app-load-enter 0.4s ease-out both;
}

.app-loading-logo {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(94, 196, 230, 0.15));
    animation: app-load-logo-breathe 3s ease-in-out infinite;
}

.app-loading-text {
    margin-top: 1.5rem;
    font-family: 'Roboto', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.app-loading-progress {
    margin-top: 2rem;
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
    overflow: hidden;
}

.app-loading-progress-fill {
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, transparent, #5EC4E6, transparent);
    border-radius: 1px;
    animation: splash-bar-slide 1.4s ease-in-out infinite;
}

.app-loading-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 107, 223, 0.06) 0%, transparent 70%);
    pointer-events: none;
    animation: splash-glow-pulse 3s ease-in-out infinite;
    z-index: 0;
}

@keyframes app-load-enter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes app-load-logo-breathe {
    0%, 100% {
        filter: drop-shadow(0 0 30px rgba(94, 196, 230, 0.1));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(94, 196, 230, 0.25));
    }
}

/* Fade transition for main content appearing */
.app-content-enter {
    animation: app-content-fade-in 0.4s ease-out both;
}

@keyframes app-content-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== App Bar ========== */

.appbar.mud-appbar {
    position: relative;
    /*background: rgba(0, 0, 0, 0.85);*/
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 1100;
    overflow: hidden;
}

/* Subtle animated gradient glow along the bottom edge */
.appbar-glow {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(61, 107, 223, 0.0) 15%,
        rgba(61, 107, 223, 0.5) 35%,
        rgba(94, 196, 230, 0.6) 50%,
        rgba(61, 107, 223, 0.5) 65%,
        rgba(61, 107, 223, 0.0) 85%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: appbar-glow-sweep 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes appbar-glow-sweep {
    0%, 100% { background-position: 200% 0; }
    50%      { background-position: -100% 0; }
}

/* Brand group: logo + title */
.appbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.appbar-logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appbar-logo {
    filter: drop-shadow(0 0 8px rgba(94, 196, 230, 0.2));
    transition: filter 0.3s ease;
}

.appbar-brand:hover .appbar-logo {
    filter: drop-shadow(0 0 14px rgba(94, 196, 230, 0.4));
}

/* Subtle breathing pulse ring behind the logo */
.appbar-logo-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(94, 196, 230, 0.1);
    animation: appbar-logo-breathe 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes appbar-logo-breathe {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.12);
    }
}

.appbar-title-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.appbar-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.appbar-brand-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.2;
}

.appbar-title-separator {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.appbar-title {
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.2;
}

.appbar-version {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1;
}

/* Vertical divider between brand and menu button */
.appbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 12px;
    flex-shrink: 0;
}

/* Hamburger button */
.appbar-menu-btn.mud-icon-button {
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    transition: all 0.2s ease;
}

.appbar-menu-btn.mud-icon-button:hover {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(61, 107, 223, 0.4);
    background: rgba(61, 107, 223, 0.08);
    box-shadow: 0 0 12px rgba(61, 107, 223, 0.15);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .appbar-brand-name {
        font-size: 0.88rem;
    }

    .appbar-title {
        font-size: 0.78rem;
    }

    .appbar-logo-wrapper img,
    .appbar-logo {
        width: 30px !important;
    }

    .appbar-logo-pulse {
        inset: -3px;
    }

    .appbar-divider {
        margin: 0 8px;
    }
}

@media (max-width: 420px) {
    .appbar-title-separator,
    .appbar-title {
        display: none;
    }
}

/* ========== Auth / Login Screen ========== */

.auth-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: auth-bg-fade-in 1.2s ease-out both;
}

.auth-backdrop-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.85) 100%);
}

.auth-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 380px;
    padding: 3rem 2.5rem 2rem;
    background: rgba(8, 8, 12, 0.75);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    animation: auth-card-enter 0.6s 0.3s ease-out both;
    overflow: hidden;
}

.auth-card-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 107, 223, 0.12) 0%, transparent 70%);
    pointer-events: none;
    animation: splash-glow-pulse 4s ease-in-out infinite;
}

.auth-logo {
    width: 140px;
    height: auto;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 20px rgba(94, 196, 230, 0.15));
    animation: auth-logo-enter 0.6s 0.5s ease-out both;
}

.auth-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.92);
    animation: auth-text-enter 0.5s 0.6s ease-out both;
}

.auth-subtitle {
    margin-top: 0.25rem;
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(94, 196, 230, 0.6);
    animation: auth-text-enter 0.5s 0.7s ease-out both;
}

.auth-divider {
    width: 48px;
    height: 1px;
    margin: 1.5rem 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: auth-text-enter 0.5s 0.8s ease-out both;
}

.auth-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: auth-text-enter 0.5s 0.9s ease-out both;
}

.auth-login-prompt {
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.25rem;
}

.auth-discord-btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.35);
}

.auth-discord-btn:active {
    transform: scale(0.98);
}

.auth-footer {
    margin-top: 2rem;
    font-family: 'Roboto', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.03em;
    animation: auth-text-enter 0.5s 1s ease-out both;
}

@keyframes auth-bg-fade-in {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes auth-card-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-logo-enter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes auth-text-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Sidebar Navigation Layout ========== */

.mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.nav-menu-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.nav-menu-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* ========== Sidebar User Card ========== */

.user-card-container {
    flex-shrink: 0;
}

.user-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 10px 12px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.user-card:hover {
    background: var(--mud-palette-background-gray);
    border-color: var(--mud-palette-lines-inputs);
}

.user-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-card-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mud-palette-primary), var(--mud-palette-secondary));
}

.user-card-avatar {
    border: 2px solid var(--mud-palette-drawer-background) !important;
}

.user-card-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-card-name {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 500 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3 !important;
}

.user-card-status {
    color: var(--mud-palette-text-disabled) !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.04em;
    line-height: 1.2 !important;
}

.user-card-logout-btn {
    flex-shrink: 0;
    color: var(--mud-palette-text-disabled) !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
}

.user-card-logout-btn:hover {
    color: var(--mud-palette-error) !important;
    background-color: rgba(244, 67, 54, 0.08) !important;
}

/* Mini/collapsed sidebar state */
.user-card-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.user-card-avatar-wrapper-mini {
    cursor: default;
}

.user-card-logout-btn-mini {
    color: var(--mud-palette-text-disabled) !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
}

.user-card-logout-btn-mini:hover {
    color: var(--mud-palette-error) !important;
    background-color: rgba(244, 67, 54, 0.08) !important;
}

/* Shared markdown content styles - used by MarkdownViewer and MarkdownEditor preview */
.markdown-content {
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-word;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 0.5em;
    margin-bottom: 0.25em;
}

.markdown-content p {
    margin: 0.5em 0;
}

.markdown-content code {
    background-color: var(--mud-palette-background-gray);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.85em;
}

.markdown-content pre {
    background-color: var(--mud-palette-background-gray);
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 3px solid var(--mud-palette-primary);
    padding: 8px 14px;
    margin: 0.5em 0;
    background: rgba(61, 107, 223, 0.06);
    border-radius: 0 6px 6px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82em;
    line-height: 1.5;
}

.markdown-content blockquote p {
    margin: 0.25em 0;
}

.markdown-content blockquote p:first-child {
    margin-top: 0;
}

.markdown-content blockquote p:last-child {
    margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 24px;
    margin: 0.5em 0;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.5em 0;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid var(--mud-palette-lines-default);
    padding: 6px 12px;
    text-align: left;
}

.markdown-content th {
    background-color: var(--mud-palette-background-gray);
}

.markdown-content a {
    color: var(--mud-palette-primary);
    text-decoration: underline;
}

.markdown-content a:hover {
    color: var(--mud-palette-primary-darken);
    text-decoration: underline;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin: 1em 0;
}

/* ========== Enforcements Page ========== */

.enforcements-page {
    animation: app-content-fade-in 0.35s ease-out both;
}

/* Section headers */
.enforcements-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

/* ── Platform Selector ── */

.platform-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.platform-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Roboto', sans-serif;
    font-size: 0;
    outline: none;
    overflow: hidden;
}

.platform-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
}

.platform-card--active {
    background: rgba(61, 107, 223, 0.1);
    border-color: rgba(61, 107, 223, 0.4);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(61, 107, 223, 0.15);
}

.platform-card--active:hover {
    background: rgba(61, 107, 223, 0.14);
    border-color: rgba(61, 107, 223, 0.5);
}

.platform-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.25s ease;
}

.platform-card--active .platform-card-icon {
    background: rgba(61, 107, 223, 0.15);
}

.platform-card-name {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.platform-card-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--mud-palette-primary);
    animation: platform-indicator-in 0.3s ease-out both;
}

@keyframes platform-indicator-in {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 32px;
        opacity: 1;
    }
}

/* ── Stat Cards ── */

.enforcement-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 0.5rem;
}

.stat-card {
    position: relative;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    overflow: hidden;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.stat-card-glow {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
}

.stat-card-glow--primary {
    background: radial-gradient(circle, var(--mud-palette-primary), transparent 70%);
}

.stat-card-glow--error {
    background: radial-gradient(circle, var(--mud-palette-error), transparent 70%);
}

.stat-card-glow--warning {
    background: radial-gradient(circle, var(--mud-palette-warning), transparent 70%);
}

.stat-card-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1;
}

.stat-card-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-card-icon--primary {
    background: rgba(61, 107, 223, 0.12);
    color: var(--mud-palette-primary);
}

.stat-card-icon--error {
    background: rgba(244, 67, 54, 0.12);
    color: var(--mud-palette-error);
}

.stat-card-icon--warning {
    background: rgba(255, 152, 0, 0.12);
    color: var(--mud-palette-warning);
}

.stat-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: -0.02em;
}

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Enforcement Card List (Timeline replacement) ── */

.enforcement-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enforcement-card {
    display: flex;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: all 0.2s ease;
    animation: enforcement-card-enter 0.3s ease-out both;
}

.enforcement-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.enforcement-card-accent {
    width: 4px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.enforcement-card--ban .enforcement-card-accent {
    background: var(--mud-palette-error);
}

.enforcement-card--warn .enforcement-card-accent {
    background: var(--mud-palette-warning);
}

.enforcement-card--revoked .enforcement-card-accent {
    opacity: 0.3;
}

.enforcement-card--revoked {
    opacity: 0.55;
}

.enforcement-card--revoked:hover {
    opacity: 0.75;
}

.enforcement-card-body {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* Card header */
.enforcement-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.enforcement-card-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.enforcement-card--ban .enforcement-card-type-badge {
    color: var(--mud-palette-error);
}

.enforcement-card--warn .enforcement-card-type-badge {
    color: var(--mud-palette-warning);
}

.enforcement-card-id {
    display: flex;
    align-items: center;
}

/* Card reason */
.enforcement-card-reason {
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Card metadata footer */
.enforcement-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.enforcement-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.enforcement-permanent-badge {
    color: var(--mud-palette-error);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
}

/* Timeline end marker */
.enforcement-timeline-end {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0 8px;
}

.enforcement-timeline-end-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

@keyframes enforcement-card-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for enforcement cards */
.enforcement-card:nth-child(1) { animation-delay: 0s; }
.enforcement-card:nth-child(2) { animation-delay: 0.04s; }
.enforcement-card:nth-child(3) { animation-delay: 0.08s; }
.enforcement-card:nth-child(4) { animation-delay: 0.12s; }
.enforcement-card:nth-child(5) { animation-delay: 0.16s; }
.enforcement-card:nth-child(6) { animation-delay: 0.20s; }
.enforcement-card:nth-child(7) { animation-delay: 0.24s; }
.enforcement-card:nth-child(8) { animation-delay: 0.28s; }
.enforcement-card:nth-child(9) { animation-delay: 0.32s; }
.enforcement-card:nth-child(10) { animation-delay: 0.36s; }

/* ── Loading & Empty States ── */

.enforcement-list-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enforcement-skeleton-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.enforcement-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

/* ── Responsive ── */

@media (max-width: 600px) {
    .platform-selector {
        gap: 8px;
    }

    .platform-card {
        min-width: 0;
        flex: 1 1 calc(50% - 8px);
        padding: 12px 16px;
    }

    .enforcement-stats {
        grid-template-columns: 1fr;
    }

    .enforcement-card-meta {
        gap: 10px;
    }

    .enforcement-card-header {
        gap: 6px;
    }
}

/* ========== List Pages (Appeals & Reports) ========== */

.list-page {
    animation: app-content-fade-in 0.35s ease-out both;
}

/* ── Page Header ── */

.list-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.list-page-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.list-page-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.list-page-header-icon--primary {
    background: rgba(61, 107, 223, 0.12);
    color: var(--mud-palette-primary);
}

.list-page-header-icon--info {
    background: rgba(33, 150, 243, 0.12);
    color: var(--mud-palette-info);
}

.list-page-create-btn {
    border-radius: 10px !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
    font-weight: 500 !important;
    padding-left: 20px !important;
    padding-right: 24px !important;
}

/* ── Card List ── */

.list-page-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-card {
    display: flex;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: all 0.2s ease;
    animation: list-card-enter 0.3s ease-out both;
}

.list-card--clickable {
    cursor: pointer;
}

.list-card--clickable:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.list-card--clickable:hover .list-card-arrow {
    opacity: 1;
    color: var(--mud-palette-primary);
}

.list-card--resolved {
    opacity: 0.5;
}

.list-card--resolved:hover {
    opacity: 0.75;
}

.list-card-accent {
    width: 4px;
    flex-shrink: 0;
}

.list-card--resolved .list-card-accent {
    opacity: 0.4;
}

.list-card-body {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.list-card-arrow {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.15);
    opacity: 0.5;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* ── Card Header Row ── */

.list-card-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.list-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.list-card-id {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mud-palette-primary);
    flex-shrink: 0;
}

.list-card-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.list-card-subtitle,
.list-card-title-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-card-title-text {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

/* ── Card Metadata ── */

.list-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.list-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ── Skeleton / Empty States ── */

.list-page-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-card-skeleton {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.list-page-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1rem;
    text-align: center;
}

/* ── Stagger Animations ── */

@keyframes list-card-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.list-card:nth-child(1) { animation-delay: 0s; }
.list-card:nth-child(2) { animation-delay: 0.03s; }
.list-card:nth-child(3) { animation-delay: 0.06s; }
.list-card:nth-child(4) { animation-delay: 0.09s; }
.list-card:nth-child(5) { animation-delay: 0.12s; }
.list-card:nth-child(6) { animation-delay: 0.15s; }
.list-card:nth-child(7) { animation-delay: 0.18s; }
.list-card:nth-child(8) { animation-delay: 0.21s; }
.list-card:nth-child(9) { animation-delay: 0.24s; }
.list-card:nth-child(10) { animation-delay: 0.27s; }

/* ── Responsive ── */

@media (max-width: 600px) {
    .list-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-page-create-btn {
        width: 100%;
    }

    .list-card-row-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .list-card-meta {
        gap: 8px;
    }

    .list-card-arrow {
        display: none;
    }
}

/* ========== Detail Pages (Report / Appeal Detail View) ========== */

.detail-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: app-content-fade-in 0.35s ease-out both;
}

/* ── Staff Banner ── */

.detail-staff-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(33, 150, 243, 0.06);
    border: 1px solid rgba(33, 150, 243, 0.15);
    border-radius: 10px;
}

/* ── Header Card ── */

.detail-header {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-header-title-area {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.detail-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.detail-header-icon--report {
    background: rgba(33, 150, 243, 0.12);
    color: var(--mud-palette-info);
}

.detail-header-icon--appeal {
    background: rgba(61, 107, 223, 0.12);
    color: var(--mud-palette-primary);
}

.detail-header-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.detail-header-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
}

.detail-header-id {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.02em;
}

.detail-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.detail-meta-item .mud-icon-root {
    color: rgba(255, 255, 255, 0.25);
}

.detail-header-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── Loading Skeletons ── */

.detail-header-skeleton {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

.detail-skeleton-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 22px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

/* ── Content Sections ── */

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    animation: detail-section-enter 0.3s ease-out both;
}

.detail-section:nth-child(3) { animation-delay: 0.04s; }
.detail-section:nth-child(4) { animation-delay: 0.08s; }
.detail-section:nth-child(5) { animation-delay: 0.12s; }
.detail-section:nth-child(6) { animation-delay: 0.16s; }
.detail-section:nth-child(7) { animation-delay: 0.20s; }
.detail-section:nth-child(8) { animation-delay: 0.24s; }

@keyframes detail-section-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-section-label .mud-icon-root {
    font-size: 1rem !important;
    color: var(--mud-palette-primary);
    opacity: 0.6;
}

.detail-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(61, 107, 223, 0.15);
    color: var(--mud-palette-primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0;
}

.detail-section-content {
    padding: 16px 18px;
}

.detail-section-content--flush {
    padding: 0;
}

.detail-section-content--flush > * {
    padding: 16px 18px;
}

.detail-section-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}

/* ── Reported Players ── */

.detail-player-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.detail-player-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.detail-player-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.detail-player-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.detail-player-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.detail-player-id {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ── Evidence ── */

.detail-evidence-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-evidence-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.detail-evidence-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.detail-evidence-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    flex-shrink: 0;
}

.detail-evidence-icon--image {
    background: rgba(76, 175, 80, 0.1);
    color: var(--mud-palette-success);
}

.detail-evidence-icon--link {
    background: rgba(61, 107, 223, 0.1);
    color: var(--mud-palette-primary);
}

.detail-evidence-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.detail-evidence-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-evidence-size {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ── Staff Response Resolved Footer ── */

.detail-response-resolved {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Two Column Layout ── */

.detail-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Enforcement Details Grid ── */

.detail-enforcement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.detail-enforcement-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-enforcement-field-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
}

.detail-enforcement-field-value {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ── Sentence Progress Bar ── */

.detail-progress-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-progress-bar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.detail-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--mud-palette-error), var(--mud-palette-warning));
    transition: width 0.6s ease-out;
}

.detail-progress-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.03em;
}

/* ── Responsive ── */

@media (max-width: 600px) {
    .detail-header {
        padding: 16px;
    }

    .detail-header-top {
        flex-direction: column;
        gap: 10px;
    }

    .detail-header-meta {
        gap: 10px;
    }

    .detail-section-content {
        padding: 14px 16px;
    }

    .detail-staff-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .detail-two-col {
        grid-template-columns: 1fr;
    }

    .detail-enforcement-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Detail Layout Grid ── */

.detail-layout {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 20px;
    align-items: start;
    animation: app-content-fade-in 0.35s ease-out both;
}

.detail-layout-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.detail-layout-sidebar {
    min-width: 0;
}

.detail-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* ── Section Card (Sidebar) ── */

.section-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    animation: section-card-enter 0.3s ease-out both;
}

.section-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.section-card--accent {
    border-top: 2px solid var(--section-accent, var(--mud-palette-primary));
}

.section-card--accent:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
                0 -2px 12px color-mix(in srgb, var(--section-accent, var(--mud-palette-primary)) 15%, transparent);
}

.section-card:nth-child(1) { animation-delay: 0s; }
.section-card:nth-child(2) { animation-delay: 0.04s; }
.section-card:nth-child(3) { animation-delay: 0.08s; }
.section-card:nth-child(4) { animation-delay: 0.12s; }
.section-card:nth-child(5) { animation-delay: 0.16s; }
.section-card:nth-child(6) { animation-delay: 0.20s; }

@keyframes section-card-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.section-card-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--section-accent, var(--mud-palette-primary)) 12%, transparent);
    color: var(--section-accent, var(--mud-palette-primary));
    flex-shrink: 0;
}

.section-card-header-icon .mud-icon-root {
    font-size: 1.1rem !important;
}

.section-card-header-text {
    flex: 1;
    min-width: 0;
}

.section-card-header-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.2;
}

.section-card-header-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.2;
    margin-top: 1px;
}

.section-card-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.section-card-header-actions .mud-button-root {
    text-transform: none !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.02em !important;
    border-radius: 6px !important;
}

.section-card-content {
    padding: 14px 16px;
}

.section-card-content--compact {
    padding: 10px 16px;
}

.section-card-content--flush {
    padding: 0;
}

.section-card-content--flush .mud-simple-table {
    margin: 0;
}

.section-card-footer {
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section-card-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    animation: section-card-enter 0.3s ease-out both;
}

.section-card-skeleton:nth-child(1) { animation-delay: 0s; }
.section-card-skeleton:nth-child(2) { animation-delay: 0.04s; }
.section-card-skeleton:nth-child(3) { animation-delay: 0.08s; }

/* ── Detail Content Area ── */

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-content--discussion {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-content .mud-expand-panel {
    background: rgba(255, 255, 255, 0.025) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none !important;
}

.detail-content .mud-expand-panel::before {
    display: none !important;
}

.detail-content .mud-expand-panel:hover {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.detail-content .mud-expand-panel.mud-panel-expanded {
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
}

.detail-content .mud-expand-panel-header {
    padding: 12px 18px !important;
    min-height: 0 !important;
}

.detail-content .mud-expand-panel-text {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: rgba(255, 255, 255, 0.55) !important;
}

.detail-content .mud-expand-panel-content {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 16px;
}

.detail-content .mud-expand-panel-list > .mud-expand-panel:nth-child(1) {
    animation: detail-section-enter 0.3s ease-out both;
    animation-delay: 0s;
}
.detail-content .mud-expand-panel-list > .mud-expand-panel:nth-child(2) {
    animation: detail-section-enter 0.3s ease-out both;
    animation-delay: 0.04s;
}
.detail-content .mud-expand-panel-list > .mud-expand-panel:nth-child(3) {
    animation: detail-section-enter 0.3s ease-out both;
    animation-delay: 0.08s;
}
.detail-content .mud-expand-panel-list > .mud-expand-panel:nth-child(4) {
    animation: detail-section-enter 0.3s ease-out both;
    animation-delay: 0.12s;
}
.detail-content .mud-expand-panel-list > .mud-expand-panel:nth-child(5) {
    animation: detail-section-enter 0.3s ease-out both;
    animation-delay: 0.16s;
}

/* ── Interaction States ── */

.section-card:focus-within {
    border-color: rgba(61, 107, 223, 0.3);
    box-shadow: 0 0 0 2px rgba(61, 107, 223, 0.1);
}

.section-card-content .mud-chip:hover {
    filter: brightness(1.1);
}

.section-card-content .mud-collapse-container {
    transition: height 0.25s ease;
}

.section-card-content .mud-skeleton {
    border-radius: 8px !important;
}

.section-card .mud-simple-table {
    background: transparent !important;
}

.section-card .mud-simple-table .mud-table-row:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.section-card .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.section-card .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.section-card .mud-alert {
    border-radius: 8px !important;
}

/* ── Detail Layout Responsive ── */

@media (max-width: 1280px) {
    .detail-layout {
        grid-template-columns: 7fr 3fr;
        gap: 16px;
    }
}

@media (max-width: 960px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

}

/* Skeleton loading for detail-header */
.detail-header-skeleton {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    animation: section-card-enter 0.3s ease-out both;
}

.detail-skeleton-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    animation: section-card-enter 0.3s ease-out both;
}

.detail-skeleton-section:nth-child(2) { animation-delay: 0.04s; }
.detail-skeleton-section:nth-child(3) { animation-delay: 0.08s; }

/* ── Data Grid ── */

.mud-data-grid {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    overflow: hidden;
    animation: section-card-enter 0.3s ease-out both;
}

.mud-data-grid .mud-table-container {
    background: transparent !important;
}

.mud-data-grid .mud-table-root {
    background: transparent !important;
}

/* Toolbar */
.mud-data-grid .mud-table-toolbar {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 48px;
}

.mud-data-grid .mud-table-toolbar .mud-typography {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
}

/* Header */
.mud-data-grid .mud-table-root {
    background: transparent !important;
}

.mud-data-grid .mud-table-head {
    background: transparent !important;
}

.mud-data-grid .mud-table-head .mud-table-cell {
    background: var(--mud-palette-surface) !important;
    border-bottom: none !important;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5) !important;
    padding-top: 10px;
    padding-bottom: 6px;
}

/* Filter row — override MudBlazor's fixed 59px sticky top to match our compact header */
.mud-data-grid .mud-table-head .mud-table-row.filter-header-row .mud-table-cell,
.mud-data-grid .mud-table-head .filter-header-cell {
    top: auto !important;
    background: var(--mud-palette-surface) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding-top: 4px;
    padding-bottom: 4px;
}

.mud-data-grid .mud-table-head .filter-header-cell .mud-input {
    font-size: 0.78rem;
}

.mud-data-grid .mud-table-head .filter-header-cell .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.06) !important;
    border-radius: 6px;
}

.mud-data-grid .mud-table-head .filter-header-cell .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.mud-data-grid .mud-table-head .filter-header-cell .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: rgba(61, 107, 223, 0.4) !important;
}

/* Filter row icon buttons (filter/clear) */
.mud-data-grid .mud-table-head .filter-header-cell .mud-icon-button {
    color: rgba(255, 255, 255, 0.25) !important;
}

.mud-data-grid .mud-table-head .filter-header-cell .mud-icon-button:hover {
    color: rgba(255, 255, 255, 0.6) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

/* Body rows — no !important on background so inline RowStyleFunc (e.g. unread highlight) wins */
.mud-data-grid .mud-table-body .mud-table-row {
    transition: background 0.15s ease;
}

.mud-data-grid .mud-table-body .mud-table-row .mud-table-cell {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
    padding-top: 10px;
    padding-bottom: 10px;
}

.mud-data-grid .mud-table-body .mud-table-row {
    cursor: default !important;
}

.mud-data-grid .mud-table-body .mud-table-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.mud-data-grid.mud-table-hover .mud-table-body .mud-table-row:hover {
    background: rgba(255, 255, 255, 0.035);
}

.mud-data-grid .mud-table-body .mud-table-row.mud-selected {
    background: rgba(61, 107, 223, 0.08);
}

/* Alternating row stripe (subtle) */
.mud-data-grid .mud-table-body .mud-table-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.mud-data-grid.mud-table-hover .mud-table-body .mud-table-row:nth-child(even):hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Pagination */
.mud-data-grid .mud-table-pagination {
    background: rgba(255, 255, 255, 0.02) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.5);
}

.mud-data-grid .mud-table-pagination .mud-table-pagination-caption {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.mud-data-grid .mud-table-pagination .mud-table-pagination-actions .mud-icon-button {
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.15s ease, background 0.15s ease;
}

.mud-data-grid .mud-table-pagination .mud-table-pagination-actions .mud-icon-button:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.06);
}

.mud-data-grid .mud-table-pagination .mud-select {
    color: rgba(255, 255, 255, 0.5);
}

/* Sort icon */
.mud-data-grid .mud-table-head .mud-table-cell .mud-table-sort-label .mud-icon-root {
    color: rgba(255, 255, 255, 0.25) !important;
    transition: color 0.15s ease;
}

.mud-data-grid .mud-table-head .mud-table-cell:hover .mud-table-sort-label .mud-icon-root {
    color: rgba(255, 255, 255, 0.5) !important;
}

.mud-data-grid .mud-table-head .mud-table-cell .mud-table-sort-label.active .mud-icon-root {
    color: var(--mud-palette-primary) !important;
}

/* Loading overlay */
.mud-data-grid .mud-table-loading-progress {
    color: var(--mud-palette-primary) !important;
}

/* Column resize handle */
.mud-data-grid .mud-table-head .header-resize-cursor {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Chips and links inside cells */
.mud-data-grid .mud-table-body .mud-chip {
    font-size: 0.75rem;
}

/* ========================================================================== */
/* ── Home Page                                                            ── */
/* ========================================================================== */

.home-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
    animation: home-fade-in 0.5s ease-out both;
}

@keyframes home-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Welcome Hero ── */

.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: 1.75rem 2rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.home-hero-glow {
    position: absolute;
    top: -40%;
    left: -10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 107, 223, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.home-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1;
}

.home-hero-avatar {
    width: 52px;
    height: 52px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(61, 107, 223, 0.15);
}

.home-hero-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-hero-greeting {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
}

.home-hero-name {
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: -0.01em;
}

/* ── Section Headers ── */

.home-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
}

/* ── Quick Actions ── */

.home-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.home-action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
    animation: home-card-enter 0.3s ease-out both;
}

.home-action-card:nth-child(1) { animation-delay: 0s; }
.home-action-card:nth-child(2) { animation-delay: 0.04s; }
.home-action-card:nth-child(3) { animation-delay: 0.08s; }
.home-action-card:nth-child(4) { animation-delay: 0.12s; }

@keyframes home-card-enter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.home-action-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.home-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.home-action-icon--error {
    background: rgba(244, 67, 54, 0.12);
    color: #f44336;
}

.home-action-icon--warning {
    background: rgba(255, 167, 38, 0.12);
    color: #ffa726;
}

.home-action-icon--info {
    background: rgba(94, 196, 230, 0.12);
    color: #5EC4E6;
}

.home-action-icon--primary {
    background: rgba(61, 107, 223, 0.12);
    color: #3D6BDF;
}

.home-action-icon--tertiary {
    background: rgba(123, 31, 162, 0.12);
    color: #CE93D8;
}

.home-action-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.home-action-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.home-action-desc {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ── Recent Activity ── */

.home-activity {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 0.25rem;
}

.home-activity-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.home-activity-panel .home-section-header {
    margin-bottom: 2px;
}

/* ── Activity List Items ── */

.home-item-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
    cursor: pointer;
    animation: home-card-enter 0.3s ease-out both;
}

.home-item:nth-child(1) { animation-delay: 0s; }
.home-item:nth-child(2) { animation-delay: 0.03s; }
.home-item:nth-child(3) { animation-delay: 0.06s; }
.home-item:nth-child(4) { animation-delay: 0.09s; }
.home-item:nth-child(5) { animation-delay: 0.12s; }

.home-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.home-item:hover .home-item-arrow {
    opacity: 1;
    color: var(--mud-palette-primary);
}

.home-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.85;
}

.home-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.home-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.home-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
}

.home-item-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.home-item-arrow {
    opacity: 0;
    color: rgba(255, 255, 255, 0.15);
    transition: all 0.18s ease;
    flex-shrink: 0;
}

/* ── Loading / Empty States ── */

.home-item-skeleton {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.home-empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 2rem 1rem;
}

/* ── Platforms ── */

.home-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-platform-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.home-platform-chip:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .home-page {
        padding: 1rem 0 2rem;
    }

    .home-hero {
        padding: 1.25rem 1.25rem;
    }

    .home-hero-name {
        font-size: 1.15rem;
    }

    .home-actions {
        grid-template-columns: 1fr;
    }


}

@media (max-width: 480px) {
    .home-hero {
        padding: 1rem;
    }

    .home-hero-avatar {
        width: 42px;
        height: 42px;
    }

    .home-hero-name {
        font-size: 1.05rem;
    }

    .home-action-card {
        padding: 12px 14px;
    }

    .home-activity-panel {
        padding: 12px;
    }
}

/* ========================================================================== */
/* ── Discussion Component                                                 ── */
/* ========================================================================== */

.discussion-thread {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Header ── */

.discussion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
    margin-bottom: 4px;
}

.discussion-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discussion-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Live indicator */
.discussion-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4caf50;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.discussion-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4caf50;
    animation: discussion-live-pulse 2s ease-in-out infinite;
}

@keyframes discussion-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* Currently viewing */
.discussion-viewers {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(94, 196, 230, 0.06);
    border: 1px solid rgba(94, 196, 230, 0.12);
}

.discussion-viewer-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(94, 196, 230, 0.3);
    background: rgba(255, 255, 255, 0.05);
    margin-left: -4px;
    transition: transform 0.2s ease;
}

.discussion-viewer-avatar:first-of-type {
    margin-left: 0;
}

.discussion-viewer-avatar:hover {
    transform: translateY(-1px);
    z-index: 2;
}

.discussion-participants {
    display: flex;
    align-items: center;
}

.discussion-participant-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.06);
    object-fit: cover;
    margin-left: -8px;
    transition: transform 0.2s ease, z-index 0.2s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
}

.discussion-participant-avatar:first-child {
    margin-left: 0;
}

.discussion-participant-avatar:hover {
    transform: translateY(-2px);
    z-index: 2;
}

.discussion-participants-overflow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(61, 107, 223, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.06);
    margin-left: -8px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
}

/* ── Chat Message Card ── */

.discussion-message {
    display: flex;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: all 0.2s ease;
    animation: discussion-message-enter 0.3s ease-out both;
}

.discussion-message:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.discussion-message--private {
    border-color: rgba(244, 67, 54, 0.15);
}

.discussion-message--private:hover {
    border-color: rgba(244, 67, 54, 0.25);
}

/* Left accent strip */
.discussion-message-accent {
    width: 4px;
    flex-shrink: 0;
    background: var(--mud-palette-primary);
    transition: background 0.2s ease;
}

.discussion-message--private .discussion-message-accent {
    background: var(--mud-palette-error);
}

/* Message body */
.discussion-message-body {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

/* Message header row */
.discussion-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.discussion-message-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discussion-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.discussion-message-username {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.01em;
}

/* Message content */
.discussion-message-content {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
    overflow-wrap: break-word;
    word-break: break-word;
}

.discussion-message-content .markdown-content {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Message footer metadata */
.discussion-message-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.discussion-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

.discussion-meta-item .mud-icon-root {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.25);
}

.discussion-message-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.discussion-message:hover .discussion-message-actions {
    opacity: 1;
}

.discussion-message-actions .mud-icon-button {
    color: rgba(255, 255, 255, 0.35) !important;
}

.discussion-message-actions .mud-icon-button:hover {
    color: rgba(255, 255, 255, 0.7) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* Visibility badge */
.discussion-visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 4px;
}

.discussion-visibility-badge--public {
    background: rgba(102, 187, 106, 0.1);
    color: var(--mud-palette-success);
}

.discussion-visibility-badge--private {
    background: rgba(244, 67, 54, 0.1);
    color: var(--mud-palette-error);
}

.discussion-visibility-badge .mud-icon-root {
    font-size: 0.78rem !important;
}

/* Staff badge */
.discussion-staff-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(66, 165, 245, 0.1);
    color: var(--mud-palette-info);
}

.discussion-staff-badge .mud-icon-root {
    font-size: 0.78rem !important;
}

/* Edited badge */
.discussion-edited-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.3);
    cursor: default;
}

/* ── Reactions ── */

.discussion-reactions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.discussion-reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.6);
}

.discussion-reaction-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.discussion-reaction-pill--active {
    background: rgba(61, 107, 223, 0.12);
    border-color: rgba(61, 107, 223, 0.35);
}

.discussion-reaction-pill--active:hover {
    background: rgba(61, 107, 223, 0.2);
    border-color: rgba(61, 107, 223, 0.45);
}

.discussion-reaction-emoji {
    font-size: 0.9rem;
    line-height: 1;
}

.discussion-reaction-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    min-width: 8px;
    text-align: center;
}

.discussion-reaction-pill--active .discussion-reaction-count {
    color: var(--mud-palette-primary);
}

/* Emoji Picker Popover */
.discussion-emoji-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px;
    max-width: 220px;
}

.discussion-emoji-picker-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.12s ease;
    line-height: 1;
}

.discussion-emoji-picker-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.2);
}

/* Custom Emojis */
.custom-emoji {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    font-family: inherit;
}

.custom-emoji--green {
    color: #4caf50;
}

.custom-emoji--red {
    color: #ef5350;
}

/* Reaction menu button styling */
.discussion-reaction-menu-button .mud-icon-button {
    color: rgba(255, 255, 255, 0.35) !important;
}

.discussion-reaction-menu-button .mud-icon-button:hover {
    color: rgba(255, 255, 255, 0.7) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* ── Edit Mode ── */

.discussion-edit-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

/* ── Quote Preview ── */

.discussion-quote-preview {
    display: flex;
    border-radius: 8px;
    background: rgba(61, 107, 223, 0.04);
    border: 1px solid rgba(61, 107, 223, 0.12);
    overflow: hidden;
    animation: discussion-message-enter 0.2s ease-out both;
}

.discussion-quote-preview-accent {
    width: 3px;
    flex-shrink: 0;
    background: var(--mud-palette-primary);
    opacity: 0.5;
}

.discussion-quote-preview-body {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.discussion-quote-preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

.discussion-quote-preview-header .mud-icon-root {
    font-size: 0.9rem !important;
    color: var(--mud-palette-primary);
    opacity: 0.6;
}

.discussion-quote-preview-header strong {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.discussion-quote-preview-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Reply Area ── */

.discussion-reply {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.discussion-reply:focus-within {
    border-color: rgba(61, 107, 223, 0.3);
}

.discussion-reply-body {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.discussion-reply-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Locked State ── */

.discussion-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
}

.discussion-locked .mud-icon-root {
    font-size: 1rem !important;
    color: rgba(255, 255, 255, 0.25);
}

/* ── End Marker ── */

.discussion-thread-end {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0 4px;
}

.discussion-thread-end-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

/* ── Empty State ── */

.discussion-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 2rem 1rem;
}

/* ── Staggered animation ── */

@keyframes discussion-message-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.discussion-message:nth-child(1) { animation-delay: 0s; }
.discussion-message:nth-child(2) { animation-delay: 0.04s; }
.discussion-message:nth-child(3) { animation-delay: 0.08s; }
.discussion-message:nth-child(4) { animation-delay: 0.12s; }
.discussion-message:nth-child(5) { animation-delay: 0.16s; }
.discussion-message:nth-child(6) { animation-delay: 0.20s; }
.discussion-message:nth-child(7) { animation-delay: 0.24s; }
.discussion-message:nth-child(8) { animation-delay: 0.28s; }
.discussion-message:nth-child(9) { animation-delay: 0.32s; }
.discussion-message:nth-child(10) { animation-delay: 0.36s; }

/* ── Mention Badge ── */

.discussion-mention-badge {
    display: inline;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(61, 107, 223, 0.15);
    color: var(--mud-palette-primary);
    font-weight: 600;
    font-size: 0.875em;
    white-space: nowrap;
    cursor: default;
}

/* ── Responsive ── */

@media (max-width: 600px) {
    .discussion-message-body {
        padding: 10px 14px;
    }

    .discussion-message-header {
        gap: 6px;
    }

    .discussion-message-meta {
        gap: 8px;
    }

    .discussion-reply-body {
        padding: 10px 14px;
    }

    .discussion-message-actions {
        opacity: 1;
    }
}

/* ========================================================================== */
/* ── Staff Home / Dashboard                                               ── */
/* ========================================================================== */

.staff-home {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
    animation: staff-home-fade-in 0.5s ease-out both;
}

@keyframes staff-home-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero ── */

.staff-home-hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: 1.75rem 2rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.staff-home-hero-glow {
    position: absolute;
    top: -40%;
    left: -10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 107, 223, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.staff-home-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1;
}

.staff-home-hero-avatar {
    width: 52px;
    height: 52px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(61, 107, 223, 0.15);
}

.staff-home-hero-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.staff-home-hero-greeting {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--mud-palette-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.staff-home-hero-name {
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: -0.01em;
}

/* ── Section Headers ── */

.staff-home-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
}

/* ── Quick Actions ── */

.staff-home-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.staff-home-action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
    animation: staff-home-card-enter 0.3s ease-out both;
}

.staff-home-action-card:nth-child(1) { animation-delay: 0s; }
.staff-home-action-card:nth-child(2) { animation-delay: 0.04s; }
.staff-home-action-card:nth-child(3) { animation-delay: 0.08s; }
.staff-home-action-card:nth-child(4) { animation-delay: 0.12s; }

@keyframes staff-home-card-enter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.staff-home-action-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.staff-home-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.staff-home-action-icon--warning {
    background: rgba(255, 167, 38, 0.12);
    color: #ffa726;
}

.staff-home-action-icon--info {
    background: rgba(94, 196, 230, 0.12);
    color: #5EC4E6;
}

.staff-home-action-icon--primary {
    background: rgba(61, 107, 223, 0.12);
    color: #3D6BDF;
}

.staff-home-action-icon--success {
    background: rgba(102, 187, 106, 0.12);
    color: #66bb6a;
}

.staff-home-action-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.staff-home-action-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.staff-home-action-desc {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ── Statistics Cards ── */

.staff-home-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.staff-home-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: staff-home-card-enter 0.3s ease-out both;
}

.staff-home-stat-card:nth-child(1) { animation-delay: 0s; }
.staff-home-stat-card:nth-child(2) { animation-delay: 0.03s; }
.staff-home-stat-card:nth-child(3) { animation-delay: 0.06s; }
.staff-home-stat-card:nth-child(4) { animation-delay: 0.09s; }
.staff-home-stat-card:nth-child(5) { animation-delay: 0.12s; }
.staff-home-stat-card:nth-child(6) { animation-delay: 0.15s; }

.staff-home-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--stat-color) 12%, transparent);
    color: var(--stat-color);
    flex-shrink: 0;
}

.staff-home-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.staff-home-stat-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.02em;
}

.staff-home-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
}

/* ── Activity Panels (Assigned + Unassigned) ── */

.staff-home-activity {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.staff-home-activity-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.staff-home-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.staff-home-panel-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

/* ── Item List (shared between assigned & unassigned) ── */

.staff-home-item-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.staff-home-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
    cursor: pointer;
    animation: staff-home-card-enter 0.3s ease-out both;
}

.staff-home-item:nth-child(1) { animation-delay: 0s; }
.staff-home-item:nth-child(2) { animation-delay: 0.03s; }
.staff-home-item:nth-child(3) { animation-delay: 0.06s; }
.staff-home-item:nth-child(4) { animation-delay: 0.09s; }
.staff-home-item:nth-child(5) { animation-delay: 0.12s; }
.staff-home-item:nth-child(6) { animation-delay: 0.15s; }
.staff-home-item:nth-child(7) { animation-delay: 0.18s; }

.staff-home-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.staff-home-item:hover .staff-home-item-arrow {
    opacity: 1;
    color: var(--mud-palette-primary);
}

.staff-home-item--resolved {
    opacity: 0.45;
}

.staff-home-item--resolved:hover {
    opacity: 0.65;
}

.staff-home-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.85;
}

.staff-home-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.staff-home-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.staff-home-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.staff-home-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
}

.staff-home-item-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.staff-home-item-arrow {
    opacity: 0;
    color: rgba(255, 255, 255, 0.15);
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.staff-home-item-age-badge {
    font-size: 0.62rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Loading / Empty States ── */

.staff-home-item-skeleton {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.staff-home-empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 2rem 1rem;
}

/* ── Performance Cards ── */

.staff-home-perf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.staff-home-perf-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    animation: staff-home-card-enter 0.3s ease-out both;
}

.staff-home-perf-card:nth-child(1) { animation-delay: 0s; }
.staff-home-perf-card:nth-child(2) { animation-delay: 0.04s; }
.staff-home-perf-card:nth-child(3) { animation-delay: 0.08s; }
.staff-home-perf-card:nth-child(4) { animation-delay: 0.12s; }
.staff-home-perf-card:nth-child(5) { animation-delay: 0.16s; }
.staff-home-perf-card:nth-child(6) { animation-delay: 0.20s; }

.staff-home-perf-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--perf-color, rgba(255, 255, 255, 0.9));
    line-height: 1;
}

.staff-home-perf-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.02em;
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .staff-home-activity {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .staff-home {
        padding: 1rem 0 2rem;
    }

    .staff-home-hero {
        padding: 1.25rem 1.25rem;
    }

    .staff-home-hero-name {
        font-size: 1.15rem;
    }

    .staff-home-actions {
        grid-template-columns: 1fr;
    }

    .staff-home-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .staff-home-perf {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .staff-home-hero {
        padding: 1rem;
    }

    .staff-home-hero-avatar {
        width: 42px;
        height: 42px;
    }

    .staff-home-hero-name {
        font-size: 1.05rem;
    }

    .staff-home-stats {
        grid-template-columns: 1fr 1fr;
    }

    .staff-home-perf {
        grid-template-columns: repeat(2, 1fr);
    }

    .staff-home-activity-panel {
        padding: 12px;
    }
}

/* ========================================================================== */
/* ── Staff Statistics Page                                                 ── */
/* ========================================================================== */

.staff-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
    animation: staff-stats-fade-in 0.5s ease-out both;
}

@keyframes staff-stats-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Section Header ── */

.staff-stats-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
}

/* ── Overview Stat Cards ── */

.staff-stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 10px;
}

.staff-stats-overview-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: staff-stats-card-enter 0.3s ease-out both;
}

.staff-stats-overview-card:nth-child(1) { animation-delay: 0s; }
.staff-stats-overview-card:nth-child(2) { animation-delay: 0.03s; }
.staff-stats-overview-card:nth-child(3) { animation-delay: 0.06s; }
.staff-stats-overview-card:nth-child(4) { animation-delay: 0.09s; }
.staff-stats-overview-card:nth-child(5) { animation-delay: 0.12s; }
.staff-stats-overview-card:nth-child(6) { animation-delay: 0.15s; }
.staff-stats-overview-card:nth-child(7) { animation-delay: 0.18s; }

@keyframes staff-stats-card-enter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.staff-stats-overview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--stat-accent) 12%, transparent);
    color: var(--stat-accent);
    flex-shrink: 0;
}

.staff-stats-overview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.staff-stats-overview-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
}

.staff-stats-overview-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.02em;
}

/* ── Averages Bar ── */

.staff-stats-averages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.staff-stats-avg-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.staff-stats-avg-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.staff-stats-avg-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
}

.staff-stats-avg-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
}

/* ── Filters Toolbar ── */

.staff-stats-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.staff-stats-toolbar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Staff Member Card ── */

.staff-stats-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: staff-stats-card-enter 0.3s ease-out both;
    transition: border-color 0.2s ease;
}

.staff-stats-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Card Header */

.staff-stats-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
}

.staff-stats-card-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.staff-stats-card-name-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.staff-stats-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

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

.staff-stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--badge-color) 15%, transparent);
    color: var(--badge-color);
    letter-spacing: 0.02em;
}

.staff-stats-badge--subtle {
    --badge-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

/* Card Quick Stats (header right) */

.staff-stats-card-quick {
    display: flex;
    align-items: center;
    gap: 24px;
}

.staff-stats-quick-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.staff-stats-quick-value {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1;
}

.staff-stats-quick-label {
    font-size: 0.62rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Card Body */

.staff-stats-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.staff-stats-detail-section {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.staff-stats-detail-section:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.staff-stats-detail-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Metric Grid */

.staff-stats-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.staff-stats-metric-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.staff-stats-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.staff-stats-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
}

.staff-stats-metric-label {
    font-size: 0.62rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Alert Banners */

.staff-stats-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
}

.staff-stats-alert--error {
    background: rgba(239, 83, 80, 0.08);
    border: 1px solid rgba(239, 83, 80, 0.15);
    color: #ef9a9a;
}

.staff-stats-alert--warning {
    background: rgba(255, 167, 38, 0.08);
    border: 1px solid rgba(255, 167, 38, 0.15);
    color: #ffe0b2;
}

.staff-stats-alert-link {
    color: var(--mud-palette-primary);
    font-weight: 600;
    text-decoration: none;
}

.staff-stats-alert-link:hover {
    text-decoration: underline;
}

/* Response Times */

.staff-stats-response-times {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.staff-stats-response-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 4px;
}

.staff-stats-response-row:nth-child(odd) {
    background: rgba(255, 255, 255, 0.015);
}

.staff-stats-response-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
}

.staff-stats-response-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* Activity Grid */

.staff-stats-activity-grid {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 4px 12px;
    align-items: center;
}

.staff-stats-activity-col-label {
    font-size: 0.62rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.staff-stats-activity-row-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
}

.staff-stats-activity-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* Empty State */

.staff-stats-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 3rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .staff-stats-card-body {
        grid-template-columns: 1fr;
    }

    .staff-stats-detail-section:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .staff-stats-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .staff-stats-card-quick {
        width: 100%;
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .staff-stats {
        padding: 1rem 0 2rem;
    }

    .staff-stats-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .staff-stats-averages {
        flex-direction: column;
        gap: 10px;
    }

    .staff-stats-avg-divider {
        width: 40px;
        height: 1px;
    }
}

@media (max-width: 480px) {
    .staff-stats-overview-grid {
        grid-template-columns: 1fr 1fr;
    }

    .staff-stats-metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .staff-stats-card-quick {
        gap: 16px;
    }
}

/* ── Page Statistics Bar (Appeals, Reports, Compensation, Applications) ── */

.page-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: page-stats-enter 0.3s ease-out both;
}

@keyframes page-stats-enter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Top row: header left, breakdown cards right */
.page-stats-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Header: total count + label */
.page-stats-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.page-stats-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--stat-accent, var(--mud-palette-primary)) 12%, transparent);
    color: var(--stat-accent, var(--mud-palette-primary));
    flex-shrink: 0;
}

.page-stats-header-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.page-stats-header-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
    letter-spacing: -0.02em;
}

.page-stats-header-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Breakdown stat cards */
.page-stats-breakdown {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-stats-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    animation: page-stats-item-enter 0.3s ease-out both;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.page-stats-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.page-stats-item--active {
    border-color: var(--stat-accent);
    background: color-mix(in srgb, var(--stat-accent) 12%, transparent);
    box-shadow: 0 0 0 1px var(--stat-accent);
}

.page-stats-item--active:hover {
    background: color-mix(in srgb, var(--stat-accent) 18%, transparent);
}

.page-stats-item:nth-child(1) { animation-delay: 0.03s; }
.page-stats-item:nth-child(2) { animation-delay: 0.06s; }
.page-stats-item:nth-child(3) { animation-delay: 0.09s; }
.page-stats-item:nth-child(4) { animation-delay: 0.12s; }
.page-stats-item:nth-child(5) { animation-delay: 0.15s; }

@keyframes page-stats-item-enter {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-stats-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--stat-accent) 12%, transparent);
    color: var(--stat-accent);
    flex-shrink: 0;
}

.page-stats-item-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.page-stats-item-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
}

.page-stats-item-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.02em;
}

/* Segmented progress bar */
.page-stats-bar {
    display: flex;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    gap: 2px;
}

.page-stats-bar--empty {
    background: rgba(255, 255, 255, 0.06);
}

/* Divider between stats and filters */
.page-stats-divider {
    border-color: rgba(255, 255, 255, 0.06);
    margin: 2px 0;
}

/* ── Page Stats Filter Controls ── */

/* Toggle group */
.page-stats .mud-toggle-group {
    border-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.02);
}

.page-stats .mud-toggle-item {
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    color: rgba(255, 255, 255, 0.45) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    transition: all 0.15s ease;
}

.page-stats .mud-toggle-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.page-stats .mud-toggle-item.mud-toggle-item-selected {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* Text field / Search */
.page-stats .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    transition: border-color 0.2s ease;
}

.page-stats .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.page-stats .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: rgba(61, 107, 223, 0.4) !important;
}

.page-stats .mud-input-outlined .mud-input-root {
    font-size: 0.84rem;
}

.page-stats .mud-input-adornment-start .mud-icon-root {
    color: rgba(255, 255, 255, 0.3) !important;
    font-size: 1.1rem !important;
}

.page-stats .mud-input-outlined.mud-input-focused .mud-input-adornment-start .mud-icon-root {
    color: rgba(61, 107, 223, 0.7) !important;
}

.page-stats .mud-input-label {
    font-size: 0.78rem !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Select / Dropdown */
.page-stats .mud-select .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
}

.page-stats .mud-select .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Checkbox */
.page-stats .mud-checkbox .mud-typography {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

.page-stats .mud-checkbox:hover .mud-typography {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 700px) {
    .page-stats-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== Shared Form Styles (Steppers) ========== */

.step-section-header {
    margin-bottom: 4px;
}

.uploaded-file-chip {
    max-width: 250px;
}

.review-section {
    border-left: 3px solid var(--mud-palette-primary);
    padding-left: 16px;
}


/* ========== Staff Select Cards ========== */
.select-staff-card {
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 10px 12px;
}

.select-staff-card:hover {
    border-color: var(--mud-palette-primary);
    background-color: var(--mud-palette-primary-hover);
}

.select-staff-card.selected {
    border-color: var(--mud-palette-primary);
    background-color: var(--mud-palette-primary-hover);
}

.select-staff-rank-header {
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.select-staff-scroll {
    min-height: 640px;
    max-height: 55vh;
    overflow-y: auto;
}

.select-staff-loading {
    min-height: 640px;
}