/* ============================================================
   MimirOne theme — Bootstrap 5.3 tokens + custom palette.
   Deep-navy surfaces with a gold primary and a blue secondary
   accent. The app is dark-only (data-bs-theme="dark" on <html>);
   the light palette below is unused.
   The --mo-* names are kept stable (violet/teal) so scoped
   component CSS that references them re-themes automatically —
   only the values changed, navy/gold not violet/teal.
   ============================================================ */

:root {
    /* Brand — gold primary, blue + green accents */
    --mo-violet: #d8a83e;      /* primary / brand (name kept for reuse) */
    --mo-violet-600: #e6b84a;  /* primary hover — brightens, per design */
    --mo-teal: #48c58a;        /* accent / "done" / valid */
    --mo-ink: #111b26;         /* text that sits on a gold fill */
    --mo-blue: #1677e8;
    --mo-blue-400: #45a2ff;
    --mo-amber: #f0c85e;
    --mo-rose: #e0575b;
    --mo-sky: #2b8fff;

    /* Continuum node-type palette — used by the graph view and the
       "Node Types" legend. One vivid colour per Domain.Enums.NodeType. */
    --mo-node-fact: #3b82f6;
    --mo-node-evidence: #22c55e;
    --mo-node-reflection: #a855f7;
    --mo-node-reasoning: #d8a83e;
    --mo-node-concept: #2dd4bf;
    --mo-node-intent: #ec4899;
    --mo-node-milestone: #f59e0b;
    --mo-node-exec: #7cc0ff;

    color-scheme: light dark;
}

/* ---------- Light palette (default :root) ---------- */
:root {
    --bs-primary: var(--mo-violet);
    --bs-primary-rgb: 216, 168, 62;
    --bs-link-color: #a9781a;
    --bs-link-hover-color: #855c10;

    --bs-body-bg: #f4f1ea;
    --bs-body-color: #1b2530;
    --bs-emphasis-color: #0b1119;
    --bs-secondary-color: #5c6b7a;
    --bs-tertiary-bg: #ece6d9;
    --bs-border-color: #ded6c4;

    --mo-surface: #ffffff;
    --mo-surface-2: #f7f3ea;
    --mo-shadow: 0 1px 2px rgba(16, 18, 27, .06), 0 8px 24px rgba(16, 18, 27, .06);
    --mo-sidebar-bg: linear-gradient(190deg, #0a1a2b 0%, #0b1c31 60%, #0c1e33 100%);
}

/* ---------- Dark palette (the real design) ---------- */
:root[data-bs-theme="dark"] {
    --bs-primary: var(--mo-violet);
    --bs-primary-rgb: 216, 168, 62;
    --bs-link-color: #72b8ff;
    --bs-link-hover-color: #a9d4ff;

    --bs-body-bg: #07111f;
    --bs-body-color: #eaf0f8;
    --bs-emphasis-color: #ffffff;
    --bs-secondary-color: #8ea0b6;
    --bs-tertiary-bg: #0c1b2c;
    --bs-border-color: rgba(255, 255, 255, .10);

    --bs-card-bg: #0b1929;
    --bs-card-cap-bg: #0c1d31;

    --mo-surface: #0b1929;
    --mo-surface-2: #0c1e33;
    --mo-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 50px rgba(0, 0, 0, .35);
    --mo-sidebar-bg: linear-gradient(190deg, #091625 0%, #0a1a2b 55%, #0b1c31 100%);
}

html, body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bs-body-bg);
}

body {
    -webkit-font-smoothing: antialiased;
}

/* Faint corner glows, dark only — echoes the source design without
   getting in the way of content. Fixed so they don't scroll. */
:root[data-bs-theme="dark"] body {
    background-image:
        radial-gradient(560px circle at 6% -8%, rgba(22, 119, 232, .10), transparent 60%),
        radial-gradient(560px circle at 102% 108%, rgba(216, 168, 62, .07), transparent 55%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Ambient starfield (wwwroot/js/mimirone-starfield.js) — sits behind the
   whole app shell on every page. A NEGATIVE z-index here is a trap: body's
   own background is special-cased as the page's root/canvas background,
   which paints behind literally everything, negative z-index included - so
   z-index:-1 made this canvas unconditionally invisible (confirmed: valid
   drawn pixels in the canvas buffer, never composited on screen). z-index:0
   keeps it in the normal (non-negative) stacking bucket, where DOM order
   already puts .page's later-in-body markup above it; .page's own chrome
   (sidebar/topbar, opaque) still covers it exactly as intended, and the
   plain content background is where it actually shows through. Still
   position:fixed so it doesn't scroll, pointer-events:none so it never
   intercepts clicks. */
#moStarfield {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: block;
}

/* Blurred network landscape fading up from the bottom of every app page. */
.mo-backdrop {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52vh;
    z-index: 0;
    pointer-events: none;
    background: url("img/mimirone-backdrop.jpg") center bottom / cover no-repeat;
    filter: blur(5px) saturate(1.1);
    opacity: .55;
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 100%);
    mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 100%);
}

/* Density: the app shell (.page = MainLayout) renders at 87.5% (14px root),
   the size the product is designed to be seen at - every rem-sized page scales
   with it. Phones and the entry pages (no .page) keep the browser's 16px. */
@media (min-width: 721px) {
    html:has(.page) { font-size: 14px; }
}

/* Slim gold scrollbar, same as the landing page. */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 197, 82, .55) transparent;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(70, 215, 255, .55), rgba(255, 197, 82, .65));
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

h1, h2, h3, .h1, .h2, .h3 {
    letter-spacing: -0.03em;
    font-weight: 600;
}

/* Cards get the app surface + soft shadow everywhere, plus the faint
   diagonal sheen + inset top highlight that gives the Home hero cards
   their depth - subtle enough to stay unnoticed in the light theme. */
.card {
    background-color: var(--mo-surface);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .035), transparent 60%);
    border-color: var(--bs-border-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--mo-shadow);
    border-radius: .75rem;
}

.card-header {
    background-color: transparent;
    border-bottom-color: var(--bs-border-color);
    font-weight: 600;
}

.btn {
    border-radius: .55rem;
    font-weight: 550;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-primary {
    --bs-btn-bg: var(--mo-violet);
    --bs-btn-border-color: var(--mo-violet);
    --bs-btn-color: var(--mo-ink);
    --bs-btn-hover-bg: var(--mo-violet-600);
    --bs-btn-hover-border-color: var(--mo-violet-600);
    --bs-btn-hover-color: var(--mo-ink);
    --bs-btn-active-bg: var(--mo-violet-600);
    --bs-btn-active-color: var(--mo-ink);
    /* Bootstrap's own .btn-primary hardcodes these to its stock blue
       (#0d6efd) rather than referencing --bs-primary, so every disabled
       primary button - which is most of them, mid-request or pending a
       required field - fell back to unthemed blue without this. */
    --bs-btn-disabled-bg: var(--mo-violet);
    --bs-btn-disabled-border-color: var(--mo-violet);
    --bs-btn-disabled-color: var(--mo-ink);
    color: var(--mo-ink);
    background-image: linear-gradient(135deg, var(--mo-violet-600), var(--mo-violet));
    box-shadow: 0 3px 12px rgba(216, 168, 62, .16);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-image: linear-gradient(135deg, #f7d77f, var(--mo-violet-600));
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(216, 168, 62, .28);
}

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

.btn-primary:disabled,
.btn-primary.disabled {
    background-image: none;
    box-shadow: none;
}

.btn-outline-primary {
    --bs-btn-color: var(--mo-violet-600);
    --bs-btn-border-color: rgba(var(--bs-primary-rgb), .5);
    --bs-btn-hover-bg: var(--mo-violet);
    --bs-btn-hover-border-color: var(--mo-violet);
    --bs-btn-hover-color: var(--mo-ink);
    --bs-btn-active-color: var(--mo-ink);
    /* Same stock-blue fallback as .btn-primary above. */
    --bs-btn-disabled-color: var(--mo-violet-600);
    --bs-btn-disabled-border-color: rgba(var(--bs-primary-rgb), .5);
    background-color: rgba(216, 168, 62, .04);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    transform: translateY(-1px);
}

/* Confirm / Reject everywhere (Pending Review, Traversal steps, ...) —
   teal/rose instead of Bootstrap's stock green/red, matching the badge
   and node-status palette. */
.btn-success {
    --bs-btn-bg: var(--mo-teal);
    --bs-btn-border-color: var(--mo-teal);
    --bs-btn-color: #06210f;
    --bs-btn-hover-bg: #5cd9a4;
    --bs-btn-hover-border-color: #5cd9a4;
    --bs-btn-hover-color: #06210f;
    --bs-btn-active-bg: #5cd9a4;
    --bs-btn-active-border-color: #5cd9a4;
    --bs-btn-active-color: #06210f;
    --bs-btn-disabled-bg: var(--mo-teal);
    --bs-btn-disabled-border-color: var(--mo-teal);
    --bs-btn-disabled-color: #06210f;
    color: #06210f;
}

.btn-outline-success {
    --bs-btn-color: var(--mo-teal);
    --bs-btn-border-color: rgba(72, 197, 138, .5);
    --bs-btn-hover-bg: var(--mo-teal);
    --bs-btn-hover-border-color: var(--mo-teal);
    --bs-btn-hover-color: #06210f;
    --bs-btn-active-color: #06210f;
    --bs-btn-disabled-color: var(--mo-teal);
    --bs-btn-disabled-border-color: rgba(72, 197, 138, .5);
}

.btn-danger {
    --bs-btn-bg: var(--mo-rose);
    --bs-btn-border-color: var(--mo-rose);
    --bs-btn-hover-bg: #e97579;
    --bs-btn-hover-border-color: #e97579;
    --bs-btn-active-bg: #e97579;
    --bs-btn-active-border-color: #e97579;
    --bs-btn-disabled-bg: var(--mo-rose);
    --bs-btn-disabled-border-color: var(--mo-rose);
}

.btn-outline-danger {
    --bs-btn-color: var(--mo-rose);
    --bs-btn-border-color: rgba(224, 87, 91, .5);
    --bs-btn-hover-bg: var(--mo-rose);
    --bs-btn-hover-border-color: var(--mo-rose);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--mo-rose);
    --bs-btn-active-border-color: var(--mo-rose);
    --bs-btn-disabled-color: var(--mo-rose);
    --bs-btn-disabled-border-color: rgba(224, 87, 91, .5);
}

/* Loading spinners — a themed blue ring everywhere instead of whatever
   ambient text color .spinner-border's default currentColor picked up. */
.spinner-border,
.spinner-grow {
    color: var(--mo-blue-400);
}

/* Alerts — tinted-chip colors from the same palette as .mo-badge, instead
   of Bootstrap's stock red/green/yellow/blue. */
.alert {
    border-radius: .7rem;
}

.alert-danger {
    --bs-alert-color: var(--mo-rose);
    --bs-alert-bg: rgba(224, 87, 91, .12);
    --bs-alert-border-color: rgba(224, 87, 91, .32);
    --bs-alert-link-color: var(--mo-rose);
}

.alert-success {
    --bs-alert-color: var(--mo-teal);
    --bs-alert-bg: rgba(72, 197, 138, .12);
    --bs-alert-border-color: rgba(72, 197, 138, .32);
    --bs-alert-link-color: var(--mo-teal);
}

.alert-warning {
    --bs-alert-color: var(--mo-amber);
    --bs-alert-bg: rgba(240, 200, 94, .14);
    --bs-alert-border-color: rgba(240, 200, 94, .34);
    --bs-alert-link-color: var(--mo-amber);
}

.alert-info {
    --bs-alert-color: var(--mo-blue-400);
    --bs-alert-bg: rgba(22, 119, 232, .12);
    --bs-alert-border-color: rgba(22, 119, 232, .32);
    --bs-alert-link-color: var(--mo-blue-400);
}

.alert-secondary {
    --bs-alert-color: var(--bs-secondary-color);
    --bs-alert-bg: var(--bs-tertiary-bg);
    --bs-alert-border-color: var(--bs-border-color);
}

.form-control, .form-select {
    border-radius: .5rem;
    background-color: var(--mo-surface);
    border-color: var(--bs-border-color);
}

.form-control:focus, .form-select:focus, .btn:focus-visible {
    border-color: var(--mo-violet);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .25);
}

.list-group-item {
    background-color: var(--mo-surface);
    border-color: var(--bs-border-color);
}

.list-group-item.active {
    background-color: var(--mo-violet);
    border-color: var(--mo-violet);
    color: var(--mo-ink);
}

.nav-pills .nav-link.active {
    background-color: var(--mo-violet);
    color: var(--mo-ink);
}

.nav-pills .nav-link {
    color: var(--bs-body-color);
}

.badge.text-bg-primary {
    background-color: var(--mo-violet) !important;
    color: var(--mo-ink) !important;
}

/* Status badges (StatusBadge.razor) — one look, every page. A tinted-chip
   style (colored border + tinted background + colored text) rather than
   Bootstrap's solid-fill .badge/.bg-*, built from the same tokens as the
   rest of the theme so it flips correctly between light and dark. */
.mo-badge {
    display: inline-flex;
    align-items: center;
    border-radius: .35rem;
    padding: .28rem .55rem;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.mo-badge-neutral {
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
}

.mo-badge-primary {
    color: var(--mo-violet-600);
    background: rgba(216, 168, 62, .16);
    border-color: rgba(216, 168, 62, .34);
}

.mo-badge-info {
    color: var(--mo-blue-400);
    background: rgba(22, 119, 232, .16);
    border-color: rgba(22, 119, 232, .34);
}

.mo-badge-success {
    color: var(--mo-teal);
    background: rgba(72, 197, 138, .16);
    border-color: rgba(72, 197, 138, .34);
}

.mo-badge-warning {
    color: var(--mo-amber);
    background: rgba(240, 200, 94, .18);
    border-color: rgba(240, 200, 94, .36);
}

.mo-badge-danger {
    color: var(--mo-rose);
    background: rgba(224, 87, 91, .16);
    border-color: rgba(224, 87, 91, .34);
}

/* Dark stays a solid inverted chip regardless of theme (matches the old
   bg-dark's always-dark intent) rather than a tinted outline. */
.mo-badge-dark {
    color: #f4f1ea;
    background: rgba(11, 17, 25, .88);
    border-color: rgba(255, 255, 255, .12);
}

a {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.content {
    padding-top: 1.25rem;
    padding-bottom: 3rem;
}

/* Lets a flex child's .text-truncate actually clip instead of overflowing. */
.min-w-0 {
    min-width: 0;
}

/* Workspace hero — a faint gold wash in the corner over the card surface. */
.mo-hero {
    background:
        radial-gradient(440px circle at 100% 0%, rgba(216, 168, 62, .10), transparent 62%),
        var(--mo-surface);
    border-color: rgba(216, 168, 62, .28);
}

.mo-eyebrow {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .7rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

/* Round initials chip on Opportunity rows */
.mo-avatar {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
}
.mo-avatar-gold { background: rgba(216, 168, 62, .18); color: var(--mo-violet-600); }
.mo-avatar-blue { background: rgba(22, 119, 232, .20); color: #76b9ff; }

/* Shared scroll wrapper for every conversation card's message thread - see
   Web/Components/UI/ChatMessageBubble.razor for the message rows themselves.
   Global (not component-scoped) because the wrapping div is written by each
   page, not by the shared component. */
.mo-chat-log {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    max-height: 32rem;
    overflow-y: auto;
    padding-right: .3rem;
}

/* Continuum-setup wizard stepper */
.mo-setup-step {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    border: 1px solid transparent;
    border-radius: .6rem;
    padding: .5rem .7rem;
    min-width: 10rem;
}
.mo-setup-step:hover {
    background: var(--mo-surface-2);
}
.mo-setup-step-active {
    background: var(--mo-surface-2);
    border-color: var(--bs-border-color);
}
.mo-setup-num {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 700;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
}
.mo-setup-num-current {
    border-color: var(--mo-violet);
    background: rgba(216, 168, 62, .15);
    color: var(--mo-violet-600);
}
.mo-setup-num-done {
    border-color: var(--mo-teal);
    background: var(--mo-teal);
    color: #06210f;
}

/* Big choice tiles on the setup wizard's "bring in history" step */
.mo-choice-card {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--bs-border-color);
    border-radius: .8rem;
    padding: 1.25rem;
    background: var(--mo-surface-2);
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.mo-choice-card .bi {
    font-size: 1.4rem;
    color: var(--mo-violet-600);
}
.mo-choice-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 168, 62, .4);
}
.mo-choice-card-active {
    border-color: var(--mo-violet);
    background: rgba(216, 168, 62, .06);
}

/* Proposal row on the setup wizard's review step */
.mo-proposal {
    border: 1px solid var(--bs-border-color);
    border-radius: .7rem;
    background: var(--mo-surface);
}
.mo-proposal-open {
    border-color: rgba(216, 168, 62, .4);
}
.mo-proposal-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--mo-blue-400);
    flex: 0 0 auto;
    margin-top: .45rem;
}

/* Clickable Opportunity card with a subtle lift on hover */
.mo-oppcard {
    display: block;
    border: 1px solid var(--bs-border-color);
    border-radius: .7rem;
    padding: 1rem;
    background: var(--mo-surface);
    transition: transform .12s ease, border-color .12s ease;
}
.mo-oppcard:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 168, 62, .4);
    text-decoration: none;
}

/* Multi-line truncation for card body copy */
.mo-clamp-2,
.mo-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mo-clamp-2 { -webkit-line-clamp: 2; }
.mo-clamp-3 { -webkit-line-clamp: 3; }

/* Continuum node card + its type-group icon chip */
.mo-node-card {
    border: 1px solid var(--bs-border-color);
    border-radius: .7rem;
    background: var(--mo-surface);
    height: 100%;
    transition: border-color .12s ease;
}
.mo-node-card:hover {
    border-color: rgba(216, 168, 62, .4);
}
.mo-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: .5rem;
    background: rgba(216, 168, 62, .16);
    color: var(--mo-violet-600);
    flex: 0 0 auto;
}
.mo-type-icon .bi { font-size: 1rem; }

/* Numbered journey "steps as tabs" strip (Traversal workspace).
   Wraps instead of scrolling; each chip is a real tab button. */
.mo-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.mo-step {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .7rem;
    background: var(--mo-surface);
    padding: .55rem .8rem;
    text-align: left;
    transition: border-color .12s ease, background .12s ease, transform .12s ease;
    min-width: 9.5rem;
}
.mo-step:hover {
    transform: translateY(-1px);
    border-color: rgba(216, 168, 62, .4);
}
.mo-step-active {
    border-color: var(--mo-violet);
    background: rgba(216, 168, 62, .07);
}
.mo-step-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 auto;
    border-radius: .5rem;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
}
.mo-step-active .mo-step-ico {
    border-color: var(--mo-violet);
    background: rgba(216, 168, 62, .15);
    color: var(--mo-violet-600);
}
.mo-step-done .mo-step-ico {
    border-color: var(--mo-teal);
    background: var(--mo-teal);
    color: #06210f;
}
.mo-step-label {
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.15;
}
.mo-step-state {
    font-size: .66rem;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Attach-a-file drop zone on the "Introduce a New Opportunity" form.
   The real <InputFile> sits on top at opacity 0 so the whole area is the
   click/drop target. */
.mo-dropzone {
    position: relative;
    border: 1.5px dashed var(--bs-border-color);
    border-radius: .8rem;
    background: var(--mo-surface-2);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: border-color .12s ease, background .12s ease;
}
.mo-dropzone:hover {
    border-color: rgba(216, 168, 62, .5);
}
.mo-dropzone .bi {
    font-size: 1.5rem;
    color: var(--mo-violet-600);
}
.mo-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.mo-dropzone-busy {
    border-color: var(--mo-violet);
    background: rgba(216, 168, 62, .07);
}

h1:focus {
    outline: none;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--mo-teal);
}
.invalid {
    outline: 1px solid var(--mo-rose);
}
.validation-message {
    color: var(--mo-rose);
}

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

/* =========================================================
   Motion kit (mo-fx-*) — shared landing-page style touches.
   Spotlight position comes from js/mo-fx.js (--mx / --my).
   ========================================================= */

/* page header with a faded logo behind it */
.mo-fx-head {
    position: relative;
    isolation: isolate;
}

.mo-fx-watermark {
    position: absolute;
    left: -2%;
    top: 50%;
    width: min(720px, 70%);
    transform: translateY(-50%);
    opacity: .08;
    pointer-events: none;
    user-select: none;
    z-index: -1;
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 35%, transparent 100%);
    animation: mo-fx-watermark 1.8s ease-out both;
}

/* gold text shine */
.mo-fx-shimmer {
    background: linear-gradient(90deg, #e8a62d, #ffc552 30%, #fff0c4 50%, #ffc552 70%, #e8a62d);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent; /* wins over any scoped color rule */
    animation: mo-fx-shimmer 6s linear infinite;
}

/* entrance: fade up, delay via --d (seconds) */
.mo-fx-enter {
    animation: mo-fx-fade-up .8s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: calc(var(--d, 0) * 1s);
}

/* hover lift (uses `translate` so it never fights an entrance transform) */
.mo-fx-lift {
    transition: translate .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.mo-fx-lift:hover {
    translate: 0 -4px;
    border-color: color-mix(in srgb, var(--spot, #ffc552) 45%, transparent);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28), 0 0 0 1px color-mix(in srgb, var(--spot, #ffc552) 14%, transparent);
}

/* light spot that follows the cursor; colour via --spot */
.mo-fx-spot {
    position: relative;
}

.mo-fx-spot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%),
        color-mix(in srgb, var(--spot, #ffc552) 16%, transparent), transparent 45%);
}

.mo-fx-spot:hover::after {
    opacity: 1;
}

/* soft attention pulse (badges) */
.mo-fx-pulse {
    animation: mo-fx-pulse 2.4s ease-in-out infinite;
}

/* item leaving after an action: slide right, tinted green (ok) or red (no) */
.mo-fx-leave-ok,
.mo-fx-leave-no {
    animation: mo-fx-leave .42s ease-in forwards;
    pointer-events: none;
}

.mo-fx-leave-ok { background: rgba(72, 197, 138, .12); }
.mo-fx-leave-no { background: rgba(224, 87, 91, .12); }

@keyframes mo-fx-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes mo-fx-watermark {
    from { opacity: 0; }
    to { opacity: .08; }
}

@keyframes mo-fx-shimmer {
    to { background-position: 200% center; }
}

@keyframes mo-fx-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240, 200, 94, .45); }
    50% { box-shadow: 0 0 0 5px rgba(240, 200, 94, 0); }
}

@keyframes mo-fx-leave {
    to { opacity: 0; transform: translateX(40px); }
}

@media (prefers-reduced-motion: reduce) {
    .mo-fx-watermark, .mo-fx-shimmer, .mo-fx-enter, .mo-fx-pulse,
    .mo-fx-leave-ok, .mo-fx-leave-no {
        animation: none !important;
    }

    .mo-fx-watermark { opacity: .08; }
    .mo-fx-lift, .mo-fx-lift:hover { transition: none; translate: none; }
}


/* ---------- Collapsible sidebar (Layout/NavMenu + js/mo-nav.js) ---------- */
/* Collapsed width = twice the icon's centre in the open menu (.65 + .85 + 1.25/2 rem),
   so icons stay exactly where they are and only the labels go. */
:root { --mo-sidebar-w: 15.625rem; }
:root[data-nav="collapsed"] { --mo-sidebar-w: 4.25rem; }

/* Hover label for a collapsed sidebar item - body-level so the scroll area can't clip it. */
.mo-nav-tip {
    position: fixed;
    z-index: 1080;
    padding: .38rem .7rem;
    border-radius: .55rem;
    background: #0c1a2b;
    border: 1px solid rgba(216, 168, 62, .4);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-6px, -50%);
    transition: opacity .15s ease, transform .2s cubic-bezier(.2, .8, .2, 1);
}
.mo-nav-tip.is-on { opacity: 1; transform: translate(0, -50%); }
.mo-nav-tip::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: inherit;
    border-left: inherit;
    border-bottom: inherit;
    transform: translateY(-50%) rotate(45deg);
}

/* ---------- shared dark page hero (same look as the Representations / Documents heroes) ---------- */
.mo-page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 2.6rem 2.75rem 2.4rem;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #050f1d 0%, #0a1830 55%, #10224a 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(4, 10, 20, .35);
    animation: mo-page-hero-up .7s cubic-bezier(.2, .7, .2, 1) backwards;
}
.mo-page-hero-orb { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.mo-page-hero-orb.is-a { left: -100px; top: -160px; width: 480px; height: 480px; background: radial-gradient(circle, rgba(216, 168, 62, .2), rgba(216, 168, 62, 0) 70%); animation: mo-page-hero-float-a 14s ease-in-out infinite; }
.mo-page-hero-orb.is-b { right: 60px; bottom: -220px; width: 540px; height: 540px; background: radial-gradient(circle, rgba(72, 137, 230, .14), rgba(72, 137, 230, 0) 70%); animation: mo-page-hero-float-b 18s ease-in-out infinite; }
.mo-page-hero-kicker { display: flex; align-items: center; gap: .6rem; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #f0d79a; }
.mo-page-hero-pulse { width: 8px; height: 8px; border-radius: 50%; background: #d8a83e; animation: mo-page-hero-pulse 1.8s ease-out infinite; }
.mo-page-hero .mo-fx-watermark { display: none; }
@keyframes mo-page-hero-up { from { opacity: 0; translate: 0 16px; } }
@keyframes mo-page-hero-float-a { 50% { translate: 40px 30px; } }
@keyframes mo-page-hero-float-b { 50% { translate: -50px -20px; } }
@keyframes mo-page-hero-pulse { 0% { box-shadow: 0 0 0 0 rgba(216, 168, 62, .6); } 100% { box-shadow: 0 0 0 10px rgba(216, 168, 62, 0); } }
@media (max-width: 720px) { .mo-page-hero { padding: 1.75rem 1.4rem; border-radius: 1.25rem; } }
@media (prefers-reduced-motion: reduce) { .mo-page-hero, .mo-page-hero-orb, .mo-page-hero-pulse { animation: none; } }

/* blurred MimirOne "M" on the right of every dark page hero */
.mo-page-hero, .mo-rp-hero, .mo-dc-hero, .mo-cd-hero, .mo-cp-hero,
.mo-su-hero, .mo-pk-hero, .mo-pp-hero, .mo-nt-hero { isolation: isolate; }
.mo-page-hero::after, .mo-rp-hero::after, .mo-dc-hero::after, .mo-cd-hero::after, .mo-cp-hero::after,
.mo-su-hero::after, .mo-pk-hero::after, .mo-pp-hero::after, .mo-nt-hero::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -3%;
    width: min(40%, 520px);
    aspect-ratio: 408 / 270;
    translate: 0 -50%;
    z-index: -1;
    background: url("img/mimirone-mark.png") center / contain no-repeat;
    opacity: .13;
    filter: blur(6px) saturate(1.2);
    pointer-events: none;
}
@media (max-width: 720px) {
    .mo-page-hero::after, .mo-rp-hero::after, .mo-dc-hero::after, .mo-cd-hero::after, .mo-cp-hero::after,
    .mo-su-hero::after, .mo-pk-hero::after, .mo-pp-hero::after, .mo-nt-hero::after { width: 75%; right: -20%; opacity: .08; }
}
