/* ===================================================================
   Base styles (merged from aaa.css).
   The AAA Figma v2 theme block below is intentionally kept last so its
   tokens and colour overrides win on any conflict.
   =================================================================== */

:root {
    font-size: var(--rz-root-font-size);
    --rz-grid-cell-padding: 0.35rem 0.5rem;
    --rz-grid-header-cell-padding: 0.35rem 0.5rem;
    --rz-grid-header-title-padding: 0 0.1rem;
    --rz-grid-filter-background-color: #f7f7f7 !important;
    /* Non-colour brand tokens (colours now sourced from the Figma :root below) */
    --aaa-button-radius: var(--aaa-input-radius);
    /* Radzen variable mappings */
    --rz-layout-body-padding: 0;
    /* Rounded Radzen buttons (match Bootstrap .btn radius) */
    --rz-button-border-radius: var(--aaa-button-radius);
    /* Rounded input controls app-wide (label-inside Filled variant) */
    --rz-input-border-radius: var(--aaa-input-radius);
    --rz-form-field-filled-border-radius: var(--aaa-input-radius);
    /* Remove the Filled-variant bottom underline indicator */
    --rz-form-field-filled-underline-display: none;
    --rz-primary: var(--acc2);
    --rz-secondary: var(--acc);
    --rz-sidebar-background-color: var(--sb);
    --rz-sidebar-color: var(--surface);
    --rz-panel-menu-background-color: var(--sb);
    --rz-panel-menu-hover-background-color: var(--sbhl);
    --rz-panel-menu-item-active-background-color: rgba(109,40,217,.2);
    --rz-panel-menu-item-active-color: var(--surface);
    --rz-link-color: var(--acc);
    --rz-link-text-decoration: none;
    --rz-link-hover-color: var(--acc2);
    --rz-link-hover-text-decoration: underline;
    --rz-grid-header-background-color: var(--acc2);
    --rz-tabs-tab-hover-background-color: var(--border);
    --rz-tabs-tab-hover-color: var(--txt);
    --rz-tabs-tab-focus-background-color: transparent;
    --rz-tabs-tab-focus-color: var(--rz-tabs-tab-color);
    /* Bootstrap */
    --bs-red: #dc3545;
    --disabled-btn-color: #D0DCEB;
    --disabled-btn-bg: #868E99;
    --disabled-btn-border: #868E99;
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background: white no-repeat center center fixed;
}

.rz-body {
    --rz-body-padding: 0;
}

.rz-layout .rz-body {
    overflow: inherit;
}

.rz-grid-table thead {
    background-color: var(--acc);
}

a {
    color: var(--rz-link-color);
}

    a:hover,
    a:focus {
        color: var(--rz-link-hover-color);
    }

.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."
    }

dialogfooter {
    position: absolute;
    height: 90px;
    bottom: 0;
    width: calc(100% - 2.5rem);
    background-color: var(--surface);
}

.dialogbody-pad {
    padding-bottom: 24px;
}

.card-title {
    color: var(--surface) !important;
}

.rz-panel-menu {
    background-color: var(--sb);
    color: var(--surface);
}

    .rz-panel-menu .rz-navigation-item {
        border-bottom: none;
    }

    .rz-panel-menu .rz-navigation-menu .rz-navigation-item-wrapper {
        background-color: var(--sb);
        color: var(--surface);
        margin: 0;
        border-radius: var(--rz-border-radius-0);
    }

    .rz-panel-menu .rz-navigation-menu .rz-navigation-item-active, .rz-panel-menu .rz-navigation-menu .rz-navigation-item-wrapper-active {
        background-color: rgba(109,40,217,.2) !important;
        color: var(--surface) !important;
    }

    .rz-panel-menu .rz-navigation-menu .rz-navigation-item:first-child {
        margin: 0;
    }

    .rz-panel-menu .rz-navigation-menu .rz-navigation-item:last-child {
        margin: 0;
    }

.rz-sidebar {
    background-color: var(--sb);
    width: var(--sbw);
}
    .rz-sidebar.rz-sidebar-start {
        border-right: none;
    }

.rz-sidebar-toggle:hover {
    background-color: var(--sbhl);
    color: var(--surface);
}

.rz-navigation-item-link {
    background-color: var(--sb);
    color: var(--surface);
}

    .rz-navigation-item-link:hover {
        background-color: var(--sbhl);
        color: var(--surface);
    }

/* Context-menu links share Radzen navigation classes with the dark sidebar. */
.rz-context-menu .rz-menu .rz-navigation-item-link {
    background-color: var(--surface);
    color: var(--txt);
}

.rz-context-menu .rz-menu .rz-navigation-item-text {
    color: inherit;
}

.rz-context-menu .rz-menu .rz-navigation-item-link:hover,
.rz-context-menu .rz-menu .rz-state-focused .rz-navigation-item-link {
    background-color: var(--border);
    color: var(--txt);
}

.rz-navigation-item-link-active {
    background-color: rgba(109,40,217,.2);
}

.rz-navigation-item-link-no-hover {
    background-color: var(--sb);
    color: var(--surface);
}
    .rz-navigation-item-link-no-hover:hover {
        background-color: var(--sb);
        color: var(--surface);
    }

.btn.disabled, .btn:disabled, fieldset:disabled .btn {
    color: var(--disabled-btn-color);
    background-color: var(--disabled-btn-bg);
    border-color: var(--disabled-btn-border);
}

.btn-top-banner {
    --bs-btn-color: var(--surface);
    --bs-btn-bg: var(--acc);
    --bs-btn-border-color: var(--acc);
    --bs-btn-hover-color: var(--surface);
    --bs-btn-hover-bg: var(--acc);
    --bs-btn-hover-border-color: var(--acc);
    --bs-btn-active-bg: var(--acc);
    --bs-btn-active-border-color: var(--acc);
}

.btn {
    border-radius: var(--aaa-button-radius);
}

.btn-primary {
    --bs-btn-color: var(--surface);
    --bs-btn-bg: var(--rz-primary);
    --bs-btn-border-color: var(--muted);
    /*--bs-btn-hover-color: var(--surface);*/
    --bs-btn-hover-bg: var(--txt);
    --bs-btn-hover-border-color: var(--txt);
    --bs-btn-active-bg: var(--rz-primary);
    --bs-btn-active-border-color: var(--rz-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--rz-primary);
    --bs-btn-border-color: var(--rz-primary);
    --bs-btn-hover-bg: var(--txt);
    --bs-btn-hover-border-color: var(--txt);
}

.rz-aaa-primary-button {
    background-color: var(--rz-primary) !important;
    color: var(--surface) !important;
    border-color: var(--rz-primary) !important;
    border-radius: var(--aaa-button-radius);
}
    .rz-aaa-primary-button:hover {
        background-color: var(--txt) !important;
    }

.rz-aaa-outline-primary-button {
    background-color: var(--surface) !important;
    color: var(--rz-primary) !important;
    border-color: var(--rz-primary) !important;
    border-radius: var(--aaa-button-radius);
}
    .rz-aaa-outline-primary-button:hover {
        background-color: var(--txt) !important;
        border-color: var(--txt) !important;
    }

.card-header {
    background-color: var(--sb2);
    color: var(--surface);
    border-top-left-radius: calc(var(--aaa-radius) - 1px) !important;
    border-top-right-radius: calc(var(--aaa-radius) - 1px) !important;
}

.rz-column-title {
    white-space: normal !important;
    color: var(--surface) !important;
}

.rz-column-title-content {
    color: var(--surface) !important;
}

.rz-sortable-column-icon {
    color: var(--surface) !important;
}

.text-info {
    color: var(--acc) !important;
}

.text-primary {
    color: var(--surface) !important;
}

#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;
    }

.btn-fixed-1 {
    width: 120px;
}

.btn-fixed-2 {
    width: 180px;
}

/* A text action that takes you somewhere, usually ending in an arrow: "View in Charges ->".
   A button, not underlined link text: hovering outlines the whole label. The outline is an inset
   shadow, so it appears without the button changing size. */
.aaa-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--acc);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: box-shadow .12s;
}

/* Colour and decoration repeated so an <a> used this way beats the global link hover. */
.aaa-link-btn:hover:not(:disabled) {
    box-shadow: inset 0 0 0 1px var(--acc);
    color: var(--acc);
    text-decoration: none;
}

.aaa-link-btn:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.aaa-link-btn .rz-icon {
    font-size: 16px;
}

/* For a link inside a small card, such as a file tile. */
.aaa-link-btn-sm {
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
}

.rz-dialog-content {
    /*margin-top: 20px;
    padding-bottom: 20px;*/
    height: 100% !important;
}

.text-right {
    text-align: right;
}

.site-profile-divider {
    border-top: var(--rz-border-base-300);
}

.site-profile a, .site-profile a:focus {
    color: var(--rz-link-color) !important;
    text-decoration: underline;
}

    .site-profile a:hover {
        color: var(--rz-link-hover-color) !important;
        text-decoration: none;
    }

.modal-w-50 {
    max-width: 50%;
    margin: auto;
}
.modal-w-75 {
    max-width: 75%;
    margin: auto;
}
.modal-w-80 {
    max-width: 80%;
    margin: auto;
}
.modal-w-100 {
    max-width: 100%;
    margin: auto;
}
.modal-h-500 {
    min-height: 500px;
}
.modal-h-750 {
    min-height: 750px;
}
.modal-h-800 {
    min-height: 800px;
}
.modal-h-1000 {
    min-height: 1000px;
}

.aaa-pre {
    white-space: pre-wrap;
    font-family: 'Roboto';
}

.filled-icon {
    font-variation-settings: 'FILL' 1;
}

p {
    color: var(--txt);
}

pre {
    color: var(--txt);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--txt) !important;
}

hr {
    color: var(--acc) !important;
}

label {
    color: var(--txt) !important;
}

.form-group {
    color: var(--txt) !important;
}

.rz-cell-data {
    color: var(--txt) !important;
}

.rz-form-field-label {
    color: var(--txt) !important;
}

.rz-fieldset-legend-text {
    color: var(--txt) !important;
}

.rz-dialog-title {
    color: var(--txt);
}

/* ===================================================================
   AAA Figma v2 theme — TRA-9.
   Kept last so these tokens and colour overrides win over the base
   styles above. Values sourced from the TRA-9 design-token block
   (DESIGN_SYSTEM.md / globals.css).
   =================================================================== */

:root {
    --sb: #1e1b4b;
    --sb2: #2d2a5e;
    --sbhl: rgba(255,255,255,.08);
    --acc: #6d28d9;
    --acc2: #5b21b6;
    --teal: #0ea5e9;
    --green: #10b981;
    --amber: #f59e0b;
    --red: #ef4444;
    --navy: #1e1b4b;
    --bg: #f4f3ff;
    --surface: #fff;
    --border: #e5e7eb;
    --txt: #111827;
    --muted: #6b7280;
    /* Sections marked 'not built yet' - see .aaa-placeholder */
    --aaa-placeholder-border: #e6007e;
    /* Swap this for any image to change the mark everywhere at once. */
    --aaa-placeholder-mark: url('/img/placeholder-mark.png');
    --grid-header-text: rgba(255,255,255,.8);
    --grid-header-border: rgba(255,255,255,.1);
    --grid-row-hover: #faf9ff;
    /* Wide enough for the longest nav label ("Document Explorer") to sit on one line beside its
       icon at 11.5px: 51px of icon, gap and padding plus the text itself. */
    --sbw: 185px;
    --navh: 48px;
    /* Shared corner radius for surfaces (grids, cards) */
    --aaa-radius: 16px;
    --aaa-input-radius: 12px;
}

/* ---- Shell layout (mirrors AppLayout.tsx) ---- */
.lay {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--txt);
}

.sb {
    width: var(--sbw);
    background: var(--sb);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width .2s ease;
}

/* Backdrop only appears behind the off-canvas sidebar on mobile (see media query). */
.sb-backdrop {
    display: none;
}

/* ---- Sidebar collapse (desktop): squeeze the sidebar to zero width ---- */
.lay.sb-collapsed .sb {
    width: 0;
    overflow: hidden;
}

/* ---- Mobile: sidebar becomes an off-canvas overlay ---- */
@media (max-width: 768px) {
    .sb {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1001;
        width: var(--sbw);
        transform: translateX(0);
        transition: transform .2s ease;
    }

    /* Collapsed on mobile = slid fully off-screen (keep full width for the slide-in). */
    .lay.sb-collapsed .sb {
        width: var(--sbw);
        transform: translateX(-100%);
    }

    /* Dim the page behind the open overlay; tap to close. */
    .lay:not(.sb-collapsed) .sb-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, .4);
    }
}

/* ---- Full-width content-area side drawer ----
   Opt-in via CssClass="full-width-drawer" on a Radzen side dialog. The dialog is a
   right-aligned, body-level overlay, so it cannot see the shell's flex layout. Size it to
   the visible content area: full viewport minus the sidebar. When the sidebar is collapsed
   (class mirrored onto <body> by interop.js) or off-canvas on mobile, the drawer tracks to
   the full width. !important beats the inline Width set by Radzen, and the
   .full-width-drawer scope keeps other (fixed-width) side dialogs untouched. */
.rz-dialog-side.full-width-drawer {
    width: calc(100vw - var(--sbw)) !important;
    max-width: calc(100vw - var(--sbw)) !important;
}

body.shell-sb-collapsed .rz-dialog-side.full-width-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
}

@media (max-width: 768px) {
    .rz-dialog-side.full-width-drawer {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.topbar {
    height: var(--navh);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    flex-shrink: 0;
}

.tb-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--txt);
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pg {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg);
}

/* ---- Topbar action buttons (mirrors TopBar.tsx) ---- */
.ib {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    position: relative;
    transition: all .12s;
    text-decoration: none;
}

.ib:hover, .ib:focus {
    color: var(--txt);
    background: #ede9fe;
    text-decoration: none;
}

.ib .rz-icon, .ib i {
    font-size: 16px;
}

.ndot {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--red);
    border: 1.5px solid #fff;
}

.av {
    width: 26px;
    height: 26px;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    border-radius: 50% !important;
    background: var(--acc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
}

/* Profile button: show only the round avatar, hide Radzen dropdown chevron (Figma) */
.rz-profile-menu .rz-navigation-item-icon-children {
    display: none;
}

/* Keep the profile trigger a tight circle: no padding/background/radius around the avatar */
.rz-profile-menu,
.rz-profile-menu .rz-navigation-item-wrapper,
.rz-profile-menu .rz-navigation-item-link {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

/* Anchor the profile dropdown flush to the right edge, dropping from the bottom of the topbar */
.rz-profile-menu .rz-navigation-menu {
    position: fixed !important;
    top: var(--navh) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 0 !important;
    width: max-content !important;
    max-width: min(480px, 92vw) !important;
    margin: 0 !important;
}

/* Keep the avatar / footer spacer columns a fixed width so every row's text
   column starts at the same x and all links line up (no flex shrink) */
.rz-profile-menu .rz-navigation-menu > .d-flex > div:first-child {
    flex: 0 0 auto;
}

/* ---- PolarisU logo ----
   The PolarisU mark is a wordmark, not an image: "polaris" in the inherited
   text colour plus a smaller ".U" in their brand green, set in Montserrat 800.
   "polaris" uses currentColor so the mark sits correctly on light and dark.
   The green defaults to a darkened shade that stays legible on light surfaces;
   dark surfaces override --polarisu-green with the brand value #6dd185. */
.polarisu-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: 1.15em;
    white-space: nowrap;
}

    .polarisu-logo .polarisu-u {
        color: var(--polarisu-green, #2b8843);
        font-size: .8em;
    }

/* ---- Sidebar: logo + flat sectioned nav (Fix 3) ---- */
.sb-logo {
    /*padding: 12px 14px 10px;*/
    border-bottom: 1px solid rgba(255,255,255,.06);
    cursor: pointer;
    align-content: center;
    height: var(--navh);
}

    .sb-logo img {
        height: calc((var(--navh) - 12px) * 0.7);
        display: block;
        margin: auto;
    }

.sb-nav {
    flex: 1;
    padding: 4px 0;
    overflow-y: auto;
}

.sb-section {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.22);
    padding: 8px 14px 2px;
    margin-top: 4px;
}

.ni {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    cursor: pointer;
    color: rgba(255,255,255,.5);
    font-size: 11.5px;
    /* A label belongs on one line: wrapping pushes the rows out of their even rhythm and reads as
       two items. The sidebar is sized to the longest label instead (--sbw). */
    white-space: nowrap;
    transition: all .12s;
    border-left: 2px solid transparent;
    text-decoration: none;
}

.ni:hover {
    color: rgba(255,255,255,.85);
    background: var(--sbhl);
    text-decoration: none;
}

.ni.on {
    color: #fff;
    background: rgba(109,40,217,.2);
    border-left-color: #a78bfa;
    font-weight: 600;
}

.ni .rz-icon, .ni i {
    font-size: 13px;
    width: 13px;
    height: 13px;
    opacity: .7;
    flex-shrink: 0;
}

.ni.on .rz-icon, .ni.on i {
    opacity: 1;
}

.sb-bottom {
    padding: 4px 0 8px;
    border-top: 1px solid rgba(255,255,255,.06);
}

/* ---- KPI summary cards (Fix 5) ---- */
.sum-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.sum-card {
    flex: 1;
    padding: 10px 12px;
    border-radius: var(--aaa-radius);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all .12s;
}

.sum-card:hover {
    border-color: #a78bfa;
}

.sum-card.red-tint {
    background: #fff5f5;
    border-color: #fecaca;
}

.sum-card.amber-tint {
    background: #fffbeb;
    border-color: #fde68a;
}

.sum-card.blue-tint {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.sum-card.green-tint {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.sum-card.grey-tint {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.sum-card.violet-tint {
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.sum-card.teal-tint {
    background: #ecfeff;
    border-color: #a5f3fc;
}

.sum-card.selected {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, .25);
}

/* Number colours per tint, matching the status-pill text colours. */
.sum-card.violet-tint .sum-n { color: #6d28d9; }
.sum-card.blue-tint .sum-n   { color: #2563eb; }
.sum-card.teal-tint .sum-n   { color: #0e7490; }
.sum-card.amber-tint .sum-n  { color: #b45309; }
.sum-card.green-tint .sum-n  { color: #15803d; }
.sum-card.red-tint .sum-n    { color: var(--red); }

.sum-n {
    font-size: 18px;
    font-weight: 800;
}

.sum-lbl {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 500;
}

/* ---- DataGrid density + navy header (Fix 6) ---- */
.rz-data-grid .rz-datatable-tbody .rz-row td {
    padding: 17px 24px;
    font-size: 11px;
}

.rz-data-grid .rz-datatable-thead th {
    background: var(--sb2);
    color: var(--grid-header-text);
    font-size: 10px;
    font-weight: 600;
    padding: 8px 14px;
    border-bottom: 1px solid var(--grid-header-border);
}

.rz-data-grid .rz-datatable-tbody .rz-row td:first-child,
.rz-data-grid .rz-datatable-thead th:first-child {
    padding-left: 28px;
}

.rz-data-grid .rz-datatable-tbody .rz-row td:last-child,
.rz-data-grid .rz-datatable-thead th:last-child {
    padding-right: 28px;
}

.rz-data-grid .rz-row:hover td {
    background: var(--grid-row-hover);
}

.paged-grid.selectable .rz-data-grid .rz-row,
.paged-grid.selectable .rz-data-grid .rz-row td,
.paged-grid.selectable .rz-data-grid .rz-data-row,
.paged-grid.selectable .rz-data-grid .rz-data-row td,
.settings-grid.selectable .rz-data-grid .rz-row,
.settings-grid.selectable .rz-data-grid .rz-row td,
.settings-grid.selectable .rz-data-grid .rz-data-row,
.settings-grid.selectable .rz-data-grid .rz-data-row td {
    cursor: pointer !important;
}

/* Non-selectable grids: keep the default cursor on rows (Radzen sets pointer by default) */
.paged-grid:not(.selectable) .rz-data-grid .rz-row,
.paged-grid:not(.selectable) .rz-data-grid .rz-row td,
.paged-grid:not(.selectable) .rz-data-grid .rz-data-row,
.paged-grid:not(.selectable) .rz-data-grid .rz-data-row td,
.settings-grid:not(.selectable) .rz-data-grid .rz-row,
.settings-grid:not(.selectable) .rz-data-grid .rz-row td,
.settings-grid:not(.selectable) .rz-data-grid .rz-data-row,
.settings-grid:not(.selectable) .rz-data-grid .rz-data-row td {
    cursor: default !important;
}

/* ---- Page background and surface colours (Fix 7) ---- */
.rz-body, .main, .pg {
    background: var(--bg);
}

.card, .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--aaa-radius);
}

/* Rounded corners on the PagedGrid table itself */
.paged-grid .rz-data-grid,
.settings-grid .rz-data-grid {
    border: 1px solid var(--border);
    border-radius: var(--aaa-radius);
    overflow: hidden;
}

/* Match card corners to the grid */
.rz-card {
    border-radius: var(--aaa-radius);
    overflow: hidden;
}

/* Filter bar surface for the Properties screen */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

/* Dropdown group headings. A long option list (the appliance location list, for example) breaks
   itself into groups with items that cannot be chosen; Radzen renders those dimmed, which reads as
   an unavailable option, so they are restyled as headings instead.

   Only a list that sets DataFieldSchema.ListHasGroupHeadings is restyled: Radzen moves the open
   panel onto the body, out of reach of any parent selector, so the list marks the popup itself with
   --aaa-ddl-headings (through PopupStyle, which lands on the items wrapper) and this matches on
   that. Everywhere else a disabled option still looks unavailable, because there it is an option
   the reader cannot have. */
.rz-dropdown-items-wrapper[style*="--aaa-ddl-headings"] .rz-dropdown-item.rz-state-disabled {
    opacity: 1;
    padding-top: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    cursor: default;
}

/* Attributes side drawer: fill the side-dialog content wrapper so the drawer's own flex
   layout scrolls its body internally and keeps the Cancel/Save footer pinned to the bottom. */
.height_100 {
    height: 100% !important;
    padding: 0 !important;
}

/* Generic info card: tinted helper panel carrying regulatory/guidance text, typically at the top
   or bottom of a drawer or form. Put each line in its own <p>; use <strong> for bold lead-ins. */
.info-card {
    font-size: 13px;
    line-height: 1.5;
    color: var(--txt);
    background: color-mix(in srgb, var(--acc) 8%, #fff);
    border: 1px solid color-mix(in srgb, var(--acc) 25%, #fff);
    border-radius: var(--aaa-radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.info-card p {
    margin: 0 0 8px;
}

.info-card p:last-child {
    margin-bottom: 0;
}

/* Optional icon variant: pair a leading RadzenIcon with the text on one row. */
.info-card-inline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.info-card-inline .rzi,
.info-card-inline .rz-icon {
    font-size: 18px;
    color: var(--acc);
    flex-shrink: 0;
}

/* ===================================================================
   Product mark animation

   The three chevrons jump in turn, left to right, each landing with a smaller second hop before the
   next one goes. Lives here rather than with the sign-in styles because both the app shell and the
   sign-in pages load this file, and both animate the same mark.

   An inlined mark is required - CSS cannot reach into an <img>. The chevrons leave their viewBox at
   the top of the jump, so the mark paints outside its box rather than carrying empty headroom that
   would push the layout around.
   =================================================================== */
.aaa-mark {
    overflow: visible;
}

.aaa-mark-chevron {
    animation: aaa-mark-bob 1.6s infinite;
}

.aaa-mark-chevron:nth-child(2) {
    animation-delay: .18s;
}

.aaa-mark-chevron:nth-child(3) {
    animation-delay: .36s;
}

/* A timing function per step rather than one for the whole animation: fast off the ground, slowing to
   the apex, then accelerating back down, which is what makes it read as a jump rather than a glide.
   The tail of the cycle is still, so the three settle before going again. Values are user units and
   the mark renders at roughly a third of its viewBox, so -30 here is about 11px on screen. */
@keyframes aaa-mark-bob {
    0% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(.16, .84, .44, 1);
    }

    26% {
        transform: translateY(-30px);
        animation-timing-function: cubic-bezier(.55, .06, .68, .19);
    }

    46% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(.16, .84, .44, 1);
    }

    58% {
        transform: translateY(-11px);
        animation-timing-function: cubic-bezier(.55, .06, .68, .19);
    }

    70% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(.16, .84, .44, 1);
    }

    77% {
        transform: translateY(-3px);
        animation-timing-function: cubic-bezier(.55, .06, .68, .19);
    }

    84%, 100% {
        transform: translateY(0);
    }
}

/* Movement is decoration: the mark still reads as the product without it. */
@media (prefers-reduced-motion: reduce) {
    .aaa-mark-chevron {
        animation: none;
    }
}

/* ===================================================================
   Placeholder sections
   -------------------------------------------------------------------
   A section that describes a feature the product cannot do yet carries
   the class `aaa-placeholder`. The pink frame and the mark make an
   unbuilt area obvious in a demo, a screenshot, or a walkthrough, so
   nobody mistakes it for working software. Remove the class in the same
   change that builds the feature.

   The mark is `--aaa-placeholder-mark`. Point it at any image in
   wwwroot/img to change it everywhere at once.
   =================================================================== */

.aaa-placeholder {
    position: relative;
    border: 2px solid var(--aaa-placeholder-border) !important;
    border-radius: 8px;
    padding-right: 84px;
}

.aaa-placeholder::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 12px;
    width: 64px;
    height: 56px;
    /* Shrinks to fit a short row; `contain` keeps the mark in proportion. */
    max-height: calc(100% - 16px);
    pointer-events: none;
    background: var(--aaa-placeholder-mark) no-repeat center / contain;
}

/* -------------------------------------------------------------------
   A single control whose destination is not built. The whole section
   around it works, so it gets the mark inline rather than the frame:
   a pink frame here would suggest the working fields are fake too.
   Keep the control's own disabled styling; this only adds the mark.
   ------------------------------------------------------------------- */

.aaa-placeholder-inline {
    /* Isolated component CSS loads after this file and outranks it. */
    color: var(--aaa-placeholder-border) !important;
    opacity: 1 !important;
}

.aaa-placeholder-inline::after {
    content: "";
    display: inline-block;
    width: 26px;
    height: 19px;
    margin-left: 6px;
    vertical-align: -5px;
    background: var(--aaa-placeholder-mark) no-repeat center / contain;
}

/* The frame is the signal; the mark is decoration. Keep both out of print. */
@media print {
    .aaa-placeholder {
        border-width: 1px !important;
        padding-right: 0;
    }

    .aaa-placeholder::after,
    .aaa-placeholder-inline::after {
        display: none;
    }
}
