/* =========================================================================
   Valar Morghulis — iron, parchment and antique gold
   Fluent-inspired: top app bar + left rail, cards on a quiet canvas,
   square-with-rounded-edges geometry (8px surfaces, 5px controls, 4px
   badges — no pill shapes for text, badges, chips, buttons, inputs,
   avatars or status marks). Neutrals derive from Radzen's own text/
   background tokens via color-mix, so light and dark themes both work
   with the appearance toggle.

   Gold identifies primary actions; red remains reserved for danger. Rich decorative
   materials live in the shell and account page; working data surfaces stay readable.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

@font-face {
    font-family: "Cinzel";
    src: url("../fonts/Cinzel/Cinzel-Variable.ttf") format("truetype");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Aged gold on parchment. The dark variant below uses silver and warmer gold. */
    --vmw-accent: #80632d;
    --vmw-accent-strong: #654c20;
    --vmw-accent-light: #a88a4c;
    --vmw-gold: #b59a64;
    --vmw-iron: #101516;
    --vmw-parchment: #eee8dc;
    --rz-base: #d8d2c6;
    --rz-base-50: #f9f5ec;
    --rz-base-100: #eee8dc;
    --rz-base-200: #e5decf;
    --rz-base-300: #d8d2c6;
    --rz-base-400: #c9c1b2;
    --rz-base-500: #bbb3a5;
    --rz-base-600: #aaa394;
    --rz-base-700: #736e60;
    --rz-base-800: #4a493f;
    --rz-base-900: #262921;
    --rz-body-background-color: var(--rz-base-100);
    --rz-base-background-color: var(--rz-base-50);
    --rz-text-color: var(--rz-base-900);
    --rz-text-secondary-color: var(--rz-base-800);
    --rz-on-base: var(--rz-text-color);
    --vmw-accent-soft: color-mix(in srgb, var(--vmw-accent) 13%, transparent);
    --vmw-accent-faint: color-mix(in srgb, var(--vmw-accent) 8%, transparent);

    /* Link ink: blends 70% accent toward the theme's text colour, so it darkens on
       light and lightens on dark instead of vanishing (softer than a raw brand red). */
    --vmw-link: color-mix(in srgb, var(--vmw-accent) 70%, var(--rz-text-color));
    --vmw-link-hover: color-mix(in srgb, var(--vmw-accent) 55%, var(--rz-text-color));

    /* Semantic status. */
    --vmw-ok: #16a34a;
    --vmw-warn: #d97706;
    --vmw-danger: #dc2626;
    --vmw-info: #0284c7;

    /* Geometry: squared with rounded edges — three steps, no pills. */
    --vmw-radius-lg: 8px;   /* cards, tiles, dialogs, overlays  */
    --vmw-radius: 5px;      /* buttons, inputs, nav items       */
    --vmw-radius-sm: 4px;   /* badges, chips, count marks       */
    --rz-border-radius: 5px;

    /* Theme-adaptive neutrals. */
    --vmw-border: color-mix(in srgb, var(--rz-text-color) 12%, transparent);
    --vmw-border-strong: color-mix(in srgb, var(--rz-text-color) 24%, transparent);
    --vmw-dim: color-mix(in srgb, var(--rz-text-color) 65%, transparent);
    --vmw-faint: color-mix(in srgb, var(--rz-text-color) 44%, transparent);
    --vmw-hover: color-mix(in srgb, var(--rz-text-color) 5%, transparent);
    --vmw-surface: color-mix(in srgb, var(--rz-text-color) 2%, var(--rz-body-background-color));
    --vmw-inset: color-mix(in srgb, var(--rz-text-color) 4.5%, var(--rz-body-background-color));

    /* Elevation. */
    --vmw-shadow-card: 0 1px 2px color-mix(in srgb, #000 5%, transparent);
    --vmw-shadow-pop: 0 6px 20px -6px color-mix(in srgb, #000 22%, transparent);
    --vmw-shadow-overlay: 0 16px 40px -12px color-mix(in srgb, #000 32%, transparent),
                         0 4px 14px color-mix(in srgb, #000 14%, transparent);

    /* Readable working text, with an engraved serif reserved for guild headings. */
    --vmw-font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
               "Helvetica Neue", Arial, sans-serif;
    --vmw-font-mono: "Cascadia Mono", Consolas, "Courier New", monospace;
    --vmw-font-display: "Cinzel", "Palatino Linotype", Georgia, serif;
    --rz-text-font-family: var(--vmw-font);

    /* Layout. */
    --vmw-topbar-h: 64px;
    --vmw-sidenav-w: 224px;
    --vmw-sidenav-collapsed-w: 58px;

    /* Recolor Radzen primary to the brand accent. */
    --rz-primary: var(--vmw-accent);
    --rz-primary-dark: var(--vmw-accent-strong);
    --rz-primary-light: var(--vmw-accent-light);
    --rz-primary-lighter: var(--vmw-accent-soft);
    --rz-on-primary: #ffffff;

    /* Grid hover/selection: material3 paints these on cells, so recolor the
       tokens (opaque, so they cover cleanly) instead of fighting the rows. */
    --rz-grid-hover-background-color: color-mix(in srgb, var(--rz-text-color) 6%, var(--rz-body-background-color));
    --rz-grid-selected-background-color: color-mix(in srgb, var(--vmw-accent) 13%, var(--rz-body-background-color));

    /* Radzen overlay geometry. */
    --rz-dialog-border-radius: var(--vmw-radius-lg);
    --rz-dialog-shadow: var(--vmw-shadow-overlay);
    --rz-notification-border-radius: var(--vmw-radius-lg);

    /* Radzen control geometry: square every corner the theme rounds into a pill. */
    --rz-button-border-radius: var(--vmw-radius);
    --rz-input-border-radius: var(--vmw-radius);
    --rz-checkbox-border-radius: var(--vmw-radius-sm);
    --rz-checkbox-checked-icon-border-radius: 2px;
    --rz-radio-border-radius: var(--vmw-radius-sm);
    --rz-chip-border-radius: var(--vmw-radius-sm);
    --rz-badge-border-radius: var(--vmw-radius-sm);
    --rz-badge-pill-border-radius: var(--vmw-radius-sm);
    --rz-pager-button-border-radius: var(--vmw-radius);
    --rz-tabs-border-radius: var(--vmw-radius);
    --rz-card-border-radius: var(--vmw-radius-lg);
    --rz-panel-border-radius: var(--vmw-radius-lg);
    --rz-menu-item-border-radius: var(--vmw-radius);
    --rz-panel-menu-item-border-radius: var(--vmw-radius);
    --rz-profile-menu-border-radius: var(--vmw-radius);
    --rz-grid-border-radius: var(--vmw-radius);

    font-size: var(--rz-root-font-size);
}

:root[data-theme="dark"] {
    --vmw-accent: #c1a367;
    --vmw-accent-strong: #d2b77f;
    --vmw-accent-light: #d9c59a;
    --rz-on-primary: #151915;
    --rz-base: #42473f;
    --rz-base-50: #e6e3d8;
    --rz-base-100: #c5c5b7;
    --rz-base-200: #9da394;
    --rz-base-300: #42473f;
    --rz-base-400: #363c36;
    --rz-base-500: #2d332e;
    --rz-base-600: #252c28;
    --rz-base-700: #121817;
    --rz-base-800: #171e1c;
    --rz-base-900: #0b100f;
    --rz-body-background-color: var(--rz-base-700);
    --rz-base-background-color: var(--rz-base-800);
    --rz-text-color: var(--rz-base-50);
    --rz-text-secondary-color: var(--rz-base-100);
}

html, body {
    margin: 0;
    height: 100%;
}

body {
    font-family: var(--vmw-font);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--vmw-link); text-decoration: none; }
a:hover, a:focus { color: var(--vmw-link-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 2px; border-radius: 2px; }

/* Quiet, consistent scrollbars. */
* { scrollbar-width: thin; scrollbar-color: var(--vmw-border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: var(--vmw-border-strong);
    border-radius: 8px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

/* ============================= Shell / top bar ============================ */

.vmw-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.vmw-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--vmw-topbar-h);
    padding: 0 20px 0 22px;
    background: linear-gradient(180deg, #222925, #121917);
    color: #e7e3d6;
    border-bottom: 1px solid #716246;
    box-shadow: inset 0 -3px 0 #0c100e, 0 2px 10px #0002;
    position: sticky;
    top: 0;
    z-index: 30;
}

.vmw-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.vmw-brand:hover, .vmw-brand:focus { color: inherit; text-decoration: none; }
.vmw-brand:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 4px; border-radius: var(--vmw-radius); }
.vmw-brand-mark { height: 46px; width: 46px; object-fit: contain; display: block; flex: 0 0 auto; }
.vmw-brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.vmw-brand-name { font: 600 .94rem var(--vmw-font-display); letter-spacing: .055em; white-space: nowrap; }
.vmw-brand-sub {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #b8ac8e;
    white-space: nowrap;
}

.vmw-topbar-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.vmw-topbar { --vmw-dim: #b8bdaf; --vmw-border: #ffffff25; --vmw-inset: #ffffff08; --vmw-hover: #ffffff0d; --rz-text-color: #e7e3d6; --rz-text-secondary-color: #c5c5b7; }
.vmw-game-mark { display: flex; align-items: center; gap: 8px; color: #c2bba9; font-size: .64rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.vmw-game-mark img { width: 38px; height: 38px; object-fit: contain; }
@media (max-width: 900px) { .vmw-game-mark span { display: none; } }
@media (max-width: 640px) { .vmw-game-mark { display: none; } .vmw-brand-name { font-size: .78rem; } }
.vmw-topbar-divider { width: 1px; height: 22px; background: var(--vmw-border); }

/* Quick navigation is available in the header, including on touch-sized screens. */
.vmw-quick-nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    background: transparent;
    color: var(--vmw-dim);
    font: 500 0.78rem var(--vmw-font);
    cursor: pointer;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.vmw-quick-nav-trigger:hover { background: var(--vmw-hover); color: var(--rz-text-color); }
.vmw-quick-nav-trigger:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 2px; }
.vmw-quick-nav-trigger:disabled { opacity: 0.5; cursor: default; }
.vmw-quick-nav-trigger .rzi { font-size: 1.1rem; }
.vmw-quick-nav-trigger kbd, .vmw-quick-nav-hints kbd {
    display: inline-block;
    padding: 1px 4px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius-sm);
    background: var(--vmw-inset);
    color: var(--vmw-dim);
    font: 500 0.68rem var(--vmw-font-mono);
    line-height: 1.4;
}
.vmw-quick-nav { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vmw-quick-nav .vmw-search-input { min-height: 42px; font-size: 0.9rem; }
.vmw-quick-nav-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--vmw-dim); font-size: 0.73rem; }
.vmw-quick-nav-results { display: flex; flex-direction: column; gap: 4px; }
.vmw-quick-nav-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: var(--vmw-radius);
    cursor: pointer;
    transition: background-color 0.1s ease, border-color 0.1s ease;
}
.vmw-quick-nav-result:hover { background: var(--vmw-hover); }
.vmw-quick-nav-result.is-active { background: var(--vmw-accent-faint); border-color: color-mix(in srgb, var(--vmw-accent) 35%, transparent); }
.vmw-quick-nav-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); color: var(--vmw-dim); background: var(--vmw-surface); }
.vmw-quick-nav-icon .rzi { font-size: 1.15rem; }
.vmw-quick-nav-result.is-active .vmw-quick-nav-icon { color: var(--vmw-link); border-color: color-mix(in srgb, var(--vmw-accent) 25%, transparent); }
.vmw-quick-nav-copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vmw-quick-nav-title { color: var(--rz-text-color); font-size: 0.88rem; font-weight: 650; }
.vmw-quick-nav-description { font-size: 0.76rem; color: var(--vmw-dim); line-height: 1.4; }
.vmw-quick-nav-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 0.68rem; color: var(--vmw-dim); }
.vmw-quick-nav-current { color: var(--vmw-link); font-weight: 600; }
.vmw-quick-nav-result .vmw-quick-nav-arrow { font-size: 1rem; color: var(--vmw-dim); }
.vmw-quick-nav-hints { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.vmw-quick-nav-hints > span { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; }
@container (max-width: 460px) {
    .vmw-quick-nav-result { flex-wrap: wrap; gap: 7px 10px; padding: 10px; }
    .vmw-quick-nav-meta { flex-basis: 100%; flex-direction: row; align-items: center; padding-left: 44px; }
    .vmw-quick-nav-result .vmw-quick-nav-arrow { display: none; }
}
@media (max-width: 1024px) {
    .vmw-quick-nav-trigger-label { display: none; }
}
@media (max-width: 640px) {
    .vmw-quick-nav-trigger { width: 32px; height: 32px; justify-content: center; padding: 0; border-color: transparent; }
    .vmw-quick-nav-trigger kbd { display: none; }
    .vmw-topbar-actions { gap: 8px; }
}
@media (max-width: 380px) {
    .vmw-brand-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .vmw-quick-nav-trigger, .vmw-quick-nav-result { transition: none; }
}

/* Generic top-bar status chip (count + label + status mark). */
.vmw-conn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 11px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    font-size: 0.76rem;
    color: var(--vmw-dim);
}
.vmw-conn-count {
    font-weight: 700;
    color: var(--rz-text-color);
    font-variant-numeric: tabular-nums;
}
.vmw-conn-label { font-weight: 500; }

/* Appearance toggle: a ghost icon button, squared like everything else. */
.vmw-topbar .rz-toggle-button,
.vmw-topbar .rz-button.rz-button-icon-only {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    background: transparent !important;
    color: var(--vmw-dim) !important;
    border-radius: var(--vmw-radius) !important;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.vmw-topbar .rz-toggle-button:hover,
.vmw-topbar .rz-button.rz-button-icon-only:hover {
    background: var(--vmw-hover) !important;
    color: var(--rz-text-color) !important;
}

/* Top-bar user block. */
.vmw-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.vmw-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vmw-signout { display: inline-flex; margin: 0; }

/* Avatar: square-rounded initials tile (never a circle). */
.vmw-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--vmw-radius);
    background: var(--vmw-accent-soft);
    color: color-mix(in srgb, var(--vmw-accent) 80%, var(--rz-text-color));
    display: inline-grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    flex: 0 0 auto;
    user-select: none;
}
.vmw-avatar-lg { width: 40px; height: 40px; font-size: 0.9rem; border-radius: var(--vmw-radius-lg); }

/* Ghost icon button (32px square-rounded). */
.vmw-icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--vmw-radius);
    color: var(--vmw-dim);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    padding: 0;
    flex: 0 0 auto;
    font-family: inherit;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.vmw-icon-btn .rzi { font-size: 1.2rem; }
.vmw-icon-btn:hover { background: var(--vmw-hover); color: var(--rz-text-color); }
.vmw-icon-btn:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 1px; }
.vmw-icon-btn:disabled { opacity: 0.5; cursor: default; background: transparent; }

.vmw-main { flex: 1; min-height: 0; }

/* ========================== Workspace: rail + content ===================== */

.vmw-workspace { display: flex; align-items: stretch; flex: 1 1 auto; min-height: 0; }

.vmw-sidenav-frame {
    --vmw-nav-width: var(--vmw-sidenav-collapsed-w);
    --vmw-nav-label-opacity: 0;
    --vmw-nav-label-shift: -4px;
    --vmw-nav-rule-opacity: 1;
    --vmw-nav-shadow: none;
    width: var(--vmw-sidenav-collapsed-w);
    flex: 0 0 var(--vmw-sidenav-collapsed-w);
    align-self: flex-start;
    position: sticky;
    top: var(--vmw-topbar-h);
    height: calc(100vh - var(--vmw-topbar-h));
    height: calc(100dvh - var(--vmw-topbar-h));
    z-index: 20;
    /* Keep this wrapper visible: its child expands over the content without resizing it. */
    overflow: visible;
}

.vmw-sidenav-frame.is-open,
.vmw-sidenav-frame:has(a:focus-visible) {
    --vmw-nav-width: var(--vmw-sidenav-w);
    --vmw-nav-label-opacity: 1;
    --vmw-nav-label-shift: 0px;
    --vmw-nav-rule-opacity: 0;
    --vmw-nav-shadow: var(--vmw-shadow-pop);
}

@media (hover: hover) {
    .vmw-sidenav-frame:hover {
        --vmw-nav-width: var(--vmw-sidenav-w);
        --vmw-nav-label-opacity: 1;
        --vmw-nav-label-shift: 0px;
        --vmw-nav-rule-opacity: 0;
        --vmw-nav-shadow: var(--vmw-shadow-pop);
    }
}

.vmw-sidenav {
    width: var(--vmw-nav-width);
    max-width: calc(100vw - 24px);
    height: 100%;
    border-right: 1px solid var(--vmw-border);
    background: var(--vmw-surface);
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    box-shadow: var(--vmw-nav-shadow);
    transition: width 180ms ease-out, box-shadow 180ms ease-out;
}

.vmw-nav-links { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.vmw-nav-links > .vmw-nav-item { flex-shrink: 0; }
.vmw-nav-footer { padding-top: 14px; flex: 0 0 auto; }
.vmw-nav-footer .vmw-nav-item { margin: 0; }

.vmw-nav-group {
    display: flex;
    align-items: flex-end;
    flex: 0 0 34px;
    padding: 0 10px 4px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--vmw-faint);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}
.vmw-nav-group::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    height: 1px;
    background: var(--vmw-border);
    opacity: var(--vmw-nav-rule-opacity);
    transition: opacity 120ms ease-out;
}

.vmw-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 38px;
    flex-shrink: 0;
    padding: 9px 10px;
    overflow: hidden;
    border: none;
    background: transparent;
    border-radius: var(--vmw-radius);
    color: var(--vmw-dim);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    position: relative;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.vmw-nav-item .rzi { font-size: 1.2rem; width: 20px; flex: 0 0 20px; text-align: center; }
.vmw-nav-item:hover, .vmw-nav-item:focus { background: var(--vmw-hover); color: var(--rz-text-color); text-decoration: none; }
.vmw-nav-item:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: -2px; }
.vmw-nav-item.active {
    background: var(--vmw-accent-faint);
    color: var(--rz-text-color);
    font-weight: 600;
}
.vmw-nav-item.active .rzi { color: var(--vmw-accent); }
.vmw-nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22%;
    bottom: 22%;
    width: 3px;
    border-radius: 2px;
    background: var(--vmw-accent);
}
.vmw-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: var(--vmw-nav-label-opacity);
    transform: translateX(var(--vmw-nav-label-shift));
    transition: opacity 120ms ease-out, transform 180ms ease-out;
}
.vmw-nav-toggle, .vmw-nav-dismiss { display: none; }
@media (any-pointer: coarse), (hover: none) {
    .vmw-nav-toggle { display: flex; }
    .vmw-nav-dismiss {
        display: block;
        position: fixed;
        inset: var(--vmw-topbar-h) 0 0 var(--vmw-sidenav-collapsed-w);
        z-index: 19;
        border: 0;
        padding: 0;
        background: transparent;
        cursor: default;
    }
    .vmw-nav-item { min-height: 44px; }
}

/* The content pane is the scroll container: viewport height minus the top bar. This is
   the top of the fill chain (.vmw-content > .vmw-page > .vmw-fill-card > .vmw-card-body >
   .vmw-grid-fill) that lets a virtualized grid fill the remaining height. */
.vmw-content {
    flex: 1 1 auto;
    min-width: 0;
    height: calc(100vh - var(--vmw-topbar-h));
    overflow: auto;
    padding: 24px 26px 28px;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(ellipse at 100% 0%, var(--vmw-accent-faint), transparent 65%);
}
.vmw-content:focus { outline: none; } /* Escape from navigation lands on this non-tab-stop landmark. */

/* Routed page wrapper: keyed on the URL so it remounts (and eases in) per navigation. */
.vmw-page {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 1600px;
    margin-inline: auto;
    padding: 24px;
    border: 1px solid color-mix(in srgb, var(--vmw-accent) 24%, var(--vmw-border));
    border-radius: var(--vmw-radius-lg);
    background: linear-gradient(145deg, var(--vmw-accent-faint), transparent 340px), var(--vmw-surface);
    box-shadow: var(--vmw-shadow-card);
    animation: vmw-page-in 180ms ease-out both;
}
.vmw-page:has(.vmw-roster-builder) { max-width: 2200px; }
.vmw-page:has(> .vmw-fill-card) { flex: 1 1 auto; }
@keyframes vmw-page-in { from { opacity: 0; transform: translateY(4px); } }

/* Keep-alive views: all stay mounted (state + live updates survive), only one shown. */
.vmw-view { display: none; }
.vmw-view.active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.vmw-page-head {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-height: 128px;
    padding: 24px 22px 30px;
    margin: 0 0 18px;
    flex: 0 0 auto;
}
/* The torn paper is decorative: never mask the header's links, buttons or focus outlines. */
.vmw-page-head::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(100deg, #eee6d5ed, #eee6d5b8), url("../images/brand/wow-forever-paper.jpg") center 30% / cover;
    -webkit-mask-image: url("../images/brand/wow-forever-paper-mask.png");
    mask-image: url("../images/brand/wow-forever-paper-mask.png");
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
:root[data-theme="dark"] .vmw-page-head::before {
    background-image: linear-gradient(100deg, #293027e6, #232c26cc), url("../images/brand/wow-forever-paper.jpg");
}
.vmw-page-head-text { grid-column: 2; min-width: 0; text-align: center; }
.vmw-page-head h1 { margin: 0; font-family: var(--vmw-font-display); font-size: clamp(1.35rem, 1.6vw, 1.65rem); line-height: 1.35; font-weight: 600; letter-spacing: .025em; overflow-wrap: anywhere; }
.vmw-page-head h1:focus { outline: none; } /* FocusOnNavigate lands here programmatically */
.vmw-page-head p { margin: 8px auto 0; max-width: 72ch; color: var(--vmw-dim); font-size: .82rem; line-height: 1.65; }
.vmw-page-head-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.vmw-page-head-actions:empty { display: none; }
.vmw-page-head-actions > a.rz-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--rz-text-color); text-decoration: none; }
@media (max-width: 1300px) {
    .vmw-page-head { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px 20px 28px; }
    .vmw-page-head-text, .vmw-page-head-actions { grid-column: 1; }
    .vmw-page-head-actions { justify-self: center; }
}

/* ================================ Cards ================================= */

.vmw-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--vmw-border);
    background: var(--vmw-surface);
    border-radius: var(--vmw-radius-lg);
    box-shadow: var(--vmw-shadow-card);
}

.rz-card {
    border-radius: var(--vmw-radius-lg) !important;
    box-shadow: var(--vmw-shadow-card) !important;
    border: 1px solid var(--vmw-border);
    background: var(--vmw-surface);
}

.vmw-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px;
    border-bottom: 1px solid var(--vmw-border);
}
.vmw-card-head > .vmw-section-title { margin: 0; }

.vmw-card-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 18px 0;
}
.vmw-card-toolbar > .rz-button { min-height: 40px; }

.vmw-card-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 14px 18px 18px;
}

.vmw-card-inset { padding: 14px 18px 0; }
.vmw-card-inset-lg { padding: 18px; }
.vmw-card-meta { font-size: 0.75rem; color: var(--vmw-dim); }

/* Right-aligned action cluster inside a card head / page head. */
.vmw-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-inline-start: auto;
}

/* Generic toolbar row. */
.vmw-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.vmw-fill-card { flex: 1 1 auto; min-height: 0; }

.vmw-section-title {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--vmw-dim);
}

.vmw-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

.vmw-count-badge {
    font-size: 0.7rem;
    font-weight: 650;
    color: var(--vmw-dim);
    background: var(--vmw-inset);
    border: 1px solid var(--vmw-border);
    padding: 1px 7px;
    border-radius: var(--vmw-radius-sm);
    line-height: 1.5;
    min-width: 24px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.vmw-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--vmw-dim);
    padding: 3px 9px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius-sm);
    background: transparent;
    line-height: 1.5;
}
.vmw-chip-mono { font-family: var(--vmw-font-mono); font-weight: 500; }

.vmw-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: color-mix(in srgb, var(--vmw-ok) 60%, var(--rz-text-color));
}
.vmw-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--vmw-ok);
    animation: vmw-pulse 2.4s ease-in-out infinite;
}
@keyframes vmw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Standalone navigation and recovery actions use the same outlined treatment as Radzen.
   Keep anchors for navigation and native buttons for commands; neither should look like prose. */
.vmw-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 40px;
    min-width: 0;
    max-width: 100%;
    background: var(--vmw-surface);
    border: 1px solid var(--vmw-border-strong);
    padding: 10px 16px;
    color: var(--rz-text-color);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: .005em;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
    border-radius: var(--vmw-radius);
    text-decoration: none;
    transition: border-color 0.1s ease, background-color 0.1s ease;
}
.vmw-link-btn:hover:not(:disabled) { text-decoration: none; color: var(--rz-text-color); border-color: var(--vmw-accent); background: var(--vmw-accent-faint); }
.vmw-link-btn:focus { text-decoration: none; color: var(--rz-text-color); }
.vmw-link-btn:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 2px; }
.vmw-link-btn:disabled { color: var(--vmw-faint); border-color: var(--vmw-border); cursor: not-allowed; }
.vmw-link-btn .rzi { flex: 0 0 auto; font-size: 18px; line-height: 1; }

.vmw-field-label {
    font-size: 0.7rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vmw-dim);
}

.vmw-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    background: var(--vmw-inset);
    color: var(--vmw-dim);
    font-size: 0.78rem;
    line-height: 1.45;
    max-width: 560px;
    margin-top: 10px;
}
.vmw-note .rzi { font-size: 1rem; color: var(--vmw-accent); flex: 0 0 auto; }
.vmw-note-warn { border-color: var(--vmw-warn); color: color-mix(in srgb, var(--vmw-warn) 75%, var(--rz-text-color)); }
.vmw-note-warn .rzi { color: var(--vmw-warn); }

.vmw-flex-spacer { flex: 1 1 auto; }
.vmw-grow { flex: 1 1 auto; min-width: 200px; }
.vmw-stack > * + * { margin-top: 14px; }
.vmw-mono { font-family: var(--vmw-font-mono); font-size: 0.75rem; word-break: break-all; }

/* ============================== Inline alerts ============================ */

.vmw-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid var(--vmw-border);
    border-inline-start: 3px solid var(--vmw-info);
    border-radius: var(--vmw-radius);
    background: var(--vmw-surface);
    color: var(--rz-text-color);
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
}
.vmw-alert-icon { font-size: 1.05rem !important; flex: 0 0 auto; margin-top: 1px; color: var(--vmw-info); }
.vmw-alert-text { min-width: 0; overflow-wrap: anywhere; }
.vmw-alert-info { border-inline-start-color: var(--vmw-info); }
.vmw-alert-info .vmw-alert-icon { color: var(--vmw-info); }
.vmw-alert-success { border-inline-start-color: var(--vmw-ok); }
.vmw-alert-success .vmw-alert-icon { color: var(--vmw-ok); }
.vmw-alert-warn { border-inline-start-color: var(--vmw-warn); }
.vmw-alert-warn .vmw-alert-icon { color: var(--vmw-warn); }
.vmw-alert-danger { border-inline-start-color: var(--vmw-danger); }
.vmw-alert-danger .vmw-alert-icon { color: var(--vmw-danger); }

/* ============================== Form primitives ========================== */

.vmw-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.vmw-field > .vmw-field-label { display: block; }
.vmw-field .rz-textbox,
.vmw-field .rz-inputtext,
.vmw-field .rz-dropdown,
.vmw-field .rz-lookup,
.vmw-field .rz-numeric,
.vmw-field .rz-textarea,
.vmw-field .rz-datepicker,
.vmw-field .rz-password { width: 100%; }
.vmw-field-help { font-size: 0.74rem; color: var(--vmw-dim); line-height: 1.4; }
.vmw-field-error {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 0.74rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--vmw-danger) 85%, var(--rz-text-color));
}
.vmw-field-error .rzi { font-size: 0.95rem; flex: 0 0 auto; }
.vmw-field-error:empty { display: none; }
.vmw-field.invalid .rz-textbox,
.vmw-field.invalid .rz-inputtext,
.vmw-field.invalid .rz-dropdown,
.vmw-field.invalid .rz-textarea,
.vmw-field .rz-textbox.invalid,
.vmw-field .rz-inputtext.invalid,
.vmw-field .rz-textarea.invalid,
.vmw-field input.invalid {
    border-color: var(--vmw-danger) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--vmw-danger) 14%, transparent) !important;
}
.validation-message {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 0.74rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--vmw-danger) 85%, var(--rz-text-color));
}
.validation-summary { margin: 0; padding: 0; list-style: none; }

.vmw-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: start;
}
.vmw-form-grid .vmw-span-2 { grid-column: 1 / -1; }
.vmw-form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* =============================== Stat tiles ============================== */

.vmw-stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
    flex: 0 0 auto;
}

.vmw-tile {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px 13px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius-lg);
    background: var(--vmw-surface);
    box-shadow: var(--vmw-shadow-card);
    min-width: 0;
}
.vmw-tile-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--vmw-dim);
}
.vmw-tile-label .vmw-dot { width: 7px; height: 7px; box-shadow: none; }
.vmw-tile-value {
    font-size: 1.7rem;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--rz-text-color);
    font-variant-numeric: tabular-nums;
}
.vmw-tile-denominator { font-size: 0.95rem; font-weight: 600; color: var(--vmw-dim); }
.vmw-tile-hint { font-size: 0.72rem; color: var(--vmw-dim); }

/* ============================= Master / detail =========================== */

.vmw-md {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(330px, 2fr) 5fr;
    gap: 14px;
    align-items: stretch;
}
.vmw-md > * { min-width: 0; min-height: 0; }

.vmw-master-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 0; }
.vmw-master-sub { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.vmw-master-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 14px 14px;
}

.vmw-detail > .vmw-empty { flex: 1 1 auto; }

.vmw-detail-stack {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 14px;
    padding: 16px 18px;
}

.vmw-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}
.vmw-detail-id { min-width: 0; }
.vmw-detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vmw-detail-title h2 { margin: 0; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.vmw-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.vmw-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 10px; }
.vmw-meta-item { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vmw-meta-label {
    font-size: 0.62rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vmw-dim);
}
.vmw-meta-value { font-size: 0.8rem; color: var(--rz-text-color); }

.vmw-fill-half {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.vmw-fill-half .vmw-grid-fill { flex: 1 1 0; min-height: 120px; }
.vmw-fill-half .vmw-empty:not(.vmw-empty-slim) { flex: 1; min-height: 0; }
.vmw-fill-half .vmw-empty-slim { flex: 1; min-height: 110px; }

/* =============================== Search field ============================ */

.vmw-search { position: relative; min-width: 0; display: block; }
.vmw-master-head .vmw-search, .vmw-card-toolbar .vmw-search, .vmw-toolbar .vmw-search, .vmw-dlg-toolbar .vmw-search { flex: 1 1 auto; }
.vmw-search .rz-textbox,
.vmw-search .vmw-search-input { width: 100%; padding-inline-start: 34px; padding-inline-end: 36px; }
.vmw-search-icon {
    position: absolute;
    inset-inline-start: 9px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    color: var(--vmw-faint);
    pointer-events: none;
    z-index: 1;
}
.vmw-search-icon .rzi { font-size: 1.05rem !important; }
.vmw-search-trailing {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}
.vmw-search-clear {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: var(--vmw-radius-sm);
    color: var(--vmw-dim);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    padding: 0;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.vmw-search-clear .rzi { font-size: 1.05rem; }
.vmw-search-clear:hover { background: var(--vmw-hover); color: var(--rz-text-color); }
.vmw-search-clear:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 1px; }
.vmw-search-busy { display: inline-grid; place-items: center; width: 24px; height: 24px; }
.vmw-search-busy-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--vmw-accent);
    animation: vmw-pulse 1s ease-in-out infinite;
}

/* ============================== Data grids ============================== */

.vmw-grid-fill { flex: 1 1 auto; min-height: 180px; }
/* Virtualized grid inside the fill chain: the grid is a flex column (Radzen), so its
   data region must be allowed to shrink and scroll rather than grow to the row count. */
.vmw-grid-fill.rz-data-grid,
.vmw-grid-fill.rz-datatable { display: flex; flex-direction: column; min-height: 180px; }
.vmw-grid-fill .rz-data-grid-data { flex: 1 1 auto; min-height: 0; overflow: auto; }
.vmw-grid-fill .rz-virtual-grid { flex: 1 1 auto; min-height: 0; }

.rz-datatable,
.rz-data-grid {
    border-radius: var(--vmw-radius);
    border: 1px solid var(--vmw-border);
    font-size: 0.82rem;
    background: var(--vmw-surface);
    max-width: 100%;
}

.rz-datatable .rz-column-title,
.rz-data-grid .rz-column-title,
.rz-grid-table thead th {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--vmw-dim);
}

.rz-grid-table thead th {
    background: var(--vmw-inset) !important;
    border-bottom: 1px solid var(--vmw-border) !important;
}

.rz-grid-table td,
.rz-grid-table th {
    padding: 7px 10px !important;
    border-color: var(--vmw-border) !important;
}

/* Neutralize the theme's inner header paddings so header text lines up with cells. */
.rz-grid-table thead th > div:not(.rz-cell-filter) { padding: 0; }
.rz-grid-table thead th .rz-column-title { padding-inline: 0; }

.rz-grid-table td { overflow-wrap: break-word; }

.rz-data-row { transition: background-color 0.08s ease; }
/* Hover fallback for non-selectable grids; selectable grids get the same color
   via --rz-grid-hover-background-color, painted on cells by the theme. */
.rz-data-row:hover { background-color: var(--vmw-hover); }
.rz-selectable .rz-data-row.rz-state-highlight > td:first-child {
    box-shadow: inset 2px 0 0 var(--vmw-accent);
}

.rz-datatable .rz-pager { border-top: 1px solid var(--vmw-border); }
.rz-pager .rz-pager-element,
.rz-pager .rz-pager-page,
.rz-pager .rz-button { border-radius: var(--vmw-radius) !important; }
.vmw-rowclick .rz-data-row { cursor: pointer; }

.vmw-cell-strong { font-weight: 600; }
.vmw-cell-dim { color: var(--vmw-dim); font-size: 0.78rem; }
.vmw-cell-status { display: inline-flex; align-items: center; gap: 8px; }
.vmw-cell-warn {
    color: color-mix(in srgb, var(--vmw-warn) 72%, var(--rz-text-color));
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ========================= Badges & status marks ========================= */

.rz-badge {
    border-radius: var(--vmw-radius-sm) !important;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    font-size: 0.64rem !important;
    font-weight: 700;
    padding: 2.5px 7px !important;
    line-height: 1.4;
    border: 1px solid transparent;
}

.rz-badge-success {
    background: color-mix(in srgb, var(--vmw-ok) 13%, transparent) !important;
    color: color-mix(in srgb, var(--vmw-ok) 60%, var(--rz-text-color)) !important;
    border-color: color-mix(in srgb, var(--vmw-ok) 32%, transparent);
}
.rz-badge-warning {
    background: color-mix(in srgb, var(--vmw-warn) 13%, transparent) !important;
    color: color-mix(in srgb, var(--vmw-warn) 60%, var(--rz-text-color)) !important;
    border-color: color-mix(in srgb, var(--vmw-warn) 34%, transparent);
}
.rz-badge-danger,
.rz-badge-error {
    background: color-mix(in srgb, var(--vmw-danger) 12%, transparent) !important;
    color: color-mix(in srgb, var(--vmw-danger) 72%, var(--rz-text-color)) !important;
    border-color: color-mix(in srgb, var(--vmw-danger) 32%, transparent);
}
.rz-badge-info {
    background: color-mix(in srgb, var(--vmw-info) 12%, transparent) !important;
    color: color-mix(in srgb, var(--vmw-info) 72%, var(--rz-text-color)) !important;
    border-color: color-mix(in srgb, var(--vmw-info) 32%, transparent);
}
.rz-badge-primary {
    background: color-mix(in srgb, var(--vmw-accent) 12%, transparent) !important;
    color: color-mix(in srgb, var(--vmw-accent) 75%, var(--rz-text-color)) !important;
    border-color: color-mix(in srgb, var(--vmw-accent) 32%, transparent);
}
.rz-badge-secondary,
.rz-badge-base,
.rz-badge-light {
    background: color-mix(in srgb, var(--rz-text-color) 6%, transparent) !important;
    color: var(--vmw-dim) !important;
    border-color: var(--vmw-border);
}

/* Status mark: a square, never a circle — squared house style. */
.vmw-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
    flex: 0 0 auto;
}
.vmw-dot.online, .vmw-dot.ok { background: var(--vmw-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vmw-ok) 20%, transparent); }
.vmw-dot.offline, .vmw-dot.warn { background: var(--vmw-warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vmw-warn) 20%, transparent); }
.vmw-dot.danger { background: var(--vmw-danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vmw-danger) 20%, transparent); }
.vmw-dot.info { background: var(--vmw-info); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vmw-info) 20%, transparent); }
.vmw-dot.none { background: var(--vmw-faint); }

/* ========================= Buttons / inputs / popups ===================== */

.rz-button {
    border-radius: var(--vmw-radius) !important;
    font-weight: 600;
    letter-spacing: 0.005em;
    text-transform: none;
    box-shadow: none !important;
}
.rz-button:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 2px; }
.rz-button.rz-button-icon-only, .rz-toggle-button, .rz-splitbutton .rz-button { border-radius: var(--vmw-radius) !important; }

/* Radzen draws outlined buttons with an inset shadow, which the house shadow reset removes.
   Use a real border so secondary actions remain visibly interactive in either theme. */
.rz-button.rz-variant-outlined { border: 1px solid currentColor; }
.rz-button.rz-variant-outlined.rz-base { border-color: var(--vmw-border-strong); background: var(--vmw-surface); color: var(--rz-text-color); }
.rz-button.rz-variant-outlined.rz-base:hover:not(:disabled),
.rz-button.rz-variant-outlined.rz-base[aria-expanded="true"] { border-color: var(--vmw-accent); background: var(--vmw-accent-faint); }

/* Each explicit action row sizes its equal-width columns to the longest label. Dense record
   actions and icon-only controls outside these groups retain their own compact sizing. */
.vmw-button-row.vmw-button-row { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch; gap: 8px; width: max-content; max-width: 100%; }
.vmw-button-row > .rz-button,
.vmw-button-row > .vmw-link-btn,
.vmw-button-row > .vmw-record-actions > .rz-button { box-sizing: border-box; width: 100%; min-width: 0; height: 40px; min-height: 40px; padding: 0 16px; font-size: .82rem; line-height: 1.25; font-weight: 600; letter-spacing: .005em; }
.vmw-button-row > .vmw-record-actions { display: flex; width: 100%; min-width: 0; align-self: stretch; }
.vmw-button-row .rz-button-box { display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1.25; }
.vmw-button-row .rz-button .rzi { font-size: 18px; }
.vmw-button-row > .vmw-link-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; }
.vmw-template-choice > .vmw-record-actions > .rz-button { height: 40px; min-height: 40px; padding: 0 16px; font-size: .82rem; }
@media (max-width: 640px) {
    .vmw-button-row.vmw-button-row { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; width: 100%; }
    .vmw-button-row:not(:has(> :nth-child(2))) { grid-template-columns: minmax(0, 1fr); }
    .vmw-button-row > .rz-button,
    .vmw-button-row > .vmw-link-btn,
    .vmw-button-row > .vmw-record-actions > .rz-button { height: 100%; padding: 10px 12px; white-space: normal; }
    .vmw-button-row .rz-button-text, .vmw-button-row .rz-button-box { white-space: normal; }
}
@container (max-width: 480px) {
    .vmw-dlg-foot > .vmw-button-row { width: 100%; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
    .vmw-dlg-foot > .vmw-button-row:not(:has(> :nth-child(2))) { grid-template-columns: minmax(0, 1fr); }
    .vmw-dlg-foot > .vmw-button-row > .rz-button,
    .vmw-dlg-foot > .vmw-button-row > .vmw-link-btn { height: 100%; min-height: 40px; padding: 10px 12px; white-space: normal; }
    .vmw-dlg-foot > .vmw-button-row .rz-button-box, .vmw-dlg-foot > .vmw-button-row .rz-button-text { white-space: normal; }
}

/* Record actions: one direct action, or one menu trigger for multiple actions. The popup
   is portalled to body by Radzen, so its styles must not depend on a grid/dialog ancestor. */
.vmw-record-actions { display: inline-flex; align-items: center; vertical-align: middle; flex: 0 0 auto; }
.vmw-record-actions > .rz-button { border: 1px solid var(--vmw-border-strong); }
.vmw-record-actions > .rz-button.rz-danger { border-color: currentColor; }
.vmw-record-actions-trigger .rz-button-box { gap: 6px; }
.vmw-record-actions-trigger .rzi { font-size: 18px; }
.vmw-record-actions-menu {
    display: none;
    position: absolute;
    box-sizing: border-box;
    width: max-content;
    min-width: min(184px, var(--vmw-record-menu-max-width, calc(100vw - 16px)));
    max-width: var(--vmw-record-menu-max-width, calc(100vw - 16px));
    max-height: min(360px, var(--vmw-record-menu-max-height, calc(100dvh - 16px)));
    overflow: auto;
    overscroll-behavior: contain;
    padding: 5px;
    background: var(--vmw-surface);
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    box-shadow: var(--vmw-shadow-pop);
    color: var(--rz-text-color);
    animation: none !important;
}
.vmw-record-actions-menu:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 1px; }
.vmw-record-actions-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--vmw-radius-sm);
    background: transparent;
    color: inherit;
    font: 500 0.82rem / 1.3 var(--vmw-font);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.1s ease;
}
.vmw-record-actions-item .rzi { font-size: 18px; flex: 0 0 auto; }
.vmw-record-actions-item > span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.vmw-record-actions-item:hover:not(:disabled),
.vmw-record-actions-item:focus-visible { background: var(--vmw-hover); }
.vmw-record-actions-item:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: -2px; }
.vmw-record-actions-item.is-destructive { color: color-mix(in srgb, var(--vmw-danger) 72%, var(--rz-text-color)); }
.vmw-record-actions-item:disabled { color: var(--vmw-faint); cursor: not-allowed; }

/* Anchor styled as a Radzen button (static pages): keep link rules from leaking in. */
a.rz-button, a.rz-button:hover, a.rz-button:focus { text-decoration: none; color: var(--rz-on-primary); }
a.rz-button.rz-variant-outlined, a.rz-button.rz-variant-text, a.rz-button.rz-variant-flat { color: inherit; }

.rz-textbox,
.rz-inputtext,
.rz-dropdown,
.rz-lookup,
.rz-numeric,
.rz-textarea,
.rz-datepicker,
.rz-password {
    border-radius: var(--vmw-radius) !important;
    font-size: 0.84rem;
}
.rz-textbox, .rz-inputtext, .rz-textarea { font-family: var(--vmw-font); }

.rz-textbox:focus,
.rz-inputtext:focus,
.rz-textarea:focus,
.rz-dropdown:focus,
.rz-dropdown:focus-within,
.rz-numeric:focus-within,
.rz-datepicker:focus-within {
    border-color: var(--vmw-accent) !important;
    box-shadow: 0 0 0 3px var(--vmw-accent-soft) !important;
    outline: none;
}

.rz-dropdown-panel {
    border-radius: var(--vmw-radius) !important;
    border: 1px solid var(--vmw-border);
    box-shadow: var(--vmw-shadow-pop) !important;
    overflow: hidden;
}
.rz-dropdown-item { font-size: 0.84rem; border-radius: 0; }
.rz-dropdown-item:hover { background: var(--vmw-hover); }
.rz-dropdown-item.rz-state-highlight { background: var(--vmw-accent-soft); color: var(--rz-text-color); }

/* Checkbox / radio / switch: squared corners, no pill track. */
.rz-chkbox-box { border-radius: var(--vmw-radius-sm) !important; }
.rz-radiobutton-box { border-radius: var(--vmw-radius-sm) !important; }
.rz-radiobutton-box .rzi-circle-on { border-radius: 2px !important; }
.rz-switch,
.rz-switch .rz-switch-circle { border-radius: var(--vmw-radius) !important; }
.rz-switch .rz-switch-circle::before { border-radius: 3px !important; }

/* Tabs / chips / progress: squared. */
.rz-tabview-nav li { border-radius: var(--vmw-radius) var(--vmw-radius) 0 0; }
.rz-tabview-nav li:after { border-radius: 2px 2px 0 0; }
.rz-chip { border-radius: var(--vmw-radius-sm) !important; }
.rz-progressbar, .rz-progressbar .rz-progressbar-value { border-radius: var(--vmw-radius-sm) !important; }
.rz-progressbar .rz-progressbar-value { transition: width 0.4s ease; }

/* Profile menu (if used): squared surface and avatar. */
.rz-profile-menu .rz-navigation-item-wrapper,
.rz-profile-menu .rz-navigation-menu,
.rz-profile-menu .rz-gravatar,
.rz-gravatar { border-radius: var(--vmw-radius) !important; }

.rz-tooltip-content {
    border-radius: var(--vmw-radius) !important;
    font-size: 0.75rem;
    padding: 5px 9px;
}

.rz-alert { border-radius: var(--vmw-radius) !important; font-size: 0.8rem; }

/* ================================ Dialogs ================================ */

.rz-dialog {
    border-radius: var(--vmw-radius-lg) !important;
    border: 1px solid var(--vmw-border);
    box-shadow: var(--vmw-shadow-overlay) !important;
    background: var(--vmw-surface);
    overflow: hidden;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    min-width: min(320px, calc(100vw - 32px));
    min-height: min(280px, calc(100dvh - 32px));
}

.rz-dialog-mask {
    background-color: color-mix(in srgb, #0b1220 45%, transparent);
    opacity: 1; /* the theme halves its mask via opacity: .5 — keep our alpha authoritative */
}

/* Stock title bar (used only if a dialog opts out of the house chrome). */
.rz-dialog-titlebar {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--vmw-border);
    background: transparent;
}
.rz-dialog-title { font-size: 0.95rem; font-weight: 650; }

/* House chrome: dialogs opened with UiDialogs.Frame render a VmwDialog shell. */
.rz-dialog:has(.vmw-dlg) { display: flex; flex-direction: column; }
.rz-dialog:has(.vmw-dlg) .rz-dialog-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

/* Keep a clear resize affordance above the footer without intercepting the native grip. */
.rz-dialog:has(.vmw-dlg)::after {
    content: "";
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 12px;
    height: 12px;
    color: var(--vmw-dim);
    background: repeating-linear-gradient(135deg, transparent 0 3px, currentColor 3px 4px);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    pointer-events: none;
}

.vmw-dlg {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    container-type: inline-size;
    font-size: 0.85rem;
}

.vmw-dlg-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--vmw-border);
    flex: 0 0 auto;
}

.vmw-dlg-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--vmw-radius);
    display: grid;
    place-items: center;
    background: var(--vmw-accent-soft);
    color: color-mix(in srgb, var(--vmw-accent) 80%, var(--rz-text-color));
    flex: 0 0 auto;
}
.vmw-dlg-icon .rzi { font-size: 1.25rem; }
.vmw-dlg-icon.danger {
    background: color-mix(in srgb, var(--vmw-danger) 11%, transparent);
    color: color-mix(in srgb, var(--vmw-danger) 75%, var(--rz-text-color));
}
.vmw-dlg-icon.warn {
    background: color-mix(in srgb, var(--vmw-warn) 12%, transparent);
    color: color-mix(in srgb, var(--vmw-warn) 75%, var(--rz-text-color));
}
.vmw-dlg-icon.ok {
    background: color-mix(in srgb, var(--vmw-ok) 12%, transparent);
    color: color-mix(in srgb, var(--vmw-ok) 65%, var(--rz-text-color));
}
.vmw-dlg-icon.accent { /* default palette — kept for explicit use */ }

.vmw-dlg-heading { flex: 1 1 auto; min-width: 0; }
.vmw-dlg-title { font-size: 0.95rem; font-weight: 650; letter-spacing: -0.005em; }
.vmw-dlg-subtitle { font-size: 0.78rem; color: var(--vmw-dim); margin-top: 2px; overflow-wrap: break-word; }

.vmw-dlg-close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: var(--vmw-radius);
    color: var(--vmw-dim);
    cursor: pointer;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    margin: -2px -6px 0 0;
    padding: 0;
    transition: background-color 0.1s ease, color 0.1s ease;
}
.vmw-dlg-close .rzi { font-size: 1.15rem; }
.vmw-dlg-close:hover { background: var(--vmw-hover); color: var(--rz-text-color); }
.vmw-dlg-close:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 1px; }

.vmw-dlg-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.vmw-dlg-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }

.vmw-dlg-grid-fill {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.vmw-dlg-grid-fill .vmw-grid-fill { min-height: 200px; }
.vmw-dlg-grid-fill .vmw-grid-fill.rz-data-grid,
.vmw-dlg-grid-fill .vmw-grid-fill.rz-datatable { min-height: 0; }

.vmw-dlg-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--vmw-border);
    background: var(--vmw-inset);
    flex: 0 0 auto;
}
.vmw-dlg-foot-info {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    min-width: 0;
    overflow: hidden;
}
.vmw-dlg-foot-info .rzi { font-size: 1.05rem; color: var(--vmw-dim); }
.vmw-dlg-foot .rz-button { flex: 0 0 auto; white-space: nowrap; }

/* Resizing a desktop dialog narrow should reflow it just like a small viewport. */
@container (max-width: 480px) {
    .vmw-dlg .vmw-dlg-columns, .vmw-dlg .vmw-form-grid { grid-template-columns: 1fr; }
    .vmw-dlg .vmw-dlg-foot-info { flex-basis: 100%; }
    .vmw-dlg .vmw-facts { grid-template-columns: 96px minmax(0, 1fr); }
}

@media (max-width: 768px) {
    .rz-dialog.vmw-dialog:has(.vmw-dlg) {
        width: var(--vmw-dialog-width, calc(100vw - 32px)) !important;
        inset-block-start: auto !important;
    }
}

.vmw-dlg-statusline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.8rem; }

.vmw-dlg-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    align-items: start;
}
.vmw-dlg-col > .vmw-section-title { display: block; margin-bottom: 10px; }
.vmw-dlg-col { min-width: 0; }

/* Facts (key/value) grid. */
.vmw-facts {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 7px 14px;
    font-size: 0.82rem;
    align-items: start;
}
.vmw-fact-label {
    color: var(--vmw-dim);
    font-size: 0.66rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 2px;
}
.vmw-fact-value { min-width: 0; overflow-wrap: anywhere; }
.vmw-fact-value .vmw-cell-status { max-width: 100%; flex-wrap: wrap; }

/* Confirm dialog. */
.vmw-confirm-message { font-size: 0.875rem; line-height: 1.5; }
.vmw-confirm-facts {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 6px 12px;
    padding: 12px 14px;
    background: var(--vmw-inset);
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    font-size: 0.82rem;
}
.vmw-confirm-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--vmw-dim);
    font-size: 0.78rem;
    line-height: 1.45;
}
.vmw-confirm-note .rzi { font-size: 1rem; color: var(--vmw-accent); flex: 0 0 auto; }

/* Timeline (lifecycle stages). */
.vmw-timeline { display: flex; flex-direction: column; }
.vmw-tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.vmw-tl-item:last-child { padding-bottom: 0; }
.vmw-tl-item::after {
    content: "";
    position: absolute;
    inset-inline-start: 4.5px;
    top: 15px;
    bottom: 1px;
    width: 1px;
    background: var(--vmw-border);
}
.vmw-tl-item:last-child::after { display: none; }
.vmw-tl-marker {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--vmw-border-strong);
    margin-top: 3px;
    flex: 0 0 auto;
    z-index: 1;
}
.vmw-tl-item.done .vmw-tl-marker { background: var(--vmw-accent); }
.vmw-tl-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vmw-tl-label {
    font-size: 0.66rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vmw-dim);
}
.vmw-tl-time { font-size: 0.78rem; }
.vmw-tl-item:not(.done) .vmw-tl-time { color: var(--vmw-dim); }

/* Monospace result block. */
.vmw-detail-block {
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    background: var(--vmw-inset);
    padding: 12px 14px;
    max-height: 240px;
    overflow: auto;
    font-family: var(--vmw-font-mono);
    font-size: 0.78rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 10px;
}

/* ============================== Notifications ============================ */

.rz-notification-item {
    border-radius: var(--vmw-radius-lg) !important;
    border: 1px solid var(--vmw-border);
    box-shadow: var(--vmw-shadow-pop) !important;
    padding: 12px 14px !important;
}

.rz-notification-success .rz-notification-item,
.rz-notification-warn .rz-notification-item,
.rz-notification-error .rz-notification-item,
.rz-notification-info .rz-notification-item {
    background: var(--vmw-surface);
    color: var(--rz-text-color);
}
.rz-notification-success .rz-notification-item { border-inline-start: 3px solid var(--vmw-ok); }
.rz-notification-warn .rz-notification-item { border-inline-start: 3px solid var(--vmw-warn); }
.rz-notification-error .rz-notification-item { border-inline-start: 3px solid var(--vmw-danger); }
.rz-notification-info .rz-notification-item { border-inline-start: 3px solid var(--vmw-info); }

.rz-notification-icon.rzi-check { color: var(--vmw-ok) !important; }
.rz-notification-icon.rzi-exclamation-triangle { color: var(--vmw-warn) !important; }
.rz-notification-icon.rzi-times { color: var(--vmw-danger) !important; }
.rz-notification-icon.rzi-info-circle { color: var(--vmw-info) !important; }

.rz-notification-title { font-weight: 650; font-size: 0.85rem; }
.rz-notification-content { font-size: 0.8rem; }
.rz-notification-close { color: var(--vmw-dim); }

/* =============================== Skeleton ============================== */

.vmw-skel {
    position: relative;
    overflow: hidden;
    background: var(--vmw-inset);
    border-radius: var(--vmw-radius);
}
.vmw-skel::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--vmw-hover), transparent);
    animation: vmw-shimmer 1.2s ease-in-out infinite;
}
@keyframes vmw-shimmer { 100% { transform: translateX(100%); } }

.vmw-skel-line { height: 12px; margin: 10px 0; }
.vmw-skel-line.w40 { width: 40%; }
.vmw-skel-line.w60 { width: 60%; }
.vmw-skel-line.w80 { width: 80%; }
.vmw-skel-line.tall { height: 18px; }
.vmw-skel-row { height: 34px; margin: 6px 0; }
.vmw-skel-group { display: block; min-width: 0; }
.vmw-skel-group > .vmw-skel:first-child { margin-top: 0; }
.vmw-skel-group > .vmw-skel:last-child { margin-bottom: 0; }

/* ============================= Empty / busy ============================ */

.vmw-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1 1 auto;
    min-height: 200px;
    color: var(--vmw-dim);
    text-align: center;
    padding: 36px 24px;
}

.vmw-empty-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--vmw-radius-lg);
    background: var(--vmw-inset);
    border: 1px solid var(--vmw-border);
    display: grid;
    place-items: center;
    margin-bottom: 8px;
}
.vmw-empty-icon-wrap .rzi { font-size: 1.45rem; color: var(--vmw-faint); }

.vmw-empty-title { font-weight: 650; font-size: 0.88rem; color: var(--rz-text-color); }
.vmw-empty-hint { font-size: 0.79rem; color: var(--vmw-dim); max-width: 340px; line-height: 1.5; }
.vmw-empty-actions { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.vmw-empty-slim {
    min-height: 110px;
    padding: 18px;
    border: 1px dashed var(--vmw-border);
    border-radius: var(--vmw-radius);
}
.vmw-empty-slim .vmw-empty-icon-wrap { width: 36px; height: 36px; margin-bottom: 4px; }
.vmw-empty-slim .vmw-empty-icon-wrap .rzi { font-size: 1.2rem; }

.vmw-busy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 200px;
    color: var(--vmw-dim);
    font-size: 0.85rem;
}

/* Call-to-action block (dashed, warn-tinted) and its icon variants. */
.vmw-cta {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 32px 24px;
    border: 1px dashed color-mix(in srgb, var(--vmw-warn) 45%, transparent);
    border-radius: var(--vmw-radius-lg);
    background: color-mix(in srgb, var(--vmw-warn) 4%, transparent);
}
.vmw-cta .vmw-empty-hint { max-width: 440px; }
.vmw-cta-icon {
    border-color: color-mix(in srgb, var(--vmw-warn) 40%, transparent);
    background: color-mix(in srgb, var(--vmw-warn) 10%, transparent);
}
.vmw-cta-icon .rzi { color: var(--vmw-warn); }
.vmw-cta-icon-ok {
    border-color: color-mix(in srgb, var(--vmw-ok) 40%, transparent);
    background: color-mix(in srgb, var(--vmw-ok) 10%, transparent);
}
.vmw-cta-icon-ok .rzi { color: var(--vmw-ok); }
.vmw-cta-status { font-size: 0.82rem; font-weight: 600; }
.vmw-cta-alert { max-width: 520px; }
.vmw-cta-foot { font-size: 0.72rem; color: var(--vmw-faint); }

/* Long-running operation progress block. */
.vmw-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    background: var(--vmw-inset);
}
.vmw-progress-head { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; }
.vmw-progress-head .rzi { font-size: 1.05rem; color: var(--vmw-accent); flex: 0 0 auto; }
.vmw-progress-title { font-weight: 650; }
.vmw-progress-meta { font-size: 0.73rem; color: var(--vmw-dim); white-space: nowrap; }
.vmw-progress-bar.rz-progressbar { height: 8px; }
.vmw-progress-counts {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--vmw-dim);
}
.vmw-count.ok { color: color-mix(in srgb, var(--vmw-ok) 65%, var(--rz-text-color)); font-weight: 600; }
.vmw-count.bad { color: color-mix(in srgb, var(--vmw-danger) 70%, var(--rz-text-color)); font-weight: 600; }
.vmw-count.dim { color: var(--vmw-dim); }

/* ============================ Overview dashboard ========================= */

.vmw-dashboard {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    gap: 18px;
    width: 100%;
    min-width: 0;
    padding: 0;
}
.vmw-dashboard > .vmw-page-head { margin-bottom: 0; }
.vmw-dash-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    color: var(--vmw-dim);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.vmw-dash-eyebrow > span:first-child { width: 7px; height: 7px; border-radius: 2px; background: var(--vmw-accent); flex: 0 0 auto; }
.vmw-dash-eyebrow-divider { color: var(--vmw-faint); }
.vmw-dash-heading { align-items: center; margin: 0; }
.vmw-dash-heading h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.vmw-dash-heading p { margin-top: 8px; line-height: 1.5; }
.vmw-dash-preview-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    background: var(--vmw-surface);
    color: var(--vmw-dim);
    font-size: 11px;
    font-weight: 550;
    white-space: nowrap;
}
.vmw-dash-preview-label .rzi { color: var(--vmw-link); font-size: 16px; }
.vmw-dash-preview-note {
    display: flex;
    align-items: center;
    gap: 8px 10px;
    flex-wrap: wrap;
    padding: 10px 13px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius);
    background: var(--vmw-inset);
    color: var(--vmw-dim);
    font-size: 12px;
    line-height: 1.5;
}
.vmw-dash-preview-note > .rzi { color: var(--vmw-link); font-size: 17px; flex: 0 0 auto; }
.vmw-dash-preview-note > span:nth-child(2) { flex: 1 1 350px; min-width: 0; }
.vmw-dash-preview-note strong { color: var(--rz-text-color); font-weight: 600; }
.vmw-dash-sample-week { font-size: 11px; margin-inline-start: auto; }
.vmw-dash-metrics { gap: 16px; margin: 0; }
.vmw-dash-metric { padding: 17px 18px 16px; gap: 7px; }
.vmw-dash-metric .vmw-tile-label { font-size: 12px; }
.vmw-dash-metric .vmw-tile-value { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 26px; line-height: 1.3; }
.vmw-dash-metric .vmw-tile-value > .rzi { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--vmw-radius); background: var(--vmw-accent-faint); color: var(--vmw-link); font-size: 20px; }
.vmw-dash-metric .vmw-tile-hint { font-size: 11px; line-height: 1.4; }
.vmw-dash-percent { font-size: 17px; font-weight: 550; margin-inline-start: 1px; }
.vmw-dash-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.vmw-dash-row > * { min-width: 0; }
.vmw-dash-card-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 20px 16px; }
.vmw-dash-card-heading > div:first-child { min-width: 0; }
.vmw-dash-card-heading h2, .vmw-dash-workspace h2 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 650; letter-spacing: -0.015em; }
.vmw-dash-card-heading p, .vmw-dash-workspace p { margin: 4px 0 0; color: var(--vmw-dim); font-size: 12px; line-height: 1.5; }
.vmw-dash-card-heading > .rzi { flex: 0 0 auto; font-size: 21px; color: var(--vmw-faint); }
.vmw-dash-segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); background: var(--vmw-inset); }
.vmw-dash-segmented button { border: 1px solid transparent; border-radius: var(--vmw-radius-sm); padding: 5px 9px; background: transparent; color: var(--vmw-dim); font: 550 11px/1.35 var(--vmw-font); white-space: nowrap; cursor: pointer; transition: background-color 0.1s ease, color 0.1s ease; }
.vmw-dash-segmented button:hover { background: var(--vmw-hover); color: var(--rz-text-color); }
.vmw-dash-segmented button[aria-pressed="true"] { background: var(--vmw-surface); border-color: var(--vmw-border); color: var(--rz-text-color); box-shadow: var(--vmw-shadow-card); }
.vmw-dash-segmented button:focus-visible, .vmw-dash-days button:focus-visible, .vmw-dash-build > summary:focus-visible,
.vmw-dash-chart-values > summary:focus-visible, .vmw-dash-workspace-links a:focus-visible { outline: 2px solid var(--vmw-accent); outline-offset: 2px; }
.vmw-dash-card-foot { display: flex; align-items: center; gap: 7px; padding: 13px 20px; margin-top: auto; border-top: 1px solid var(--vmw-border); color: var(--vmw-dim); font-size: 11px; line-height: 1.4; }
.vmw-dash-card-foot > .rzi { font-size: 15px; flex: 0 0 auto; }

/* The chart controls its own SVG sizing through Radzen's ResizeObserver. */
.vmw-dash-chart-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding: 0 20px 15px; }
.vmw-dash-chart-total { font-size: 26px; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.vmw-dash-chart-total > span { margin-inline-start: 4px; color: var(--vmw-dim); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.vmw-dash-chart-ratio { display: inline-flex; align-items: center; gap: 4px; color: color-mix(in srgb, var(--vmw-ok) 65%, var(--rz-text-color)); font-size: 11px; font-weight: 600; }
.vmw-dash-chart-ratio .rzi { font-size: 15px; }
.vmw-dash-chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 0 20px; color: var(--vmw-dim); font-size: 11px; }
.vmw-dash-chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.vmw-dash-chart-legend i { display: inline-block; width: 17px; height: 0; border-top: 2px solid var(--vmw-accent); }
.vmw-dash-chart-legend i.vmw-dash-key-released { border-top: 2px dashed var(--vmw-info); }
.vmw-dash-chart-unit { margin-inline-start: auto; }
.vmw-dash-chart { width: calc(100% - 24px); min-width: 0; height: 245px; margin: 8px 12px 0; }
.vmw-dash-chart-values { margin: 0 20px 15px; color: var(--vmw-dim); font-size: 11px; }
.vmw-dash-chart-values > summary { width: fit-content; max-width: 100%; padding: 3px 0; border-radius: var(--vmw-radius-sm); cursor: pointer; }
.vmw-dash-chart-values > summary:hover { color: var(--vmw-link); }
.vmw-dash-chart-values ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; padding: 6px 0 0; margin: 0; list-style: none; }
.vmw-dash-chart-values li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 7px 0; border-bottom: 1px solid var(--vmw-border); }
.vmw-dash-chart-values li strong { color: var(--rz-text-color); font-weight: 600; }

.vmw-dash-mix-total { display: flex; align-items: center; gap: 15px; padding: 6px 20px 23px; }
.vmw-dash-mix-total > strong { font-size: 40px; font-weight: 650; line-height: 1.1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.vmw-dash-mix-total > span { color: var(--vmw-dim); font-size: 12px; line-height: 1.5; }
.vmw-dash-mix-list { display: flex; flex-direction: column; gap: 23px; padding: 0 20px 25px; }
.vmw-dash-family-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: 12px; }
.vmw-dash-family-label > span { display: inline-flex; align-items: center; gap: 8px; }
.vmw-dash-family-label .rzi { color: var(--vmw-dim); font-size: 17px; }
.vmw-dash-family-label strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.vmw-dash-family-label small { color: var(--vmw-dim); font-size: 11px; font-weight: 400; }
.vmw-dash-family .rz-progressbar, .vmw-dash-build-details > .rz-progressbar { height: 6px; background: var(--vmw-inset); }
.vmw-dashboard .rz-progressbar, .vmw-dashboard .rz-progressbar .rz-progressbar-value { border-radius: 2px !important; }
.vmw-dash-family-raids .rz-progressbar.rz-progressbar-determinate .rz-progressbar-value { background-color: var(--vmw-accent); }
.vmw-dash-family-dungeons .rz-progressbar.rz-progressbar-determinate .rz-progressbar-value { background-color: var(--vmw-info); }
.vmw-dash-family-community .rz-progressbar.rz-progressbar-determinate .rz-progressbar-value { background-color: var(--vmw-ok); }

.vmw-dash-build-list { padding: 0 20px 14px; }
.vmw-dash-build { border-top: 1px solid var(--vmw-border); }
.vmw-dash-build > summary { display: flex; align-items: center; gap: 12px; padding: 17px 14px; border-radius: var(--vmw-radius-sm); list-style: none; cursor: pointer; transition: background-color 0.1s ease; }
.vmw-dash-build > summary::-webkit-details-marker { display: none; }
.vmw-dash-build > summary:hover { background: var(--vmw-hover); }
.vmw-dash-build-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: var(--vmw-radius); border: 1px solid var(--vmw-border); background: var(--vmw-inset); color: var(--vmw-dim); }
.vmw-dash-build-icon .rzi { font-size: 19px; }
.vmw-dash-build-name { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.vmw-dash-build-name strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.vmw-dash-build-name > span { font-size: 11px; color: var(--vmw-dim); }
.vmw-dash-build > summary > .rz-badge { flex: 0 0 auto; }
.vmw-dash-build-open { display: inline-flex; align-items: center; gap: 5px; color: var(--vmw-dim); font-size: 11px; flex: 0 0 auto; }
.vmw-dash-build-open .rzi { font-size: 17px; transition: transform 0.1s ease; }
.vmw-dash-build[open] .vmw-dash-build-open .rzi { transform: rotate(180deg); }
.vmw-dash-build[open] .vmw-dash-build-name strong { color: var(--vmw-link); }
.vmw-dash-build-details { padding: 0 14px 18px 61px; }
.vmw-dash-build-details > p { margin: 0 0 15px; color: var(--vmw-dim); font-size: 12px; line-height: 1.6; }
.vmw-dash-build-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-bottom: 17px; }
.vmw-dash-build-facts > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vmw-dash-build-facts small { color: var(--vmw-dim); font-size: 10px; }
.vmw-dash-build-facts strong { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.vmw-dash-build-readiness { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 11px; color: var(--vmw-dim); }
.vmw-dash-build-readiness strong { color: var(--rz-text-color); font-weight: 600; font-variant-numeric: tabular-nums; }

.vmw-dash-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 20px 19px; }
.vmw-dash-days button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 9px 2px; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); background: transparent; color: var(--vmw-dim); font-family: var(--vmw-font); cursor: pointer; transition: background-color 0.1s ease, border-color 0.1s ease; }
.vmw-dash-days button > span { font-size: 10px; font-weight: 500; }
.vmw-dash-days button > strong { color: var(--rz-text-color); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vmw-dash-days button:hover { background: var(--vmw-hover); }
.vmw-dash-days button[aria-pressed="true"] { border-color: color-mix(in srgb, var(--vmw-accent) 60%, var(--vmw-border)); background: var(--vmw-accent-faint); color: var(--vmw-link); }
.vmw-dash-days button[aria-pressed="true"] > strong { color: var(--vmw-link); }
.vmw-dash-agenda-items { display: flex; flex-direction: column; gap: 20px; padding: 0 20px 24px; min-height: 166px; }
.vmw-dash-agenda-item { display: flex; align-items: stretch; gap: 11px; }
.vmw-dash-agenda-item > div { min-width: 0; }
.vmw-dash-agenda-marker { width: 3px; flex: 0 0 3px; border-radius: 2px; background: var(--vmw-accent); }
.vmw-dash-agenda-item:nth-child(even) .vmw-dash-agenda-marker { background: var(--vmw-info); }
.vmw-dash-agenda-time { color: var(--vmw-dim); font-size: 10px; font-variant-numeric: tabular-nums; }
.vmw-dash-agenda-item h3 { margin: 4px 0 0; font-size: 12px; font-weight: 600; line-height: 1.45; }
.vmw-dash-agenda-item p { margin: 4px 0 0; color: var(--vmw-dim); font-size: 11px; line-height: 1.5; }

.vmw-dash-workspace { display: grid; grid-template-columns: minmax(190px, 0.85fr) minmax(0, 3fr); align-items: center; gap: 18px; padding: 19px 20px; }
.vmw-dash-workspace-intro { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vmw-dash-workspace-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); background: var(--vmw-inset); color: var(--vmw-dim); }
.vmw-dash-workspace-icon .rzi { font-size: 19px; }
.vmw-dash-workspace-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 9px; min-width: 0; }
.vmw-dash-workspace-links a { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 11px; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); color: var(--rz-text-color); font-size: 12px; font-weight: 550; line-height: 1.4; text-decoration: none; transition: background-color 0.1s ease, border-color 0.1s ease; }
.vmw-dash-workspace-links a:hover { background: var(--vmw-hover); border-color: var(--vmw-border-strong); }
.vmw-dash-workspace-links a > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.vmw-dash-workspace-links a > .rzi { flex: 0 0 auto; font-size: 18px; color: var(--vmw-link); }
.vmw-dash-workspace-links a > .rzi:last-child { font-size: 14px; color: var(--vmw-faint); }
.vmw-dash-workspace-links small { display: block; margin-top: 3px; font-size: 10px; font-weight: 400; color: var(--vmw-dim); }
.vmw-dash-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px; margin: -3px 0 0; color: var(--vmw-dim); font-size: 10px; line-height: 1.5; }
.vmw-dash-account-error { min-width: 0; }
.vmw-dash-account-error .rz-alert { margin: 0; }

@media (max-width: 1180px) {
    .vmw-dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vmw-dash-workspace { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
    .vmw-dash-row { grid-template-columns: minmax(0, 1fr); }
    .vmw-dash-chart { height: 265px; }
    .vmw-dash-mix-list { gap: 19px; }
    .vmw-dash-agenda-items { min-height: 156px; }
}
@media (max-width: 800px) {
    .vmw-dash-chart .vmw-dash-axis-label-secondary { display: none; }
}
@media (max-width: 640px) {
    .vmw-dashboard { gap: 18px; padding: 0; }
    .vmw-dash-heading h1 { font-size: 26px; }
    .vmw-dash-heading p { font-size: 12px; }
    .vmw-dash-preview-note { align-items: flex-start; gap: 7px; padding: 10px 11px; font-size: 11px; }
    .vmw-dash-preview-note > span:nth-child(2) { flex-basis: calc(100% - 24px); }
    .vmw-dash-sample-week { margin-inline-start: 24px; font-size: 10px; }
    .vmw-dashboard .vmw-dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .vmw-dash-card-heading { padding: 16px 16px 14px; }
    .vmw-dash-card-heading h2 { font-size: 14px; }
    .vmw-dash-card-heading p { font-size: 11px; }
    .vmw-dash-card-foot { padding: 12px 16px; }
    .vmw-dash-chart-summary { padding: 0 16px 13px; }
    .vmw-dash-chart-legend { padding-inline: 16px; gap: 7px 12px; }
    .vmw-dash-chart-unit { font-size: 10px; }
    .vmw-dash-chart { width: calc(100% - 12px); margin-inline: 6px; height: 230px; }
    .vmw-dash-chart-values { margin-inline: 16px; }
    .vmw-dash-chart-values ul { grid-template-columns: 1fr; }
    .vmw-dash-mix-total { padding: 3px 16px 20px; }
    .vmw-dash-mix-list { padding: 0 16px 22px; }
    .vmw-dash-build-list { padding: 0 16px 8px; }
    .vmw-dash-build > summary { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px 10px; padding: 14px 10px; }
    .vmw-dash-build-icon { grid-row: 1 / 3; width: 30px; height: 34px; align-self: start; }
    .vmw-dash-build-name { grid-column: 2; }
    .vmw-dash-build > summary > .rz-badge { grid-row: 2; grid-column: 2; justify-self: start; }
    .vmw-dash-build-open { grid-column: 3; grid-row: 1 / 3; }
    .vmw-dash-build-open > span { display: none; }
    .vmw-dash-build-details { padding-inline: 10px; }
    .vmw-dash-build-facts { grid-template-columns: 1fr; }
    .vmw-dash-days { margin: 0 16px 18px; gap: 5px; }
    .vmw-dash-agenda-items { padding: 0 16px 22px; }
    .vmw-dash-workspace { padding: 16px; gap: 15px; }
    .vmw-dash-workspace-links { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .vmw-dashboard .vmw-dash-metrics { grid-template-columns: minmax(0, 1fr); }
    .vmw-dash-metric { padding: 14px 16px; gap: 4px; }
    .vmw-dash-chart-summary { align-items: flex-start; }
    .vmw-dash-chart-total > span { display: block; margin: 3px 0 0; font-size: 11px; }
    .vmw-dash-chart-ratio { padding-top: 6px; }
    .vmw-dash-chart-unit { flex-basis: 100%; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .vmw-dash-segmented button, .vmw-dash-days button, .vmw-dash-build > summary,
    .vmw-dash-build-open .rzi, .vmw-dash-workspace-links a { transition: none; }
}

/* Guild home: engraved framing, inventory shelves and short, purposeful reveals. */
.vmw-dashboard .vmw-home-welcome { grid-template-columns: minmax(0, 1fr); padding: 20px 22px 26px; }
.vmw-home-welcome .vmw-page-head-text { grid-column: 1; }
.vmw-home-welcome h1 { font-size: clamp(1.35rem, 2vw, 1.85rem); text-wrap: balance; }
.vmw-home-welcome-seal { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px auto 0; width: min(260px, 100%); }
.vmw-home-welcome-seal > span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--vmw-accent)); opacity: .65; }
.vmw-home-welcome-seal > span:last-child { transform: rotate(180deg); }
.vmw-home-welcome-seal img { display: block; flex: 0 0 auto; filter: drop-shadow(0 2px 4px #0003); }
.vmw-dashboard > .vmw-card, .vmw-dashboard .vmw-home-raids, .vmw-dashboard .vmw-news,
.vmw-dashboard .vmw-discord-widget, .vmw-dashboard .vmw-home-guild-info {
    border-top: 2px solid color-mix(in srgb, var(--vmw-accent) 68%, var(--vmw-border));
    background: linear-gradient(140deg, var(--vmw-accent-faint), transparent 32%), var(--vmw-surface);
}
.vmw-dashboard .vmw-card-head, .vmw-dashboard .vmw-raid-section-head, .vmw-dashboard .vmw-news-heading {
    padding: 20px; gap: 16px; align-items: center;
}
.vmw-dashboard .vmw-card-head > div { min-width: 0; }
.vmw-dashboard .vmw-card-head h2, .vmw-dashboard .vmw-news-heading h2 { text-wrap: balance; }
.vmw-dashboard .vmw-home-wish-items, .vmw-dashboard .vmw-recent-loot-items {
    padding: 20px; scroll-padding-inline: 20px;
    scrollbar-width: thin; scrollbar-color: var(--vmw-border-strong) transparent;
}
.vmw-dashboard .vmw-home-wish-items > li, .vmw-dashboard .vmw-recent-loot-items > li {
    background: linear-gradient(150deg, var(--vmw-accent-faint), transparent 60%), var(--vmw-inset);
    border-color: var(--vmw-border); border-top-color: color-mix(in srgb, var(--vmw-accent) 45%, var(--vmw-border));
    transition: transform .1s ease, border-color .1s ease, background-color .1s ease;
    animation: vmw-home-reveal 180ms ease backwards;
}
.vmw-dashboard .vmw-home-wish-items > li:focus-within, .vmw-dashboard .vmw-recent-loot-items > li:focus-within {
    border-color: var(--vmw-accent); background-color: var(--vmw-accent-faint);
}
.vmw-dashboard .vmw-home-wish-items > li:nth-child(2), .vmw-dashboard .vmw-recent-loot-items > li:nth-child(2) { animation-delay: 30ms; }
.vmw-dashboard .vmw-home-wish-items > li:nth-child(3), .vmw-dashboard .vmw-recent-loot-items > li:nth-child(3) { animation-delay: 60ms; }
.vmw-dashboard .vmw-home-wish-items > li:nth-child(4), .vmw-dashboard .vmw-recent-loot-items > li:nth-child(4) { animation-delay: 90ms; }
.vmw-dashboard .vmw-home-wish-items > li:nth-child(5), .vmw-dashboard .vmw-recent-loot-items > li:nth-child(5) { animation-delay: 120ms; }
.vmw-dashboard .vmw-home-upgrade-priority .vmw-wish-rank { font: 500 1.4rem/1 var(--vmw-font-display); color: var(--vmw-link); }
.vmw-dashboard .vmw-home-wish-items .vmw-wish-item-link, .vmw-dashboard .vmw-recent-loot-items .vmw-wish-item-link {
    min-height: 98px; line-height: 1.5; align-items: center; justify-content: center; text-align: center;
}
.vmw-dashboard .vmw-home-wish-items .vmw-wish-item-name { min-width: 0; }
.vmw-dashboard .vmw-home-wish-items .vmw-wish-icon, .vmw-dashboard .vmw-recent-loot-items .vmw-wish-icon {
    box-shadow: 0 2px 8px #0002; flex-shrink: 0;
}
.vmw-dashboard .vmw-home-raids-body { display: flex; flex-direction: column; justify-content: center; min-height: 200px; padding: 20px; }
.vmw-dashboard .vmw-home-raids-body > .vmw-empty { margin-block: auto; }
.vmw-dashboard .vmw-news-story { transition: background-color .1s ease; }
.vmw-dashboard .vmw-news-story:focus-within { background: var(--vmw-accent-faint); }
.vmw-dashboard .vmw-news-heading > .rzi { display: grid; place-items: center; width: 40px; height: 40px; margin: 0; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); background: var(--vmw-accent-faint); font-size: 23px; }
.vmw-dashboard .vmw-home-guild-info-link { padding: 20px; }
.vmw-dashboard .vmw-home-guild-info-heading img { filter: drop-shadow(0 3px 5px #0003); }
.vmw-home-item-loading { display: grid; grid-auto-flow: column; grid-auto-columns: max(220px, calc((100% - 144px) / 5)); gap: 36px; min-width: 0; padding: 20px; overflow: hidden; }
.vmw-home-item-loading.is-detailed { grid-auto-columns: max(230px, calc((100% - 72px) / 5)); gap: 18px; }
.vmw-home-item-placeholder { min-height: 148px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 12px; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); background: var(--vmw-inset); }
.vmw-home-item-loading.is-detailed .vmw-home-item-placeholder { min-height: 284px; }
.vmw-home-item-placeholder-detail { display: flex; align-items: center; gap: 12px; min-height: 84px; }
.vmw-home-item-placeholder-icon { display: block; width: 40px; height: 40px; flex: 0 0 auto; }
.vmw-home-item-placeholder-detail > .vmw-skel-group { flex: 1; min-width: 0; }
@keyframes vmw-home-reveal { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (hover: hover) {
    .vmw-dashboard .vmw-home-wish-items > li:hover, .vmw-dashboard .vmw-recent-loot-items > li:hover { transform: translateY(-2px); border-color: var(--vmw-border-strong); }
    .vmw-dashboard .vmw-news-story:hover { background: var(--vmw-accent-faint); }
}
@media (max-width: 1050px) and (min-width: 701px) {
    .vmw-dashboard .vmw-home-community { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
    .vmw-dashboard .vmw-home-guild-info-link { justify-content: center; }
    .vmw-dashboard .vmw-home-guild-info-action { margin-top: 12px; }
}
@media (max-width: 640px) {
    .vmw-dashboard .vmw-home-welcome { padding: 18px 10px 24px; }
    .vmw-home-welcome-seal { margin-top: 10px; width: 200px; }
    .vmw-dashboard .vmw-card-head, .vmw-dashboard .vmw-raid-section-head, .vmw-dashboard .vmw-news-heading { padding: 16px; gap: 12px; }
    .vmw-dashboard .vmw-home-wishlist .vmw-card-head { align-items: stretch; }
    .vmw-dashboard .vmw-home-wishlist .vmw-card-head > div { flex-basis: 100%; }
    .vmw-dashboard .vmw-home-manage-wishlist { width: 100%; }
    .vmw-dashboard .vmw-home-wish-items, .vmw-dashboard .vmw-recent-loot-items, .vmw-home-item-loading {
        padding: 16px; scroll-padding-inline: 16px; grid-auto-columns: minmax(min(240px, 100%), 85%);
    }
    .vmw-home-item-loading.is-detailed { grid-auto-columns: minmax(min(240px, 100%), 85%); }
    .vmw-dashboard .vmw-home-raids-body, .vmw-dashboard .vmw-home-guild-info-link { padding: 16px; }
    .vmw-dashboard .vmw-news-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-inline: 16px; }
    .vmw-dashboard .vmw-news-filters button { padding-inline: 4px; font-size: .75rem; }
    .vmw-dashboard .vmw-news-footer { padding: 14px 16px; }
    .vmw-dashboard .vmw-news-footer > .vmw-button-row { width: 100%; }
    .vmw-dashboard .vmw-news-footer .vmw-link-btn { padding-inline: 8px; font-size: .75rem; }
    .vmw-dashboard .vmw-home-guild-info-action { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .vmw-dashboard .vmw-home-wish-items > li, .vmw-dashboard .vmw-recent-loot-items > li { animation: none; transition: none; }
    .vmw-dashboard .vmw-home-wish-items > li:hover, .vmw-dashboard .vmw-recent-loot-items > li:hover { transform: none; }
    .vmw-dashboard .vmw-news-story { transition: none; }
}

/* =============================== Not found ============================== */

.vmw-notfound {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--rz-body-background-color);
}
.vmw-notfound-card {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 44px 40px;
    border: 1px solid var(--vmw-border);
    border-radius: var(--vmw-radius-lg);
    background: var(--vmw-surface);
    box-shadow: var(--vmw-shadow-card);
}
.vmw-notfound-code {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--vmw-accent);
}
.vmw-notfound-card h1 { margin: 0; font-size: 1.1rem; font-weight: 650; }
.vmw-notfound-card p { margin: 0 0 10px; color: var(--vmw-dim); font-size: 0.84rem; line-height: 1.55; }
.vmw-notfound-card .vmw-mono { color: var(--vmw-dim); }

/* ============================== Responsive ============================== */

@media (max-width: 1180px) {
    .vmw-content { height: auto; overflow: visible; }
    .vmw-page, .vmw-page:has(> .vmw-fill-card) { flex: none; height: auto; }
    .vmw-view.active { flex: none; height: auto; }
    .vmw-md { grid-template-columns: 1fr; }
    .vmw-master-body { height: 420px; flex: none; }
    .vmw-fill-half { flex: none; }
    .vmw-fill-half .vmw-grid-fill { height: 300px; flex: none; }
    .vmw-fill-card { flex: none; }
    .vmw-card-body { flex: none; }
    .vmw-card-body .vmw-grid-fill { height: 480px; flex: none; }
    .vmw-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .vmw-content { padding: 12px 10px 18px; }
    .vmw-page { padding: 12px; }
    .vmw-page-head { padding: 22px 12px 28px; }
    .vmw-page-head::before { -webkit-mask-image: url("../images/brand/wow-forever-paper-mask-sm.png"); mask-image: url("../images/brand/wow-forever-paper-mask-sm.png"); }
    .vmw-topbar { padding: 0 12px 0 14px; }
    .vmw-stat-row { grid-template-columns: 1fr; }
    .vmw-conn-label { display: none; }
    .vmw-brand-sub { display: none; }
    .vmw-user-name { display: none; }
    .vmw-dlg-columns { grid-template-columns: 1fr; }
    .vmw-dlg-foot { flex-wrap: wrap; }
    .vmw-dlg-foot-info { flex-basis: 100%; }
    .vmw-dlg-foot .rz-button { flex: 0 0 auto; white-space: nowrap; }
    .vmw-form-grid { grid-template-columns: 1fr; }
    .vmw-facts { grid-template-columns: 96px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .vmw-sidenav, .vmw-nav-label, .vmw-nav-group::before { transition: none; }
    .vmw-page { animation: none; }
    .vmw-live-dot, .vmw-search-busy-dot { animation: none; }
    .vmw-skel::after { animation: none; }
    .rz-data-row, .vmw-nav-item, .vmw-icon-btn, .vmw-link-btn, .vmw-dlg-close, .vmw-search-clear, .vmw-record-actions-item { transition: none; }
    .rz-progressbar .rz-progressbar-value { transition: none; }
}

/* ============================== Error UI =============================== */

#blazor-error-ui {
    background: #b91c1c;
    color: #fff;
    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;
    font-family: var(--vmw-font);
    font-size: 0.85rem;
}

#blazor-error-ui .reload {
    color: #fff;
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b91c1c;
    padding: 1rem;
    color: white;
    border-radius: var(--vmw-radius);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--vmw-border);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--vmw-accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* FocusOnNavigate lands on the heading programmatically; no visible ring needed. */
.vmw-notfound-card h1:focus { outline: none; }

/* Permission selection in role and membership dialogs. */
.vmw-permission-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.vmw-stack > .vmw-permission-group { margin-top: 14px; }
.vmw-permission-group > legend { padding: 0; margin-bottom: 8px; }
.vmw-permission-list { display: grid; gap: 8px; }
.vmw-permission-choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); background: var(--vmw-surface); }
.vmw-permission-choice input { accent-color: var(--vmw-accent); width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 18px; }
.vmw-permission-copy { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.vmw-permission-title { font-weight: 600; }
.vmw-user-status { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.vmw-user-lockout-hint { line-height: 1.2; }
.vmw-copy-target { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--vmw-inset); border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); }
.vmw-copy-person { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.vmw-copy-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; flex: 1 1 0; min-height: 0; }
.vmw-copy-picker { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
.vmw-copy-section-head { display: flex; align-items: center; gap: 8px; }
.vmw-copy-section-head h2, .vmw-copy-preview h2 { margin: 0; }
.vmw-copy-preview { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow-y: auto; padding-left: 18px; border-left: 1px solid var(--vmw-border); }
.vmw-copy-role-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.vmw-copy-role-list li { display: flex; flex-direction: column; gap: 5px; padding: 10px; background: var(--vmw-inset); border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); }
.vmw-copy-role-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; overflow-wrap: anywhere; }
.vmw-copy-kept { display: flex; flex-direction: column; gap: 5px; overflow-wrap: anywhere; }
@container (max-width: 680px) {
    .vmw-copy-layout { display: flex; flex-direction: column; flex: 0 0 auto; }
    .vmw-copy-picker { min-height: 340px; height: 340px; flex: 0 0 auto; }
    .vmw-copy-preview { overflow: visible; border-left: 0; border-top: 1px solid var(--vmw-border); padding: 16px 0 0; flex: 0 0 auto; }
}

/* My Profile keeps Discord identity and website access clear at every viewport. */
.vmw-profile { display: grid; gap: 18px; min-width: 0; }
.vmw-profile-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.vmw-profile-column { display: grid; gap: 18px; min-width: 0; }
.vmw-profile .vmw-section-title { margin: 0; }
.vmw-profile-account { gap: 18px; padding: 18px; }
.vmw-profile-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vmw-profile-identity > div { min-width: 0; overflow-wrap: anywhere; }
.vmw-profile-name { font-size: 1rem; font-weight: 650; margin-bottom: 3px; }
.vmw-profile-facts { margin: 0; gap: 12px 16px; grid-template-columns: 136px minmax(0, 1fr); }
.vmw-profile-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.vmw-profile-role-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.vmw-profile-role-list li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: var(--vmw-inset); border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); font-size: 0.82rem; }
.vmw-profile-role-list .rzi { color: var(--vmw-dim); font-size: 1.05rem; flex: 0 0 auto; }
.vmw-profile-role-list span { min-width: 0; overflow-wrap: anywhere; }
.vmw-profile-intro { margin: 0; color: var(--vmw-dim); font-size: 0.82rem; line-height: 1.5; }
@media (max-width: 1000px) {
    .vmw-profile-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .vmw-profile-facts { grid-template-columns: 110px minmax(0, 1fr); gap: 11px 12px; }
    .vmw-profile-account { padding: 14px; }
}

/* Audit history: compact query controls and readable, encoded historical snapshots. */
.vmw-audit-search-toolbar { flex-wrap: wrap; }
.vmw-audit-search-toolbar .vmw-search { min-width: min(290px, 100%); }
.vmw-audit-filter-toolbar { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) minmax(130px, .9fr) minmax(150px, 1fr) minmax(150px, 1fr); align-items: end; gap: 10px; }
.vmw-audit-time-hint { margin: 8px 14px 0; color: var(--vmw-dim); font-size: .73rem; flex: 0 0 auto; }
.vmw-audit-summary { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmw-audit-overview { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--vmw-inset); border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); min-width: 0; }
.vmw-audit-overview h2 { margin: 0; font-size: 1rem; line-height: 1.5; font-weight: 650; overflow-wrap: anywhere; }
.vmw-audit-event-status, .vmw-audit-section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.vmw-audit-event-time { display: flex; flex-wrap: wrap; gap: 5px 18px; font-size: .8rem; }
.vmw-audit-reason { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: .78rem; overflow-wrap: anywhere; }
.vmw-audit-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.vmw-audit-detail-section { min-width: 0; padding: 14px; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); }
.vmw-audit-detail-section h3 { margin: 0 0 12px; }
.vmw-audit-section-head { justify-content: space-between; margin-bottom: 12px; }
.vmw-audit-section-head h3 { margin: 0; }
.vmw-audit-facts { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: baseline; gap: 9px 12px; margin: 0; font-size: .8rem; }
.vmw-audit-facts dt { color: var(--vmw-dim); font-size: .72rem; }
.vmw-audit-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.vmw-audit-change { min-width: 0; overflow: hidden; border: 1px solid var(--vmw-border); border-radius: var(--vmw-radius); }
.vmw-audit-change + .vmw-audit-change { margin-top: 10px; }
.vmw-audit-change-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 12px; background: var(--vmw-inset); border-bottom: 1px solid var(--vmw-border); }
.vmw-audit-change.is-changed .vmw-audit-change-head { border-inline-start: 3px solid var(--vmw-info); padding-inline-start: 9px; }
.vmw-audit-property { min-width: 0; overflow-wrap: anywhere; font-size: .79rem; }
.vmw-audit-change-head .vmw-card-meta { flex: 0 0 auto; }
.vmw-audit-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vmw-audit-value { min-width: 0; padding: 10px 12px; }
.vmw-audit-value + .vmw-audit-value { border-inline-start: 1px solid var(--vmw-border); }
.vmw-audit-value pre, .vmw-audit-metadata pre { margin: 7px 0 0; font-family: var(--vmw-font-mono); font-size: .78rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; tab-size: 2; color: inherit; }
.vmw-audit-value pre.vmw-audit-value-missing { font-family: var(--vmw-font); font-style: italic; color: var(--vmw-dim); }
.vmw-audit-metadata { align-items: start; grid-template-columns: minmax(120px, .7fr) minmax(0, 2fr); }
.vmw-audit-metadata dt { overflow-wrap: anywhere; }
.vmw-audit-metadata pre { margin: 0; }
.vmw-audit-related-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vmw-audit-related-record { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--vmw-inset); border-radius: var(--vmw-radius); overflow-wrap: anywhere; }
.vmw-audit-empty-copy { margin: 0; color: var(--vmw-dim); font-size: .78rem; line-height: 1.5; }
.vmw-audit-facts + .vmw-audit-empty-copy { margin-top: 12px; }
.vmw-audit-retention-note { display: flex; align-items: flex-start; gap: 7px; margin: 0; color: var(--vmw-dim); font-size: .75rem; line-height: 1.5; }
.vmw-audit-retention-note .rzi { font-size: 1rem; flex: 0 0 auto; }
@container (max-width: 680px) {
    .vmw-audit-parties, .vmw-audit-comparison, .vmw-audit-related-list { grid-template-columns: minmax(0, 1fr); }
    .vmw-audit-value + .vmw-audit-value { border-inline-start: 0; border-top: 1px solid var(--vmw-border); }
    .vmw-audit-facts { grid-template-columns: 94px minmax(0, 1fr); }
}
@media (max-width: 1180px) {
    .vmw-audit-filter-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .vmw-audit-filter-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vmw-audit-filter-toolbar > .vmw-field:first-child { grid-column: 1 / -1; }
    .vmw-audit-parties, .vmw-audit-comparison, .vmw-audit-related-list { grid-template-columns: minmax(0, 1fr); }
    .vmw-audit-value + .vmw-audit-value { border-inline-start: 0; border-top: 1px solid var(--vmw-border); }
    .vmw-audit-facts { grid-template-columns: 90px minmax(0, 1fr); gap: 9px; }
}
