@charset "UTF-8";

/* ============================================================
   PORTAL — MudBlazor style uplift
   Modern minimalist SaaS look (inspired by Aepix / Linear / Notion / Asana)
   ─────────────────────────────────────────────────────────
   - Design tokens: --ax-*  (light defaults in :root,
     dark overrides under html[data-theme="dark"])
   - MudBlazor palette values come from DefaultTheme.cs and are
     consumed here via the runtime --mud-palette-* variables.
   - Fonts are self-hosted (no CDN): Inter (variable) + JetBrains Mono.
   ============================================================ */


/* ══════════════════════════════════════════════════════════
   1 — DESIGN TOKENS
   ══════════════════════════════════════════════════════════ */
:root {
    /* Fonts */
    --ax-font-family: 'Inter', Roboto, sans-serif;
    --ax-mono-font: 'JetBrains Mono', Consolas, monospace;

    /* Border radius */
    --ax-radius-sm: 6px;
    --ax-radius: 8px;
    --ax-radius-lg: 10px;
    --ax-radius-xl: 12px;
    --ax-radius-2xl: 14px;
    --ax-radius-full: 999px;

    /* Control density */
    --ax-control-height-sm: 26px;
    --ax-control-height: 32px;
    --ax-control-height-lg: 40px;

    /* Shadows (subtle, minimal) */
    --ax-shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
    --ax-shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px -1px rgba(0, 0, 0, .04);
    --ax-shadow-md: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px -2px rgba(0, 0, 0, .04);
    --ax-shadow-lg: 0 10px 24px rgba(0, 0, 0, .08), 0 4px 8px -4px rgba(0, 0, 0, .04);
    --ax-shadow-xl: 0 20px 40px rgba(0, 0, 0, .09), 0 8px 16px -8px rgba(0, 0, 0, .05);

    /* Accent helpers (primary = indigo, see DefaultTheme.cs) */
    --ax-primary-subtle: rgba(99, 102, 241, .10);
    --ax-primary-text: #3730a3;
    --ax-primary-ring: rgba(99, 102, 241, .20);
    --ax-error-ring: rgba(225, 29, 72, .16);

    /* Transitions */
    --ax-transition-fast: 80ms ease;
    --ax-transition: 150ms ease;

    /* App tokens */
    --ax-body-bg: #f4f4f2;
    --ax-font-color: #1a1a17;
    --ax-exception-bg: #fff5f5;
    --ax-popup-bg: #ffffff;
    --ax-normal: #6366f1;
    --ax-tooltip-bg: #2c2c30;

    /* White switch thumb needs a visible edge on white surfaces */
    --ax-switch-thumb-border: rgba(0, 0, 0, .18);

    /* Splash screen tints — stronger than --ax-primary-subtle because
       alpha washes out on light full-screen backgrounds */
    --ax-splash-tint: rgba(99, 102, 241, .18);
    --ax-splash-glow: rgba(99, 102, 241, .22);
}

html[data-theme="dark"] {
    color-scheme: dark;

    --ax-shadow-xs: 0 1px 2px rgba(0, 0, 0, .18);
    --ax-shadow-sm: 0 1px 3px rgba(0, 0, 0, .22), 0 1px 2px -1px rgba(0, 0, 0, .16);
    --ax-shadow-md: 0 4px 12px rgba(0, 0, 0, .30), 0 2px 4px -2px rgba(0, 0, 0, .18);
    --ax-shadow-lg: 0 10px 24px rgba(0, 0, 0, .32), 0 4px 8px -4px rgba(0, 0, 0, .20);
    --ax-shadow-xl: 0 20px 40px rgba(0, 0, 0, .36), 0 8px 16px -8px rgba(0, 0, 0, .24);

    --ax-primary-subtle: rgba(129, 140, 248, .14);
    --ax-primary-text: #a5b4fc;
    --ax-primary-ring: rgba(129, 140, 248, .26);
    --ax-error-ring: rgba(244, 63, 94, .22);

    --ax-body-bg: #1e1e20;
    --ax-font-color: #ededef;
    --ax-exception-bg: #332929;
    --ax-popup-bg: #28282a;
    --ax-tooltip-bg: #47474d;

    /* White thumb contrasts on its own against dark surfaces */
    --ax-switch-thumb-border: transparent;

    --ax-splash-tint: rgba(129, 140, 248, .14);
    --ax-splash-glow: rgba(129, 140, 248, .16);
}

    html[data-theme="dark"] body:has(.loading-progress) {
        background-color: var(--ax-body-bg);
        color: var(--ax-font-color);
    }


/* ══════════════════════════════════════════════════════════
   2 — BASE
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--ax-font-family);
    font-size: 0.875rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Subtle scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--mud-palette-lines-inputs);
    border-radius: var(--ax-radius-full);
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--mud-palette-action-default);
    }

/* Neutralise Chrome's autofill background so it matches the MudBlazor surface */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--mud-palette-surface) inset !important;
    -webkit-text-fill-color: var(--mud-palette-text-primary) !important;
    caret-color: var(--mud-palette-text-primary);
    transition: background-color 9999s ease-out;
}


/* ══════════════════════════════════════════════════════════
   3 — ELEVATION (soften all MudBlazor shadows)
   ══════════════════════════════════════════════════════════ */
.mud-elevation-1 {
    box-shadow: var(--ax-shadow-xs);
}

.mud-elevation-2,
.mud-elevation-3 {
    box-shadow: var(--ax-shadow-sm);
}

.mud-elevation-4,
.mud-elevation-5,
.mud-elevation-6 {
    box-shadow: var(--ax-shadow-md);
}

.mud-elevation-8,
.mud-elevation-9,
.mud-elevation-10,
.mud-elevation-12,
.mud-elevation-16 {
    box-shadow: var(--ax-shadow-lg);
}

.mud-elevation-24 {
    box-shadow: var(--ax-shadow-xl);
}


/* ══════════════════════════════════════════════════════════
   4 — TYPOGRAPHY
   ══════════════════════════════════════════════════════════ */
.mud-typography-h4,
.mud-typography-h5,
.mud-typography-h6 {
    letter-spacing: -0.01em;
}

.font-mono {
    font-family: var(--ax-mono-font);
}

.font-300 {
    font-weight: 300;
}

.font-400 {
    font-weight: 400;
}

.font-500 {
    font-weight: 500;
}

.font-700 {
    font-weight: 700;
}


/* ══════════════════════════════════════════════════════════
   5 — APP BAR
   ══════════════════════════════════════════════════════════ */
.mud-appbar {
    box-shadow: none;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}


/* ══════════════════════════════════════════════════════════
   6 — DRAWER / NAV MENU
   ══════════════════════════════════════════════════════════ */
.mud-drawer {
    box-shadow: none;
    border-right: 1px solid var(--mud-palette-lines-default);
}

.mud-drawer .mud-navmenu {
    padding: 4px 0 8px;
}

.mud-drawer .mud-drawer-content {
    overflow-x: hidden;
}

/* Nav item — Aepix geometry: 8px radius, 6px/10px padding, 20px icon,
   centered 32px rows. (MudBlazor base: 8px/16px, line-height 1.75,
   align-items flex-start.) */
.mud-nav-link {
    margin: 1px 8px;
    padding: 6px 10px;
    /* MudBlazor sets width:100%; with the 8px side margins that overflows
       the drawer and shows a horizontal scrollbar — subtract the margins. */
    width: calc(100% - 16px);
    border-radius: var(--ax-radius);
    align-items: center;
    line-height: 1.25rem;
    transition: background-color var(--ax-transition-fast), color var(--ax-transition-fast);
}

    .mud-nav-link .mud-nav-link-text {
        font-size: 0.875rem;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.mud-navmenu .mud-nav-link .mud-icon-root {
    font-size: 1.25rem;
}

/* Group expand chevron — muted, and neutral even when expanded
   (MudBlazor paints .mud-transform with the primary color). */
.mud-nav-link-expand-icon {
    opacity: .55;
}

.mud-navmenu.mud-navmenu-default .mud-nav-link-expand-icon.mud-transform {
    fill: currentColor;
}

.mud-nav-group > .mud-nav-link .mud-nav-link-text {
    font-weight: 500;
}

/* Child links under a group — Aepix indent (MudBlazor default is 36px) */
.mud-nav-group * .mud-navmenu .mud-nav-item .mud-nav-link {
    padding-left: 32px;
    padding-inline-start: 32px;
}

/* Active link — primary tint, no accent bar (MudNavMenu must NOT set
   Bordered). Selectors mirror MudBlazor's .mud-navmenu-default rules
   exactly so they win by order at equal specificity. */
.mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: var(--ax-primary-subtle);
    color: var(--ax-primary-text);
}

    .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled):hover:not(.mud-nav-link-disabled),
    .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled):focus-visible:not(.mud-nav-link-disabled),
    .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled):active:not(.mud-nav-link-disabled) {
        background-color: var(--ax-primary-subtle);
    }

    .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-text {
        font-weight: 500;
    }

    .mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-icon-root.mud-icon-default {
        color: var(--ax-primary-text);
    }

/* Mini (collapsed) rail — icons stay anchored at the same 10px left
   padding as in expanded mode (no horizontal slide), chevron shrinks
   and parks next to the icon. The group-child selectors mirror
   MudBlazor's mini-mode padding resets so they win by order. */
.mud-drawer--closed.mud-drawer-mini .mud-nav-link {
    margin: 1px 4px;
    padding: 6px 4px 6px 10px;
    width: calc(100% - 8px);
}

.mud-drawer--closed.mud-drawer-mini .mud-nav-group * .mud-navmenu .mud-nav-item .mud-nav-link,
.mud-drawer--closed.mud-drawer-mini .mud-nav-group * .mud-navmenu > .mud-nav-group .mud-nav-link {
    padding: 6px 4px 6px 10px;
}

.mud-drawer--closed.mud-drawer-mini .mud-nav-link .mud-nav-link-expand-icon {
    font-size: 0.875rem;
}


/* ══════════════════════════════════════════════════════════
   7 — BUTTONS
   ══════════════════════════════════════════════════════════ */
.mud-button-root {
    letter-spacing: normal;
}

    .mud-button-root:focus-visible {
        box-shadow: 0 0 0 3px var(--ax-primary-ring);
    }

.mud-button {
    min-height: var(--ax-control-height);
    min-width: 2.25rem;
    padding: 3px 14px;
    border-radius: var(--ax-radius);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Sizes */
.mud-button-filled-size-small,
.mud-button-outlined-size-small,
.mud-button-text-size-small {
    min-height: var(--ax-control-height-sm);
    padding: 2px 10px;
    font-size: 0.8125rem;
}

.mud-button-filled-size-large,
.mud-button-outlined-size-large,
.mud-button-text-size-large {
    min-height: var(--ax-control-height-lg);
    padding: 6px 20px;
    font-size: 0.9375rem;
}

/* Variants */
.mud-button-filled {
    box-shadow: var(--ax-shadow-xs);
}

    .mud-button-filled:hover,
    .mud-button-filled:active {
        box-shadow: var(--ax-shadow-xs);
    }

.mud-button-outlined {
    border-color: var(--mud-palette-lines-inputs);
}

    .mud-button-outlined:hover {
        border-color: var(--mud-palette-action-default);
    }

/* Icon buttons — squarish, denser. Switch/checkbox/radio reuse
   .mud-icon-button internally and rely on its geometry — exclude them. */
.mud-icon-button:not(.mud-switch-base, .mud-checkbox .mud-icon-button, .mud-radio .mud-icon-button) {
    padding: 6px;
    border-radius: var(--ax-radius);
}

.plain-button {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;
}


/* ══════════════════════════════════════════════════════════
   8 — INPUTS / SELECTS / PICKERS
   ══════════════════════════════════════════════════════════ */

/* Outlined border element: thinner, rounder, ring on focus */
.mud-input.mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--ax-radius);
    transition: border-color var(--ax-transition-fast), box-shadow var(--ax-transition-fast);
}

.mud-input.mud-input-outlined:not(.mud-disabled):not(:focus-within):hover .mud-input-outlined-border {
    border-color: var(--mud-palette-action-default);
}

.mud-input.mud-input-outlined:focus-within .mud-input-outlined-border {
    border-width: 1px;
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 3px var(--ax-primary-ring);
}

.mud-input.mud-input-outlined.mud-input-error:focus-within .mud-input-outlined-border {
    border-color: var(--mud-palette-error);
    box-shadow: 0 0 0 3px var(--ax-error-ring);
}

/* Denser input padding (≈ 36px tall controls) */
.mud-input.mud-input-outlined input.mud-input-root-outlined,
.mud-input-outlined-with-label .mud-input input {
    padding: 8px 12px !important;
}

.mud-input.mud-input-outlined textarea.mud-input-root-outlined {
    padding: 8px 12px !important;
}

.mud-select div.mud-input-slot.mud-input-root-outlined {
    padding: 8px 12px !important;
}

.mud-input-label-inputcontrol {
    font-size: 0.875rem !important;
}

.mud-input-label-filled,
.mud-input-label-outlined {
    transform: translate(14px, 9px) scale(1);
}

/* Adornments */
.mud-input input.mud-input-root-adorned-start,
div.mud-input-slot.mud-input-root-outlined.mud-input-root-adorned-start {
    padding-inline-end: 12px !important;
    padding-left: 2px !important;
}

.mud-input input.mud-input-root-adorned-end,
div.mud-input-slot.mud-input-root-outlined.mud-input-root-adorned-end {
    padding-inline-start: 12px !important;
    padding-right: 2px !important;
}

.mud-input.mud-input-adorned-start {
    padding-inline-start: 12px;
}

.mud-input.mud-input-adorned-end {
    padding-inline-end: 12px !important;
}

.dense-input input {
    padding: 5px 8px !important;
}

.required-field:after {
    content: '*';
    color: var(--mud-palette-error);
    margin-left: 0.25rem;
}


/* ══════════════════════════════════════════════════════════
   9 — POPOVER / MENU / LIST
   ══════════════════════════════════════════════════════════ */
.mud-popover {
    border-radius: var(--ax-radius-lg);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: var(--ax-shadow-lg);
}

    .mud-popover .mud-list {
        padding: 4px;
    }

    .mud-popover .mud-list-item {
        border-radius: var(--ax-radius-sm);
        transition: background-color var(--ax-transition-fast);
    }

.mud-list-item.mud-selected-item {
    background-color: var(--ax-primary-subtle);
    color: var(--mud-palette-primary);
}

.mud-list-item-dense .mud-list-item-icon {
    min-width: 30px;
}


/* ══════════════════════════════════════════════════════════
   10 — DIALOGS / OVERLAY
   ══════════════════════════════════════════════════════════ */
.mud-dialog {
    border-radius: var(--ax-radius-2xl);
    border: 1px solid var(--mud-palette-lines-default);
}

    .mud-dialog .mud-dialog-title {
        font-size: 1rem;
        font-weight: 600;
        padding: 16px 20px 12px;
    }

    .mud-dialog .mud-dialog-actions {
        padding: 12px 20px 16px;
        gap: 8px;
    }

.mud-overlay-scrim.mud-overlay-dark {
    background-color: rgba(15, 15, 18, .45);
}

html[data-theme="dark"] .mud-overlay-scrim.mud-overlay-dark {
    background-color: rgba(0, 0, 0, .60);
}


/* ══════════════════════════════════════════════════════════
   11 — TABLES / DATA GRID
   ══════════════════════════════════════════════════════════ */
.mud-table {
    border-radius: var(--ax-radius-xl);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: var(--ax-shadow-xs);
    overflow: hidden;
}

.mud-table-cell {
    font-size: 0.875rem;
    border-bottom: 1px solid var(--mud-palette-table-lines);
}

/* Uppercase muted header row (global — no per-component style needed) */
/* Must be .mud-table-root-prefixed: MudBlazor's own header rule is
   .mud-table-root .mud-table-head .mud-table-cell (0,3,0) and would
   out-specify a two-class selector. */
.mud-table-root .mud-table-head .mud-table-cell {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    background-color: var(--mud-palette-background-gray) !important;
}

.mud-table-pagination .mud-table-cell,
.mud-table-pagination-caption,
.mud-table-pagination-select {
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: normal;
}


/* ══════════════════════════════════════════════════════════
   12 — TABS
   ══════════════════════════════════════════════════════════ */
.mud-tab {
    text-transform: none;
    min-width: 0;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    border-radius: var(--ax-radius) var(--ax-radius) 0 0;
}

    .mud-tab.mud-tab-active {
        color: var(--mud-palette-primary);
    }

.mud-tab-slider {
    border-radius: var(--ax-radius-full);
}

.mud-tabs-panels {
    height: 100%;
}

.mud-tab-panel {
    height: 100%;
}


/* ══════════════════════════════════════════════════════════
   13 — CHIPS / BADGES / BREADCRUMBS
   ══════════════════════════════════════════════════════════ */
.mud-chip {
    font-weight: 500;
    height: 26px;
    font-size: 0.8125rem;
}

    .mud-chip.mud-chip-size-small {
        height: 21px;
        font-size: 0.6875rem;
    }

.mud-badge {
    font-weight: 600;
    font-size: 0.6875rem;
}

.mud-breadcrumbs {
    font-size: 0.8125rem;
}


/* ══════════════════════════════════════════════════════════
   14 — SWITCH (solid pill track, white thumb, no hover halo)
   ══════════════════════════════════════════════════════════ */
.mud-switch-track {
    opacity: 1;
    background-color: var(--mud-palette-lines-inputs);
}

.mud-switch-base.mud-checked + .mud-switch-track {
    opacity: 1;
}

.mud-switch-base:hover {
    background-color: transparent;
}

.mud-switch-button .mud-switch-thumb-small,
.mud-switch-button .mud-switch-thumb-medium,
.mud-switch-button .mud-switch-thumb-large {
    background-color: #fff;
    border: 1px solid var(--ax-switch-thumb-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .20);
    box-sizing: border-box;
}


/* ══════════════════════════════════════════════════════════
   15 — TOOLTIP / SNACKBAR / ALERT / PROGRESS
   ══════════════════════════════════════════════════════════ */
.mud-tooltip {
    background-color: var(--ax-tooltip-bg);
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--ax-radius-sm);
}

.mud-snackbar {
    border-radius: var(--ax-radius-lg);
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: var(--ax-shadow-lg);
}

    .mud-snackbar.mud-alert-text-success {
        border-left: 3px solid var(--mud-palette-success);
        background-color: var(--ax-popup-bg);
        color: var(--mud-palette-text-primary);
    }

    .mud-snackbar.mud-alert-text-error {
        border-left: 3px solid var(--mud-palette-error);
        background-color: var(--ax-popup-bg);
        color: var(--mud-palette-text-primary);
    }

    .mud-snackbar.mud-alert-text-info {
        border-left: 3px solid var(--mud-palette-info);
        background-color: var(--ax-popup-bg);
        color: var(--mud-palette-text-primary);
    }

    .mud-snackbar.mud-alert-text-warning {
        border-left: 3px solid var(--mud-palette-warning);
        background-color: var(--ax-popup-bg);
        color: var(--mud-palette-text-primary);
    }

    .mud-snackbar.mud-alert-text-normal {
        border-left: 3px solid var(--ax-normal);
        background-color: var(--ax-popup-bg);
        color: var(--mud-palette-text-primary);
    }

.mud-alert {
    border-radius: var(--ax-radius-lg);
    font-size: 0.875rem;
}

.mud-progress-linear {
    border-radius: var(--ax-radius-full);
}


/* ══════════════════════════════════════════════════════════
   16 — CARDS / PAPER
   ══════════════════════════════════════════════════════════ */
.mud-paper:not(.mud-paper-square) {
    border-radius: var(--ax-radius-xl);
}

.mud-card {
    border: 1px solid var(--mud-palette-lines-default);
}


/* ══════════════════════════════════════════════════════════
   17 — LAYOUT & APP-SPECIFIC UTILITIES
   ══════════════════════════════════════════════════════════ */
.text-end {
    text-align: end;
}

.text-center {
    text-align: center;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.fill-primary {
    fill: var(--ax-primary-color);
}

.fill-danger {
    fill: var(--ax-danger-color);
}

.fill-warning {
    fill: var(--ax-warning-color);
}

.fill-success {
    fill: var(--ax-success-color);
}

.fill-info {
    fill: var(--ax-info-color);
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.align-center {
    align-items: center;
}

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

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-5 {
    gap: 1.25rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-7 {
    gap: 1.75rem;
}

.gap-8 {
    gap: 2rem;
}

.mx-1 {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.mx-3 {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.my-1 {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.my-2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.my-3 {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.my-4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.stack {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.row {
    flex-direction: row;
}

.row-center-x {
    justify-content: center;
}

.row-center-y {
    align-items: center;
}

.column-center-x {
    align-items: center;
}

.column-center-y {
    justify-content: center;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: break-word;
    background-color: var(--mud-palette-surface);
    background-clip: border-box;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--ax-radius-xl);
}

.block-content {
    border-radius: 0.5rem;
    flex-grow: 0;
    margin: auto;
    max-width: 30rem;
    padding: 1.5rem;
    width: auto;
}


/* ══════════════════════════════════════════════════════════
   18 — BLAZOR FRAMEWORK / SPLASH
   ══════════════════════════════════════════════════════════ */
ul.validation-errors, div.validation-message, li.validation-message {
    color: var(--mud-palette-error);
    font-size: 0.75rem;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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."
    }

.center {
    margin: 0;
    padding: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

/* ── Splash screen — minimal, indigo-tinted, theme-aware ──
   Shown while Blazor WASM boots. js/app.js loads as a BLOCKING script in
   <head> and sets data-theme on <html> before first paint, so the dark
   overrides below apply from the very first frame.
   IMPORTANT: --mud-palette-* variables do NOT exist yet at splash time
   (MudThemeProvider hasn't rendered) — use --ax-* tokens or literals only. */
.splash-screen {
    position: fixed;
    inset: 0;
    background: var(--ax-body-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
}

    /* Primary-tinted gradient wash over the base background */
    .splash-screen::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 70% 55% at 50% 38%, var(--ax-splash-tint) 0%, transparent 70%);
        pointer-events: none;
    }

.splash-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: splashIn .6s ease both;
}

/* Soft ambient glow behind the logo */
.splash-glow {
    position: absolute;
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--ax-splash-glow) 0%, transparent 70%);
    animation: glowPulse 3.5s ease-in-out infinite;
    pointer-events: none;
}

/* Portal product wordmark — lowercase "portal" in Comfortaa with the
   concentric ring mark as the "o". Mirrors Layout/PortalBrand.razor, but
   sized for the splash and using --ax-* tokens / literals only because
   --mud-palette-* don't exist yet at boot-splash time. */
.splash-portal {
    position: relative;
    z-index: 1;
    font-family: 'Comfortaa', var(--ax-font-family);
    font-weight: 600;
    font-size: 46px;
    letter-spacing: -0.5px;
    line-height: 1;
    white-space: nowrap;
    color: var(--ax-font-color);
    user-select: none;
}

    .splash-portal .pb-o {
        display: inline-block;
        width: 0.62em;
        height: 0.62em;
        vertical-align: -0.07em;
    }

    .splash-portal .pb-o-outer {
        fill: none;
        stroke: #6366f1;
        stroke-width: 4.5;
    }

    .splash-portal .pb-o-inner {
        fill: none;
        stroke: #6366f1;
        stroke-width: 3;
        opacity: 0.5;
    }

html[data-theme="dark"] .splash-portal .pb-o-outer,
html[data-theme="dark"] .splash-portal .pb-o-inner {
    stroke: #818cf8;
}

@keyframes splashIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.55;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

.splash-progress-wrap {
    position: relative;
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.splash-progress-track {
    width: 100%;
    height: 3px;
    background: var(--ax-primary-subtle);
    border-radius: 999px;
    overflow: hidden;
}

/* Blazor sets --blazor-load-percentage on .loading-progress;
   the variable inherits to children, driving the fill width. */
.loading-progress .splash-progress-fill {
    height: 100%;
    width: calc(var(--blazor-load-percentage, 0) * 1%);
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-loading-label {
    font-family: var(--ax-font-family);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 4px;
    color: #9a9a96;
    text-transform: uppercase;
}

html[data-theme="dark"] .splash-loading-label {
    color: rgba(255, 255, 255, 0.30);
}
