html, body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', 'Noto Sans Arabic', sans-serif;
}

.cursor-pointer { cursor: pointer; }
.text-transform-none { text-transform: none !important; }

/* ===== AppBar ===== */
.appbar-main {
    border-bottom: 1px solid var(--mud-palette-divider) !important;
    backdrop-filter: blur(8px);
}

/* ===== Sidebar ===== */
.sidebar {
    background: #1E293B !important;
    border-right: none !important;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 16px;
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-brand-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #F1F5F9;
    letter-spacing: 0.3px;
}

.sidebar-brand-label {
    font-size: 0.625rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.sidebar-footer {
    padding: 10px 16px;
    border-top: 1px solid #334155;
    text-align: center;
    color: #64748B;
    font-size: 0.6875rem;
}

/* Nav items on dark sidebar */
.sidebar-nav .mud-nav-link {
    color: #CBD5E1 !important;
    border-radius: 8px !important;
    margin-bottom: 2px;
}

.sidebar-nav .mud-nav-link:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #F1F5F9 !important;
}

.sidebar-nav .mud-nav-link.active {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60A5FA !important;
}

.sidebar-nav .mud-nav-link .mud-nav-link-icon {
    color: #94A3B8 !important;
}

.sidebar-nav .mud-nav-link.active .mud-nav-link-icon {
    color: #60A5FA !important;
}

/* Nav section labels */
.nav-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 12px 6px;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #64748B;
    user-select: none;
}

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

/* ===== Page Layout ===== */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin: 0 0 4px 0;
}

.page-header p {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
}

/* ===== Dashboard Hero ===== */
.dashboard-hero {
    margin-bottom: 28px;
    padding: 24px 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 50%, #3B82F6 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: 20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.dashboard-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.dashboard-hero-avatar {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    backdrop-filter: blur(4px);
}

.dashboard-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    color: white;
    letter-spacing: -0.02em;
}

.dashboard-hero-subtitle {
    font-size: 0.875rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.dashboard-hero-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.dashboard-hero-date .mud-icon-root {
    font-size: 1rem !important;
}

/* Dark mode hero */
.mud-theme-dark .dashboard-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #2563EB 100%);
}

/* ===== Toolbar ===== */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

/* Date filter pickers — visible outlined style */
.page-toolbar .mud-picker .mud-input-outlined-border {
    border-color: rgba(25, 118, 210, 0.55) !important;
    border-width: 1.5px !important;
}
.page-toolbar .mud-picker:hover .mud-input-outlined-border {
    border-color: rgba(25, 118, 210, 0.85) !important;
}
.page-toolbar .mud-picker .mud-input-outlined {
    background: rgba(25, 118, 210, 0.04);
    border-radius: 6px;
}
.page-toolbar .mud-picker .mud-input-label {
    color: #1565C0 !important;
    font-weight: 500;
}

/* ===== Stat Cards (legacy) ===== */
.stat-card {
    border-radius: 12px !important;
    border: 1px solid var(--mud-palette-divider);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 130px;
}

.stat-card .mud-card-content {
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

/* ===== Stat Cards V2 (Modern Dashboard) ===== */
.stat-card-v2 {
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 130px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
}

.stat-card-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
}

[dir="rtl"] .stat-card-v2::before {
    border-radius: 16px 16px 0 0;
}

.stat-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.stat-card-v2:active {
    transform: translateY(-1px);
}

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

.stat-card-icon-bg .mud-icon-root {
    font-size: 1.4rem !important;
    color: white !important;
}

.stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.stat-card-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
}

.stat-card-value-sm {
    font-size: 1.35rem;
}

.stat-card-negative {
    color: #EF4444 !important;
}

.stat-card-sub {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 2px;
}

/* Color variants */
.stat-card-blue::before { background: linear-gradient(90deg, #0284C7, #38BDF8); }
.stat-card-blue .stat-card-icon-bg { background: linear-gradient(135deg, #0284C7, #38BDF8); }

.stat-card-green::before { background: linear-gradient(90deg, #16A34A, #4ADE80); }
.stat-card-green .stat-card-icon-bg { background: linear-gradient(135deg, #16A34A, #4ADE80); }

.stat-card-amber::before { background: linear-gradient(90deg, #D97706, #FBBF24); }
.stat-card-amber .stat-card-icon-bg { background: linear-gradient(135deg, #D97706, #FBBF24); }

.stat-card-indigo::before { background: linear-gradient(90deg, #3B82F6, #818CF8); }
.stat-card-indigo .stat-card-icon-bg { background: linear-gradient(135deg, #3B82F6, #818CF8); }

.stat-card-teal::before { background: linear-gradient(90deg, #0D9488, #5EEAD4); }
.stat-card-teal .stat-card-icon-bg { background: linear-gradient(135deg, #0D9488, #5EEAD4); }

.stat-card-violet::before { background: linear-gradient(90deg, #7C3AED, #A78BFA); }
.stat-card-violet .stat-card-icon-bg { background: linear-gradient(135deg, #7C3AED, #A78BFA); }

/* Quick Actions Card */
.quick-actions-card {
    background: var(--mud-palette-surface) !important;
}

.quick-action-btn {
    text-transform: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
}

/* ===== Data Table Card ===== */
.data-card {
    border-radius: 12px !important;
    border: 1px solid var(--mud-palette-divider);
    overflow: hidden;
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
    .mud-main-content {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-hero {
        padding: 18px 20px;
        border-radius: 12px;
    }

    .dashboard-hero-title {
        font-size: 1.2rem;
    }

    .dashboard-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-card-v2 {
        min-height: 110px;
        padding: 16px;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .stat-card-value-sm {
        font-size: 1.15rem;
    }
}

/* ===== Error UI ===== */
#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;
}

.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."
}

/* ===== RTL Support ===== */
[dir="rtl"] .sidebar {
    border-left: none !important;
}

[dir="rtl"] .sidebar-brand {
    direction: rtl;
}

[dir="rtl"] .nav-label {
    direction: rtl;
}

[dir="rtl"] .page-header {
    text-align: right;
}

[dir="rtl"] .dashboard-hero-content {
    direction: rtl;
}

[dir="rtl"] .dashboard-hero-title {
    text-align: right;
}

[dir="rtl"] .stat-card-v2 {
    direction: rtl;
}

[dir="rtl"] .sidebar-footer {
    direction: ltr;
}

[dir="rtl"] #blazor-error-ui .dismiss {
    right: auto;
    left: 0.75rem;
}

/* ===== Dashboard Typography ===== */
.page-header h1,
.dashboard-hero-title {
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.stat-card .mud-typography-h4,
.stat-card .mud-typography-h5 {
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.stat-card .mud-typography-overline {
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.data-card .mud-typography-h6 {
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Data cards improved */
.data-card {
    transition: box-shadow 0.2s ease;
}

.data-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
}

/* ===== AI Assistant ===== */
.ai-assistant-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

[dir="rtl"] .ai-assistant-fab {
    right: auto;
    left: 24px;
    align-items: flex-start;
}

.ai-assistant-panel {
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 560px;
    max-height: calc(100vh - 140px);
    background: var(--mud-palette-surface);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--mud-palette-divider);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-assistant-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
    flex-shrink: 0;
}

.ai-assistant-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.ai-msg {
    display: flex;
    gap: 8px;
    max-width: 88%;
}

.ai-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-msg-bot {
    align-self: flex-start;
}

.ai-msg-avatar {
    flex-shrink: 0;
    margin-top: 4px;
}

.ai-msg-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.55;
}

.ai-msg-content a {
    text-decoration: none;
}
.ai-msg-content a:hover {
    text-decoration: underline;
}

.ai-msg-bot .ai-msg-content {
    background: var(--mud-palette-background-grey);
    border-bottom-left-radius: 4px;
}

.ai-msg-user .ai-msg-content {
    background: var(--mud-palette-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-msg-content code {
    background: rgba(0,0,0,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.ai-msg-time {
    font-size: 0.65rem;
    color: var(--mud-palette-text-secondary);
    opacity: 0.6;
    margin-top: 2px;
    padding: 0 4px;
}

.ai-msg-user .ai-msg-time {
    text-align: right;
}

.ai-feedback {
    display: flex;
    gap: 0;
    margin-top: -2px;
}

.ai-feedback .mud-icon-button {
    padding: 2px !important;
}

/* Typing indicator */
.ai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--mud-palette-background-grey);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.ai-typing-indicator span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mud-palette-text-secondary);
    opacity: 0.4;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.ai-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.ai-assistant-suggestions {
    padding: 8px 16px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    border-top: 1px solid var(--mud-palette-divider);
    flex-shrink: 0;
    max-height: 80px;
    overflow-y: auto;
}

.ai-suggestion-chip {
    font-size: 0.72rem !important;
    text-transform: none !important;
    border-radius: 16px !important;
    padding: 2px 10px !important;
    min-height: 26px !important;
}

.ai-assistant-input {
    padding: 8px 12px 12px;
    flex-shrink: 0;
}

.ai-assistant-input .mud-input-outlined {
    border-radius: 24px !important;
}

@media (max-width: 480px) {
    .ai-assistant-panel {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
    }
    .ai-assistant-fab {
        bottom: 16px;
        right: 16px;
    }
}

/* ===== Analytics Page ===== */

.analytics-hero {
    background: linear-gradient(135deg, #0F4C75 0%, #0D9488 100%);
    border-radius: 16px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.analytics-hero::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -70px;
    right: 80px;
    pointer-events: none;
}

.analytics-hero-content { display: flex; align-items: center; gap: 16px; z-index: 1; }

.analytics-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.analytics-hero-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin: 0 0 4px;
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.analytics-hero-subtitle { font-size: 0.8rem; color: rgba(255,255,255,0.75); margin: 0; }

.analytics-hero-badge {
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 1;
    flex-shrink: 0;
    white-space: nowrap;
}

.analytics-section-header { display: flex; align-items: center; gap: 10px; }

.analytics-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.analytics-section-icon .mud-icon-root { color: white !important; font-size: 0.95rem !important; }

.analytics-icon-green  { background: linear-gradient(135deg, #16A34A, #4ADE80); }
.analytics-icon-teal   { background: linear-gradient(135deg, #0D9488, #5EEAD4); }
.analytics-icon-blue   { background: linear-gradient(135deg, #0284C7, #38BDF8); }
.analytics-icon-amber  { background: linear-gradient(135deg, #D97706, #FBBF24); }
.analytics-icon-violet { background: linear-gradient(135deg, #7C3AED, #A78BFA); }
.analytics-icon-indigo { background: linear-gradient(135deg, #3B82F6, #818CF8); }
.analytics-icon-red    { background: linear-gradient(135deg, #DC2626, #F87171); }

.analytics-section-badge { border-radius: 12px; padding: 2px 10px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.analytics-badge-green { background: rgba(22,163,74,0.1);  color: #16A34A; }
.analytics-badge-teal  { background: rgba(13,148,136,0.1); color: #0D9488; }
.analytics-badge-amber { background: rgba(217,119,6,0.1);  color: #D97706; }

/* Stat Card Red Variant */
.stat-card-red::before           { background: linear-gradient(90deg, #DC2626, #F87171); }
.stat-card-red .stat-card-icon-bg { background: linear-gradient(135deg, #DC2626, #F87171); }

/* Utilization mini-bar inside stat card */
.stat-card-util-bar { margin-top: 6px; height: 4px; background: rgba(0,0,0,0.08); border-radius: 2px; overflow: hidden; }
.stat-card-util-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #7C3AED, #A78BFA); transition: width 0.5s ease; }

/* Period Tabs */
.analytics-filter-header { display: flex; align-items: center; gap: 6px; }

.period-tabs {
    display: flex;
    background: var(--mud-palette-background);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--mud-palette-divider);
}

.period-tab-btn {
    flex: 1;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.period-tab-btn:hover { background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); }
.period-tab-btn-active { background: var(--mud-palette-surface) !important; color: #0D9488 !important; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

/* Chart Cards */
.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
    gap: 12px;
}

.chart-card-title-wrap { display: flex; align-items: center; gap: 10px; }

.chart-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chart-icon .mud-icon-root { color: white !important; font-size: 0.95rem !important; }

.chart-period-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-background);
    border-radius: 10px;
    padding: 3px 10px;
    border: 1px solid var(--mud-palette-divider);
    flex-shrink: 0;
}

.chart-card-body { padding: 16px; height: 270px; position: relative; }
.chart-card-body canvas { max-height: 100%; }

.chart-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--mud-palette-text-secondary);
}

/* Analytics Table */
.analytics-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.analytics-table thead tr { background: var(--mud-palette-background); }
.analytics-table th { padding: 10px 16px; text-align: left; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mud-palette-text-secondary); white-space: nowrap; }
.analytics-table td { padding: 11px 16px; border-bottom: 1px solid var(--mud-palette-divider); color: var(--mud-palette-text-primary); }
.analytics-table tbody tr:last-child td { border-bottom: none; }
.analytics-table tbody tr:hover td { background: var(--mud-palette-background); }
.analytics-product-name { font-weight: 600; font-size: 0.85rem; }

/* Utilization bar in table */
.util-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.util-bar-bg { flex: 1; height: 6px; background: var(--mud-palette-background); border-radius: 3px; overflow: hidden; border: 1px solid var(--mud-palette-divider); }
.util-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; }
.util-bar-green { background: linear-gradient(90deg, #16A34A, #4ADE80); }
.util-bar-amber { background: linear-gradient(90deg, #D97706, #FBBF24); }
.util-bar-red   { background: linear-gradient(90deg, #DC2626, #F87171); }
.util-pct-label { font-size: 0.75rem; font-weight: 700; white-space: nowrap; min-width: 38px; text-align: right; }
.util-label-green { color: #16A34A; }
.util-label-amber { color: #D97706; }
.util-label-red   { color: #DC2626; }

/* Summary KPI Cards */
.summary-kpi-card { display: flex; align-items: flex-start; gap: 14px; }
.summary-kpi-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* RTL for analytics */
[dir="rtl"] .analytics-hero-content { direction: rtl; }
[dir="rtl"] .analytics-section-header { direction: rtl; }
[dir="rtl"] .analytics-table th, [dir="rtl"] .analytics-table td { text-align: right; }
[dir="rtl"] .period-tabs { direction: rtl; }
[dir="rtl"] .util-pct-label { text-align: left; }

@media (max-width: 600px) {
    .analytics-hero { flex-direction: column; align-items: flex-start; padding: 18px 20px; gap: 12px; }
    .chart-card-body { height: 220px; }
    .analytics-table th, .analytics-table td { padding: 8px 10px; }
    .period-tab-btn { padding: 5px 6px; font-size: 0.72rem; }
}

/* ===== Profile & Account Settings ===== */

/* Profile Hero Banner */
.profile-hero {
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.profile-hero::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -100px;
    right: -60px;
    pointer-events: none;
}

.profile-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

/* Profile Avatar */
.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    border: 3px solid rgba(255,255,255,0.3);
}

.profile-avatar.avatar-blue   { background: linear-gradient(135deg, #1D4ED8, #3B82F6); }
.profile-avatar.avatar-green  { background: linear-gradient(135deg, #15803D, #22C55E); }
.profile-avatar.avatar-amber  { background: linear-gradient(135deg, #B45309, #F59E0B); }
.profile-avatar.avatar-violet { background: linear-gradient(135deg, #6D28D9, #8B5CF6); }
.profile-avatar.avatar-teal   { background: linear-gradient(135deg, #0E7490, #06B6D4); }
.profile-avatar.avatar-rose   { background: linear-gradient(135deg, #BE123C, #F43F5E); }

.profile-avatar-badge {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.profile-avatar-badge.badge-verified { background: #22C55E; }
.profile-avatar-badge.badge-pending  { background: #F59E0B; }
.profile-avatar-badge .mud-icon-root { font-size: 11px !important; color: white !important; }

/* Profile Hero Info */
.profile-hero-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: white;
    margin: 0 0 3px;
}

.profile-hero-email {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 8px;
}

.profile-hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-role-chip {
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Profile Hero Meta (right side) */
.profile-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    z-index: 1;
    flex-shrink: 0;
}

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

.profile-meta-item .mud-icon-root {
    color: rgba(255,255,255,0.55) !important;
    font-size: 1rem !important;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Commission Edit Row */
.commission-edit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.commission-edit-row:last-child {
    border-bottom: none;
}

/* Approval Filter Tabs */
.approval-filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.approval-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.approval-tab:hover {
    background: var(--mud-palette-action-hover);
    color: var(--mud-palette-text-primary);
}

.approval-tab-active {
    background: var(--mud-palette-surface);
    font-weight: 700;
}

.approval-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

/* Profile Detail List */
.profile-detail-list {
    display: flex;
    flex-direction: column;
}

.profile-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--mud-palette-divider);
    gap: 12px;
}

.profile-detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.78rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    text-align: right;
}

/* Profile Security Items */
.profile-security-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.security-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--mud-palette-background);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--mud-palette-text-secondary);
}

.security-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.security-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.security-item-sub {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

/* Account Manage Layout Header */
.account-manage-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
    border-radius: 12px;
    margin-bottom: 4px;
}

.account-manage-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-manage-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 2px;
}

.account-manage-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

/* Manage Form Inputs (for SSR Identity pages) */
.manage-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 4px;
}

.manage-field-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.manage-field-label .mud-icon-root {
    font-size: 1rem !important;
}

.manage-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--mud-palette-divider);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.manage-input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.manage-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--mud-palette-background);
}

.manage-input::placeholder {
    color: var(--mud-palette-text-secondary);
    opacity: 0.55;
}

.manage-validation-error {
    font-size: 0.75rem;
    color: #DC2626;
    margin-top: 2px;
    display: block;
}

.manage-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1D4ED8, #2563EB);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.manage-submit-btn:hover {
    background: linear-gradient(135deg, #1e40af, #1D4ED8);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.manage-submit-btn:active {
    transform: translateY(0);
}

.manage-text-btn {
    background: none;
    border: none;
    color: var(--mud-palette-primary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', 'Sora', 'Inter', sans-serif;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Dark mode overrides */
[data-mud-theme="dark"] .manage-input,
.mud-theme-dark .manage-input {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
    color: #F1F5F9;
}

[data-mud-theme="dark"] .manage-input:focus,
.mud-theme-dark .manage-input:focus {
    border-color: #60A5FA;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

[data-mud-theme="dark"] .manage-validation-error,
.mud-theme-dark .manage-validation-error {
    color: #F87171;
}

/* RTL support */
[dir="rtl"] .profile-hero-meta {
    align-items: flex-start;
}

[dir="rtl"] .detail-value {
    text-align: left;
}

[dir="rtl"] .account-manage-header {
    direction: rtl;
}

/* ===== Help Page ===== */
.help-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mud-palette-divider);
}
.help-section-label::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #0284C7, #38BDF8);
    border-radius: 2px;
    flex-shrink: 0;
}
[dir="rtl"] .help-section-label::before {
    background: linear-gradient(180deg, #38BDF8, #0284C7);
}

/* Hero */
.help-hero {
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, #1E40AF 55%, #0F172A 100%);
    border-radius: 20px;
    padding: 56px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.help-hero-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.help-hero-blob-1 {
    width: 340px; height: 340px;
    background: rgba(255,255,255,0.04);
    top: -90px; right: -60px;
}
.help-hero-blob-2 {
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.05);
    bottom: -50px; left: 8%;
}
.help-hero-blob-3 {
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.03);
    top: 20%; left: 5%;
}
.help-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
    width: 100%;
}
.help-hero-icon-wrap {
    width: 68px; height: 68px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
}

/* Quick Nav */
.help-qnav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.help-qnav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 24px;
    border: 1.5px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}
.help-qnav-btn:hover {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Role Cards */
.help-role-card {
    border-radius: 16px;
    padding: 24px 20px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
    min-height: 210px;
}
.help-role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(0,0,0,0.18);
}
.help-role-blue  { background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%); }
.help-role-amber { background: linear-gradient(135deg, #78350F 0%, #F59E0B 100%); }
.help-role-green { background: linear-gradient(135deg, #064E3B 0%, #10B981 100%); }
.help-role-teal  { background: linear-gradient(135deg, #0C4A6E 0%, #06B6D4 100%); }
.help-role-icon-wrap {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.help-role-icon-wrap .mud-icon-root { color: white !important; }
.help-role-name { font-size: 1.05rem; font-weight: 700; color: white; }
.help-role-desc { font-size: 0.8rem; color: rgba(255,255,255,0.78); line-height: 1.55; flex: 1; }
.help-role-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.help-role-tags span {
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.18);
    font-size: 0.71rem;
    color: white;
    font-weight: 500;
}

/* Workflow Cards */
.help-wf-card {
    background: var(--mud-palette-surface);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid var(--mud-palette-divider);
    height: 100%;
}
.help-wf-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mud-palette-divider);
}
.help-wf-avatar {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.help-wf-title { font-size: 0.95rem; font-weight: 700; color: var(--mud-palette-text-primary); line-height: 1.2; }
.help-wf-subtitle { font-size: 0.78rem; color: var(--mud-palette-text-secondary); margin-top: 2px; }

/* Steps */
.help-steps { display: flex; flex-direction: column; }
.help-step { display: flex; gap: 14px; position: relative; }
.help-step:not(.help-step-last)::after {
    content: '';
    position: absolute;
    left: 17px; top: 36px; bottom: 0;
    width: 2px;
    background: var(--mud-palette-divider);
    z-index: 0;
}
[dir="rtl"] .help-step:not(.help-step-last)::after { left: auto; right: 17px; }
.help-step-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem; color: white;
    flex-shrink: 0; position: relative; z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.help-step-body { padding: 6px 0 20px; flex: 1; }
.help-step-body-title { font-size: 0.88rem; font-weight: 600; color: var(--mud-palette-text-primary); margin-bottom: 3px; }
.help-step-body-desc { font-size: 0.78rem; color: var(--mud-palette-text-secondary); line-height: 1.5; }

/* Tips Grid */
.help-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.help-tip-card {
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-divider);
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: box-shadow 0.2s, transform 0.2s;
}
.help-tip-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.09);
    transform: translateY(-1px);
}
.help-tip-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.help-tip-text { font-size: 0.8rem; color: var(--mud-palette-text-primary); line-height: 1.5; padding-top: 6px; }

/* Changelog */
.help-changelog { display: flex; flex-direction: column; }
.help-cl-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--mud-palette-divider);
}
.help-cl-item:last-child { border-bottom: none; }
.help-cl-icon {
    width: 38px; height: 38px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.help-cl-content { flex: 1; }
.help-cl-title { font-size: 0.88rem; font-weight: 600; color: var(--mud-palette-text-primary); }
.help-cl-desc { font-size: 0.78rem; color: var(--mud-palette-text-secondary); margin-top: 2px; }
.help-cl-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.68rem; font-weight: 700;
    white-space: nowrap; letter-spacing: 0.5px; flex-shrink: 0;
}
.badge-new      { background: #DCFCE7; color: #166534; }
.badge-improved { background: #DBEAFE; color: #1E40AF; }
[data-mud-theme="dark"] .badge-new      { background: rgba(22,101,52,0.3); color: #4ADE80; }
[data-mud-theme="dark"] .badge-improved { background: rgba(30,64,175,0.3); color: #60A5FA; }

/* Footer */
.help-footer {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.help-footer-left { display: flex; gap: 16px; align-items: flex-start; flex: 1; }
.help-footer-right { text-align: right; flex-shrink: 0; }
[dir="rtl"] .help-footer-right { text-align: left; }

/* Dark mode fixes */
[data-mud-theme="dark"] .help-tip-icon,
[data-mud-theme="dark"] .help-cl-icon { filter: brightness(0.8); }

/* Mobile responsive */
@media (max-width: 600px) {
    .profile-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .profile-hero-meta {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }

    .profile-hero-name {
        font-size: 1.1rem;
    }

    .account-manage-header {
        padding: 16px;
    }
}

/* ===== Manage SSR Top Bar ===== */
.manage-topbar-ssr {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 1rem;
    background: #1E3A5F;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    color: #fff;
}

.manage-topbar-ssr-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: .95rem;
    margin-right: auto;
    text-decoration: none;
    color: #fff;
}

.manage-topbar-ssr-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.manage-topbar-ssr-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: .82rem;
    padding: .25rem .6rem;
    border-radius: 4px;
    transition: background .15s;
}

.manage-topbar-ssr-link:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.manage-topbar-ssr-logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,.45);
    color: rgba(255,255,255,.9);
    border-radius: 4px;
    padding: .2rem .7rem;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    font-family: inherit;
}

.manage-topbar-ssr-logout:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.7);
    color: #fff;
}

/* ===== Onboarding Wizard ===== */
.onb-feature-pill {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: 11px;
    padding: 14px 11px;
    text-align: center;
}

.onb-check-row {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.onb-check-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onb-network-card {
    border: 1px solid var(--mud-palette-divider);
    border-radius: 10px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.onb-action-tile {
    border: 1px solid var(--mud-palette-divider);
    border-radius: 10px;
    padding: 13px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    display: flex;
    align-items: center;
    gap: 11px;
    user-select: none;
}

.onb-action-tile:hover {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 5%, transparent);
}
