/* TrendyAdmin visual adaptation: violet tokens, plum sidebar, soft cards.
   Source: TrendyAdmin-pro/assets/scss/{base/_variables,layout/_sidebar,layout/_header,pages/_dashboard}.scss.
   No upstream global CSS/Bootstrap reset or vendor JS is imported. */
html, body { margin: 0; min-height: 100%; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.cp-shell {
    --cp-bg: #f5f3fa; --cp-surface: #fff; --cp-text: #191233; --cp-muted: #6b627f;
    --cp-border: #e7e2f2; --cp-sidebar: #171032; --cp-sidebar-width: 280px;
    --cp-primary: #7c3aed; --cp-secondary: #0f766e;
    min-height: 100dvh; background: var(--cp-bg); color: var(--cp-text);
    font-size: 14px; line-height: 1.6; color-scheme: light;
}
.cp-shell[data-theme="dark"] {
    --cp-bg: #0e0a1f; --cp-surface: #191330; --cp-text: #f4f1ff; --cp-muted: #b1a8c8;
    --cp-border: #3b3066; --cp-sidebar: #120d26; color-scheme: dark;
}
.cp-shell *, .cp-shell *::before, .cp-shell *::after { box-sizing: border-box; }
.cp-shell h1, .cp-shell h2, .cp-shell h3, .cp-shell p { margin: 0; }
.cp-shell button, .cp-shell a { -webkit-tap-highlight-color: transparent; }
.cp-shell button { font: inherit; cursor: pointer; }
.cp-shell a { text-decoration: none; }
.cp-shell :focus-visible { outline: 3px solid var(--cp-primary); outline-offset: 4px; }
.cp-shell p { color: var(--cp-muted); }
.cp-skip-link { position: fixed; top: -100px; left: 20px; z-index: 1600; padding: 12px 20px; border-radius: 12px; background: var(--cp-surface); color: var(--cp-text); }
.cp-skip-link:focus { top: 12px; }
.cp-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1100; width: var(--cp-sidebar-width); display: flex; flex-direction: column; background: linear-gradient(170deg, #261744, var(--cp-sidebar) 45%); color: #ece8f8; overflow-y: auto; }
.cp-brand { min-height: 90px; display: flex; align-items: center; gap: 12px; padding: 20px; color: #fff; min-width: 0; }
.cp-brand-mark { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; }
.cp-brand-fallback { display: grid; place-items: center; background: var(--cp-primary); font-size: 24px; font-weight: 800; }
.cp-brand-label { min-width: 0; }
.cp-brand-label strong { display: block; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.cp-brand-label small { display: block; margin-top: 4px; color: #bcb0d4; font-size: 9px; letter-spacing: .14em; }
.cp-navigation { padding: 22px 16px; flex: 1; }
.cp-nav-heading { display: block; margin: 0 12px 14px; color: #bcb0d4; font-size: 10px; font-weight: 700; letter-spacing: .13em; white-space: nowrap; }
.cp-nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: #d6cfea; min-height: 52px; }
.cp-nav-link:hover { background: #ffffff0d; color: #fff; }
.cp-nav-link.active { background: linear-gradient(110deg, var(--cp-primary), color-mix(in srgb, var(--cp-primary), #171032 18%)); box-shadow: 0 8px 24px #0002; color: #fff; }
.cp-nav-icon { display: grid; place-items: center; flex: 0 0 30px; }
.cp-nav-label { white-space: nowrap; font-weight: 600; }
.cp-nav-note { margin: 36px 6px 0; padding: 20px 16px; border: 1px solid #ffffff20; border-radius: 16px; background: #ffffff06; }
.cp-nav-note > span { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 600; }
.cp-shell .cp-nav-note p { color: #bcb0d4; font-size: 12px; }
.cp-sidebar-footer { padding: 24px; border-top: 1px solid #ffffff12; font-size: 11px; display: flex; align-items: center; gap: 10px; color: #bcb0d4; }
.cp-status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cp-secondary); flex: 0 0 7px; }
.cp-workspace { margin-left: var(--cp-sidebar-width); min-height: 100dvh; display: flex; flex-direction: column; min-width: 0; }
.cp-topbar { min-height: 80px; margin: 18px 28px 0; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 18px; box-shadow: 0 4px 10px -2px #1e124208; }
.cp-topbar-start, .cp-topbar-actions { display: flex; align-items: center; gap: 18px; min-width: 0; }
.cp-topbar-title { min-width: 0; }
.cp-topbar-title strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.cp-topbar-title span { display: block; color: var(--cp-muted); font-size: 12px; }
.cp-icon-button { width: 44px; height: 44px; flex: 0 0 44px; display: inline-grid; place-items: center; border: 1px solid var(--cp-border); border-radius: 12px; background: transparent; color: inherit; }
.cp-icon-button:hover { background: color-mix(in srgb, var(--cp-primary), transparent 92%); }
.cp-preview-badge, .cp-page-tag { padding: 6px 12px; border: 1px solid var(--cp-border); border-radius: 100px; font-size: 11px; color: var(--cp-muted); white-space: nowrap; }
.cp-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 36px; flex: 1; }
.cp-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.cp-shell .cp-eyebrow { font-size: 10px; letter-spacing: .16em; font-weight: 700; margin-bottom: 8px; }
.cp-shell h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.2; font-weight: 750; letter-spacing: -.04em; margin-bottom: 8px; }
.cp-page-tag { display: flex; align-items: center; gap: 8px; background: var(--cp-surface); }
.cp-welcome-card { position: relative; isolation: isolate; overflow: hidden; display: flex; justify-content: space-between; border-radius: 24px; padding: 38px 40px; color: #fff; background: linear-gradient(115deg, #29124f, color-mix(in srgb, var(--cp-primary), #171032 25%)); box-shadow: 0 12px 28px -6px #1e12421a; }
.cp-welcome-copy { position: relative; z-index: 1; max-width: 520px; }
.cp-welcome-label { display: inline-block; padding: 5px 10px; border: 1px solid #ffffff30; border-radius: 8px; background: #ffffff0d; color: #e6dbff; font-size: 11px; }
.cp-shell .cp-welcome-card h2 { margin: 18px 0 14px; font-size: clamp(24px, 2.8vw, 36px); line-height: 1.2; font-weight: 700; letter-spacing: -.03em; }
.cp-shell .cp-welcome-card p { color: #e2d7f4; line-height: 1.8; max-width: 470px; }
.cp-welcome-link { display: inline-flex; align-items: center; gap: 22px; margin-top: 26px; color: #fff; font-weight: 650; font-size: 13px; }
.cp-welcome-link:hover { text-decoration: underline; }
.cp-welcome-art { display: grid; place-items: center; position: relative; width: 240px; flex: 0 0 240px; }
.cp-art-orbit { position: absolute; width: 230px; height: 230px; border: 1px solid #ffffff20; border-radius: 50%; box-shadow: 0 0 0 32px #ffffff06, 0 0 0 64px #ffffff04; }
.cp-art-tile { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 28px; background: linear-gradient(140deg, #ffffff38, #ffffff0c); border: 1px solid #ffffff50; transform: rotate(-12deg); box-shadow: 16px 24px 32px #12052640; }
.cp-art-tile .mud-icon-root { font-size: 60px; transform: rotate(12deg); }
.cp-art-dot { position: absolute; width: 20px; height: 20px; background: #c9b5ff; border-radius: 7px; transform: rotate(20deg); }
.cp-art-dot-one { top: 22px; right: 12px; }.cp-art-dot-two { bottom: 15px; left: 18px; width: 12px; height: 12px; background: #82e2d0; }
.cp-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 26px 0; }
.cp-card { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 18px; box-shadow: 0 4px 10px -2px #1e124208; }
.cp-feature-card { position: relative; padding: 24px; }
.cp-feature-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--cp-primary); background: color-mix(in srgb, var(--cp-primary), transparent 91%); flex: 0 0 44px; }
.cp-small-label { position: absolute; top: 32px; right: 20px; font-size: 9px; font-weight: 700; letter-spacing: .1em; color: var(--cp-muted); }
.cp-shell .cp-feature-card h2 { margin: 18px 0 6px; font-size: 17px; font-weight: 700; }
.cp-feature-card p { font-size: 13px; }
.cp-feature-state { display: block; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--cp-border); color: var(--cp-muted); font-size: 11px; }
.cp-status-card { padding: 24px; scroll-margin-top: 20px; }
.cp-section-heading { display: flex; gap: 14px; align-items: center; }
.cp-section-heading h2 { font-size: 16px; font-weight: 700; }.cp-section-heading p { font-size: 12px; margin-top: 3px; }
.cp-empty-state { text-align: center; padding: 34px 16px 18px; margin-top: 24px; border-top: 1px solid var(--cp-border); }
.cp-empty-state > .mud-icon-root { font-size: 36px; color: var(--cp-muted); opacity: .65; }
.cp-empty-state h3 { margin: 12px 0 6px; font-size: 14px; font-weight: 650; }
.cp-empty-state p { max-width: 490px; margin: 0 auto; font-size: 12px; }
.cp-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 36px; color: var(--cp-muted); border-top: 1px solid var(--cp-border); font-size: 11px; }
.cp-mobile-toggle { display: none; }
.cp-mobile-dialog { position: fixed; inset: 0 auto 0 0; margin: 0; padding: 0; width: min(320px, 90vw); max-width: 90vw; height: 100dvh; max-height: 100dvh; border: 0; background: var(--cp-sidebar); color: #ece8f8; overflow-y: auto; }
.cp-mobile-dialog::backdrop { background: #09051899; }
.cp-mobile-dialog-header { display: flex; align-items: center; padding-right: 12px; }
.cp-mobile-dialog-header .cp-brand { flex: 1; padding-right: 10px; }
.cp-mobile-dialog-header .cp-icon-button { border-color: #ffffff30; }
.portal-title { font-size: clamp(1.5rem, 5vw, 2.5rem); font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 1200px) {
    .cp-shell-collapsed { --cp-sidebar-width: 84px; }
    .cp-shell-collapsed .cp-desktop-sidebar .cp-brand-label,
    .cp-shell-collapsed .cp-desktop-sidebar .cp-nav-label,
    .cp-shell-collapsed .cp-desktop-sidebar .cp-nav-heading,
    .cp-shell-collapsed .cp-desktop-sidebar .cp-nav-note { display: none; }
    .cp-shell-collapsed .cp-desktop-sidebar .cp-nav-link { padding: 10px; justify-content: center; }
    .cp-shell-collapsed .cp-sidebar-footer { justify-content: center; }
}
@media (max-width: 1199px) {
    .cp-desktop-sidebar, .cp-desktop-toggle { display: none; }
    .cp-mobile-toggle { display: inline-grid; }
    .cp-workspace { margin-left: 0; }
}
@media (max-width: 767px) {
    .cp-topbar { margin: 12px 16px 0; padding: 12px; }.cp-topbar-start, .cp-topbar-actions { gap: 10px; }
    .cp-preview-badge, .cp-topbar-title span, .cp-page-tag { display: none; }
    .cp-topbar-title strong { font-size: 12px; }
    .cp-content { padding: 24px 16px; }.cp-page-heading { margin-bottom: 22px; }
    .cp-welcome-card { padding: 28px 24px; }.cp-welcome-art { display: none; }
    .cp-feature-grid { grid-template-columns: 1fr; gap: 14px; margin: 18px 0; }
    .cp-status-card { padding: 20px; }.cp-footer { padding: 18px 16px; flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .cp-shell *, .cp-shell *::before, .cp-shell *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: #fff4ce;
    color: #242424;
    z-index: 10000;
}

#blazor-error-ui .dismiss {
    margin-left: 1rem;
    cursor: pointer;
}
