/*
 * Vehicles Manager shared portal design system.
 *
 * This file intentionally loads after the legacy portal stylesheet. It provides
 * one final, predictable visual layer for both Filament panels while leaving all
 * Livewire actions, routes, permissions, forms, tables, and backend behavior intact.
 */

:root {
    --vm-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --vm-font-size-display: 28px;
    --vm-line-height-display: 36px;
    --vm-font-size-page-title: 24px;
    --vm-line-height-page-title: 32px;
    --vm-font-size-section: 18px;
    --vm-line-height-section: 26px;
    --vm-font-size-subsection: 16px;
    --vm-line-height-subsection: 24px;
    --vm-font-size-body: 14px;
    --vm-line-height-body: 21px;
    --vm-font-size-supporting: 13px;
    --vm-line-height-supporting: 19px;
    --vm-font-size-meta: 12px;
    --vm-line-height-meta: 18px;
    --vm-weight-regular: 400;
    --vm-weight-medium: 500;
    --vm-weight-semibold: 600;
    --vm-weight-bold: 700;
    --vm-sidebar-width: 16.25rem;
    --vm-sidebar-collapsed-width: 3.9rem;
    --vm-sidebar: #071b3a;
    --vm-sidebar-hover: #102b54;
    --vm-primary: #246bfd;
    --vm-primary-hover: #1d5be0;
    --vm-primary-soft: #eaf1ff;
    --vm-focus-ring: rgba(36, 107, 253, 0.24);
    --vm-page: #f7f9fc;
    --vm-surface: #ffffff;
    --vm-surface-subtle: #f9fbfe;
    --vm-text: #0f1f3d;
    --vm-text-secondary: #667085;
    --vm-text-muted: #98a2b3;
    --vm-border: #e4eaf2;
    --vm-border-strong: #d3dce9;
    --vm-control-border: #c5cfdd;
    --vm-control-border-hover: #aab7ca;
    --vm-success: #22c55e;
    --vm-success-text: #16803a;
    --vm-success-soft: #e8f6ec;
    --vm-warning: #f59e0b;
    --vm-warning-text: #9a5c00;
    --vm-warning-soft: #fff4df;
    --vm-danger: #ef4444;
    --vm-danger-soft: #feecec;
    --vm-info: #2f80ed;
    --vm-info-soft: #eaf3ff;
    --vm-purple: #7c4dff;
    --vm-purple-soft: #f1ecff;
    --vm-radius-control: 8px;
    --vm-radius-card: 12px;
    --vm-radius-panel: 14px;
    --vm-shadow-card: 0 8px 24px rgba(15, 31, 61, 0.055);
    --vm-shadow-menu: 0 16px 40px rgba(15, 31, 61, 0.14);
    --vm-shadow-modal: 0 24px 64px rgba(15, 31, 61, 0.22);
    --vm-space-1: 0.25rem;
    --vm-space-2: 0.5rem;
    --vm-space-3: 0.75rem;
    --vm-space-4: 1rem;
    --vm-space-5: 1.25rem;
    --vm-space-6: 1.5rem;
    --vm-space-8: 2rem;
    --vm-space-10: 2.5rem;
    --vm-motion: 180ms ease;

    /* Keep older custom pages on the same palette. */
    --fm-primary: var(--vm-primary);
    --fm-primary-600: var(--vm-primary-hover);
    --fm-primary-700: #1748bd;
    --fm-primary-soft: var(--vm-primary-soft);
    --fm-primary-softer: #f4f7ff;
    --fm-bg: var(--vm-page);
    --fm-surface: var(--vm-surface);
    --fm-surface-muted: var(--vm-surface-subtle);
    --fm-border: var(--vm-border);
    --fm-border-strong: var(--vm-border-strong);
    --fm-text: var(--vm-text);
    --fm-muted: var(--vm-text-secondary);
    --fm-shadow: var(--vm-shadow-menu);
    --fm-shadow-soft: var(--vm-shadow-card);
    --fm-radius: var(--vm-radius-card);
    --fm-radius-sm: var(--vm-radius-control);
    --vmx-sidebar: var(--vm-sidebar);
    --vmx-sidebar-deep: var(--vm-sidebar);
    --vmx-sidebar-active: var(--vm-primary);
    --vmx-indigo: var(--vm-primary);
    --vmx-indigo-deep: var(--vm-primary-hover);
    --vmx-bg: var(--vm-page);
    --vmx-card: var(--vm-surface);
    --vmx-border: var(--vm-border);
    --vmx-text: var(--vm-text);
    --vmx-muted: var(--vm-text-secondary);
    --vmx-soft-shadow: var(--vm-shadow-card);
    --vm-ref-sidebar-width: var(--vm-sidebar-width);

    /* Framework-neutral aliases for new and existing components. */
    --color-primary: var(--vm-primary);
    --color-primary-hover: var(--vm-primary-hover);
    --color-sidebar: var(--vm-sidebar);
    --color-page-background: var(--vm-page);
    --color-surface: var(--vm-surface);
    --color-text-primary: var(--vm-text);
    --color-text-secondary: var(--vm-text-secondary);
    --color-text-muted: var(--vm-text-muted);
    --color-border: var(--vm-border);
    --color-success: var(--vm-success);
    --color-warning: var(--vm-warning);
    --color-danger: var(--vm-danger);
    --color-info: var(--vm-info);
}

/* Job workspace: shared Regular Service and WOF workflow */
.vm-job-workspace {
    display: grid;
    gap: 16px;
    color: var(--vm-color-text, #0f1f3d);
}

.vm-job-workspace__header,
.vm-job-section__header,
.vm-job-workspace__title-row,
.vm-job-inline-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.vm-job-workspace__back,
.vm-job-section a,
.vm-job-workspace__financials a {
    color: var(--vm-color-primary, #246bfd);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.vm-job-workspace__title-row {
    justify-content: flex-start;
    margin-top: 8px;
}

.vm-job-workspace h1 {
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

.vm-job-workspace h2 {
    margin: 0;
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
}

.vm-job-workspace h3 {
    margin: 14px 0 4px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}

.vm-job-workspace p,
.vm-job-workspace dd,
.vm-job-workspace dt,
.vm-job-workspace label,
.vm-job-workspace input,
.vm-job-workspace select,
.vm-job-workspace textarea,
.vm-job-workspace button {
    font-size: 14px;
    line-height: 20px;
}

.vm-job-workspace p {
    margin: 4px 0 0;
    color: var(--vm-color-text-secondary, #667085);
}

.vm-job-workspace__status,
.vm-job-workspace__workflow {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border: 1px solid #d8e4ff;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d5be0;
    font-size: 12px;
    font-weight: 500;
}

.vm-job-workspace__workflow {
    border-color: var(--vm-color-border, #e4eaf2);
    background: #fff;
    color: var(--vm-color-text-secondary, #667085);
}

.vm-job-workspace__primary,
.vm-job-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid var(--vm-color-primary, #246bfd);
    border-radius: 8px;
    background: var(--vm-color-primary, #246bfd);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.vm-job-workspace__primary:hover,
.vm-job-button:hover {
    border-color: var(--vm-color-primary-hover, #1d5be0);
    background: var(--vm-color-primary-hover, #1d5be0);
}

.vm-job-workspace__primary.is-disabled,
.vm-job-workspace__primary:disabled,
.vm-job-button:disabled {
    border-color: var(--vm-color-border, #e4eaf2);
    background: #eef2f7;
    color: var(--vm-color-text-muted, #98a2b3);
    cursor: not-allowed;
}

.vm-job-button--secondary {
    border-color: var(--vm-color-border, #e4eaf2);
    background: #fff;
    color: var(--vm-color-text, #0f1f3d);
}

.vm-job-button--secondary:hover {
    border-color: #bdd0ff;
    background: #f5f8ff;
    color: var(--vm-color-primary, #246bfd);
}

.vm-job-progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 14px 18px;
    list-style: none;
    border: 1px solid var(--vm-color-border, #e4eaf2);
    border-radius: 12px;
    background: #fff;
}

.vm-job-progress li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--vm-color-text-muted, #98a2b3);
    font-size: 12px;
    font-weight: 500;
}

.vm-job-progress li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 8px;
    left: 34px;
    bottom: -7px;
    height: 2px;
    background: var(--vm-color-border, #e4eaf2);
}

.vm-job-progress li > span {
    z-index: 1;
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border: 1px solid var(--vm-color-border, #e4eaf2);
    border-radius: 50%;
    background: #fff;
}

.vm-job-progress li.is-complete,
.vm-job-progress li.is-current {
    color: var(--vm-color-primary, #246bfd);
}

.vm-job-progress li.is-complete > span,
.vm-job-progress li.is-current > span {
    border-color: var(--vm-color-primary, #246bfd);
    background: var(--vm-color-primary, #246bfd);
    color: #fff;
}

.vm-job-workspace__summary,
.vm-job-workspace__financials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.vm-job-workspace__financials {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vm-job-workspace__summary > section,
.vm-job-section,
.vm-job-disclosure--edit {
    padding: 18px;
    border: 1px solid var(--vm-color-border, #e4eaf2);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(15, 31, 61, 0.04);
}

.vm-job-workspace dl {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
}

.vm-job-workspace dl > div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
}

.vm-job-workspace dt {
    color: var(--vm-color-text-muted, #98a2b3);
}

.vm-job-workspace dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 500;
}

.vm-job-section__header {
    align-items: flex-start;
    margin-bottom: 14px;
}

.vm-job-checklist-summary,
.vm-job-wof-summary,
.vm-job-work-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--vm-color-border, #e4eaf2);
}

.vm-job-wof-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vm-job-wof-summary > div {
    display: grid;
    gap: 3px;
}

.vm-job-wof-summary span {
    color: var(--vm-color-text-muted, #98a2b3);
    font-size: 12px;
}

.vm-job-warning {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #f7cf83;
    border-radius: 8px;
    background: #fffaf0;
}

.vm-job-warning strong {
    color: #9a5b00;
}

.vm-job-findings-list,
.vm-job-work-list,
.vm-job-timeline {
    display: grid;
}

.vm-job-findings-list article {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--vm-color-border, #e4eaf2);
}

.vm-job-findings-list article > span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d5be0;
    font-size: 12px;
    font-weight: 500;
}

.vm-job-findings-list article > button,
.vm-job-failure-builder > div button {
    border: 0;
    background: transparent;
    color: var(--vm-color-primary, #246bfd);
    font-weight: 500;
    cursor: pointer;
}

.vm-job-finding-select input,
.vm-job-workspace .is-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--vm-color-primary, #246bfd);
}

.vm-job-disclosure {
    margin-top: 14px;
    border-top: 1px solid var(--vm-color-border, #e4eaf2);
}

.vm-job-disclosure summary {
    padding: 14px 0;
    color: var(--vm-color-primary, #246bfd);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.vm-job-form-grid,
.vm-job-wof-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.vm-job-form-grid label,
.vm-job-wof-form label {
    display: grid;
    gap: 6px;
    color: var(--vm-color-text, #0f1f3d);
    font-size: 13px;
    font-weight: 500;
}

.vm-job-form-grid input,
.vm-job-form-grid select,
.vm-job-form-grid textarea,
.vm-job-wof-form input,
.vm-job-wof-form select,
.vm-job-wof-form textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #ccd6e4;
    border-radius: 8px;
    background: #fff;
    color: var(--vm-color-text, #0f1f3d);
    font-weight: 400;
}

.vm-job-form-grid textarea,
.vm-job-wof-form textarea {
    min-height: 82px;
    resize: vertical;
}

.vm-job-form-grid input:focus,
.vm-job-form-grid select:focus,
.vm-job-form-grid textarea:focus,
.vm-job-wof-form input:focus,
.vm-job-wof-form select:focus,
.vm-job-wof-form textarea:focus {
    border-color: var(--vm-color-primary, #246bfd);
    outline: 3px solid rgba(36, 107, 253, 0.14);
}

.vm-job-form-grid .is-wide,
.vm-job-wof-form .is-wide {
    grid-column: 1 / -1;
}

.vm-job-form-grid .is-check,
.vm-job-wof-form .is-check {
    display: flex;
    align-items: center;
}

.vm-job-failure-builder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--vm-color-border, #e4eaf2);
    border-radius: 8px;
    background: #f8faff;
}

.vm-job-failure-builder > h3,
.vm-job-failure-builder > div {
    grid-column: 1 / -1;
}

.vm-job-failure-builder > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.vm-job-empty {
    padding: 14px 0;
}

.vm-job-timeline > div {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 10px 0 10px 22px;
    border-bottom: 1px solid var(--vm-color-border, #e4eaf2);
}

.vm-job-timeline > div > span {
    position: absolute;
    top: 16px;
    left: 2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--vm-color-primary, #246bfd);
}

.vm-job-timeline time {
    color: var(--vm-color-text-muted, #98a2b3);
    font-size: 12px;
}

.vm-job-timeline p {
    grid-column: 1 / -1;
}

.vm-job-disclosure--edit {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .vm-job-workspace__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vm-job-progress {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 14px;
    }

    .vm-job-progress li::after {
        display: none;
    }

    .vm-job-wof-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .vm-job-workspace__header,
    .vm-job-workspace__summary,
    .vm-job-workspace__financials,
    .vm-job-wof-summary,
    .vm-job-form-grid,
    .vm-job-wof-form,
    .vm-job-failure-builder {
        grid-template-columns: minmax(0, 1fr);
    }

    .vm-job-workspace__header {
        display: grid;
    }

    .vm-job-workspace__primary,
    .vm-job-button {
        width: 100%;
    }

    .vm-job-progress {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .vm-job-progress li {
        min-width: 126px;
        scroll-snap-align: start;
    }

    .vm-job-findings-list article,
    .vm-job-checklist-summary,
    .vm-job-work-list > div {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .vm-job-finding-select {
        position: absolute;
    }

    .vm-job-inline-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .vm-job-form-grid .is-wide,
    .vm-job-wof-form .is-wide,
    .vm-job-failure-builder > h3,
    .vm-job-failure-builder > div {
        grid-column: auto;
    }
}

@media (max-width: 430px) {
    .vm-job-workspace h1 {
        font-size: 22px;
        line-height: 30px;
    }

    .vm-job-workspace__summary > section,
    .vm-job-section,
    .vm-job-disclosure--edit {
        padding: 14px;
    }
}

/* Data migration workspace extensions */
.vmdm-steps--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.vmdm-upload-form--wide {
    width: min(1180px, 100%);
}

.vmdm-wizard-section {
    padding: var(--vm-space-5) 0;
}

.vmdm-wizard-section:first-child {
    padding-top: 0;
}

.vmdm-wizard-section + .vmdm-wizard-section {
    border-top: 1px solid var(--vm-border);
}

.vmdm-form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vmdm-compatibility,
.vmdm-dependency-note,
.vmdm-no-write-note,
.vmdm-warning-note {
    display: flex;
    align-items: flex-start;
    gap: var(--vm-space-3);
    margin: var(--vm-space-4) 0;
    padding: var(--vm-space-3) var(--vm-space-4);
    border: 1px solid #cfe0ff;
    border-radius: var(--vm-radius-control);
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
}

.vmdm-compatibility--review,
.vmdm-warning-note {
    border-color: #fed7aa;
    background: var(--vm-warning-soft);
    color: var(--vm-warning-text);
}

.vmdm-compatibility > svg,
.vmdm-dependency-note > svg,
.vmdm-no-write-note > svg,
.vmdm-warning-note > svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.vmdm-compatibility > div,
.vmdm-dependency-note > div,
.vmdm-no-write-note > div {
    display: grid;
    gap: 2px;
}

.vmdm-compatibility strong,
.vmdm-dependency-note strong,
.vmdm-no-write-note strong {
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-semibold);
}

.vmdm-compatibility span,
.vmdm-compatibility small,
.vmdm-dependency-note span,
.vmdm-no-write-note span,
.vmdm-warning-note span {
    color: inherit;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-meta);
}

.vmdm-type-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--vm-space-2);
}

.vmdm-check-tile {
    display: flex;
    align-items: center;
    gap: var(--vm-space-2);
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface);
    cursor: pointer;
}

.vmdm-check-tile:hover,
.vmdm-check-tile:has(input:checked) {
    border-color: #a9c3ff;
    background: var(--vm-primary-soft);
}

.vmdm-check-tile input {
    position: absolute;
    width: 1px;
    min-height: 1px;
    opacity: 0;
}

.vmdm-check-tile > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border: 1px solid var(--vm-control-border);
    border-radius: 5px;
    background: var(--vm-surface);
    color: transparent;
}

.vmdm-check-tile input:checked + span {
    border-color: var(--vm-primary);
    background: var(--vm-primary);
    color: #fff;
}

.vmdm-check-tile > span svg {
    width: 14px;
    height: 14px;
}

.vmdm-check-tile strong {
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
}

.vmdm-mode-options {
    display: grid;
    gap: var(--vm-space-2);
    margin: 0;
    padding: 0;
    border: 0;
    align-content: start;
}

.vmdm-mode-options legend {
    margin-bottom: 4px;
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

.vmdm-mode-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: var(--vm-space-3);
    width: 100%;
    min-height: 0;
    padding: 10px 12px;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface);
    color: var(--vm-text);
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.vmdm-mode-option:hover {
    border-color: #a9c3ff;
}

.vmdm-mode-option.is-selected {
    border-color: var(--vm-primary);
    background: var(--vm-primary-soft);
}

.vmdm-mode-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid var(--vm-control-border);
    border-radius: 50%;
    background: var(--vm-surface);
    color: transparent;
}

.vmdm-mode-option.is-selected .vmdm-mode-check {
    border-color: var(--vm-primary);
    background: var(--vm-primary);
    color: #fff;
}

.vmdm-mode-check svg {
    width: 13px;
    height: 13px;
}

.vmdm-mode-option > span:last-child {
    display: grid;
    gap: 2px;
}

.vmdm-mode-option strong {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--vm-space-2);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

.vmdm-mode-option strong em {
    padding: 2px 6px;
    border-radius: 999px;
    background: #dbe7ff;
    color: var(--vm-primary-hover);
    font-size: 11px;
    font-style: normal;
    font-weight: var(--vm-weight-medium);
    line-height: 16px;
}

.vmdm-mode-option small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-meta);
}

.vmdm-mode-summary {
    margin: 2px 0 0;
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vmdm-inline-check input,
.vmdm-confirm-check input {
    width: 18px;
    min-height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
    accent-color: var(--vm-primary);
}

.vmdm-upload-list {
    display: grid;
    gap: var(--vm-space-2);
    margin-top: var(--vm-space-3);
}

.vmdm-upload-list > div {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 34px;
    align-items: center;
    gap: var(--vm-space-3);
    padding: var(--vm-space-2) var(--vm-space-3);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface-subtle);
}

.vmdm-upload-list > div > svg {
    width: 20px;
    color: var(--vm-primary);
}

.vmdm-upload-list span {
    display: grid;
    min-width: 0;
}

.vmdm-upload-list strong {
    overflow: hidden;
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-upload-list small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
}

.vmdm-upload-list button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: var(--vm-radius-control);
    background: transparent;
    color: var(--vm-text-secondary);
}

.vmdm-upload-list button:hover {
    background: var(--vm-danger-soft);
    color: var(--vm-danger);
}

.vmdm-upload-list button svg {
    width: 18px;
}

.vmdm-batch-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    background: var(--vm-surface);
    box-shadow: var(--vm-shadow-card);
}

.vmdm-batch-meta > div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: var(--vm-space-3) var(--vm-space-4);
    border-right: 1px solid var(--vm-border);
}

.vmdm-batch-meta > div:last-child {
    border-right: 0;
}

.vmdm-batch-meta small,
.vmdm-history-detail small,
.vmdm-history-progress small {
    color: var(--vm-text-muted);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-meta);
}

.vmdm-batch-meta strong,
.vmdm-history-detail strong {
    overflow: hidden;
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-status--dry-run {
    border: 1px solid #bcd0ff;
    background: #eef4ff;
    color: var(--vm-primary-hover);
}

.vmdm-status--partially-rolled-back {
    background: var(--vm-warning-soft);
    color: var(--vm-warning-text);
}

.vmdm-panel-heading--history {
    align-items: flex-start;
}

.vmdm-filters--wrap {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.vmdm-filters--wrap select {
    min-width: 150px;
}

.vmdm-history-head,
.vmdm-history-row.vmdm-history-row--detailed {
    display: grid;
    grid-template-columns:
        minmax(210px, 1.3fr)
        minmax(140px, 0.8fr)
        minmax(130px, 0.7fr)
        minmax(140px, 0.8fr)
        minmax(180px, 1fr)
        150px
        88px;
    align-items: center;
    gap: var(--vm-space-3);
    min-width: 1080px;
}

.vmdm-history-head {
    padding: var(--vm-space-3) var(--vm-space-5);
    border-bottom: 1px solid var(--vm-border);
    background: var(--vm-surface-subtle);
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
}

.vmdm-history-row.vmdm-history-row--detailed {
    padding: var(--vm-space-3) var(--vm-space-5);
}

.vmdm-history-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--vm-space-2);
}

.vmdm-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface);
    color: var(--vm-text-secondary);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.vmdm-icon-button:hover {
    border-color: #b8c9ea;
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
}

.vmdm-icon-button:focus-visible {
    outline: 3px solid var(--vm-focus-ring);
    outline-offset: 2px;
}

.vmdm-icon-button svg {
    width: 17px;
    height: 17px;
}

.vmdm-history-detail,
.vmdm-history-progress {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.vmdm-history-progress > span {
    display: block;
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf6;
}

.vmdm-history-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--vm-primary);
}

.vmdm-file-mapping + .vmdm-file-mapping {
    border-top: 1px solid var(--vm-border);
}

.vmdm-file-mapping > header {
    display: grid;
    grid-template-columns: 44px minmax(200px, 1fr) max-content minmax(220px, 0.6fr);
    align-items: center;
    gap: var(--vm-space-4);
    padding: var(--vm-space-4) var(--vm-space-5);
    background: var(--vm-surface-subtle);
}

.vmdm-file-mapping > header > div {
    min-width: 0;
}

.vmdm-file-mapping > header h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-file-mapping > header p {
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vmdm-file-mapping > header label,
.vmdm-preset-bar label,
.vmdm-relationship-list label,
.vmdm-assistance label {
    display: grid;
    gap: 5px;
    color: var(--vm-text);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-meta);
}

.vmdm-confidence {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    white-space: nowrap;
}

.vmdm-confidence--high {
    background: var(--vm-success-soft);
    color: var(--vm-success-text);
}

.vmdm-confidence--possible,
.vmdm-confidence--review {
    background: var(--vm-warning-soft);
    color: var(--vm-warning-text);
}

.vmdm-preset-bar {
    display: flex;
    align-items: end;
    gap: var(--vm-space-2);
    padding: var(--vm-space-3) var(--vm-space-5);
    border-top: 1px solid var(--vm-border);
    border-bottom: 1px solid var(--vm-border);
}

.vmdm-preset-bar label {
    min-width: 180px;
    flex: 1 1 220px;
}

.vmdm-mapping-head--transform,
.vmdm-mapping-row--transform {
    grid-template-columns:
        minmax(150px, 0.8fr)
        minmax(170px, 1fr)
        minmax(210px, 1fr)
        minmax(210px, 1fr)
        minmax(160px, 0.8fr);
    min-width: 1000px;
}

.vmdm-mapping-row > div:first-child {
    display: grid;
    gap: 2px;
}

.vmdm-mapping-row > div:first-child small {
    color: var(--vm-text-muted);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
}

.vmdm-progress-panel > small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
}

.vmdm-no-write-note {
    margin: 0;
    border-color: #cfe0ff;
}

.vmdm-relationship-list {
    display: grid;
}

.vmdm-relationship-list > article {
    display: grid;
    grid-template-columns: minmax(210px, 0.9fr) minmax(220px, 1fr) minmax(240px, 1fr) max-content max-content;
    align-items: center;
    gap: var(--vm-space-4);
    padding: var(--vm-space-4) var(--vm-space-5);
    border-bottom: 1px solid var(--vm-border);
}

.vmdm-relationship-list > article:last-child {
    border-bottom: 0;
}

.vmdm-relationship-list > article > div:first-child {
    display: flex;
    align-items: center;
    gap: var(--vm-space-3);
    min-width: 0;
}

.vmdm-relationship-list > article > div:first-child > span:last-child {
    display: grid;
    min-width: 0;
}

.vmdm-relationship-list strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

.vmdm-relationship-list small {
    overflow: hidden;
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-relationship-list p {
    margin: 0;
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vmdm-inline-check,
.vmdm-confirm-check {
    display: flex !important;
    align-items: flex-start;
    gap: var(--vm-space-2);
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-meta);
}

.vmdm-reconciliation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    min-width: 0;
}

.vmdm-reconciliation-table {
    overflow-x: auto;
}

.vmdm-reconciliation-head,
.vmdm-reconciliation-table > div:not(.vmdm-reconciliation-head) {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) repeat(7, minmax(65px, 0.5fr));
    align-items: center;
    gap: var(--vm-space-2);
    min-width: 750px;
    padding: var(--vm-space-3) var(--vm-space-5);
    border-bottom: 1px solid var(--vm-border);
}

.vmdm-reconciliation-head {
    background: var(--vm-surface-subtle);
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
}

.vmdm-reconciliation-table strong,
.vmdm-reconciliation-table span {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-regular);
}

.vmdm-reconciliation-table strong {
    font-weight: var(--vm-weight-medium);
}

.vmdm-reconciliation aside {
    padding: var(--vm-space-5);
    border-left: 1px solid var(--vm-border);
    background: var(--vm-surface-subtle);
}

.vmdm-reconciliation aside dl {
    display: grid;
    gap: var(--vm-space-2);
    margin: var(--vm-space-4) 0;
}

.vmdm-reconciliation aside dl div,
.vmdm-file-retention > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--vm-space-3);
}

.vmdm-reconciliation aside dt,
.vmdm-reconciliation aside dd {
    margin: 0;
    font-size: var(--vm-font-size-supporting);
}

.vmdm-reconciliation aside dt {
    color: var(--vm-text-secondary);
}

.vmdm-reconciliation aside dd,
.vmdm-reconciliation aside > strong {
    color: var(--vm-text);
    font-weight: var(--vm-weight-medium);
}

.vmdm-reconciliation aside p {
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vmdm-confirm-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr) max-content;
    align-items: center;
    gap: var(--vm-space-5);
    padding: var(--vm-space-5);
}

.vmdm-warning-text {
    grid-column: 1 / -1;
    color: var(--vm-warning-text);
    font-size: var(--vm-font-size-meta);
    text-align: right;
}

.vmdm-rollback-preview > .vmdm-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: var(--vm-space-5);
}

.vmdm-rollback-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--vm-space-4);
    padding: var(--vm-space-4) var(--vm-space-5);
    border-top: 1px solid var(--vm-border);
}

.vmdm-preparation-guide > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--vm-space-2) var(--vm-space-5);
    margin: 0;
    padding: var(--vm-space-5) var(--vm-space-5) var(--vm-space-3) 42px;
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    line-height: var(--vm-line-height-supporting);
}

.vmdm-readiness-list {
    display: grid;
    gap: var(--vm-space-2);
    padding: 0 var(--vm-space-5) var(--vm-space-4);
}

.vmdm-readiness-list > div {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) max-content;
    align-items: center;
    gap: var(--vm-space-3);
    min-height: 48px;
    padding: var(--vm-space-2) var(--vm-space-3);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface);
}

.vmdm-readiness-list > div > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.vmdm-readiness-list > div > span svg {
    width: 16px;
    height: 16px;
}

.vmdm-readiness-list .is-ready > span {
    background: var(--vm-success-soft);
    color: var(--vm-success-text);
}

.vmdm-readiness-list .is-pending > span {
    background: var(--vm-warning-soft);
    color: var(--vm-warning-text);
}

.vmdm-readiness-list > div > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.vmdm-readiness-list strong {
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-supporting);
}

.vmdm-readiness-list small,
.vmdm-readiness-list em {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-style: normal;
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-meta);
}

.vmdm-readiness-list em {
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--vm-surface-subtle);
    white-space: nowrap;
}

.vmdm-preparation-guide > .vmdm-button {
    align-self: flex-start;
    margin: 0 var(--vm-space-5) var(--vm-space-5);
}

.vmdm-preparation-guide .vmdm-warning-note {
    margin-inline: var(--vm-space-5);
}

.vmdm-file-retention {
    display: grid;
    gap: var(--vm-space-3);
    padding: var(--vm-space-5);
}

.vmdm-file-retention > div {
    padding-bottom: var(--vm-space-3);
    border-bottom: 1px solid var(--vm-border);
}

.vmdm-file-retention > div > span:first-child {
    display: grid;
    min-width: 0;
}

.vmdm-file-retention strong {
    overflow: hidden;
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-file-retention small {
    color: var(--vm-text-muted);
    font-size: var(--vm-font-size-meta);
}

.vmdm-file-retention > .vmdm-button {
    justify-self: end;
}

.vmdm-assistance {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1fr) max-content;
    align-items: end;
    gap: var(--vm-space-4);
    padding: var(--vm-space-5);
}

.vmdm-page textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid var(--vm-control-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface);
    color: var(--vm-text);
    font: inherit;
    font-size: var(--vm-font-size-body);
    line-height: var(--vm-line-height-body);
    resize: vertical;
}

.vmdm-page textarea:focus {
    outline: 3px solid rgba(36, 107, 253, 0.2);
    outline-offset: 2px;
}

@media (max-width: 1280px) {
    .vmdm-steps--six {
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .vmdm-steps--six li {
        min-width: 170px;
    }

    .vmdm-batch-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vmdm-batch-meta > div:nth-child(3) {
        border-right: 0;
    }

    .vmdm-batch-meta > div:nth-child(n + 4) {
        border-top: 1px solid var(--vm-border);
    }

    .vmdm-file-mapping > header {
        grid-template-columns: 44px minmax(220px, 1fr) max-content;
    }

    .vmdm-file-mapping > header label {
        grid-column: 2 / -1;
    }

    .vmdm-relationship-list > article {
        grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(240px, 1fr);
    }

    .vmdm-relationship-list .vmdm-inline-check,
    .vmdm-relationship-list .vmdm-button {
        grid-column: auto;
    }
}

@media (max-width: 1024px) {
    .vmdm-form-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vmdm-type-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vmdm-batch-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vmdm-batch-meta > div {
        border-top: 1px solid var(--vm-border);
    }

    .vmdm-batch-meta > div:nth-child(-n + 2) {
        border-top: 0;
    }

    .vmdm-batch-meta > div:nth-child(even) {
        border-right: 0;
    }

    .vmdm-preset-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .vmdm-preset-bar .vmdm-button {
        align-self: end;
    }

    .vmdm-relationship-list > article {
        grid-template-columns: 1fr 1fr;
    }

    .vmdm-relationship-list > article > div:first-child,
    .vmdm-relationship-list > article > p {
        grid-column: 1 / -1;
    }

    .vmdm-reconciliation {
        grid-template-columns: 1fr;
    }

    .vmdm-reconciliation aside {
        border-top: 1px solid var(--vm-border);
        border-left: 0;
    }

    .vmdm-confirm-panel,
    .vmdm-assistance {
        grid-template-columns: 1fr 1fr;
    }

    .vmdm-confirm-panel > div,
    .vmdm-assistance > div {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .vmdm-form-grid--three,
    .vmdm-type-grid {
        grid-template-columns: 1fr;
    }

    .vmdm-batch-meta {
        grid-template-columns: 1fr;
    }

    .vmdm-batch-meta > div,
    .vmdm-batch-meta > div:nth-child(-n + 2) {
        border-top: 1px solid var(--vm-border);
        border-right: 0;
    }

    .vmdm-batch-meta > div:first-child {
        border-top: 0;
    }

    .vmdm-filters--wrap {
        width: 100%;
    }

    .vmdm-filters--wrap label,
    .vmdm-filters--wrap select {
        width: 100%;
    }

    .vmdm-file-mapping > header {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: var(--vm-space-3);
        padding-inline: var(--vm-space-4);
    }

    .vmdm-file-mapping > header .vmdm-confidence,
    .vmdm-file-mapping > header label {
        grid-column: 1 / -1;
    }

    .vmdm-preset-bar {
        padding-inline: var(--vm-space-4);
    }

    .vmdm-preset-bar label,
    .vmdm-preset-bar .vmdm-button {
        width: 100%;
        flex: 1 1 100%;
    }

    .vmdm-mapping-head--transform {
        display: none;
    }

    .vmdm-mapping-row--transform {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .vmdm-relationship-list > article,
    .vmdm-confirm-panel,
    .vmdm-assistance {
        grid-template-columns: 1fr;
    }

    .vmdm-relationship-list > article > *,
    .vmdm-confirm-panel > *,
    .vmdm-assistance > * {
        grid-column: auto;
    }

    .vmdm-relationship-list > article {
        padding-inline: var(--vm-space-4);
    }

    .vmdm-reconciliation aside {
        padding: var(--vm-space-4);
    }

    .vmdm-rollback-preview > .vmdm-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: var(--vm-space-4);
    }

    .vmdm-rollback-actions {
        align-items: stretch;
        flex-direction: column;
        padding-inline: var(--vm-space-4);
    }

    .vmdm-preparation-guide > ul {
        grid-template-columns: 1fr;
        padding-inline: 38px var(--vm-space-4);
    }

    .vmdm-file-retention,
    .vmdm-assistance {
        padding: var(--vm-space-4);
    }

    .vmdm-readiness-list {
        padding-inline: var(--vm-space-4);
    }

    .vmdm-readiness-list > div {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .vmdm-readiness-list em {
        grid-column: 2;
        justify-self: start;
    }

    .vmdm-preparation-guide > .vmdm-button {
        margin-inline: var(--vm-space-4);
    }
}

@media (max-width: 430px) {
    .vmdm-rollback-preview > .vmdm-preview-grid {
        grid-template-columns: 1fr;
    }

    .vmdm-confirm-panel .vmdm-button,
    .vmdm-assistance .vmdm-button,
    .vmdm-file-retention > .vmdm-button {
        width: 100%;
    }

    .vmdm-preparation-guide > .vmdm-button {
        width: calc(100% - (var(--vm-space-4) * 2));
    }
}

/* Booking creation and workshop resource forms */
.vmbk-create-form,
.vmbf-form {
    width: 100%;
    min-width: 0;
}

.vmbk-create-form .vmbk-form-section,
.vmbf-form .vmbf-section {
    overflow: visible;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    background: var(--vm-surface);
    box-shadow: var(--vm-shadow-card);
}

.vmbk-create-form :is(.fi-input-wrp, .fi-fo-select .choices__inner),
.vmbf-form :is(.fi-input-wrp, .fi-fo-select .choices__inner) {
    min-height: 42px;
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface);
}

.vmbk-create-form :is(input, select, textarea),
.vmbf-form :is(input, select, textarea) {
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-body);
}

.vmbk-create-form .fi-fo-field-wrp-label,
.vmbf-form .fi-fo-field-wrp-label {
    margin-bottom: var(--vm-space-2);
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting);
}

.vmbk-create-form .fi-section-header-heading,
.vmbf-form .fi-section-header-heading {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

.vmbk-create-form .fi-section-header-description,
.vmbf-form .fi-section-header-description {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vmbk-summary,
.vmbk-summary-empty {
    display: flex;
    min-height: 74px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: var(--vm-space-3) var(--vm-space-4);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-page);
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    line-height: var(--vm-line-height-supporting);
}

.vmbk-summary strong {
    color: var(--vm-text);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-semibold);
}

.vmbk-summary small {
    color: var(--vm-text-muted);
    font-size: var(--vm-font-size-meta);
}

.vmbk-summary-warning {
    border-color: #f5c96b;
    background: #fffaf0;
}

.vmbk-summary-warning a {
    color: var(--vm-primary);
    font-weight: var(--vm-weight-medium);
    text-decoration: none;
}

.vmbk-summary-warning a:hover {
    color: var(--vm-primary-hover);
    text-decoration: underline;
}

.vmbk-review-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-border);
}

.vmbk-review-grid > div {
    display: flex;
    min-width: 0;
    min-height: 68px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: var(--vm-space-3) var(--vm-space-4);
    background: var(--vm-surface);
}

.vmbk-review-grid span {
    color: var(--vm-text-muted);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-meta);
}

.vmbk-review-grid strong {
    overflow: hidden;
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-resource-bookings.fi-resource-create-record-page .fi-form-actions.fi-sticky {
    z-index: 15;
    justify-content: flex-end;
    margin-inline: 0;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    box-shadow: 0 -8px 24px rgb(15 31 61 / 8%);
}

@media (max-width: 1024px) {
    .vmbk-review-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .vmbk-review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fi-resource-bookings.fi-resource-create-record-page .fi-form-actions.fi-sticky {
        bottom: 0;
        flex-wrap: wrap;
        border-radius: var(--vm-radius-control) var(--vm-radius-control) 0 0;
    }
}

@media (max-width: 430px) {
    .vmbk-review-grid {
        grid-template-columns: 1fr;
    }

    .vmbk-review-grid > div {
        min-height: 58px;
    }

    .fi-resource-bookings.fi-resource-create-record-page .fi-form-actions.fi-sticky > * {
        width: 100%;
    }
}

html {
    background: var(--vm-page);
    color-scheme: light;
}

body,
.fi-body,
.fi-layout {
    background: var(--vm-page) !important;
    color: var(--vm-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    letter-spacing: 0;
}

* {
    scrollbar-color: #b7c2d2 transparent;
    scrollbar-width: thin;
}

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

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

a,
button,
input,
select,
textarea,
summary,
[tabindex]:not([tabindex="-1"]) {
    outline-offset: 3px;
}

:where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid rgba(36, 107, 253, 0.28) !important;
}

::selection {
    background: rgba(36, 107, 253, 0.2);
}

/* Authenticated app shell */
.fi-main-ctn {
    background: var(--vm-page) !important;
    min-width: 0;
    overflow-x: clip;
}

.fi-main {
    background: transparent !important;
    min-width: 0;
    padding: var(--vm-space-8) var(--vm-space-8) var(--vm-space-10) !important;
}

.fi-page {
    gap: var(--vm-space-5) !important;
    margin-inline: auto;
    max-width: 96rem;
    min-width: 0;
    width: 100%;
}

.fi-page-content {
    min-width: 0;
}

.fi-header {
    align-items: flex-end;
    gap: var(--vm-space-4);
    padding: 0 0 var(--vm-space-2) !important;
}

.fi-header-heading {
    color: var(--vm-text) !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.25 !important;
}

.fi-header-subheading {
    color: var(--vm-text-secondary) !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}

/* Sidebar */
.fi-sidebar {
    background: var(--vm-sidebar) !important;
    border-right: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
    width: var(--vm-sidebar-width) !important;
}

.fi-sidebar-header {
    background: var(--vm-sidebar) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: none !important;
    min-height: 5.25rem !important;
    padding: 0 var(--vm-space-5) !important;
}

.fi-sidebar-header .fi-logo,
.fi-sidebar-header a,
.fi-sidebar-header span,
.fi-sidebar-header .fi-icon-btn,
.fi-sidebar-header .fi-icon-btn svg {
    color: #ffffff !important;
}

.fi-sidebar-header .fi-logo {
    max-width: calc(var(--vm-sidebar-width) - 4rem);
}

.vm-brand {
    align-items: center;
    display: inline-flex;
    gap: var(--vm-space-3);
    min-width: 0;
}

.vm-brand-mark {
    align-items: center;
    background: var(--vm-primary);
    border-radius: var(--vm-radius-control);
    color: #ffffff !important;
    display: inline-flex;
    flex: 0 0 3rem;
    font-size: 1.125rem;
    font-style: italic;
    font-weight: 800;
    height: 3rem;
    justify-content: center;
    line-height: 1;
    width: 3rem;
}

.vm-brand-name {
    color: #ffffff !important;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.1;
    min-width: 0;
}

.fi-sidebar-nav {
    background: var(--vm-sidebar) !important;
    gap: var(--vm-space-2) !important;
    padding: var(--vm-space-4) var(--vm-space-3) var(--vm-space-5) !important;
}

.fi-sidebar-nav-groups {
    gap: var(--vm-space-3) !important;
}

.fi-sidebar-group {
    gap: var(--vm-space-1) !important;
}

.fi-sidebar-group-label {
    color: #8fa3c3 !important;
    font-size: 0.675rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    line-height: 1.2 !important;
    padding: var(--vm-space-3) var(--vm-space-3) var(--vm-space-1) !important;
    text-transform: uppercase !important;
}

.fi-sidebar-group-button {
    min-height: 1.75rem !important;
}

.fi-sidebar-group-icon,
.fi-sidebar-group-collapse-button,
.fi-sidebar-group-collapse-button svg {
    color: #8fa3c3 !important;
}

.fi-sidebar-item a,
.fi-sidebar-item-button {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    color: #dbe6f7 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    gap: var(--vm-space-3) !important;
    min-height: 2.625rem !important;
    padding: 0 var(--vm-space-3) !important;
    transform: none !important;
    transition: background-color var(--vm-motion), border-color var(--vm-motion), color var(--vm-motion) !important;
}

.fi-sidebar-item-label,
.fi-sidebar-item-icon,
.fi-sidebar-item svg,
.fi-sidebar-item a span {
    color: currentColor !important;
}

.fi-sidebar-item-icon,
.fi-sidebar-item svg {
    height: 1.125rem !important;
    width: 1.125rem !important;
}

.fi-sidebar-item a:hover,
.fi-sidebar-item-button:hover,
.fi-sidebar-item a:focus-visible,
.fi-sidebar-item-button:focus-visible {
    background: var(--vm-sidebar-hover) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

.fi-sidebar-item.fi-active a,
.fi-sidebar-item.fi-active .fi-sidebar-item-button {
    background: var(--vm-primary) !important;
    border-color: var(--vm-primary) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.fi-sidebar-item.fi-active a::before,
.fi-sidebar-item.fi-active .fi-sidebar-item-button::before {
    display: none !important;
}

.fi-sidebar-sub-group-items {
    border-left: 1px solid rgba(143, 163, 195, 0.32) !important;
    gap: 0 !important;
    margin: var(--vm-space-1) 0 var(--vm-space-2) 1.35rem !important;
    padding: 0 0 0 var(--vm-space-3) !important;
}

.fi-sidebar-sub-group-items .fi-sidebar-item a {
    border: 0 !important;
    color: #aebed7 !important;
    font-size: 0.8rem !important;
    min-height: 2rem !important;
    padding: 0 var(--vm-space-2) !important;
    position: relative;
}

.fi-sidebar-sub-group-items .fi-sidebar-item a::before {
    background: #6680a7 !important;
    border-radius: 999px !important;
    content: "" !important;
    display: block !important;
    height: 0.375rem !important;
    left: -0.95rem !important;
    position: absolute !important;
    top: calc(50% - 0.1875rem) !important;
    width: 0.375rem !important;
}

.fi-sidebar-sub-group-items .fi-sidebar-item.fi-active a {
    background: transparent !important;
    color: #ffffff !important;
}

.fi-sidebar-sub-group-items .fi-sidebar-item.fi-active a::before {
    background: var(--vm-primary) !important;
}

.fi-sidebar .fi-badge,
.fi-sidebar-item-badge {
    background: var(--vm-primary) !important;
    border: 0 !important;
    color: #ffffff !important;
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    min-height: 1.25rem !important;
    min-width: 1.25rem !important;
}

.vm-sidebar-footer {
    background: var(--vm-sidebar) !important;
    border-top: 0 !important;
    padding: var(--vm-space-3) !important;
}

.vm-help-card {
    background: rgba(255, 255, 255, 0.055) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--vm-radius-control) !important;
    min-height: 4.5rem !important;
    padding: var(--vm-space-3) !important;
}

.vm-help-card strong {
    font-size: 0.8125rem !important;
}

.vm-help-card p {
    font-size: 0.6875rem !important;
}

/* Header */
.fi-topbar {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid var(--vm-border) !important;
    box-shadow: none !important;
    position: sticky;
    top: 0;
    z-index: 40;
}

.fi-topbar > nav {
    gap: var(--vm-space-3) !important;
    min-height: 5.25rem !important;
    padding: 0 var(--vm-space-6) !important;
}

.fi-topbar [x-persist*="topbar.end"] {
    gap: var(--vm-space-2) !important;
    margin-left: auto !important;
    min-width: 0;
}

.vm-topbar-breadcrumb {
    color: var(--vm-text-secondary) !important;
    flex: 0 1 auto;
    min-width: 0;
}

.vm-topbar-breadcrumb a {
    color: var(--vm-primary) !important;
}

.vmx-topbar-actions {
    flex: 1 1 auto !important;
    gap: var(--vm-space-2) !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
}

.vmx-topbar-search {
    background: #f3f6fb !important;
    border: 1px solid transparent !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    flex: 1 1 22rem !important;
    height: 2.75rem !important;
    max-width: 30rem !important;
    min-width: 14rem !important;
}

.vmx-topbar-search:focus-within {
    background: #ffffff !important;
    border-color: #9bbcff !important;
    box-shadow: 0 0 0 3px rgba(36, 107, 253, 0.12) !important;
}

.vmx-topbar-search input {
    color: var(--vm-text) !important;
    font-size: 0.875rem !important;
}

.vmx-topbar-search input::placeholder {
    color: var(--vm-text-muted) !important;
}

.vmx-topbar-search > span {
    background: #e9eef7 !important;
    border-radius: 6px !important;
    color: var(--vm-text-secondary) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.vmx-location-select,
.vmx-topbar-icon {
    background: #ffffff !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    color: var(--vm-text) !important;
    height: 2.75rem !important;
    transition: background-color var(--vm-motion), border-color var(--vm-motion), color var(--vm-motion) !important;
}

.vmx-location-select {
    max-width: 15rem !important;
    min-width: 11.5rem !important;
}

.vmx-location-select:hover,
.vmx-topbar-icon:hover {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-border-strong) !important;
    color: var(--vm-primary) !important;
}

.vmx-topbar-icon {
    flex: 0 0 2.75rem !important;
    width: 2.75rem !important;
}

.vmx-topbar-search svg,
.vmx-location-select svg,
.vmx-topbar-icon svg {
    color: currentColor !important;
    fill: none !important;
    stroke: currentColor !important;
}

.fi-topbar .fi-user-menu {
    flex: 0 0 auto !important;
    margin-left: var(--vm-space-1) !important;
    min-width: 2.75rem !important;
    width: auto !important;
}

.fi-topbar .fi-user-menu > button {
    margin: 0 !important;
}

.fi-topbar .fi-avatar {
    border: 3px solid #ffffff !important;
    box-shadow: 0 5px 14px rgba(15, 31, 61, 0.12) !important;
    height: 2.5rem !important;
    width: 2.5rem !important;
}

.vm-topbar-user-meta {
    display: grid !important;
    gap: 0.125rem !important;
    line-height: 1.15 !important;
    margin: 0 var(--vm-space-1) 0 0 !important;
    max-width: 10.5rem !important;
    min-width: 7.5rem !important;
}

.vm-topbar-user-meta strong {
    color: var(--vm-text) !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
}

.vm-topbar-user-meta span {
    color: var(--vm-text-secondary) !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.vm-topbar-user-meta strong,
.vm-topbar-user-meta span,
.vmx-location-select span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Shared Filament components */
.fi-btn {
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    min-height: 2.5rem !important;
    transform: none !important;
    transition: background-color var(--vm-motion), border-color var(--vm-motion), color var(--vm-motion) !important;
}

.fi-btn-color-primary,
.fi-ac-btn-action {
    background: var(--vm-primary) !important;
    border-color: var(--vm-primary) !important;
    color: #ffffff !important;
}

.fi-btn-color-primary:hover,
.fi-btn-color-primary:focus,
.fi-btn-color-primary:active {
    background: var(--vm-primary-hover) !important;
    border-color: var(--vm-primary-hover) !important;
}

.fi-btn-color-danger {
    background: var(--vm-danger) !important;
    border-color: var(--vm-danger) !important;
}

.fi-icon-btn {
    border-radius: var(--vm-radius-control) !important;
    color: var(--vm-text-secondary) !important;
}

.fi-icon-btn:hover {
    background: var(--vm-surface-subtle) !important;
    color: var(--vm-primary) !important;
}

.fi-section,
.fi-ta-ctn,
.fi-fo-component-ctn,
.fm-card,
.fm-pricing-card {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-card) !important;
    box-shadow: var(--vm-shadow-card) !important;
}

.fi-section-header {
    border-bottom-color: var(--vm-border) !important;
}

.fi-section-header-heading,
.fi-ta-header-heading,
.fm-card-title {
    color: var(--vm-text) !important;
    font-weight: 650 !important;
}

.fi-section-header-description,
.fi-ta-header-description,
.fm-card-subtitle {
    color: var(--vm-text-secondary) !important;
}

.fi-input-wrp,
.fi-select-input,
.fi-textarea,
.fi-fo-field-wrp input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.fi-fo-field-wrp textarea,
.fi-fo-field-wrp select {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border-strong) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    color: var(--vm-text) !important;
    min-height: 2.625rem;
}

.fi-input-wrp:focus-within,
.fi-fo-field-wrp input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.fi-fo-field-wrp textarea:focus,
.fi-fo-field-wrp select:focus {
    border-color: #9bbcff !important;
    box-shadow: 0 0 0 3px rgba(36, 107, 253, 0.12) !important;
}

.fi-fo-field-wrp-label,
.fi-fo-field-wrp-label span {
    color: var(--vm-text) !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
}

.fi-fo-field-wrp-helper-text,
.fi-fo-field-wrp-hint {
    color: var(--vm-text-secondary) !important;
    font-size: 0.75rem !important;
}

.fi-ta-ctn {
    min-width: 0;
    overflow: hidden;
}

.fi-ta-header,
.fi-ta-content,
.fi-ta-footer {
    background: #ffffff !important;
}

.fi-ta-content {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.fi-ta-table {
    min-width: 100%;
}

.fi-ta-header-cell {
    background: #f8fafc !important;
    border-bottom-color: var(--vm-border) !important;
    color: var(--vm-text-secondary) !important;
    font-size: 0.75rem !important;
    font-weight: 650 !important;
    text-transform: none !important;
}

.fi-ta-row {
    border-bottom-color: var(--vm-border) !important;
    transition: background-color var(--vm-motion) !important;
}

.fi-ta-row:hover {
    background: #f8faff !important;
}

.fi-ta-cell,
.fi-ta-text {
    color: var(--vm-text) !important;
    font-size: 0.8125rem !important;
    line-height: 1.45 !important;
}

.fi-badge {
    border: 1px solid transparent !important;
    border-radius: 999px !important;
    font-size: 0.75rem !important;
    font-weight: 650 !important;
    line-height: 1.2 !important;
    padding: 0.3rem 0.55rem !important;
}

.fi-badge-color-success {
    background: var(--vm-success-soft) !important;
    color: #187b36 !important;
}

.fi-badge-color-warning {
    background: var(--vm-warning-soft) !important;
    color: #a15c00 !important;
}

.fi-badge-color-danger {
    background: var(--vm-danger-soft) !important;
    color: #c92b2b !important;
}

.fi-badge-color-info,
.fi-badge-color-primary {
    background: var(--vm-info-soft) !important;
    color: #1c61bd !important;
}

.fi-badge-color-gray {
    background: #eef2f6 !important;
    color: #536172 !important;
}

.fi-dropdown-panel {
    background: #ffffff !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: var(--vm-shadow-menu) !important;
    max-height: min(32rem, calc(100vh - 2rem));
    overflow-y: auto;
}

.fi-dropdown-list {
    padding: var(--vm-space-2) !important;
}

.fi-dropdown-list-item {
    border-radius: 6px !important;
    color: var(--vm-text) !important;
    font-size: 0.8125rem !important;
    font-weight: 550 !important;
    min-height: 2.25rem !important;
}

.fi-dropdown-list-item:hover,
.fi-dropdown-list-item:focus {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.fi-dropdown-list-item-icon {
    color: currentColor !important;
}

.fi-modal-window {
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-panel) !important;
    box-shadow: var(--vm-shadow-modal) !important;
    max-height: calc(100vh - 2rem) !important;
}

.fi-modal-content {
    overflow-y: auto !important;
}

.fi-tabs {
    border-bottom-color: var(--vm-border) !important;
}

.fi-tabs-item {
    border-radius: var(--vm-radius-control) !important;
    color: var(--vm-text-secondary) !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
}

.fi-tabs-item.fi-active,
.fi-tabs-item[aria-selected="true"] {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.fi-pagination {
    color: var(--vm-text-secondary) !important;
}

/* Custom portal pages */
:where(
    .vmx-dashboard,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list,
    .vm-quote-page,
    .vm-inventory-page,
    .vma-account-page,
    .fm-page-shell
) {
    color: var(--vm-text) !important;
    margin-inline: auto;
    max-width: 96rem;
    min-width: 0;
    width: 100%;
}

/*
 * Reset page-specific legacy shell rules with matching specificity. This keeps
 * dashboard, bookings, calendar, jobs, quotes, inventory, and settings aligned.
 */
body:has(.vmx-dashboard) .fi-main,
body:has(.vm-bookings-page) .fi-main,
body:has(.vmc-page) .fi-main,
body:has(.vm-job-cards) .fi-main,
body:has(.vm-quotes-list) .fi-main,
body:has(.vm-quote-page) .fi-main,
body:has(.vm-inventory-page) .fi-main,
body:has(.vma-account-page) .fi-main,
body:has(.fm-page-shell) .fi-main {
    background: transparent !important;
    padding: var(--vm-space-8) var(--vm-space-8) var(--vm-space-10) !important;
}

body:has(.vmx-dashboard) .fi-page,
body:has(.vm-bookings-page) .fi-page,
body:has(.vmc-page) .fi-page,
body:has(.vm-job-cards) .fi-page,
body:has(.vm-quotes-list) .fi-page,
body:has(.vm-quote-page) .fi-page,
body:has(.vm-inventory-page) .fi-page,
body:has(.vma-account-page) .fi-page,
body:has(.fm-page-shell) .fi-page {
    background: transparent !important;
    margin-inline: auto !important;
    max-width: 96rem !important;
    min-width: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

body:has(.vmx-dashboard) .fi-page-content,
body:has(.vm-bookings-page) .fi-page-content,
body:has(.vmc-page) .fi-page-content,
body:has(.vm-job-cards) .fi-page-content,
body:has(.vm-quotes-list) .fi-page-content,
body:has(.vm-quote-page) .fi-page-content,
body:has(.vm-inventory-page) .fi-page-content,
body:has(.vma-account-page) .fi-page-content,
body:has(.fm-page-shell) .fi-page-content {
    max-width: 100% !important;
    min-width: 0 !important;
}

body:has(.vmx-dashboard) .fi-topbar > nav,
body:has(.vm-bookings-page) .fi-topbar > nav,
body:has(.vmc-page) .fi-topbar > nav,
body:has(.vm-job-cards) .fi-topbar > nav,
body:has(.vm-quotes-list) .fi-topbar > nav,
body:has(.vm-quote-page) .fi-topbar > nav,
body:has(.vm-inventory-page) .fi-topbar > nav,
body:has(.vma-account-page) .fi-topbar > nav,
body:has(.fm-page-shell) .fi-topbar > nav {
    gap: var(--vm-space-3) !important;
    min-height: 5.25rem !important;
    padding: 0 var(--vm-space-6) !important;
}

body:has(.vmx-dashboard) .fi-topbar [x-persist*="topbar.end"],
body:has(.vm-bookings-page) .fi-topbar [x-persist*="topbar.end"],
body:has(.vmc-page) .fi-topbar [x-persist*="topbar.end"],
body:has(.vm-job-cards) .fi-topbar [x-persist*="topbar.end"],
body:has(.vm-quotes-list) .fi-topbar [x-persist*="topbar.end"],
body:has(.vm-quote-page) .fi-topbar [x-persist*="topbar.end"],
body:has(.vm-inventory-page) .fi-topbar [x-persist*="topbar.end"],
body:has(.vma-account-page) .fi-topbar [x-persist*="topbar.end"],
body:has(.fm-page-shell) .fi-topbar [x-persist*="topbar.end"] {
    flex: 1 1 auto !important;
    gap: var(--vm-space-2) !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: auto !important;
}

body:has(.vmx-dashboard) .vmx-topbar-actions,
body:has(.vm-bookings-page) .vmx-topbar-actions,
body:has(.vmc-page) .vmx-topbar-actions,
body:has(.vm-job-cards) .vmx-topbar-actions,
body:has(.vm-quotes-list) .vmx-topbar-actions,
body:has(.vm-quote-page) .vmx-topbar-actions,
body:has(.vm-inventory-page) .vmx-topbar-actions,
body:has(.vma-account-page) .vmx-topbar-actions,
body:has(.fm-page-shell) .vmx-topbar-actions {
    flex: 1 1 auto !important;
    gap: var(--vm-space-2) !important;
    justify-content: flex-end !important;
    max-width: none !important;
    min-width: 0 !important;
    width: auto !important;
}

body:has(.vmx-dashboard) .vmx-topbar-search,
body:has(.vm-bookings-page) .vmx-topbar-search,
body:has(.vmc-page) .vmx-topbar-search,
body:has(.vm-job-cards) .vmx-topbar-search,
body:has(.vm-quotes-list) .vmx-topbar-search,
body:has(.vm-quote-page) .vmx-topbar-search,
body:has(.vm-inventory-page) .vmx-topbar-search,
body:has(.vma-account-page) .vmx-topbar-search,
body:has(.fm-page-shell) .vmx-topbar-search {
    flex: 1 1 22rem !important;
    max-width: 30rem !important;
    min-width: 14rem !important;
    width: auto !important;
}

body:has(.vmx-dashboard) .vmx-location-select,
body:has(.vm-bookings-page) .vmx-location-select,
body:has(.vmc-page) .vmx-location-select,
body:has(.vm-job-cards) .vmx-location-select,
body:has(.vm-quotes-list) .vmx-location-select,
body:has(.vm-quote-page) .vmx-location-select,
body:has(.vm-inventory-page) .vmx-location-select,
body:has(.vma-account-page) .vmx-location-select,
body:has(.fm-page-shell) .vmx-location-select {
    flex: 0 1 15rem !important;
    max-width: 15rem !important;
    min-width: 11.5rem !important;
}

body:has(.vm-bookings-page) .vmbk-table-scroll,
body:has(.vm-inventory-page) .vmi-table-scroll,
body:has(.vm-quote-page) .vmq-table-wrap,
body:has(.vmx-dashboard) .vmx-table-wrap,
body:has(.fm-page-shell) .fm-responsive-table {
    max-width: 100% !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
}

/* Plans and billing */
body:has(.vmbill-page) .fi-page > .fi-header {
    display: none !important;
}

body:has(.vmbill-page) .fi-page {
    background: var(--vm-page) !important;
    padding: clamp(var(--vm-space-4), 2vw, var(--vm-space-8)) !important;
}

.vmbill-page {
    color: var(--vm-text);
    gap: var(--vm-space-5) !important;
    margin-top: 0 !important;
}

.vmbill-page-head {
    align-items: flex-start;
    display: flex;
    gap: var(--vm-space-4);
    justify-content: space-between;
    min-width: 0;
}

.vmbill-page-head > div:first-child {
    min-width: 0;
}

.vmbill-page-head h1 {
    color: var(--vm-text);
    font-size: var(--vm-font-size-page-title);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-page-title);
    margin: 0;
}

.vmbill-page-head p {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-body);
    margin: var(--vm-space-1) 0 0;
    max-width: 44rem;
}

.vmbill-head-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: var(--vm-space-2);
    justify-content: flex-end;
}

.vmbill-page .fm-button,
.vmbill-page .fm-button-secondary {
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
    min-height: 40px !important;
    padding: 0 var(--vm-space-4) !important;
    transform: none !important;
    transition: background-color var(--vm-motion), border-color var(--vm-motion), color var(--vm-motion) !important;
}

.vmbill-page .fm-button {
    background: var(--vm-primary) !important;
    border: 1px solid var(--vm-primary) !important;
    color: #ffffff !important;
}

.vmbill-page .fm-button:hover,
.vmbill-page .fm-button:focus-visible {
    background: var(--vm-primary-hover) !important;
    border-color: var(--vm-primary-hover) !important;
}

.vmbill-page .fm-button-secondary {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border-strong) !important;
    color: var(--vm-text) !important;
}

.vmbill-page .fm-button-secondary:hover,
.vmbill-page .fm-button-secondary:focus-visible {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-control-border-hover) !important;
    color: var(--vm-primary-hover) !important;
}

.vmbill-page .vmbill-danger-button {
    color: var(--vm-danger) !important;
}

.vmbill-page .vmbill-danger-button:hover,
.vmbill-page .vmbill-danger-button:focus-visible {
    background: var(--vm-danger-soft) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: var(--vm-danger) !important;
}

.vmbill-page :where(.fm-button, .fm-button-secondary):disabled {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-border) !important;
    color: var(--vm-text-muted) !important;
}

.vmbill-summary-grid {
    gap: var(--vm-space-4) !important;
    grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr) !important;
}

.vmbill-page .fm-card {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-card) !important;
    box-shadow: var(--vm-shadow-card) !important;
    color: var(--vm-text) !important;
}

.vmbill-page .fm-card-padded {
    padding: var(--vm-space-5) !important;
}

.vmbill-page .fm-card-header {
    border-bottom-color: var(--vm-border) !important;
    padding: var(--vm-space-4) var(--vm-space-5) !important;
}

.vmbill-page .fm-card-title {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
}

.vmbill-page .fm-card-subtitle {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vmbill-page .fm-billing-current {
    align-items: center;
    margin-top: var(--vm-space-4);
}

.vmbill-page .fm-billing-current .fm-package-price {
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

.vmbill-page .fm-billing-meta {
    border-bottom: 1px solid var(--vm-border);
    border-top: 1px solid var(--vm-border);
    gap: 0;
    margin-top: var(--vm-space-4);
}

.vmbill-page .fm-billing-meta > div {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: var(--vm-space-3) var(--vm-space-4) !important;
}

.vmbill-page .fm-billing-meta > div + div {
    border-left: 1px solid var(--vm-border) !important;
}

.vmbill-page .fm-billing-meta span {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vmbill-page .fm-billing-meta strong {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
    margin-top: var(--vm-space-1) !important;
}

.vmbill-page .fm-upgrade-note {
    background: var(--vm-warning-soft) !important;
    border: 1px solid rgba(245, 158, 11, 0.32) !important;
    border-radius: var(--vm-radius-control) !important;
    color: var(--vm-warning-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
    margin-top: var(--vm-space-4) !important;
    padding: var(--vm-space-3) !important;
}

.vmbill-page .fm-check-list {
    gap: var(--vm-space-2) !important;
    margin-top: var(--vm-space-4) !important;
}

.vmbill-page .fm-check-item {
    align-items: flex-start !important;
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vmbill-page .fm-check-dot {
    border-color: var(--vm-border-strong) !important;
    height: 1rem !important;
    margin-top: 1px;
    width: 1rem !important;
}

.vmbill-page .fm-check-dot-done {
    background: var(--vm-success) !important;
    border-color: var(--vm-success) !important;
}

.vmbill-section {
    display: grid;
    gap: var(--vm-space-4);
    min-width: 0;
}

.vmbill-section-head h2 {
    color: var(--vm-text);
    font-size: var(--vm-font-size-section);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-section);
    margin: 0;
}

.vmbill-section-head p {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-supporting);
    margin: var(--vm-space-1) 0 0;
}

.vmbill-page .fm-package-grid {
    gap: var(--vm-space-4) !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.vmbill-page .fm-pricing-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.vmbill-page .fm-pricing-card-featured {
    border-color: rgba(36, 107, 253, 0.5) !important;
    box-shadow: var(--vm-shadow-card) !important;
}

.vmbill-page .fm-pricing-card-current {
    border: 2px solid var(--vm-primary) !important;
    outline: 0 !important;
}

.vmbill-page .fm-pricing-topline {
    gap: var(--vm-space-2) !important;
    justify-content: flex-start !important;
}

.vmbill-page .fm-pricing-card > .fm-package-price {
    color: var(--vm-text) !important;
    font-size: 28px !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 36px !important;
    margin-top: var(--vm-space-4);
}

.vmbill-page .fm-package-description {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
    margin: var(--vm-space-3) 0 0 !important;
    min-height: 2.375rem;
}

.vmbill-page .fm-plan-diff {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-border) !important;
    border-radius: var(--vm-radius-control) !important;
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
    padding: var(--vm-space-3) !important;
}

.vmbill-page .fm-plan-diff strong {
    color: var(--vm-text) !important;
    font-weight: var(--vm-weight-medium) !important;
}

.vmbill-page .fm-package-feature-section {
    margin-top: auto !important;
    padding-top: var(--vm-space-5) !important;
}

.vmbill-page .fm-package-feature-section > * {
    width: 100%;
}

.vmbill-page .fm-pill {
    border-radius: 6px !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 16px !important;
    padding: var(--vm-space-1) var(--vm-space-2) !important;
}

.vmbill-page :where(.fm-pill-active, .fm-pill-paid, .fm-pill-completed) {
    background: var(--vm-success-soft) !important;
    color: var(--vm-success-text) !important;
}

.vmbill-page :where(.fm-pill-trialing, .fm-pill-pending) {
    background: var(--vm-warning-soft) !important;
    color: var(--vm-warning-text) !important;
}

.vmbill-page :where(.fm-pill-cancelled, .fm-pill-canceled, .fm-pill-past_due, .fm-pill-failed) {
    background: var(--vm-danger-soft) !important;
    color: var(--vm-danger) !important;
}

.vmbill-page .fm-pill-neutral {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.vmbill-page .fm-responsive-table {
    border-radius: 0 0 var(--vm-radius-card) var(--vm-radius-card);
}

.vmbill-page .fm-comparison-table th,
.vmbill-page .fm-comparison-table td {
    border-bottom-color: var(--vm-border) !important;
    padding: var(--vm-space-3) var(--vm-space-4) !important;
}

.vmbill-page .fm-comparison-table th {
    background: var(--vm-surface-subtle) !important;
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-semibold) !important;
    letter-spacing: 0 !important;
    line-height: var(--vm-line-height-meta) !important;
    text-transform: none !important;
}

.vmbill-page .fm-comparison-table td {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: 20px !important;
}

.vmbill-page .fm-list {
    gap: 0 !important;
    padding: 0 !important;
}

.vmbill-page .fm-list-row {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--vm-border) !important;
    border-radius: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    padding: var(--vm-space-3) var(--vm-space-5) !important;
}

.vmbill-page .fm-list-row:last-child {
    border-bottom: 0 !important;
}

.vmbill-page .fm-list-title {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vmbill-page .fm-list-meta {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vmbill-page .fm-list-row > strong {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
}

.vmbill-page .fm-link {
    color: var(--vm-primary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
}

.vmbill-page .fm-link:hover,
.vmbill-page .fm-link:focus-visible {
    color: var(--vm-primary-hover) !important;
}

.vmbill-page .fm-empty {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
    padding: var(--vm-space-6) !important;
}

@media (max-width: 1180px) {
    .vmbill-page .fm-package-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    .vmbill-page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .vmbill-head-actions {
        justify-content: flex-start;
    }

    .vmbill-summary-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 700px) {
    body:has(.vmbill-page) .fi-page {
        padding: var(--vm-space-4) !important;
    }

    .vmbill-page .fm-package-grid {
        grid-template-columns: 1fr !important;
    }

    .vmbill-page .fm-billing-meta {
        grid-template-columns: 1fr !important;
    }

    .vmbill-page .fm-billing-meta > div + div {
        border-left: 0 !important;
        border-top: 1px solid var(--vm-border) !important;
    }

    .vmbill-page .fm-list-row {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }
}

@media (max-width: 520px) {
    .vmbill-page-head h1 {
        font-size: 22px;
        line-height: 30px;
    }

    .vmbill-head-actions,
    .vmbill-head-actions > *,
    .vmbill-page .fm-package-feature-section > * {
        width: 100%;
    }

    .vmbill-page .fm-card-padded,
    .vmbill-page .fm-card-header {
        padding: var(--vm-space-4) !important;
    }

    .vmbill-page .fm-list-row {
        align-items: start !important;
        grid-template-columns: 1fr !important;
        padding: var(--vm-space-3) var(--vm-space-4) !important;
    }
}

:where(
    .vmx-hero h1,
    .vmbk-hero h1,
    .vmc-page-head h1,
    .vmj-page-head h1,
    .vmql-page-head h1,
    .vmq-title-row h1,
    .vmi-hero h1,
    .vma-page-head h1,
    .fm-dashboard-hero h1
) {
    color: var(--vm-text) !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.25 !important;
}

:where(
    .vmx-hero p,
    .vmbk-hero p,
    .vmc-page-head p,
    .vmj-page-head p,
    .vmql-page-head p,
    .vmq-title-stack > p,
    .vmi-hero p,
    .vma-page-head p,
    .fm-dashboard-hero p
) {
    color: var(--vm-text-secondary) !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}

:where(
    .vmbk-hero,
    .vmc-page-head,
    .vmj-page-head,
    .vmql-page-head,
    .vmq-header,
    .vmi-hero,
    .vma-page-head
) {
    align-items: flex-end !important;
    gap: var(--vm-space-4) !important;
    margin-bottom: var(--vm-space-5) !important;
}

:where(
    .vmx-kpi-card,
    .vmx-card,
    .vmbk-stat-card,
    .vmbk-table-card,
    .vmc-calendar-card,
    .vmc-summary-strip,
    .vmj-card,
    .vmql-metric,
    .vmql-panel,
    .vmql-card,
    .vmq-card,
    .vmq-progress-card,
    .vmq-side-card,
    .vmi-stat-card,
    .vmi-chart-card,
    .vmi-table-card,
    .vmi-category-card,
    .vma-settings-card,
    .vma-profile-banner,
    .vma-panel
) {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border) !important;
    border-radius: var(--vm-radius-card) !important;
    box-shadow: var(--vm-shadow-card) !important;
}

:where(
    .vmx-primary-button,
    .vmbk-button-primary,
    .vmc-new-booking,
    .vmj-button-primary,
    .vmql-button-primary,
    .vmi-button-primary,
    .vma-save-button
) {
    background: var(--vm-primary) !important;
    border-color: var(--vm-primary) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    min-height: 2.625rem !important;
}

:where(
    .vmx-primary-button,
    .vmbk-button-primary,
    .vmc-new-booking,
    .vmj-button-primary,
    .vmql-button-primary,
    .vmi-button-primary,
    .vma-save-button
):hover {
    background: var(--vm-primary-hover) !important;
    border-color: var(--vm-primary-hover) !important;
}

:where(
    .vmx-secondary-button,
    .vmbk-button-light,
    .vmj-button-light,
    .vmql-button-light,
    .vmi-button-light,
    .vmq-action,
    .vma-secondary-button
) {
    background: #ffffff !important;
    border: 1px solid var(--vm-border-strong) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    color: var(--vm-text) !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    min-height: 2.625rem !important;
}

:where(
    .vmx-secondary-button,
    .vmbk-button-light,
    .vmj-button-light,
    .vmql-button-light,
    .vmi-button-light,
    .vmq-action,
    .vma-secondary-button
):hover {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-border-strong) !important;
}

:where(
    .vmbk-tabs,
    .vmj-tabs,
    .vmql-tabs,
    .vmq-tabs,
    .vmi-tabs,
    .vmc-view-tabs
) {
    border-color: var(--vm-border) !important;
}

:where(
    .vmbk-tab.is-active,
    .vmj-tab.is-active,
    .vmql-tab.is-active,
    .vmq-tabs a.is-active,
    .vmi-tabs a.is-active,
    .vmc-view-tabs a.is-active
) {
    border-color: var(--vm-primary) !important;
    color: var(--vm-primary) !important;
}

.vmx-segments a,
.vmx-segments span {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--vm-border);
    border-radius: 7px;
    color: var(--vm-text-secondary);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    justify-content: center;
    min-height: 2rem;
    padding: 0 var(--vm-space-3);
    text-decoration: none;
}

.vmx-segments a:hover {
    background: var(--vm-surface-subtle);
    color: var(--vm-primary-hover);
}

.vmx-segments a.is-active,
.vmx-segments span.is-active {
    background: var(--vm-primary);
    border-color: var(--vm-primary);
    color: #ffffff;
}

.vmx-segments span {
    cursor: default;
}

.vmq-response {
    cursor: default !important;
}

.vmi-period-label {
    align-items: center;
    background: var(--vm-surface-subtle);
    border: 1px solid var(--vm-border);
    border-radius: 7px;
    color: var(--vm-text-secondary);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 2rem;
    padding: 0 var(--vm-space-3);
}

.vmc-more-menu {
    position: relative;
}

.vmc-more-menu > summary {
    cursor: pointer;
    list-style: none;
}

.vmc-more-menu > summary::-webkit-details-marker {
    display: none;
}

.vmc-more-menu > div {
    background: #ffffff;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    box-shadow: var(--vm-shadow-menu);
    display: grid;
    min-width: 10.5rem;
    padding: var(--vm-space-2);
    position: absolute;
    right: 0;
    top: calc(100% + var(--vm-space-2));
    z-index: 20;
}

.vmc-more-menu > div a,
.vmc-more-menu > div button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--vm-text);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 550;
    min-height: 2.25rem;
    padding: 0 var(--vm-space-3);
    text-align: left;
    text-decoration: none;
}

.vmc-more-menu > div a:hover,
.vmc-more-menu > div button:hover {
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
}

:where(
    .vmbk-table-scroll,
    .vmi-table-scroll,
    .vmql-list,
    .vmq-table-wrap,
    .vmx-table-wrap,
    .fm-responsive-table
) {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
}

:where(
    .vmbk-table,
    .vmi-table,
    .vmq-items-table,
    .vmx-job-table,
    .fm-comparison-table
) thead th {
    background: #f8fafc !important;
    border-bottom-color: var(--vm-border) !important;
    color: var(--vm-text-secondary) !important;
    font-size: 0.75rem !important;
    font-weight: 650 !important;
}

:where(
    .vmbk-table,
    .vmi-table,
    .vmq-items-table,
    .vmx-job-table,
    .fm-comparison-table
) tbody td {
    border-bottom-color: var(--vm-border) !important;
    color: var(--vm-text) !important;
    font-size: 0.8125rem !important;
}

:where(
    .vmbk-table,
    .vmi-table,
    .vmq-items-table,
    .vmx-job-table,
    .fm-comparison-table
) tbody tr:hover {
    background: #f8faff !important;
}

/* Account settings */
body:has(.vma-account-page) .fi-page {
    background: var(--vm-page) !important;
    padding: clamp(var(--vm-space-4), 2vw, var(--vm-space-8)) !important;
}

.vma-account-page,
.vma-account-page button,
.vma-account-page input,
.vma-account-page select {
    font-family: var(--vm-font-family) !important;
}

.vma-account-page {
    color: var(--vm-text) !important;
    gap: var(--vm-space-5) !important;
}

.vma-page-head {
    align-items: center !important;
    gap: var(--vm-space-4) !important;
}

.vma-page-head h1 {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-page-title) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-page-title) !important;
}

.vma-page-head p {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
    margin-top: var(--vm-space-1) !important;
}

.vma-save-button,
.vma-secondary-button {
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
    min-height: 40px !important;
    padding-inline: var(--vm-space-4) !important;
    transform: none !important;
    transition: background-color var(--vm-motion), border-color var(--vm-motion), color var(--vm-motion) !important;
}

.vma-save-button {
    background: var(--vm-primary) !important;
    border-color: var(--vm-primary) !important;
    color: #ffffff !important;
}

.vma-save-button:hover,
.vma-save-button:focus-visible {
    background: var(--vm-primary-hover) !important;
    border-color: var(--vm-primary-hover) !important;
}

.vma-secondary-button {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border-strong) !important;
    color: var(--vm-text) !important;
    min-width: 0 !important;
}

.vma-secondary-button:hover,
.vma-secondary-button:focus-visible {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-control-border-hover) !important;
    color: var(--vm-primary-hover) !important;
}

.vma-layout {
    gap: var(--vm-space-5) !important;
    grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr) !important;
}

.vma-settings-card,
.vma-profile-banner,
.vma-panel {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-card) !important;
    box-shadow: var(--vm-shadow-card) !important;
}

.vma-settings-card {
    gap: var(--vm-space-1) !important;
    padding: var(--vm-space-4) var(--vm-space-2) !important;
    top: 6.25rem !important;
}

.vma-menu-title {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-meta) !important;
    padding: 0 var(--vm-space-3) var(--vm-space-2) !important;
}

.vma-menu-item {
    border-left-width: 2px !important;
    border-radius: var(--vm-radius-control) !important;
    gap: var(--vm-space-3) !important;
    min-height: 3.75rem !important;
    padding: var(--vm-space-2) var(--vm-space-3) !important;
}

.vma-menu-item .vma-icon {
    color: var(--vm-text-secondary) !important;
    height: 1.125rem !important;
    width: 1.125rem !important;
}

.vma-menu-item strong {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vma-menu-item small {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
    margin-top: 0 !important;
}

.vma-menu-item:hover {
    background: var(--vm-surface-subtle) !important;
}

.vma-menu-item.is-active {
    background: var(--vm-primary-soft) !important;
    border-left-color: var(--vm-primary) !important;
    color: var(--vm-primary-hover) !important;
}

.vma-menu-item.is-active strong,
.vma-menu-item.is-active .vma-icon {
    color: var(--vm-primary-hover) !important;
}

.vma-danger-item strong,
.vma-danger-item .vma-icon {
    color: var(--vm-danger) !important;
}

.vma-content {
    gap: var(--vm-space-4) !important;
}

.vma-profile-banner {
    background: var(--vm-surface) !important;
    gap: var(--vm-space-5) !important;
    min-height: 9rem !important;
    padding: var(--vm-space-6) !important;
}

.vma-avatar {
    background: var(--vm-primary) !important;
    border-color: var(--vm-surface) !important;
    border-width: 4px !important;
    box-shadow: 0 8px 20px rgba(36, 107, 253, 0.18) !important;
    font-size: 1.5rem !important;
    font-weight: var(--vm-weight-semibold) !important;
    height: 5.75rem !important;
    width: 5.75rem !important;
}

.vma-camera-button {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border-strong) !important;
    box-shadow: var(--vm-shadow-card) !important;
    color: var(--vm-text) !important;
    height: 2.25rem !important;
    width: 2.25rem !important;
}

.vma-profile-summary {
    gap: var(--vm-space-3) !important;
}

.vma-name-row {
    gap: var(--vm-space-2) !important;
}

.vma-name-row h2 {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

.vma-name-row span {
    background: var(--vm-primary-soft) !important;
    border-radius: 6px !important;
    color: var(--vm-primary-hover) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-meta) !important;
    padding: var(--vm-space-1) var(--vm-space-2) !important;
}

.vma-contact-grid {
    gap: var(--vm-space-2) var(--vm-space-5) !important;
}

.vma-contact-grid span {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
    overflow-wrap: anywhere;
}

.vma-contact-grid .vma-icon {
    color: var(--vm-text-secondary) !important;
}

.vma-panel {
    gap: var(--vm-space-5) !important;
    padding: var(--vm-space-5) !important;
}

.vma-panel-head {
    border-bottom-color: var(--vm-border) !important;
    padding-bottom: var(--vm-space-3) !important;
}

.vma-panel-head h2 {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-subsection) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-subsection) !important;
}

.vma-form-grid {
    gap: var(--vm-space-4) var(--vm-space-5) !important;
}

.vma-field {
    color: var(--vm-text) !important;
    gap: var(--vm-space-2) !important;
}

.vma-field > span {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vma-field input,
.vma-field select,
.vma-phone-field {
    background: var(--vm-surface) !important;
    border-color: var(--vm-control-border) !important;
    border-radius: var(--vm-radius-control) !important;
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
    min-height: 42px !important;
}

.vma-field input:hover,
.vma-field select:hover,
.vma-phone-field:hover {
    border-color: var(--vm-control-border-hover) !important;
}

.vma-field input:focus,
.vma-field select:focus,
.vma-phone-field:focus-within {
    border-color: var(--vm-primary) !important;
    box-shadow: 0 0 0 3px rgba(36, 107, 253, 0.14) !important;
}

.vma-field input[readonly] {
    background: var(--vm-surface-subtle) !important;
    color: var(--vm-text-secondary) !important;
}

.vma-phone-field select,
.vma-phone-field input {
    min-height: 40px !important;
}

.vma-phone-field select {
    border-right-color: var(--vm-border) !important;
}

.vma-security-row {
    border-bottom-color: var(--vm-border) !important;
    gap: var(--vm-space-3) !important;
    padding: var(--vm-space-3) 0 !important;
}

.vma-security-icon {
    height: 2.5rem !important;
    width: 2.5rem !important;
}

.vma-security-green {
    background: var(--vm-success-soft) !important;
    color: var(--vm-success) !important;
}

.vma-security-blue {
    background: var(--vm-info-soft) !important;
    color: var(--vm-info) !important;
}

.vma-security-row strong {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-body) !important;
}

.vma-security-row small,
.vma-password-fields > small {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vma-status-pill {
    border-radius: 6px !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-meta) !important;
    min-height: 1.75rem !important;
    min-width: 6rem !important;
}

.vma-status-pill.is-active {
    background: var(--vm-success-soft) !important;
    color: var(--vm-success-text) !important;
}

.vma-status-pill.is-off {
    background: var(--vm-surface-subtle) !important;
    color: var(--vm-text-secondary) !important;
}

.vma-password-fields {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-border) !important;
    border-radius: var(--vm-radius-control) !important;
    gap: var(--vm-space-3) !important;
    padding: var(--vm-space-4) !important;
}

@media (max-width: 1180px) {
    .vma-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 820px) {
    body:has(.vma-account-page) .fi-page {
        padding: var(--vm-space-4) !important;
    }

    .vma-page-head {
        align-items: stretch !important;
    }

    .vma-profile-banner,
    .vma-panel {
        padding: var(--vm-space-4) !important;
    }
}

@media (max-width: 540px) {
    .vma-page-head h1 {
        font-size: 22px !important;
        line-height: 30px !important;
    }

    .vma-menu-item {
        min-height: 3.5rem !important;
    }

    .vma-phone-field select {
        border-bottom-color: var(--vm-border) !important;
    }
}

.vma-avatar-input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.vma-upload-error {
    background: var(--vm-danger-soft);
    border-radius: 6px;
    color: var(--vm-danger);
    font-size: 0.6875rem;
    font-weight: 600;
    left: 50%;
    margin: var(--vm-space-2) 0 0;
    padding: var(--vm-space-1) var(--vm-space-2);
    position: absolute;
    text-align: center;
    top: 100%;
    transform: translateX(-50%);
    width: max-content;
    z-index: 2;
}

/* Empty, loading, validation, and disabled states */
.fi-ta-empty-state,
.fi-section-content-ctn:has(> .fi-no-notifications),
.fm-empty-state {
    color: var(--vm-text-secondary) !important;
    padding: var(--vm-space-8) !important;
    text-align: center;
}

.fi-loading-indicator {
    color: var(--vm-primary) !important;
}

.fi-fo-field-wrp-error-message {
    color: var(--vm-danger) !important;
    font-size: 0.75rem !important;
}

:where(button, a, input, select, textarea)[disabled],
[aria-disabled="true"] {
    cursor: not-allowed !important;
    opacity: 0.55 !important;
}

/* Dark mode remains available through the existing header control. */
html.vmx-dark {
    --vm-page: #0c1424;
    --vm-surface: #121d30;
    --vm-surface-subtle: #17243a;
    --vm-text: #edf3ff;
    --vm-text-secondary: #aab7cb;
    --vm-text-muted: #7f8da5;
    --vm-border: #25334a;
    --vm-border-strong: #34435c;
    --vm-control-border: #465873;
    --vm-control-border-hover: #60728c;
    --vm-primary-soft: #172d5b;
    --vm-success-text: #86efac;
    --vm-warning-text: #fcd34d;
    color-scheme: dark;
}

html.vmx-dark body,
html.vmx-dark .fi-body,
html.vmx-dark .fi-layout,
html.vmx-dark .fi-main-ctn,
html.vmx-dark .fi-topbar,
html.vmx-dark .fi-section,
html.vmx-dark .fi-ta-ctn,
html.vmx-dark .fi-ta-header,
html.vmx-dark .fi-ta-content,
html.vmx-dark .fi-ta-footer,
html.vmx-dark .fi-dropdown-panel,
html.vmx-dark .fi-modal-window {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border) !important;
    color: var(--vm-text) !important;
}

html.vmx-dark .fi-main-ctn,
html.vmx-dark .fi-main {
    background: var(--vm-page) !important;
}

html.vmx-dark :where(.fi-input-wrp, input, select, textarea) {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-border-strong) !important;
    color: var(--vm-text) !important;
}

@media (min-width: 1024px) {
    .fi-sidebar-open {
        width: var(--vm-sidebar-width) !important;
    }

    .fi-sidebar:not(.fi-sidebar-open) {
        width: var(--vm-sidebar-collapsed-width) !important;
    }

    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header {
        padding-inline: 0.65rem !important;
    }

    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item a,
    .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-button {
        justify-content: center !important;
        padding-inline: 0 !important;
    }

    .fi-sidebar:not(.fi-sidebar-open) .vm-sidebar-footer {
        padding-inline: 0.45rem !important;
    }
}

@media (max-width: 1440px) {
    .fi-main {
        padding: var(--vm-space-6) var(--vm-space-6) var(--vm-space-8) !important;
    }

    .vm-topbar-breadcrumb {
        display: none !important;
    }

    .vmx-topbar-search {
        flex-basis: 18rem !important;
        max-width: 22rem !important;
    }

    .vmx-location-select {
        max-width: 13rem !important;
        min-width: 9.5rem !important;
    }

    .vm-topbar-user-meta {
        max-width: 8.5rem !important;
        min-width: 6.5rem !important;
    }

    body:has(.vmx-dashboard) .fi-main,
    body:has(.vm-bookings-page) .fi-main,
    body:has(.vmc-page) .fi-main,
    body:has(.vm-job-cards) .fi-main,
    body:has(.vm-quotes-list) .fi-main,
    body:has(.vm-quote-page) .fi-main,
    body:has(.vm-inventory-page) .fi-main,
    body:has(.vma-account-page) .fi-main,
    body:has(.fm-page-shell) .fi-main {
        padding: var(--vm-space-6) var(--vm-space-6) var(--vm-space-8) !important;
    }
}

@media (max-width: 1180px) {
    .fi-topbar > nav {
        padding-inline: var(--vm-space-4) !important;
    }

    .vmx-topbar-search {
        display: none !important;
    }

    body:has(.vmx-dashboard) .vmx-topbar-search,
    body:has(.vm-bookings-page) .vmx-topbar-search,
    body:has(.vmc-page) .vmx-topbar-search,
    body:has(.vm-job-cards) .vmx-topbar-search,
    body:has(.vm-quotes-list) .vmx-topbar-search,
    body:has(.vm-quote-page) .vmx-topbar-search,
    body:has(.vm-inventory-page) .vmx-topbar-search,
    body:has(.vma-account-page) .vmx-topbar-search,
    body:has(.fm-page-shell) .vmx-topbar-search {
        display: none !important;
    }

    .vmx-location-select {
        flex: 1 1 auto !important;
        max-width: 15rem !important;
    }

    :where(.vmbk-stats, .vmi-stats, .vmx-kpi-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    :where(.vmi-chart-grid, .vmx-dashboard-grid, .vmq-layout) {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1023px) {
    .fi-sidebar {
        width: var(--vm-sidebar-width) !important;
    }

    .fi-main {
        padding: var(--vm-space-5) !important;
    }

    body:has(.vmx-dashboard) .fi-main,
    body:has(.vm-bookings-page) .fi-main,
    body:has(.vmc-page) .fi-main,
    body:has(.vm-job-cards) .fi-main,
    body:has(.vm-quotes-list) .fi-main,
    body:has(.vm-quote-page) .fi-main,
    body:has(.vm-inventory-page) .fi-main,
    body:has(.vma-account-page) .fi-main,
    body:has(.fm-page-shell) .fi-main {
        padding: var(--vm-space-5) !important;
    }

    .fi-topbar > nav {
        min-height: 4.5rem !important;
    }

    .vmx-topbar-icon:nth-of-type(2),
    .vmx-topbar-icon:nth-of-type(3) {
        display: none !important;
    }

    .vm-topbar-user-meta {
        display: none !important;
    }

    .fi-modal-window {
        max-width: calc(100vw - 1.5rem) !important;
        width: calc(100vw - 1.5rem) !important;
    }
}

@media (max-width: 834px) {
    .fi-main {
        padding: var(--vm-space-4) !important;
    }

    body:has(.vmx-dashboard) .fi-main,
    body:has(.vm-bookings-page) .fi-main,
    body:has(.vmc-page) .fi-main,
    body:has(.vm-job-cards) .fi-main,
    body:has(.vm-quotes-list) .fi-main,
    body:has(.vm-quote-page) .fi-main,
    body:has(.vm-inventory-page) .fi-main,
    body:has(.vma-account-page) .fi-main,
    body:has(.fm-page-shell) .fi-main {
        padding: var(--vm-space-4) !important;
    }

    .fi-page {
        gap: var(--vm-space-4) !important;
    }

    .fi-header {
        align-items: stretch;
        flex-direction: column;
    }

    .fi-header-actions {
        align-self: stretch;
        flex-wrap: wrap;
    }

    :where(
        .vmbk-hero,
        .vmc-page-head,
        .vmj-page-head,
        .vmql-page-head,
        .vmq-header,
        .vmi-hero,
        .vma-page-head
    ) {
        align-items: stretch !important;
        display: flex !important;
        flex-direction: column !important;
    }

    :where(
        .vmbk-head-actions,
        .vmj-head-actions,
        .vmql-head-actions,
        .vmq-actions,
        .vmi-head-actions
    ) {
        align-self: stretch !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)) !important;
        width: 100% !important;
    }

    :where(
        .vmbk-head-actions > *,
        .vmj-head-actions > *,
        .vmql-head-actions > *,
        .vmq-actions > *,
        .vmi-head-actions > *
    ) {
        justify-content: center !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    :where(.vmbk-stats, .vmi-stats, .vmx-kpi-grid, .vmql-metrics) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .vma-layout,
    .vma-form-grid,
    .vma-settings-card {
        grid-template-columns: 1fr !important;
    }

    .vma-settings-card {
        position: static !important;
    }

    .fi-ta-header {
        align-items: stretch !important;
    }

    .fi-ta-header-toolbar {
        align-items: stretch !important;
        flex-direction: column !important;
    }
}

@media (max-width: 640px) {
    .fi-main {
        padding: var(--vm-space-3) !important;
    }

    body:has(.vmx-dashboard) .fi-main,
    body:has(.vm-bookings-page) .fi-main,
    body:has(.vmc-page) .fi-main,
    body:has(.vm-job-cards) .fi-main,
    body:has(.vm-quotes-list) .fi-main,
    body:has(.vm-quote-page) .fi-main,
    body:has(.vm-inventory-page) .fi-main,
    body:has(.vma-account-page) .fi-main,
    body:has(.fm-page-shell) .fi-main {
        padding: var(--vm-space-3) !important;
    }

    .fi-topbar > nav {
        gap: var(--vm-space-2) !important;
        padding-inline: var(--vm-space-3) !important;
    }

    .vmx-location-select {
        max-width: none !important;
        min-width: 0 !important;
    }

    .vmx-location-select span {
        display: none !important;
    }

    .vmx-topbar-icon:nth-of-type(n+2) {
        display: none !important;
    }

    .fi-header-heading,
    :where(
        .vmx-hero h1,
        .vmbk-hero h1,
        .vmc-page-head h1,
        .vmj-page-head h1,
        .vmql-page-head h1,
        .vmq-title-row h1,
        .vmi-hero h1,
        .vma-page-head h1,
        .fm-dashboard-hero h1
    ) {
        font-size: 1.5rem !important;
    }

    :where(.vmbk-stats, .vmi-stats, .vmx-kpi-grid, .vmql-metrics) {
        grid-template-columns: 1fr !important;
    }

    :where(
        .vmbk-head-actions,
        .vmj-head-actions,
        .vmql-head-actions,
        .vmq-actions,
        .vmi-head-actions
    ) {
        grid-template-columns: 1fr !important;
    }

    .fi-modal-window {
        border-radius: var(--vm-radius-control) !important;
        max-height: calc(100dvh - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
        width: calc(100vw - 1rem) !important;
    }

    .fi-modal-header,
    .fi-modal-content,
    .fi-modal-footer {
        padding-inline: var(--vm-space-4) !important;
    }

    .vma-security-row {
        grid-template-columns: auto minmax(0, 1fr) !important;
    }
}

/*
 * Authoritative typography layer
 *
 * Legacy feature styles remain in place for layout and behavior. These rules
 * provide one semantic type and color system across both panels and every
 * custom portal page.
 */
html,
body,
.fi-body,
.fi-layout,
.vm-login-page,
button,
input,
optgroup,
select,
textarea {
    font-family: var(--vm-font-family) !important;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body,
.fi-body,
.fi-layout {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

button,
input,
optgroup,
select,
textarea {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

:where(
    .vmx-dashboard,
    .vm-business-profiles,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list,
    .vm-quote-page,
    .vm-inventory-page,
    .vma-account-page,
    .fm-page-shell,
    .vmin-page,
    .vm-login-page
) {
    color: var(--vm-text);
    font-family: var(--vm-font-family) !important;
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-body);
}

:where(
    .vmx-dashboard,
    .vm-business-profiles,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list,
    .vm-quote-page,
    .vm-inventory-page,
    .vma-account-page,
    .fm-page-shell,
    .vmin-page,
    .vm-login-page
) :where(h1, h2, h3, h4, p, span, a, button, label, th, td) {
    letter-spacing: 0 !important;
}

.vm-type-display {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-display) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-display) !important;
}

.vm-type-page-title {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-page-title) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-page-title) !important;
}

.vm-type-section-title {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

.vm-type-subsection-title {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-subsection) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-subsection) !important;
}

.vm-type-card-title {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
}

.vm-type-body {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

.vm-type-supporting {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vm-type-meta {
    color: var(--vm-text-muted) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vm-type-label {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

/* Page headings */
.vmx-hero h1 {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-display) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-display) !important;
}

:where(
    .fi-header-heading,
    .vmb-page-heading h1,
    .vmbk-hero h1,
    .vmc-page-head h1,
    .vmj-page-head h1,
    .vmql-page-head h1,
    .vmq-title-row h1,
    .vmi-hero h1,
    .vma-page-head h1,
    .fm-dashboard-hero h1,
    .vmin-page-header h1,
    .vmin-category-header h1,
    .vmin-connect-header h1,
    .vmin-details-provider h1
) {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-page-title) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-page-title) !important;
}

:where(
    .fi-header-subheading,
    .vmx-hero > div > p,
    .vmb-page-heading > p,
    .vmbk-hero > div > p,
    .vmc-page-head > div > p,
    .vmj-page-head > div > p,
    .vmql-page-head > div > p,
    .vmi-hero > div > p,
    .vma-page-head > div > p,
    .fm-dashboard-hero > div > p,
    .vmin-page-header > div > p,
    .vmin-category-header > div > p,
    .vmin-connect-header > div > p
) {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

/* Section and card hierarchy */
:where(
    .vmx-card-header h2,
    .vmi-card-head h2,
    .vmin-section-heading h2,
    .vmin-panel-heading h2,
    .vmq-section-head h2,
    .vmq-side-card h2,
    .vma-section-title,
    .fm-section-title,
    .fi-modal-heading
) {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

:where(
    .fi-section-header-heading,
    .fi-ta-header-heading,
    .fm-card-title,
    .vmin-provider-title-row h3,
    .vmb-stat-copy h3,
    .vmbk-stat-copy h3,
    .vmi-stat-copy h3,
    .vmx-kpi-label,
    .vmq-side-card h3
) {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
    text-transform: none !important;
}

:where(
    .fi-section-header-description,
    .fi-ta-header-description,
    .fm-card-subtitle,
    .vmin-provider-description,
    .vmin-section-heading p,
    .vmin-panel-heading p
) {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

/* Navigation and application header */
.fi-sidebar-group-label {
    font-size: 11px !important;
    font-weight: var(--vm-weight-semibold) !important;
    letter-spacing: 0.04em !important;
    line-height: 16px !important;
}

.fi-sidebar-item a,
.fi-sidebar-item-button {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.fi-sidebar-item.fi-active a,
.fi-sidebar-item.fi-active .fi-sidebar-item-button {
    font-weight: var(--vm-weight-semibold) !important;
}

.fi-sidebar-sub-group-items .fi-sidebar-item a {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vm-brand-name {
    font-size: 15px !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
}

.fi-sidebar .fi-badge,
.fi-sidebar-item-badge {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 16px !important;
}

.vm-help-card strong {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
}

.vm-help-card p {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vmx-topbar-search input,
.vmx-location-select,
.vm-topbar-breadcrumb,
.fi-topbar .fi-dropdown-list-item-label {
    font-size: var(--vm-font-size-body) !important;
    line-height: 20px !important;
}

.vmx-topbar-search input,
.vm-topbar-breadcrumb {
    font-weight: var(--vm-weight-regular) !important;
}

.vmx-location-select,
.fi-topbar .fi-dropdown-list-item-label {
    font-weight: var(--vm-weight-medium) !important;
}

.vm-topbar-user-name {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
}

.vm-topbar-user-role,
.vmx-topbar-search > span {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vm-topbar-user-meta strong {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
}

.vm-topbar-user-meta span {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

/* Controls and forms */
button,
[role="button"],
a[class*="-button"],
a[class*="-action"],
summary[class*="-button"] {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.fi-btn,
.vmin-button,
:where(
    .vmx-dashboard,
    .vm-business-profiles,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list,
    .vm-quote-page,
    .vm-inventory-page,
    .vma-account-page,
    .fm-page-shell,
    .vmin-page,
    .vm-login-page
) :where(button, a[class*="button"], a[class*="action"]) {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.fi-btn:not(.fi-icon-btn),
.vmin-button {
    min-height: 40px !important;
}

.fi-btn-size-sm:not(.fi-icon-btn),
.fi-btn-size-xs:not(.fi-icon-btn) {
    font-size: var(--vm-font-size-supporting) !important;
    line-height: var(--vm-line-height-meta) !important;
    min-height: 34px !important;
}

.fi-fo-field-wrp-label,
.fi-fo-field-wrp-label span,
:where(
    .vmx-dashboard,
    .vm-business-profiles,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list,
    .vm-quote-page,
    .vm-inventory-page,
    .vma-account-page,
    .fm-page-shell,
    .vmin-page,
    .vm-login-page
) label {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.fi-input,
.fi-select-input,
.fi-fo-textarea,
:where(
    .vmx-dashboard,
    .vm-business-profiles,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list,
    .vm-quote-page,
    .vm-inventory-page,
    .vma-account-page,
    .fm-page-shell,
    .vmin-page,
    .vm-login-page
) :where(input, select, textarea) {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

:where(input, textarea)::placeholder {
    color: var(--vm-text-muted) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    opacity: 1;
}

.filepond--root,
.choices,
.choices__inner,
.choices__input,
.choices__item,
.fi-fo-file-upload {
    font-family: var(--vm-font-family) !important;
}

.choices__inner,
.choices__input,
.choices__item {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

.filepond--drop-label label,
.filepond--file-info-main,
.filepond--file-status-main {
    font-family: var(--vm-font-family) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.filepond--file-info-sub,
.filepond--file-status-sub {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

:where(.fi-fo-field-wrp-helper-text, .fi-fo-field-wrp-hint, .fi-fo-field-wrp-error-message) {
    font-size: var(--vm-font-size-meta) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.fi-fo-field-wrp-helper-text,
.fi-fo-field-wrp-hint {
    color: var(--vm-text-secondary) !important;
    font-weight: var(--vm-weight-regular) !important;
}

.fi-fo-field-wrp-error-message {
    color: var(--vm-danger) !important;
    font-weight: var(--vm-weight-medium) !important;
}

/* Tables, tabs, menus, and statuses */
.fi-ta-header-cell,
:where(
    .vmx-dashboard,
    .vm-business-profiles,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list,
    .vm-quote-page,
    .vm-inventory-page,
    .vma-account-page,
    .fm-page-shell,
    .vmin-page
) table thead th {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-semibold) !important;
    letter-spacing: 0 !important;
    line-height: var(--vm-line-height-meta) !important;
    text-transform: none !important;
}

.fi-ta-cell,
.fi-ta-text,
:where(
    .vmx-dashboard,
    .vm-business-profiles,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list,
    .vm-quote-page,
    .vm-inventory-page,
    .vma-account-page,
    .fm-page-shell,
    .vmin-page
) table tbody td {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: 20px !important;
}

:where(.fi-ta-cell, table tbody td) :where(strong, b, a) {
    font-weight: var(--vm-weight-medium) !important;
}

:where(.fi-pagination, .fi-ta-footer) :where(button, a, select, span) {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

:where(
    .fi-badge,
    .fm-pill,
    .vmb-pill,
    .vmbk-pill,
    .vmj-pill,
    .vmql-pill,
    .vmq-pill,
    .vmi-pill,
    .vmx-badge,
    .vma-status-pill,
    .vmin-badge
) {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-medium) !important;
    letter-spacing: 0 !important;
    line-height: 16px !important;
    text-transform: none !important;
}

:where(.fi-tabs-item, [role="tab"], .vmin-tab) {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

:where(.fi-tabs-item.fi-active, .fi-tabs-item[aria-selected="true"], [role="tab"][aria-selected="true"], .vmin-tab.is-active) {
    font-weight: var(--vm-weight-semibold) !important;
}

.fi-dropdown-list-item-label,
.fi-dropdown-header-label {
    font-size: var(--vm-font-size-body) !important;
    line-height: 20px !important;
}

.fi-dropdown-list-item-label {
    font-weight: var(--vm-weight-medium) !important;
}

.fi-dropdown-header-label {
    font-weight: var(--vm-weight-semibold) !important;
}

.fi-modal-description,
.fi-modal-content {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

:where(.fi-no-notification-title, .fi-ta-empty-state-heading, .fi-section-empty-state-heading) {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

:where(.fi-no-notification-body, .fi-ta-empty-state-description, .fi-section-empty-state-description) {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

/* Authentication and settings-specific shared typography */
.vm-login-brand h1,
.vm-login-heading h2 {
    font-size: var(--vm-font-size-display) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-display) !important;
}

.vm-login-heading p {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

.vm-login-input-wrap input {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

.vm-login-submit {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.vm-login-feature strong {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
}

.vm-login-feature p {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.fm-security-status,
.fm-package-description {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-body);
    margin-top: var(--vm-space-2);
}

.fm-package-description {
    margin-top: var(--vm-space-4);
}

.fm-package-feature-section {
    margin-top: var(--vm-space-5);
}

.fm-security-setup {
    background: var(--vm-primary-soft);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    margin-top: var(--vm-space-4);
    padding: var(--vm-space-4);
}

.fm-security-heading {
    color: var(--vm-primary-hover);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-supporting);
}

.fm-security-heading-spaced {
    margin-top: var(--vm-space-4);
}

.fm-security-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-regular);
    line-height: 20px;
    overflow-wrap: anywhere;
}

.fm-security-url {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.fm-security-verify-row {
    display: flex;
    gap: var(--vm-space-3);
    margin-top: var(--vm-space-4);
}

.fm-security-code-input {
    background: var(--vm-surface);
    border: 1px solid var(--vm-border-strong);
    border-radius: var(--vm-radius-control);
    flex: 1;
    min-height: 40px;
    min-width: 0;
    padding: 0 var(--vm-space-3);
}

/* Shared resource, settings, and modal form surfaces */
.fi-fo-component-ctn {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.fi-section:has(.fi-fo-field-wrp) {
    overflow: visible !important;
}

.fi-section:has(.fi-fo-field-wrp):focus-within,
.fi-modal-window:has(.choices.is-open),
.fi-dropdown-panel:has(.choices.is-open) {
    position: relative;
    z-index: 30;
}

.fi-section:has(.choices.is-open),
.fi-modal-window:has(.choices.is-open),
.fi-dropdown-panel:has(.choices.is-open) {
    overflow: visible !important;
}

.fi-fo-field-wrp,
.fi-fo-field-wrp > div,
.fi-fo-field-wrp .fi-input-wrp,
.fi-fo-field-wrp .choices {
    min-width: 0;
    overflow: visible !important;
}

.fi-fo-field-wrp > .grid {
    gap: var(--vm-space-2) !important;
}

.fi-fo-field-wrp .fi-fo-field-wrp-label {
    padding-inline: 1px;
}

.fi-fo-field-wrp .fi-input-wrp {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-control-border) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: 0 1px 2px rgba(15, 31, 61, 0.04) !important;
    min-height: 42px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.fi-fo-field-wrp .fi-input-wrp:not(.fi-disabled):not(.fi-invalid):hover {
    border-color: var(--vm-control-border-hover) !important;
}

.fi-fo-field-wrp .fi-input-wrp:not(.fi-invalid):focus-within {
    border-color: var(--vm-primary) !important;
    box-shadow: 0 0 0 3px rgba(36, 107, 253, 0.14) !important;
}

.fi-fo-field-wrp .fi-input-wrp.fi-invalid {
    border-color: var(--vm-danger) !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.08) !important;
}

.fi-fo-field-wrp .fi-input-wrp.fi-invalid:focus-within {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14) !important;
}

.fi-fo-field-wrp .fi-input-wrp.fi-disabled,
.fi-fo-field-wrp .fi-input-wrp:has(:disabled) {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-border) !important;
    box-shadow: none !important;
}

.fi-fo-field-wrp .fi-input,
.fi-fo-field-wrp .fi-select-input,
.fi-fo-field-wrp .fi-fo-textarea,
.fi-fo-field-wrp .choices__input {
    outline: none !important;
}

.fi-fo-date-time-picker-display-text-input {
    color: var(--vm-text) !important;
    -webkit-text-fill-color: var(--vm-text) !important;
    opacity: 1 !important;
}

.fi-fo-date-time-picker-display-text-input::placeholder {
    color: var(--vm-text-muted) !important;
    -webkit-text-fill-color: var(--vm-text-muted) !important;
    opacity: 1 !important;
}

.fi-fo-date-time-picker-display-text-input:disabled {
    color: var(--vm-text-secondary) !important;
    -webkit-text-fill-color: var(--vm-text-secondary) !important;
}

.fi-fo-date-time-picker > button {
    color: var(--vm-text) !important;
    text-align: left;
}

.fi-input[type="date"] {
    color: var(--vm-text) !important;
    color-scheme: light;
    -webkit-text-fill-color: var(--vm-text) !important;
}

.fi-input[type="date"]::-webkit-datetime-edit,
.fi-input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    color: var(--vm-text) !important;
    -webkit-text-fill-color: var(--vm-text) !important;
}

.fi-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.72;
}

.fi-fo-field-wrp .choices__inner {
    align-items: center;
    display: flex;
    min-height: 40px;
    padding-block: var(--vm-space-2);
}

.fi-fo-field-wrp .choices__list--dropdown,
.fi-fo-field-wrp .choices__list[aria-expanded] {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border-strong) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: var(--vm-shadow-menu) !important;
    margin-top: var(--vm-space-2) !important;
    overflow: hidden !important;
    z-index: 60 !important;
}

.fi-fo-field-wrp .choices__list--dropdown .choices__input,
.fi-fo-field-wrp .choices__list[aria-expanded] .choices__input {
    background: var(--vm-surface) !important;
    border-bottom: 1px solid var(--vm-border) !important;
    color: var(--vm-text) !important;
    padding: var(--vm-space-3) !important;
}

.fi-fo-field-wrp .choices__list--dropdown .choices__list,
.fi-fo-field-wrp .choices__list[aria-expanded] .choices__list {
    max-height: 15rem;
    padding: var(--vm-space-1);
}

.fi-fo-field-wrp .choices__item--choice {
    border-radius: 6px;
    color: var(--vm-text) !important;
    line-height: var(--vm-line-height-body);
    padding: var(--vm-space-2) var(--vm-space-3) !important;
}

.fi-fo-field-wrp .choices__item--choice.is-highlighted,
.fi-fo-field-wrp .choices__item--choice[aria-selected="true"] {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.fi-fo-field-wrp .fi-input-wrp-prefix,
.fi-fo-field-wrp .fi-input-wrp-suffix {
    color: var(--vm-text-secondary) !important;
}

/* Customer vehicle create, edit, and detail surfaces */
.vmcv-form {
    counter-reset: vmcv-section;
    min-width: 0;
}

.vmcv-form > .grid {
    gap: var(--vm-space-4);
}

.vmcv-section {
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-card) !important;
    box-shadow: var(--vm-shadow-card) !important;
    counter-increment: vmcv-section;
    min-width: 0;
    overflow: visible !important;
}

.vmcv-section:focus-within {
    position: relative;
    z-index: 20;
}

.vmcv-section .fi-section-header {
    align-items: flex-start;
    gap: var(--vm-space-3);
    padding: var(--vm-space-4) var(--vm-space-5) var(--vm-space-3);
}

.vmcv-section .fi-section-header-icon {
    color: var(--vm-primary);
    height: 20px;
    margin-top: 2px;
    width: 20px;
}

.vmcv-form .vmcv-section .fi-section-header-heading {
    align-items: center;
    color: var(--vm-text-primary);
    display: flex;
    flex-wrap: wrap;
    font-size: var(--vm-font-size-section);
    font-weight: var(--vm-weight-semibold);
    gap: var(--vm-space-2);
    line-height: var(--vm-line-height-section);
}

.vmcv-form .vmcv-section .fi-section-header-heading::before {
    align-items: center;
    background: var(--vm-primary);
    border-radius: 6px;
    color: #ffffff;
    content: counter(vmcv-section);
    display: inline-flex;
    flex: 0 0 22px;
    font-size: 12px;
    font-weight: var(--vm-weight-semibold);
    height: 22px;
    justify-content: center;
    line-height: 1;
}

.vmcv-section-optional .fi-section-header-heading::after,
.vmcv-section-secure .fi-section-header-heading::after {
    border-radius: 999px;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    line-height: 18px;
    margin-left: auto;
    padding: 2px var(--vm-space-2);
}

.vmcv-section-optional .fi-section-header-heading::after {
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
    content: "Optional";
}

.vmcv-section-secure .fi-section-header-heading::after {
    background: #fff7e8;
    color: #b54708;
    content: "Restricted";
}

.vmcv-section .fi-section-header-description {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-supporting);
    margin-top: 2px;
}

.vmcv-section .fi-section-content {
    padding: var(--vm-space-4) var(--vm-space-5) var(--vm-space-5);
}

.vmcv-section .fi-input,
.vmcv-section .fi-select-input,
.vmcv-section textarea {
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-body);
}

.vmcv-section .fi-fo-field-wrp-label {
    color: var(--vm-text-primary);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
}

.vmcv-section .fi-fo-field-wrp-helper-text,
.vmcv-section .fi-fo-field-wrp-hint {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-meta);
}

.vmcv-info-note {
    background: var(--vm-primary-soft);
    border: 1px solid #cfe0ff;
    border-radius: var(--vm-radius-control);
    color: var(--vm-text-secondary);
    padding: var(--vm-space-3);
}

.vmcv-info-note .fi-fo-placeholder {
    font-size: var(--vm-font-size-supporting);
    line-height: var(--vm-line-height-supporting);
}

.vmcv-workshop-notes textarea {
    min-height: 130px;
    resize: vertical;
}

.fi-resource-customer-vehicles.fi-resource-create-record-page,
.fi-resource-customer-vehicles.fi-resource-edit-record-page,
.fi-resource-customer-vehicles.fi-resource-view-record-page {
    min-width: 0;
}

.fi-resource-customer-vehicles .fi-form-actions {
    background: rgb(255 255 255 / 96%);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    bottom: var(--vm-space-2);
    box-shadow: var(--vm-shadow-dropdown);
    justify-content: flex-end;
    padding: var(--vm-space-3) var(--vm-space-4);
    position: sticky;
    z-index: 20;
}

.fi-resource-customer-vehicles .fi-btn-color-gray.fi-ac-btn-action {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border-strong) !important;
    color: var(--vm-text-primary) !important;
}

.fi-resource-customer-vehicles .fi-btn-color-gray.fi-ac-btn-action:hover,
.fi-resource-customer-vehicles .fi-btn-color-gray.fi-ac-btn-action:focus-visible {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-primary) !important;
    color: var(--vm-primary-hover) !important;
}

/* Business, inventory, services, staff, quotes, jobs, calendar, and bookings */
body:has(.vm-business-profiles) .fi-main {
    background: transparent !important;
    overflow-x: clip !important;
    padding: var(--vm-space-8) var(--vm-space-8) var(--vm-space-10) !important;
}

body:has(.vm-business-profiles) .fi-page {
    background: transparent !important;
    margin-inline: auto !important;
    max-width: 96rem !important;
    min-width: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

body:has(.vm-business-profiles) .fi-page-content {
    max-width: 100% !important;
    min-width: 0 !important;
}

:where(
    .vm-business-profiles,
    .vm-inventory-page,
    .vm-bookings-page,
    .vmc-page,
    .vm-job-cards,
    .vm-quotes-list
) {
    display: grid;
    gap: var(--vm-space-5) !important;
    min-width: 0;
}

:where(
    .vmb-page-heading,
    .vmi-hero,
    .vmbk-hero,
    .vmc-page-head,
    .vmj-page-head,
    .vmql-page-head
) {
    align-items: flex-start !important;
    display: flex;
    gap: var(--vm-space-4) !important;
    justify-content: space-between;
    margin: 0 !important;
    min-width: 0;
}

:where(
    .vmb-page-heading,
    .vmi-hero,
    .vmbk-hero,
    .vmc-page-head,
    .vmj-page-head,
    .vmql-page-head
) > div:first-child {
    min-width: 0;
}

:where(
    .vmb-page-heading h1,
    .vmi-hero h1,
    .vmbk-hero h1,
    .vmc-page-head h1,
    .vmj-page-head h1,
    .vmql-page-head h1
) {
    margin: 0 !important;
}

:where(
    .vmb-page-heading p,
    .vmi-hero p,
    .vmbk-hero p,
    .vmc-page-head p,
    .vmj-page-head p,
    .vmql-page-head p
) {
    margin: var(--vm-space-1) 0 0 !important;
    max-width: 46rem;
}

:where(.vmi-head-actions, .vmbk-head-actions, .vmj-head-actions, .vmql-head-actions) {
    align-items: center !important;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: var(--vm-space-2) !important;
    justify-content: flex-end;
}

:where(
    .vmb-filter-button,
    .vmb-add-button,
    .vmi-button,
    .vmbk-button,
    .vmc-new-booking,
    .vmc-filter-button,
    .vmc-today,
    .vmc-icon-button,
    .vmj-button,
    .vmj-row-button,
    .vmql-button,
    .vmql-row-button,
    .vmbk-view-button
) {
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
    min-height: 40px !important;
    transform: none !important;
}

:where(.vmb-add-button, .vmi-button-primary, .vmbk-button-primary, .vmc-new-booking, .vmj-button-primary, .vmql-button-primary) {
    background: var(--vm-primary) !important;
    border-color: var(--vm-primary) !important;
    color: #ffffff !important;
}

:where(.vmb-add-button, .vmi-button-primary, .vmbk-button-primary, .vmc-new-booking, .vmj-button-primary, .vmql-button-primary):hover {
    background: var(--vm-primary-hover) !important;
    border-color: var(--vm-primary-hover) !important;
}

:where(.vmb-filter-button, .vmi-button-light, .vmbk-button-light, .vmc-filter-button, .vmc-today, .vmc-icon-button, .vmj-button-light, .vmql-button-light, .vmbk-view-button) {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border-strong) !important;
    color: var(--vm-text) !important;
}

:where(
    .vmb-stat-card,
    .vmb-table-card,
    .vmi-stat-card,
    .vmi-chart-card,
    .vmi-table-card,
    .vmi-item-card,
    .vmbk-stat-card,
    .vmbk-table-card,
    .vmc-calendar-card,
    .vmc-stats,
    .vmj-card,
    .vmj-empty,
    .vmql-metric,
    .vmql-panel,
    .vmql-card
) {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-card) !important;
    box-shadow: var(--vm-shadow-card) !important;
    min-width: 0;
}

:where(.vmb-stats, .vmi-stats, .vmbk-stats, .vmql-metrics) {
    display: grid;
    gap: var(--vm-space-4) !important;
    min-width: 0;
}

.vmb-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.vmi-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.vmbk-stats,
.vmql-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

:where(.vmb-stat-card, .vmi-stat-card, .vmbk-stat-card, .vmql-metric) {
    min-height: 7.25rem !important;
    padding: var(--vm-space-5) !important;
}

:where(
    .vmb-stat-copy > span,
    .vmi-stat-card > div > span,
    .vmbk-stat-card > div > span,
    .vmql-metric small
) {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

:where(.vmb-stat-copy > strong, .vmi-stat-card > div > strong, .vmbk-stat-card > div > strong, .vmql-metric > strong) {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-page-title) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-page-title) !important;
}

:where(.vmb-stat-copy small, .vmi-trend, .vmbk-trend, .vmql-metric em) {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

:where(.vmi-card-head h2, .vmc-timeline-group h2) {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

:where(
    .vmb-search,
    .vmb-select,
    .vmi-search,
    .vmi-select,
    .vmbk-search,
    .vmbk-date-button,
    .vmc-staff-filter,
    .vmc-select-filter,
    .vmc-search,
    .vmc-date-range,
    .vmj-search-input,
    .vmql-search,
    .vmql-toolbar select
) {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-control-border) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    min-height: 42px !important;
}

:where(
    .vmb-search,
    .vmb-select,
    .vmi-search,
    .vmi-select,
    .vmbk-search,
    .vmc-staff-filter,
    .vmc-select-filter,
    .vmc-search,
    .vmj-search-input,
    .vmql-search
):focus-within {
    border-color: #9bbcff !important;
    box-shadow: 0 0 0 3px rgba(36, 107, 253, 0.12) !important;
}

:where(.vmb-toolbar, .vmi-toolbar, .vmbk-toolbar, .vmc-filters, .vmql-toolbar) {
    gap: var(--vm-space-3) !important;
}

:where(.vmb-table-wrap, .vmi-table-scroll, .vmbk-table-scroll) {
    max-width: 100%;
    overscroll-behavior-inline: contain;
}

:where(.vmi-table-scroll, .vmbk-table-scroll) {
    overflow-x: auto !important;
}

:where(.vmb-table, .vmi-table, .vmbk-table) tbody tr {
    transition: background-color var(--vm-motion);
}

:where(.vmb-table, .vmi-table, .vmbk-table) tbody tr:hover {
    background: #f8faff !important;
}

:where(.vmb-action-panel, .vmi-row-menu > div, .vmbk-row-menu > div, .vmj-more > div, .vmql-more > div) {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: var(--vm-shadow-menu) !important;
    max-height: min(28rem, calc(100vh - 2rem));
    overflow-y: auto;
    z-index: 60 !important;
}

/* Inventory row actions live in the page overlay layer so table scrolling cannot clip them. */
.vmi-row-menu-trigger,
.vmbk-row-menu-trigger {
    align-items: center;
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-control) !important;
    color: var(--vm-text-secondary) !important;
    cursor: pointer;
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    padding: 0 !important;
    width: 2.25rem;
}

.vmi-row-menu-trigger:hover,
.vmi-row-menu-trigger:focus-visible,
.vmbk-row-menu-trigger:hover,
.vmbk-row-menu-trigger:focus-visible {
    background: var(--vm-primary-soft) !important;
    border-color: #b9cffd !important;
    color: var(--vm-primary) !important;
}

.vmi-row-menu-panel,
.vmbk-row-menu-panel {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: var(--vm-shadow-menu) !important;
    display: grid;
    gap: 2px;
    max-height: min(28rem, calc(100vh - 1rem));
    overflow-y: auto;
    padding: 6px;
    width: 13rem;
    z-index: 1000 !important;
}

.vmi-row-menu-panel[x-cloak],
.vmbk-row-menu-panel[x-cloak] {
    display: none !important;
}

:is(.vmi-row-menu-panel, .vmbk-row-menu-panel) :is(a, button) {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: var(--vm-text) !important;
    cursor: pointer;
    display: flex;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    min-height: 2.25rem;
    padding: var(--vm-space-2) var(--vm-space-3) !important;
    text-align: left;
    text-decoration: none !important;
}

:is(.vmi-row-menu-panel, .vmbk-row-menu-panel) :is(a, button):hover,
:is(.vmi-row-menu-panel, .vmbk-row-menu-panel) :is(a, button):focus-visible {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.vmi-row-menu-panel button.is-danger {
    color: var(--vm-danger) !important;
}

.vmbk-row-menu-panel button.is-danger {
    color: var(--vm-danger) !important;
}

.vmbk-row-menu-panel .vmbk-menu-item {
    box-shadow: none !important;
    gap: var(--vm-space-2);
    justify-content: flex-start;
    width: 100%;
}

.vmbk-row-menu-panel .vmbk-menu-item .vmbk-icon {
    flex: 0 0 auto;
    height: 1rem;
    width: 1rem;
}

/* Keep Booking accents aligned with the portal's blue theme. */
body:has(.vm-bookings-page) .vmbk-tone-teal,
body:has(.vm-bookings-page) .vmbk-pill-teal,
body:has(.vm-bookings-page) .vmbk-pill-green,
body:has(.vm-bookings-page) .vmbk-tab-green strong {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

body:has(.vm-bookings-page) .vmbk-trend-up {
    color: var(--vm-primary) !important;
}

body:has(.vm-bookings-page) .vmbk-tech-cell > span {
    background: var(--vm-primary-soft) !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--vm-primary-hover) !important;
}

body:has(.vm-bookings-page) .vmbk-table-card {
    overflow: hidden !important;
}

body:has(.vm-bookings-page) .vmbk-table-scroll {
    overflow-x: auto !important;
    scrollbar-color: #b9cffd #eef4ff;
    scrollbar-width: thin;
}

body:has(.vm-bookings-page) .vmbk-table {
    min-width: 76rem !important;
    table-layout: auto !important;
}

body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(1),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(2),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(3),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(4),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(5),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(8),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(9),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(10) {
    width: auto !important;
}

body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(1) {
    min-width: 8rem;
}

body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(2),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(3),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(4),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(5) {
    min-width: 9rem;
}

body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(8),
body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(9) {
    min-width: 7.75rem;
}

body:has(.vm-bookings-page) .vmbk-table :is(th, td):nth-child(10) {
    min-width: 7.5rem;
}

body:has(.vm-bookings-page) .vmbk-id-cell > strong {
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

body:has(.vm-bookings-page) .vmbk-date-cell small {
    color: var(--vm-text-muted);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
}

.vmbk-recycle-note {
    align-items: flex-start;
    background: var(--vm-primary-soft);
    border: 1px solid #cfe0ff;
    border-radius: var(--vm-radius-card);
    color: var(--vm-text);
    display: flex;
    gap: var(--vm-space-3);
    padding: var(--vm-space-4);
}

.vmbk-recycle-note > span {
    align-items: center;
    background: var(--vm-surface);
    border-radius: var(--vm-radius-control);
    color: var(--vm-primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.vmbk-recycle-note .vmbk-icon,
.vmbk-restore-button .vmbk-icon {
    height: 1.1rem;
    width: 1.1rem;
}

.vmbk-recycle-note strong {
    display: block;
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-semibold);
}

.vmbk-recycle-note p {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-supporting);
    margin: var(--vm-space-1) 0 0;
}

.vmbk-deleted-heading {
    align-items: center;
    border-bottom: 1px solid var(--vm-border);
    display: flex;
    gap: var(--vm-space-2);
    min-height: 3.75rem;
    padding: 0 var(--vm-space-5);
}

.vmbk-deleted-heading strong {
    color: var(--vm-text);
    font-size: var(--vm-font-size-subsection);
    font-weight: var(--vm-weight-semibold);
}

.vmbk-deleted-heading span {
    align-items: center;
    background: var(--vm-primary-soft);
    border-radius: 999px;
    color: var(--vm-primary-hover);
    display: inline-flex;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    height: 1.5rem;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0 var(--vm-space-2);
}

.vmbk-restore-button {
    align-items: center;
    background: var(--vm-surface);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    color: var(--vm-primary);
    cursor: pointer;
    display: inline-flex;
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-medium);
    gap: var(--vm-space-2);
    min-height: 2.5rem;
    padding: 0 var(--vm-space-3);
}

.vmbk-restore-button:hover,
.vmbk-restore-button:focus-visible {
    background: var(--vm-primary-soft);
    border-color: #b9cffd;
    color: var(--vm-primary-hover);
}

@container (max-width: 1180px) {
    .vmbk-head-actions {
        flex-wrap: wrap !important;
    }
}

@container (max-width: 980px) {
    body:has(.vm-bookings-page) .vmbk-table {
        min-width: 0 !important;
    }
}

/* Keep charts contained and calendar events readable without growing the page. */
.vmi-chart-grid,
.vmi-chart-card,
.vmi-line-chart {
    min-width: 0;
}

.vmi-chart-card,
.vmi-line-chart {
    overflow: hidden !important;
}

.vmi-line-chart svg {
    display: block;
    max-height: calc(100% - 2.2rem) !important;
    max-width: calc(100% - 3.7rem) !important;
}

.vmi-axis-x span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmc-calendar-card {
    overflow: hidden !important;
}

.vmc-schedule-shell {
    max-height: min(70vh, 41rem);
    overflow: auto !important;
    overscroll-behavior: contain;
}

.vmc-event {
    background: var(--vm-info-soft) !important;
    border-color: #8cb8f3 !important;
    color: #1c61bd !important;
}

.vmc-event strong,
.vmc-event em,
.vmc-event small {
    font-weight: var(--vm-weight-medium) !important;
    letter-spacing: 0 !important;
}

.vmc-event strong {
    font-size: 11px !important;
    line-height: 14px !important;
}

.vmc-event em,
.vmc-event small {
    font-size: 10px !important;
    line-height: 12px !important;
}

/* Standard Filament resource tables used by Staff and Services. */
body:has(.vms-staff-person) .fi-ta-ctn {
    overflow: hidden !important;
}

body:has(.vms-staff-person) .fi-ta-content {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scrollbar-color: #b9cffd #f2f6ff !important;
    scrollbar-width: thin;
}

body:has(.vms-staff-person) .fi-ta-content::-webkit-scrollbar {
    height: 8px;
}

body:has(.vms-staff-person) .fi-ta-content::-webkit-scrollbar-track {
    background: #f2f6ff;
}

body:has(.vms-staff-person) .fi-ta-content::-webkit-scrollbar-thumb {
    background: #b9cffd;
    border-radius: 999px;
}

body:has(.vms-staff-person) .fi-ta-content::-webkit-scrollbar-thumb:hover {
    background: #96b5f8;
}

body:has(.vms-staff-person) .fi-ta-text,
.vms-person-copy strong,
.vms-staff-meta strong {
    color: var(--vm-text) !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.vms-person-copy small,
.vms-person-copy em,
.vms-staff-meta small,
.vms-staff-meta em {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

body:has(.vms-staff-person) .fi-badge {
    font-weight: var(--vm-weight-medium) !important;
}

/* Staff Management list and profile */
body:has(.vms-staff-person) .fi-header-actions .fi-btn,
body:has(.vms-staff-person) .fi-ta-header-toolbar .fi-btn,
body:has(.vms-staff-person) .fi-dropdown-trigger .fi-btn {
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    min-height: 40px;
    transform: none !important;
}

body:has(.vms-staff-person) .fi-header-actions .fi-btn.fi-color-primary {
    background: var(--vm-primary) !important;
    border-color: var(--vm-primary) !important;
    color: #ffffff !important;
}

body:has(.vms-staff-person) .fi-header-actions .fi-btn.fi-color-primary:hover {
    background: var(--vm-primary-hover) !important;
    border-color: var(--vm-primary-hover) !important;
}

body:has(.vms-staff-person) .fi-header-actions .fi-btn.fi-color-gray {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border-strong) !important;
    color: var(--vm-text) !important;
}

body:has(.vms-staff-person) .fi-header-actions .fi-btn.fi-color-gray:hover {
    background: var(--vm-primary-soft) !important;
    border-color: #b7cbfb !important;
    color: var(--vm-primary-hover) !important;
}

body:has(.vms-staff-person) .fi-ta-ctn {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border) !important;
    border-radius: var(--vm-radius-card) !important;
    box-shadow: none !important;
}

body:has(.vms-staff-person) .fi-ta-table {
    min-width: 78rem !important;
    table-layout: auto !important;
    width: 100% !important;
}

body:has(.vms-staff-person) .fi-ta-header-cell {
    background: var(--vm-surface-subtle) !important;
    border-color: var(--vm-border) !important;
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-semibold) !important;
    letter-spacing: 0 !important;
}

body:has(.vms-staff-person) .fi-ta-row {
    background: var(--vm-surface) !important;
    cursor: pointer;
}

body:has(.vms-staff-person) .fi-ta-row:hover {
    background: #f8faff !important;
}

body:has(.vms-staff-person) .fi-ta-cell {
    border-color: var(--vm-border) !important;
    padding-left: var(--vm-space-3) !important;
    padding-right: var(--vm-space-3) !important;
}

body:has(.vms-staff-person) .fi-ta-header-cell {
    padding-left: var(--vm-space-3) !important;
    padding-right: var(--vm-space-3) !important;
}

body:has(.vms-staff-person) .fi-ta-cell:first-child,
body:has(.vms-staff-person) .fi-ta-header-cell:first-child {
    padding-left: var(--vm-space-4) !important;
}

body:has(.vms-staff-person) .fi-ta-cell:last-child,
body:has(.vms-staff-person) .fi-ta-header-cell:last-child {
    padding-right: var(--vm-space-2) !important;
}

.vms-avatar {
    background: var(--vm-primary-soft) !important;
    border: 1px solid #d3e0ff;
    border-radius: 10px !important;
    color: var(--vm-primary-hover) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-semibold) !important;
    letter-spacing: 0 !important;
}

.vms-person-copy {
    max-width: 14rem;
}

.vms-person-copy strong,
.vms-person-copy small,
.vms-person-copy em {
    display: block;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: normal !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vms-staff-meta {
    min-width: 0 !important;
}

body:has(.vms-staff-person) .fi-badge {
    border-radius: 7px !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-medium) !important;
    min-height: 26px !important;
    padding-inline: var(--vm-space-2) !important;
}

body:has(.vms-staff-person) .fi-dropdown-trigger .fi-btn {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border-strong) !important;
    color: var(--vm-text-secondary) !important;
    height: 36px;
    min-height: 36px !important;
    min-width: 36px !important;
    width: 36px;
}

body:has(.vms-staff-person) .fi-dropdown-trigger .fi-btn:hover {
    background: var(--vm-primary-soft) !important;
    border-color: #b7cbfb !important;
    color: var(--vm-primary-hover) !important;
}

body:has(.vms-staff-person) .fi-dropdown-panel {
    border: 1px solid var(--vm-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 14px 32px rgba(15, 31, 61, 0.13) !important;
    min-width: 14rem !important;
    padding: 0 !important;
}

body:has(.vms-staff-person) .fi-dropdown-list {
    gap: 2px;
    padding: 6px !important;
}

body:has(.vms-staff-person) .fi-dropdown-list-item {
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    min-height: 36px !important;
}

body:has(.vms-staff-person) .fi-ac-grouped-action {
    background: transparent !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    min-height: 36px !important;
    transform: none !important;
}

body:has(.vms-staff-person) .fi-ac-grouped-action:hover,
body:has(.vms-staff-person) .fi-ac-grouped-action:focus-visible {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

body:has(.vms-staff-person) .fi-ta-pagination {
    border-color: var(--vm-border) !important;
}

/* Invoice list: preserve readable columns and keep overflow inside the table. */
body:has(.vminvoice-number) .fi-page,
body:has(.vminvoice-number) .fi-main-ctn,
body:has(.vminvoice-number) .fi-main,
body:has(.vminvoice-number) .fi-ta-ctn {
    min-width: 0 !important;
}

body:has(.vminvoice-number) .fi-ta-ctn {
    overflow: hidden !important;
}

body:has(.vminvoice-number) .fi-ta-content {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scrollbar-color: var(--vm-border-strong) var(--vm-primary-soft);
    scrollbar-width: thin;
}

body:has(.vminvoice-number) .fi-ta-content::-webkit-scrollbar {
    height: 8px;
}

body:has(.vminvoice-number) .fi-ta-content::-webkit-scrollbar-track {
    background: var(--vm-primary-soft);
}

body:has(.vminvoice-number) .fi-ta-content::-webkit-scrollbar-thumb {
    background: var(--vm-border-strong);
    border-radius: 999px;
}

body:has(.vminvoice-number) .fi-ta-table {
    min-width: 86rem !important;
    table-layout: auto !important;
    width: 100% !important;
}

body:has(.vminvoice-number) :where(.fi-ta-header-cell, .fi-ta-cell) {
    padding-left: var(--vm-space-3) !important;
    padding-right: var(--vm-space-3) !important;
}

body:has(.vminvoice-number) :where(.fi-ta-text, .fi-ta-text-item, .fi-badge, .fi-ta-actions) {
    overflow-wrap: normal !important;
    white-space: nowrap !important;
}

body:has(.vminvoice-number) .vminvoice-number {
    font-weight: var(--vm-weight-medium) !important;
}

body:has(.vminvoice-number) .fi-dropdown-trigger :where(.fi-btn, .fi-icon-btn) {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border-strong) !important;
    border-radius: var(--vm-radius-control) !important;
    box-shadow: none !important;
    color: var(--vm-text-secondary) !important;
    height: 36px;
    min-height: 36px !important;
    min-width: 36px !important;
    width: 36px;
}

body:has(.vminvoice-number) .fi-dropdown-trigger :where(.fi-btn, .fi-icon-btn):hover {
    background: var(--vm-primary-soft) !important;
    border-color: var(--vm-border-strong) !important;
    color: var(--vm-primary-hover) !important;
}

body:has(.vminvoice-number) .fi-dropdown-panel {
    border: 1px solid var(--vm-border) !important;
    border-radius: 10px !important;
    box-shadow: var(--vm-shadow-menu) !important;
    min-width: 13rem !important;
}

@media (max-width: 1535px) {
    body:has(.vminvoice-number) .fi-ta-table {
        min-width: 58rem !important;
    }
}

@media (max-width: 1023px) {
    body:has(.vminvoice-number) .fi-ta-table {
        min-width: 50rem !important;
    }
}

@media (max-width: 767px) {
    body:has(.vminvoice-number) .fi-main {
        padding-inline: var(--vm-space-3) !important;
    }

    body:has(.vminvoice-number) .fi-ta-table {
        min-width: 42rem !important;
    }

    body:has(.vminvoice-number) .fi-ta-header {
        padding: var(--vm-space-3) !important;
    }
}

body:has(.vms-profile-page) .fi-header {
    display: none !important;
}

.vms-profile-page {
    display: grid;
    gap: var(--vm-space-5);
    margin-inline: auto;
    max-width: 88rem;
    min-width: 0;
    width: 100%;
}

.vms-profile-back {
    align-items: center;
    color: var(--vm-text-secondary);
    display: inline-flex;
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    gap: var(--vm-space-2);
    justify-self: start;
    text-decoration: none;
}

.vms-profile-back:hover {
    color: var(--vm-primary-hover);
}

.vms-profile-back svg,
.vms-profile-edit svg,
.vms-profile-context svg,
.vms-profile-details dt svg,
.vms-capability-list svg,
.vms-profile-empty > svg {
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
}

.vms-profile-hero {
    align-items: center;
    background: var(--vm-surface);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    display: grid;
    gap: var(--vm-space-5);
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: var(--vm-space-6);
}

.vms-profile-avatar {
    align-items: center;
    background: var(--vm-primary);
    border: 4px solid var(--vm-primary-soft);
    border-radius: 14px;
    color: #ffffff;
    display: inline-flex;
    font-size: 24px;
    font-weight: var(--vm-weight-semibold);
    height: 76px;
    justify-content: center;
    line-height: 1;
    width: 76px;
}

.vms-profile-identity {
    min-width: 0;
}

.vms-profile-eyebrow {
    color: var(--vm-text-muted);
    display: block;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-meta);
    margin-bottom: var(--vm-space-1);
}

.vms-profile-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--vm-space-3);
}

.vms-profile-title-row h1 {
    color: var(--vm-text);
    font-size: var(--vm-font-size-page-title);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-page-title);
    margin: 0;
}

.vms-profile-identity > p {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-body);
    line-height: var(--vm-line-height-body);
    margin: var(--vm-space-1) 0 var(--vm-space-3);
}

.vms-profile-context {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--vm-space-3) var(--vm-space-5);
}

.vms-profile-context span {
    align-items: center;
    color: var(--vm-text-secondary);
    display: inline-flex;
    font-size: var(--vm-font-size-supporting);
    gap: var(--vm-space-2);
    min-width: 0;
}

.vms-profile-context svg {
    color: var(--vm-primary);
}

.vms-profile-status {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    line-height: 16px;
    min-height: 26px;
    padding: 5px 9px;
    white-space: nowrap;
}

.vms-profile-status.is-primary {
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
}

.vms-profile-status.is-warning {
    background: var(--vm-warning-soft);
    color: #a15c00;
}

.vms-profile-status.is-danger {
    background: var(--vm-danger-soft);
    color: var(--vm-danger);
}

.vms-profile-status.is-neutral {
    background: var(--vm-surface-subtle);
    color: var(--vm-text-secondary);
}

.vms-profile-edit {
    align-items: center;
    background: var(--vm-primary);
    border: 1px solid var(--vm-primary);
    border-radius: var(--vm-radius-control);
    box-shadow: none;
    color: #ffffff;
    display: inline-flex;
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-medium);
    gap: var(--vm-space-2);
    justify-content: center;
    min-height: 40px;
    padding: 0 var(--vm-space-4);
    text-decoration: none;
}

.vms-profile-edit:hover {
    background: var(--vm-primary-hover);
    border-color: var(--vm-primary-hover);
    color: #ffffff;
}

.vms-profile-layout {
    align-items: start;
    display: grid;
    gap: var(--vm-space-5);
    grid-template-columns: minmax(0, 1.55fr) minmax(19rem, .8fr);
    min-width: 0;
}

.vms-profile-main,
.vms-profile-sidebar {
    display: grid;
    gap: var(--vm-space-5);
    min-width: 0;
}

.vms-profile-card {
    background: var(--vm-surface);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    box-shadow: none;
    min-width: 0;
    padding: var(--vm-space-5);
}

.vms-profile-card-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--vm-border);
    display: flex;
    gap: var(--vm-space-4);
    justify-content: space-between;
    margin-bottom: var(--vm-space-5);
    padding-bottom: var(--vm-space-4);
}

.vms-profile-card-head h2 {
    color: var(--vm-text);
    font-size: var(--vm-font-size-subsection);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-subsection);
    margin: 0;
}

.vms-profile-card-head p {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    line-height: var(--vm-line-height-supporting);
    margin: var(--vm-space-1) 0 0;
}

.vms-profile-count {
    align-items: center;
    background: var(--vm-primary-soft);
    border-radius: 7px;
    color: var(--vm-primary-hover);
    display: inline-flex;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    height: 28px;
    justify-content: center;
    min-width: 28px;
    padding-inline: var(--vm-space-2);
}

.vms-profile-details {
    display: grid;
    gap: var(--vm-space-5);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.vms-profile-details > div {
    min-width: 0;
}

.vms-profile-details dt {
    align-items: center;
    color: var(--vm-text-secondary);
    display: flex;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    gap: var(--vm-space-2);
    line-height: var(--vm-line-height-meta);
    margin-bottom: var(--vm-space-1);
}

.vms-profile-details dt svg {
    color: var(--vm-primary);
}

.vms-profile-details dd {
    color: var(--vm-text);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-body);
    margin: 0;
    overflow-wrap: anywhere;
}

.vms-capability-list {
    display: grid;
    gap: var(--vm-space-2);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.vms-capability-list li {
    align-items: center;
    background: var(--vm-surface-subtle);
    border: 1px solid var(--vm-border);
    border-radius: 8px;
    color: var(--vm-text);
    display: flex;
    font-size: var(--vm-font-size-supporting);
    gap: var(--vm-space-2);
    line-height: var(--vm-line-height-supporting);
    min-height: 40px;
    padding: var(--vm-space-2) var(--vm-space-3);
}

.vms-capability-list svg {
    color: var(--vm-primary);
}

.vms-profile-summary {
    display: grid;
    gap: 0;
    margin: 0;
}

.vms-profile-summary > div {
    border-bottom: 1px solid var(--vm-border);
    display: grid;
    gap: var(--vm-space-1);
    padding: var(--vm-space-3) 0;
}

.vms-profile-summary > div:first-child {
    padding-top: 0;
}

.vms-profile-summary > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.vms-profile-summary dt {
    color: var(--vm-text-muted);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-meta);
}

.vms-profile-summary dd {
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
    margin: 0;
    overflow-wrap: anywhere;
}

.vms-profile-summary dd.is-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}

.vms-profile-empty {
    align-items: center;
    background: var(--vm-surface-subtle);
    border: 1px dashed var(--vm-border-strong);
    border-radius: 8px;
    display: flex;
    gap: var(--vm-space-3);
    padding: var(--vm-space-4);
}

.vms-profile-empty > svg {
    color: var(--vm-primary);
    height: 24px;
    width: 24px;
}

.vms-profile-empty strong,
.vms-profile-empty span {
    display: block;
}

.vms-profile-empty strong {
    color: var(--vm-text);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-semibold);
}

.vms-profile-empty span {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    margin-top: var(--vm-space-1);
}

.vms-sync-error {
    background: var(--vm-danger-soft);
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: var(--vm-danger);
    font-size: var(--vm-font-size-supporting);
    line-height: var(--vm-line-height-supporting);
    margin: var(--vm-space-4) 0 0;
    padding: var(--vm-space-3);
}

@media (max-width: 980px) {
    .vms-profile-hero {
        align-items: start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .vms-profile-edit {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .vms-profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    body:has(.vms-staff-person) .fi-header-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
    }

    body:has(.vms-staff-person) .fi-header-actions .fi-btn {
        justify-content: center;
        width: 100%;
    }

    .vms-profile-page {
        gap: var(--vm-space-4);
    }

    .vms-profile-hero {
        grid-template-columns: 1fr;
        padding: var(--vm-space-4);
    }

    .vms-profile-avatar {
        height: 64px;
        width: 64px;
    }

    .vms-profile-edit {
        width: 100%;
    }

    .vms-profile-card {
        padding: var(--vm-space-4);
    }

    .vms-profile-details,
    .vms-capability-list {
        grid-template-columns: 1fr;
    }
}

/* Flat blue treatment for Job Cards and Quotes. */
.vm-job-cards .vmj-button,
.vm-job-cards .vmj-row-button,
.vm-job-cards .vmj-filter-panel button,
.vm-job-cards .vmj-pagination a,
.vm-quotes-list .vmql-button,
.vm-quotes-list .vmql-row-button,
.vm-quotes-list .vmql-toolbar-actions button,
.vm-quotes-list .vmql-pagination a,
.vm-quote-page .vmq-back,
.vm-quote-page .vmq-action,
.vm-quote-page .vmq-small-action,
.vm-quote-page .vmq-note-action,
.vm-quote-page .vmq-icon-action,
.vm-quote-page .vmq-response {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    transition: background-color var(--vm-motion), border-color var(--vm-motion), color var(--vm-motion) !important;
}

.vm-job-cards .vmj-button:hover,
.vm-job-cards .vmj-row-button:hover,
.vm-job-cards .vmj-filter-panel button:hover,
.vm-job-cards .vmj-pagination a:hover,
.vm-quotes-list .vmql-button:hover,
.vm-quotes-list .vmql-row-button:hover,
.vm-quotes-list .vmql-toolbar-actions button:hover,
.vm-quotes-list .vmql-pagination a:hover,
.vm-quote-page .vmq-back:hover,
.vm-quote-page .vmq-action:hover,
.vm-quote-page .vmq-small-action:hover,
.vm-quote-page .vmq-note-action:hover,
.vm-quote-page .vmq-icon-action:hover,
.vm-quote-page .vmq-response:hover {
    box-shadow: none !important;
    transform: none !important;
}

.vm-job-cards .vmj-button-primary,
.vm-job-cards .vmj-filter-panel button,
.vm-quotes-list .vmql-button-primary,
.vm-quotes-list .vmql-toolbar-actions button {
    background: var(--vm-primary) !important;
    border-color: var(--vm-primary) !important;
    color: #ffffff !important;
}

.vm-job-cards .vmj-button-primary:hover,
.vm-job-cards .vmj-filter-panel button:hover,
.vm-quotes-list .vmql-button-primary:hover,
.vm-quotes-list .vmql-toolbar-actions button:hover {
    background: var(--vm-primary-hover) !important;
    border-color: var(--vm-primary-hover) !important;
    color: #ffffff !important;
}

.vm-job-cards .vmj-button-light,
.vm-job-cards .vmj-row-button,
.vm-quotes-list .vmql-button-light,
.vm-quotes-list .vmql-row-button,
.vm-quote-page .vmq-back,
.vm-quote-page .vmq-action,
.vm-quote-page .vmq-small-action,
.vm-quote-page .vmq-note-action,
.vm-quote-page .vmq-icon-action {
    background: var(--vm-surface) !important;
    border: 1px solid var(--vm-border-strong) !important;
    color: var(--vm-text) !important;
}

.vm-job-cards .vmj-button-light:hover,
.vm-job-cards .vmj-row-button:hover,
.vm-quotes-list .vmql-button-light:hover,
.vm-quotes-list .vmql-row-button:hover,
.vm-quote-page .vmq-back:hover,
.vm-quote-page .vmq-action:hover,
.vm-quote-page .vmq-small-action:hover,
.vm-quote-page .vmq-note-action:hover,
.vm-quote-page .vmq-icon-action:hover {
    background: var(--vm-primary-soft) !important;
    border-color: #b7cbfb !important;
    color: var(--vm-primary-hover) !important;
}

.vm-job-cards .vmj-card,
.vm-job-cards .vmj-empty,
.vm-quotes-list .vmql-metric,
.vm-quotes-list .vmql-panel,
.vm-quotes-list .vmql-card,
.vm-quotes-list .vmql-empty,
.vm-quote-page .vmq-progress-card,
.vm-quote-page .vmq-card {
    border-color: var(--vm-border) !important;
    box-shadow: none !important;
}

.vm-job-cards .vmj-card[class*="vmj-card-"],
.vm-quotes-list .vmql-card[class*="vmql-card-"] {
    border-left-color: var(--vm-border) !important;
    border-left-width: 1px !important;
}

.vm-job-cards .vmj-vehicle-photo[class*="vmj-photo-"] {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.vm-job-cards .vmj-vehicle-photo::before,
.vm-job-cards .vmj-vehicle-photo::after {
    display: none !important;
}

.vm-job-cards .vmj-primary a,
.vm-quotes-list .vmql-identity a,
.vm-quote-page .vmq-total-row dt,
.vm-quote-page .vmq-total-row dd,
.vm-quote-page .vmq-summary-card > strong {
    color: var(--vm-primary) !important;
}

.vm-job-cards .vmj-tab,
.vm-quotes-list .vmql-tab {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border) !important;
    box-shadow: none !important;
    color: var(--vm-text-secondary) !important;
}

.vm-job-cards .vmj-tab strong,
.vm-quotes-list .vmql-tab strong {
    background: #eef2f7 !important;
    color: var(--vm-text-secondary) !important;
}

.vm-job-cards .vmj-tab.is-active,
.vm-quotes-list .vmql-tab.is-active {
    background: var(--vm-primary-soft) !important;
    border-color: #b7cbfb !important;
    box-shadow: none !important;
    color: var(--vm-primary-hover) !important;
}

.vm-job-cards .vmj-tab.is-active strong,
.vm-quotes-list .vmql-tab.is-active strong {
    background: #d7e4ff !important;
    color: var(--vm-primary-hover) !important;
}

.vm-job-cards .vmj-pill-green,
.vm-job-cards .vmj-pill-teal,
.vm-quotes-list .vmql-pill-green,
.vm-quotes-list .vmql-pill-teal,
.vm-quote-page .vmq-pill-green,
.vm-quote-page .vmq-pill-teal {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.vm-job-cards .vmj-priority-green {
    color: var(--vm-text-secondary) !important;
}

.vm-job-cards .vmj-row-primary:not(.vmj-row-disabled),
.vm-quotes-list .vmql-row-primary {
    background: var(--vm-primary-soft) !important;
    border-color: #c4d4fa !important;
    color: var(--vm-primary-hover) !important;
}

.vm-job-cards .vmj-button > strong {
    align-items: center;
    background: var(--vm-primary-soft);
    border-radius: 999px;
    color: var(--vm-primary-hover);
    display: inline-flex;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
    height: 1.35rem;
    justify-content: center;
    min-width: 1.35rem;
    padding: 0 .3rem;
}

.vm-job-cards .vmj-recycle-notice {
    align-items: center;
    background: var(--vm-primary-soft);
    border: 1px solid #c7d7fb;
    border-radius: var(--vm-radius-card);
    color: var(--vm-primary-hover);
    display: flex;
    gap: var(--vm-space-3);
    padding: var(--vm-space-3) var(--vm-space-4);
}

.vm-job-cards .vmj-recycle-notice .vmj-icon {
    flex: 0 0 auto;
    height: 1.25rem;
    width: 1.25rem;
}

.vm-job-cards .vmj-recycle-notice div {
    display: grid;
    gap: 2px;
}

.vm-job-cards .vmj-recycle-notice strong,
.vm-job-cards .vmj-job-number {
    color: var(--vm-text);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-semibold);
}

.vm-job-cards .vmj-recycle-notice span {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vm-job-cards .vmj-more button:hover,
.vm-quotes-list .vmql-more a:hover,
.vm-quotes-list .vmql-more button:hover,
.vm-quote-page .vmq-more-panel a:hover,
.vm-quote-page .vmq-more-panel button:hover {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.vm-job-cards .vmj-pagination a.is-active,
.vm-quotes-list .vmql-pagination a.is-active {
    background: var(--vm-primary) !important;
    border-color: var(--vm-primary) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.vm-quotes-list .vmql-metric-teal > span,
.vm-quotes-list .vmql-metric-green > span,
.vm-quotes-list .vmql-avatar-teal,
.vm-quotes-list .vmql-avatar-green,
.vm-quote-page .vmq-item-teal,
.vm-quote-page .vmq-item-blue,
.vm-quote-page .vmq-attachment > span,
.vm-quote-page .vmq-vehicle > span {
    background: var(--vm-primary-soft) !important;
    color: var(--vm-primary-hover) !important;
}

.vm-quote-page .vmq-progress-step.is-done > span,
.vm-quote-page .vmq-person > span {
    background: var(--vm-primary) !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.vm-quote-page .vmq-tabs a.is-active {
    border-color: var(--vm-primary) !important;
    color: var(--vm-primary) !important;
}

.vm-quote-page .vmq-response {
    background: var(--vm-surface) !important;
    border-color: var(--vm-border-strong) !important;
}

.vm-quote-page .vmq-response.is-approve,
.vm-quote-page .vmq-response.is-select {
    border-color: #b7cbfb !important;
    color: var(--vm-primary-hover) !important;
}

.vm-quote-page .vmq-response.is-approve > span,
.vm-quote-page .vmq-response.is-select > span {
    background: var(--vm-primary-soft) !important;
}

.vm-quote-page .vmq-timeline-event.is-done > span {
    background: var(--vm-primary) !important;
    box-shadow: 0 0 0 1px var(--vm-primary) !important;
}

/* Keep Quote typography as restrained and readable as the Bookings table. */
.vm-quotes-list :where(
    .vmql-button,
    .vmql-row-button,
    .vmql-toolbar-actions a,
    .vmql-toolbar-actions button,
    .vmql-more a,
    .vmql-more button,
    .vmql-pagination a,
    .vmql-per-page
) {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.vm-quotes-list .vmql-metric :where(small, em) {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vm-quotes-list .vmql-metric strong {
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

.vm-quotes-list .vmql-tab {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.vm-quotes-list .vmql-tab strong {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 16px !important;
}

.vm-quotes-list .vmql-tab.is-active {
    font-weight: var(--vm-weight-semibold) !important;
}

.vm-quotes-list .vmql-toolbar label > span {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vm-quotes-list :where(.vmql-search input, .vmql-toolbar select) {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

.vm-quotes-list .vmql-identity a {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vm-quotes-list .vmql-identity strong {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.vm-quotes-list .vmql-identity small,
.vm-quotes-list .vmql-detail-grid small,
.vm-quotes-list .vmql-detail-grid span,
.vm-quotes-list .vmql-total small {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vm-quotes-list .vmql-detail-grid strong {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: 20px !important;
}

.vm-quotes-list .vmql-total > strong {
    font-size: var(--vm-font-size-subsection) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-subsection) !important;
}

.vm-quotes-list .vmql-empty strong {
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: 20px !important;
}

.vm-quotes-list .vmql-empty span,
.vm-quotes-list .vmql-footer > span {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vm-quotes-list .vmql-per-page :where(span, select) {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vm-quote-page .vmq-title-stack > p {
    color: var(--vm-text-secondary) !important;
    font-size: var(--vm-font-size-body) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-body) !important;
}

.vm-quote-page .vmq-progress-step strong,
.vm-quote-page .vmq-tabs a,
.vm-quote-page .vmq-item-cell strong,
.vm-quote-page .vmq-totals dd,
.vm-quote-page .vmq-response strong,
.vm-quote-page .vmq-summary-card dd,
.vm-quote-page :where(.vmq-person, .vmq-vehicle, .vmq-attachment) strong,
.vm-quote-page .vmq-timeline-event strong,
.vm-quote-page .vmq-repair :where(strong, em) {
    font-weight: var(--vm-weight-medium) !important;
}

.vm-quote-page :where(
    .vmq-progress-step strong,
    .vmq-item-cell strong,
    .vmq-totals dt,
    .vmq-totals dd,
    .vmq-response strong,
    .vmq-person strong,
    .vmq-vehicle strong,
    .vmq-attachment strong,
    .vmq-timeline-event strong,
    .vmq-repair strong,
    .vmq-repair em
) {
    font-size: var(--vm-font-size-supporting) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vm-quote-page .vmq-tabs a {
    font-size: var(--vm-font-size-body) !important;
    line-height: 20px !important;
}

.vm-quote-page .vmq-tabs a.is-active,
.vm-quote-page :where(.vmq-section-head h2, .vmq-customer-actions h2, .vmq-side-card h2) {
    font-weight: var(--vm-weight-semibold) !important;
}

.vm-quote-page .vmq-items-table th {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vm-quote-page .vmq-items-table td {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: 20px !important;
}

.vm-quote-page :where(
    .vmq-progress-step small,
    .vmq-item-cell small,
    .vmq-customer-actions p,
    .vmq-response small,
    .vmq-summary-card > span,
    .vmq-side-card p,
    .vmq-private-note,
    .vmq-person small,
    .vmq-vehicle small,
    .vmq-attachment small,
    .vmq-timeline-event p,
    .vmq-repair p,
    .vmq-repair small
) {
    font-size: var(--vm-font-size-meta) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vm-quote-page .vmq-totals dt,
.vm-quote-page .vmq-summary-card dt {
    font-weight: var(--vm-weight-regular) !important;
}

.vm-quote-page :where(.vmq-summary-card dt, .vmq-summary-card dd) {
    font-size: var(--vm-font-size-meta) !important;
    line-height: var(--vm-line-height-meta) !important;
}

.vm-quote-page .vmq-discount-input,
.vm-quote-page .vmq-side-head a,
.vm-quote-page :where(.vmq-more-panel a, .vmq-more-panel button) {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-medium) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

.vm-quote-page .vmq-totals .vmq-total-row :where(dt, dd),
.vm-quote-page .vmq-summary-card > strong {
    font-size: var(--vm-font-size-section) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-section) !important;
}

.vm-quote-page .vmq-empty {
    font-size: var(--vm-font-size-supporting) !important;
    font-weight: var(--vm-weight-regular) !important;
    line-height: var(--vm-line-height-supporting) !important;
}

@media (max-width: 1240px) {
    .vmi-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .vmbk-stats,
    .vmql-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 980px) {
    body:has(.vm-business-profiles) .fi-main {
        padding: var(--vm-space-6) var(--vm-space-5) var(--vm-space-8) !important;
    }

    :where(.vmb-stats, .vmi-stats) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    :where(.vmi-hero, .vmbk-hero, .vmc-page-head, .vmj-page-head, .vmql-page-head) {
        align-items: stretch !important;
        flex-direction: column;
    }

    :where(.vmi-head-actions, .vmbk-head-actions, .vmj-head-actions, .vmql-head-actions) {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    body:has(.vm-business-profiles) .fi-main {
        padding: var(--vm-space-4) var(--vm-space-3) var(--vm-space-6) !important;
    }

    :where(.vm-business-profiles, .vm-inventory-page, .vm-bookings-page, .vmc-page, .vm-job-cards, .vm-quotes-list) {
        gap: var(--vm-space-4) !important;
    }

    :where(.vmb-stats, .vmi-stats, .vmbk-stats, .vmql-metrics) {
        grid-template-columns: 1fr !important;
    }

    :where(.vmb-stat-card, .vmi-stat-card, .vmbk-stat-card, .vmql-metric) {
        min-height: 0 !important;
        padding: var(--vm-space-4) !important;
    }

    :where(.vmi-head-actions, .vmbk-head-actions, .vmj-head-actions, .vmql-head-actions) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    :where(.vmi-head-actions, .vmbk-head-actions, .vmj-head-actions, .vmql-head-actions) > * {
        justify-content: center;
        min-width: 0 !important;
        width: 100%;
    }

    :where(.vmi-head-actions, .vmbk-head-actions, .vmj-head-actions, .vmql-head-actions) > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .vmc-schedule-shell {
        max-height: 32rem;
    }

    .vmb-toolbar {
        grid-template-columns: 1fr !important;
    }

    .vmb-toolbar > * {
        grid-column: auto !important;
        width: 100%;
    }
}

@media (max-width: 700px) {
    :root {
        --vm-font-size-display: 24px;
        --vm-line-height-display: 32px;
        --vm-font-size-page-title: 22px;
        --vm-line-height-page-title: 30px;
        --vm-font-size-section: 17px;
        --vm-line-height-section: 24px;
    }

    .fm-security-verify-row {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .fi-resource-customer-vehicles.fi-resource-create-record-page .fi-header > .shrink-0 {
        display: none;
    }

    .vmcv-form > .grid {
        gap: var(--vm-space-3);
    }

    .vmcv-section .fi-section-header {
        padding: var(--vm-space-4) var(--vm-space-4) var(--vm-space-2);
    }

    .vmcv-section .fi-section-content {
        padding: var(--vm-space-3) var(--vm-space-4) var(--vm-space-4);
    }

    .vmcv-form .vmcv-section .fi-section-header-heading {
        font-size: 17px;
        line-height: 24px;
    }

    .fi-resource-customer-vehicles.fi-resource-create-record-page .fi-form-actions {
        padding: var(--vm-space-3);
    }

    .fi-resource-customer-vehicles.fi-resource-create-record-page .fi-form-actions .fi-ac {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
        width: 100%;
    }

    .fi-resource-customer-vehicles.fi-resource-create-record-page .fi-form-actions .fi-btn {
        justify-content: center;
        width: 100%;
    }
}

/* Workshop resource scheduler */
.vmrs-page {
    color: var(--vm-text);
    gap: var(--vm-space-4) !important;
    min-width: 0;
}

.vmrs-page-head {
    margin-bottom: 0 !important;
}

.vmrs-page-head h1 {
    font-size: var(--vm-font-size-page-title) !important;
    font-weight: var(--vm-weight-semibold) !important;
    line-height: var(--vm-line-height-page-title) !important;
}

.vmrs-page :where(button, a, input, select, textarea) {
    font-family: var(--vm-font-family);
}

.vmrs-page .vmc-icon {
    fill: none;
    height: 1.125rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 1.125rem;
}

.vmrs-toolbar,
.vmrs-summary,
.vmrs-scheduler,
.vmrs-combined,
.vmrs-agenda,
.vmrs-unassigned,
.vmrs-mobile-agenda {
    background: var(--vm-surface);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    box-shadow: var(--vm-shadow-card);
}

.vmrs-toolbar {
    align-items: center;
    display: flex;
    gap: var(--vm-space-3);
    justify-content: space-between;
    padding: var(--vm-space-3);
    position: relative;
    z-index: 5;
}

.vmrs-toolbar-primary,
.vmc-date-tools,
.vmrs-segmented {
    align-items: center;
    display: flex;
    gap: var(--vm-space-2);
}

.vmrs-toolbar-primary {
    flex-wrap: wrap;
    min-width: 0;
}

.vmc-today,
.vmc-icon-button,
.vmrs-date-picker,
.vmrs-segmented a,
.vmrs-filter-drawer > summary,
.vmrs-primary-button,
.vmrs-secondary-button,
.vmrs-danger-button {
    align-items: center;
    border-radius: var(--vm-radius-control);
    display: inline-flex;
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-medium);
    justify-content: center;
    line-height: 20px;
    min-height: 2.5rem;
    text-decoration: none;
    transition: background-color var(--vm-motion), border-color var(--vm-motion), color var(--vm-motion);
}

.vmc-today,
.vmc-icon-button,
.vmrs-date-picker,
.vmrs-filter-drawer > summary,
.vmrs-secondary-button {
    background: var(--vm-surface);
    border: 1px solid var(--vm-border-strong);
    color: var(--vm-text);
}

.vmc-today,
.vmrs-filter-drawer > summary,
.vmrs-primary-button,
.vmrs-secondary-button,
.vmrs-danger-button {
    gap: var(--vm-space-2);
    padding: 0 var(--vm-space-4);
}

.vmc-icon-button {
    flex: 0 0 2.5rem;
    padding: 0;
    width: 2.5rem;
}

.vmc-today:hover,
.vmc-icon-button:hover,
.vmrs-date-picker:hover,
.vmrs-filter-drawer > summary:hover,
.vmrs-secondary-button:hover {
    background: var(--vm-primary-soft);
    border-color: #bdd0ff;
    color: var(--vm-primary-hover);
}

.vmrs-date-picker {
    cursor: pointer;
    gap: var(--vm-space-2);
    min-width: 12.5rem;
    overflow: hidden;
    padding: 0 var(--vm-space-3);
    position: relative;
}

.vmrs-date-picker span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmrs-date-picker input {
    cursor: pointer;
    inset: 0;
    opacity: 0;
    position: absolute;
}

.vmrs-segmented {
    background: var(--vm-page);
    border: 1px solid var(--vm-border);
    border-radius: 10px;
    gap: 2px;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: none;
}

.vmrs-segmented::-webkit-scrollbar {
    display: none;
}

.vmrs-segmented a {
    color: var(--vm-text-secondary);
    min-height: 2rem;
    padding: 0 var(--vm-space-3);
    white-space: nowrap;
}

.vmrs-segmented a:hover {
    color: var(--vm-primary-hover);
}

.vmrs-segmented a.is-active {
    background: var(--vm-primary);
    color: #ffffff;
}

.vmrs-primary-button {
    background: var(--vm-primary);
    border: 1px solid var(--vm-primary);
    color: #ffffff;
}

.vmrs-primary-button:hover {
    background: var(--vm-primary-hover);
    border-color: var(--vm-primary-hover);
}

.vmrs-danger-button {
    background: var(--vm-surface);
    border: 1px solid #fecaca;
    color: #c52222;
}

.vmrs-danger-button:hover {
    background: var(--vm-danger-soft);
}

.vmrs-page :where(button, a, input, select, textarea):focus-visible {
    outline: 3px solid rgba(36, 107, 253, .24);
    outline-offset: 2px;
}

.vmrs-filter-drawer {
    flex: 0 0 auto;
    position: relative;
}

.vmrs-filter-drawer > summary {
    cursor: pointer;
    list-style: none;
}

.vmrs-filter-drawer > summary::-webkit-details-marker {
    display: none;
}

.vmrs-filters {
    background: var(--vm-surface);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    box-shadow: var(--vm-shadow-menu);
    display: grid;
    gap: var(--vm-space-3);
    grid-template-columns: repeat(2, minmax(11rem, 1fr));
    padding: var(--vm-space-4);
    position: absolute;
    right: 0;
    top: calc(100% + var(--vm-space-2));
    width: min(42rem, calc(100vw - 3rem));
    z-index: 30;
}

.vmrs-filters label,
.vmrs-form-grid label,
.vmrs-override-reason {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.vmrs-filters label > span:first-child,
.vmrs-form-grid label > span:first-child,
.vmrs-override-reason > span {
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
}

.vmrs-filters :where(input, select),
.vmrs-form-grid :where(input, select, textarea),
.vmrs-override-reason textarea {
    background-color: var(--vm-surface);
    border: 1px solid var(--vm-control-border);
    border-radius: var(--vm-radius-control);
    color: var(--vm-text);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-regular);
    min-height: 2.75rem;
    min-width: 0;
    padding: .65rem .75rem;
    width: 100%;
}

.vmrs-filters select,
.vmrs-form-grid select {
    background-position: right .75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.25rem 1.25rem !important;
    padding-right: 2.5rem !important;
}

.vmrs-filters :where(input, select):hover,
.vmrs-form-grid :where(input, select, textarea):hover,
.vmrs-override-reason textarea:hover {
    border-color: var(--vm-control-border-hover);
}

.vmrs-search-field > span:last-child {
    align-items: center;
    display: flex;
    position: relative;
}

.vmrs-search-field > span:last-child svg {
    color: var(--vm-text-secondary);
    left: .75rem;
    position: absolute;
}

.vmrs-search-field input {
    padding-left: 2.4rem;
}

.vmrs-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
}

.vmrs-summary-item {
    align-items: center;
    border-right: 1px solid var(--vm-border);
    display: flex;
    gap: var(--vm-space-2);
    justify-content: space-between;
    min-width: 0;
    padding: .75rem var(--vm-space-4);
}

.vmrs-summary-item:last-child {
    border-right: 0;
}

.vmrs-summary-item span {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    line-height: var(--vm-line-height-supporting);
}

.vmrs-summary-item strong {
    color: var(--vm-text);
    font-size: var(--vm-font-size-subsection);
    font-weight: var(--vm-weight-semibold);
}

.vmrs-summary-warning strong {
    color: var(--vm-warning-text);
}

.vmrs-summary-danger strong {
    color: #c52222;
}

.vmrs-scheduler {
    min-width: 0;
    overflow: hidden;
}

.vmrs-resource-scroll {
    max-height: min(64vh, 40rem);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: #b9cffd #f2f6ff;
    scrollbar-width: thin;
}

.vmrs-resource-scroll::-webkit-scrollbar {
    height: 9px;
    width: 9px;
}

.vmrs-resource-scroll::-webkit-scrollbar-thumb {
    background: #b9cffd;
    border-radius: 999px;
}

.vmrs-resource-board {
    min-width: max(100%, calc(5rem + (var(--vmrs-resource-count) * 14rem)));
}

.vmrs-resource-header-row,
.vmrs-resource-grid {
    display: grid;
    grid-template-columns: 5rem repeat(var(--vmrs-resource-count), minmax(14rem, 1fr));
}

.vmrs-resource-header-row {
    background: var(--vm-surface);
    border-bottom: 1px solid var(--vm-border);
    min-height: 5.25rem;
    position: sticky;
    top: 0;
    z-index: 15;
}

.vmrs-time-header {
    align-items: center;
    background: var(--vm-surface-subtle);
    border-right: 1px solid var(--vm-border);
    color: var(--vm-text-secondary);
    display: flex;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
    justify-content: center;
    left: 0;
    position: sticky;
    text-transform: uppercase;
    z-index: 18;
}

.vmrs-resource-header {
    align-content: center;
    align-items: center;
    border-right: 1px solid var(--vm-border);
    display: grid;
    gap: 2px var(--vm-space-2);
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: .65rem .75rem;
}

.vmrs-resource-header:last-child {
    border-right: 0;
}

.vmrs-avatar {
    align-items: center;
    background: var(--vm-primary-soft);
    border-radius: 50%;
    color: var(--vm-primary-hover);
    display: inline-flex;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
    grid-row: span 2;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.vmrs-resource-header div {
    min-width: 0;
}

.vmrs-resource-header strong,
.vmrs-resource-header small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmrs-resource-header strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-semibold);
}

.vmrs-resource-header small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
}

.vmrs-capacity,
.vmrs-status-label {
    align-items: center;
    background: var(--vm-primary-soft);
    border-radius: 999px;
    color: var(--vm-primary-hover);
    display: inline-flex;
    font-size: 11px;
    font-weight: var(--vm-weight-medium);
    line-height: 16px;
    max-width: 100%;
    padding: 2px 7px;
    white-space: nowrap;
}

.vmrs-capacity-warning {
    background: var(--vm-warning-soft);
    color: var(--vm-warning-text);
}

.vmrs-capacity-danger {
    background: var(--vm-danger-soft);
    color: #c52222;
}

.vmrs-header-action {
    background: transparent;
    border: 0;
    color: var(--vm-primary);
    font-size: 11px;
    font-weight: var(--vm-weight-medium);
    grid-column: 3;
    padding: 0;
    text-align: right;
}

.vmrs-header-action:hover {
    color: var(--vm-primary-hover);
}

.vmrs-resource-grid {
    background: var(--vm-surface);
    min-height: var(--vmrs-grid-height);
}

.vmrs-time-rail {
    background: var(--vm-surface-subtle);
    border-right: 1px solid var(--vm-border);
    left: 0;
    position: sticky;
    z-index: 12;
}

.vmrs-time-rail span {
    color: var(--vm-text-secondary);
    font-size: 11px;
    font-weight: var(--vm-weight-medium);
    left: .5rem;
    position: absolute;
    transform: translateY(-50%);
    white-space: nowrap;
}

.vmrs-time-rail span.is-first,
.vmc-time-rail span.is-first {
    transform: translateY(0);
}

.vmrs-time-rail span.is-last,
.vmc-time-rail span.is-last {
    transform: translateY(-100%);
}

.vmrs-resource-column {
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 48.7px,
        var(--vm-border) 48.7px,
        var(--vm-border) 49.7px
    );
    border-right: 1px solid var(--vm-border);
    min-width: 0;
    position: relative;
}

.vmrs-resource-column:last-child {
    border-right: 0;
}

.vmrs-empty-slot {
    align-items: center;
    background: transparent;
    border: 0;
    color: transparent;
    display: flex;
    height: 49px;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    width: 100%;
    z-index: 1;
}

.vmrs-empty-slot:hover {
    background: rgba(36, 107, 253, .055);
    color: var(--vm-primary);
}

.vmrs-empty-slot svg {
    height: 1rem !important;
    width: 1rem !important;
}

.vmrs-job,
.vmrs-block {
    left: 4px;
    overflow: hidden;
    position: absolute;
    right: 4px;
}

.vmrs-job {
    background: #edf4ff;
    border: 1px solid #9fc0ff;
    border-left: 3px solid var(--vm-primary);
    border-radius: 7px;
    box-shadow: 0 2px 6px rgba(15, 31, 61, .06);
    height: max(28px, var(--vmrs-height));
    top: var(--vmrs-top);
    z-index: 4;
}

.vmrs-job[draggable="true"] {
    cursor: grab;
}

.vmrs-job[draggable="true"]:active {
    cursor: grabbing;
}

.vmrs-job.is-locked {
    background: #f4f6f9;
    border-color: var(--vm-border-strong);
    border-left-color: var(--vm-text-muted);
}

.vmrs-job-main {
    background: transparent;
    border: 0;
    color: var(--vm-text);
    display: grid;
    gap: 1px;
    height: 100%;
    min-width: 0;
    padding: 5px 7px 8px;
    text-align: left;
    width: 100%;
}

.vmrs-job-main > * {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmrs-job-main strong {
    font-size: 12px;
    font-weight: var(--vm-weight-semibold);
    line-height: 15px;
}

.vmrs-job-main > span:not(.vmrs-job-time):not(.vmrs-status-label),
.vmrs-job-main small {
    color: var(--vm-text-secondary);
    font-size: 10px;
    line-height: 13px;
}

.vmrs-job-time {
    color: var(--vm-primary-hover);
    font-size: 10px;
    font-weight: var(--vm-weight-semibold);
    line-height: 13px;
}

.vmrs-job-main .vmrs-status-label {
    bottom: 4px;
    position: absolute;
    right: 5px;
}

.vmrs-resize-handle {
    background: transparent;
    border: 0;
    bottom: 0;
    cursor: ns-resize;
    height: 9px;
    left: 0;
    position: absolute;
    right: 0;
    width: 100%;
    z-index: 7;
}

.vmrs-resize-handle::after {
    background: rgba(36, 107, 253, .45);
    border-radius: 999px;
    bottom: 2px;
    content: "";
    height: 2px;
    left: 38%;
    position: absolute;
    right: 38%;
}

.vmrs-block {
    background: repeating-linear-gradient(-45deg, #f3f6fa, #f3f6fa 7px, #e8edf4 7px, #e8edf4 14px);
    border: 1px dashed var(--vm-text-muted);
    border-radius: 6px;
    color: var(--vm-text-secondary);
    display: grid;
    min-height: 26px;
    padding: 4px 22px 4px 6px;
    z-index: 3;
}

.vmrs-block strong,
.vmrs-block small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmrs-block strong {
    font-size: 10px;
    font-weight: var(--vm-weight-semibold);
    text-transform: capitalize;
}

.vmrs-block small {
    font-size: 9px;
}

.vmrs-block button {
    background: transparent;
    border: 0;
    color: var(--vm-text-secondary);
    padding: 2px;
    position: absolute;
    right: 3px;
    top: 3px;
}

.vmrs-block button svg {
    height: .8rem !important;
    width: .8rem !important;
}

.vmrs-tone-warning,
.vmrs-tone-amber {
    background: #fff7e8 !important;
    border-color: #f8ce83 !important;
    border-left-color: var(--vm-warning) !important;
}

.vmrs-tone-danger,
.vmrs-tone-rose {
    background: #fff0f0 !important;
    border-color: #f6b5b5 !important;
    border-left-color: var(--vm-danger) !important;
}

.vmrs-tone-purple,
.vmrs-tone-success,
.vmrs-tone-green,
.vmrs-tone-teal,
.vmrs-tone-indigo {
    background: #edf4ff !important;
    border-color: #9fc0ff !important;
    border-left-color: var(--vm-primary) !important;
}

.vmrs-mobile-agenda {
    display: none;
}

.vmrs-combined,
.vmrs-agenda {
    overflow: hidden;
}

.vmrs-combined > header,
.vmrs-agenda-day > header,
.vmrs-mobile-agenda > header {
    align-items: center;
    border-bottom: 1px solid var(--vm-border);
    display: flex;
    justify-content: space-between;
    padding: var(--vm-space-4);
}

.vmrs-combined h2,
.vmrs-agenda h2,
.vmrs-mobile-agenda h2,
.vmrs-unassigned h2,
.vmrs-drawer h2,
.vmrs-dialog h2 {
    color: var(--vm-text);
    font-size: var(--vm-font-size-section);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-section);
    margin: 0;
}

.vmrs-combined p,
.vmrs-drawer p,
.vmrs-dialog p {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    line-height: var(--vm-line-height-supporting);
    margin: 2px 0 0;
}

.vmrs-combined-list,
.vmrs-agenda-day {
    display: grid;
}

.vmrs-combined-row,
.vmrs-agenda-event {
    background: var(--vm-surface);
    border: 0;
    border-bottom: 1px solid var(--vm-border);
    color: var(--vm-text);
    display: grid;
    gap: var(--vm-space-4);
    grid-template-columns: .8fr 1.25fr 1.5fr 1fr 1fr;
    padding: var(--vm-space-3) var(--vm-space-4);
    text-align: left;
    width: 100%;
}

.vmrs-combined-row:hover,
.vmrs-agenda-event:hover {
    background: var(--vm-primary-soft) !important;
}

.vmrs-combined-row span,
.vmrs-agenda-event span {
    display: grid;
    min-width: 0;
}

.vmrs-combined-row strong,
.vmrs-agenda-event strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmrs-combined-row small,
.vmrs-agenda-event small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmrs-agenda {
    gap: 0;
}

.vmrs-agenda-day + .vmrs-agenda-day {
    border-top: 1px solid var(--vm-border);
}

.vmrs-agenda-event {
    grid-template-columns: .8fr 1.3fr 1.5fr 1fr;
}

.vmrs-inline-notice,
.vmrs-empty {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    padding: var(--vm-space-5);
    text-align: center;
}

.vmrs-inline-notice {
    background: var(--vm-primary-soft);
    border-bottom: 1px solid #c8d8ff;
    color: var(--vm-primary-hover);
    text-align: left;
}

.vmrs-unassigned {
    overflow: hidden;
}

.vmrs-unassigned > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: var(--vm-space-4);
}

.vmrs-unassigned > summary::-webkit-details-marker {
    display: none;
}

.vmrs-unassigned > summary span {
    background: var(--vm-primary-soft);
    border-radius: 999px;
    color: var(--vm-primary-hover);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
    padding: 2px 8px;
}

.vmrs-unassigned > div {
    border-top: 1px solid var(--vm-border);
}

.vmrs-unassigned-job {
    align-items: center;
    border-bottom: 1px solid var(--vm-border);
    display: grid;
    gap: var(--vm-space-3);
    grid-template-columns: 1fr 1.4fr 1fr auto;
    padding: var(--vm-space-3) var(--vm-space-4);
}

.vmrs-unassigned-job:last-child {
    border-bottom: 0;
}

.vmrs-unassigned-job strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

.vmrs-unassigned-job span,
.vmrs-unassigned-job small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
}

.vmrs-overlay {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: var(--vm-space-4);
    position: fixed;
    z-index: 100;
}

.vmrs-overlay-backdrop {
    background: rgba(7, 27, 58, .48);
    border: 0;
    inset: 0;
    position: absolute;
}

.vmrs-drawer,
.vmrs-dialog {
    background: var(--vm-surface);
    border: 1px solid var(--vm-border);
    box-shadow: var(--vm-shadow-modal);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.vmrs-drawer {
    align-self: stretch;
    border-radius: var(--vm-radius-panel) 0 0 var(--vm-radius-panel);
    margin: -1rem -1rem -1rem auto;
    max-height: none;
    padding: 0;
    width: min(31rem, calc(100vw - 2rem));
}

.vmrs-quick-drawer {
    width: min(42rem, calc(100vw - 2rem));
}

.vmrs-dialog {
    border-radius: var(--vm-radius-panel);
    padding: var(--vm-space-5);
    width: min(39rem, calc(100vw - 2rem));
}

.vmrs-drawer > header,
.vmrs-dialog > header {
    align-items: start;
    background: var(--vm-surface);
    border-bottom: 1px solid var(--vm-border);
    display: flex;
    justify-content: space-between;
    padding: var(--vm-space-5);
    position: sticky;
    top: 0;
    z-index: 3;
}

.vmrs-dialog > header {
    margin: calc(var(--vm-space-5) * -1) calc(var(--vm-space-5) * -1) var(--vm-space-4);
}

.vmrs-drawer > header > button,
.vmrs-dialog > header > button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--vm-radius-control);
    color: var(--vm-text-secondary);
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.vmrs-drawer > header > button:hover,
.vmrs-dialog > header > button:hover {
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
}

.vmrs-preview-details {
    display: grid;
    gap: var(--vm-space-3);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: var(--vm-space-5);
}

.vmrs-preview-details div {
    background: var(--vm-surface-subtle);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    min-width: 0;
    padding: var(--vm-space-3);
}

.vmrs-preview-details dt,
.vmrs-move-comparison span {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vmrs-preview-details dd {
    color: var(--vm-text);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-medium);
    margin: 1px 0;
    overflow-wrap: anywhere;
}

.vmrs-preview-details small,
.vmrs-move-comparison small {
    color: var(--vm-text-secondary);
    display: block;
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vmrs-drawer > section {
    border-top: 1px solid var(--vm-border);
    padding: var(--vm-space-5);
}

.vmrs-drawer > section h3 {
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-semibold);
    margin: 0 0 var(--vm-space-2);
}

.vmrs-drawer > footer,
.vmrs-dialog > footer,
.vmrs-form-grid footer {
    align-items: center;
    background: var(--vm-surface);
    border-top: 1px solid var(--vm-border);
    display: flex;
    flex-wrap: wrap;
    gap: var(--vm-space-2);
    justify-content: flex-end;
    padding: var(--vm-space-4) var(--vm-space-5);
}

.vmrs-drawer > footer {
    bottom: 0;
    position: sticky;
}

.vmrs-move-comparison {
    display: grid;
    gap: var(--vm-space-3);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vmrs-move-comparison article {
    background: var(--vm-surface-subtle);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    display: grid;
    gap: 3px;
    padding: var(--vm-space-3);
}

.vmrs-move-comparison strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

.vmrs-form-grid {
    display: grid;
    gap: var(--vm-space-4);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: var(--vm-space-4);
}

.vmrs-quick-form,
.vmrs-drawer > form {
    margin: 0;
    padding: var(--vm-space-5);
}

.vmrs-full-field {
    grid-column: 1 / -1;
}

.vmrs-form-grid footer.vmrs-full-field {
    margin: var(--vm-space-2) calc(var(--vm-space-5) * -1) calc(var(--vm-space-5) * -1);
}

.vmrs-review-button {
    align-self: end;
}

.vmrs-alert {
    border: 1px solid;
    border-radius: var(--vm-radius-control);
    margin-top: var(--vm-space-4);
    padding: var(--vm-space-3);
}

.vmrs-alert strong,
.vmrs-alert p {
    font-size: var(--vm-font-size-supporting);
    margin: 0;
}

.vmrs-alert-danger {
    background: var(--vm-danger-soft);
    border-color: #fecaca;
    color: #9f1d1d;
}

.vmrs-alert-warning {
    background: var(--vm-warning-soft);
    border-color: #f7d999;
    color: #7a4a00;
}

.vmrs-override-reason {
    margin-top: var(--vm-space-4);
}

@media (max-width: 1120px) {
    .vmrs-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vmrs-summary-item:nth-child(3) {
        border-right: 0;
    }

    .vmrs-summary-item:nth-child(n + 4) {
        border-top: 1px solid var(--vm-border);
    }

    .vmrs-combined-row {
        grid-template-columns: .8fr 1.25fr 1.4fr 1fr;
    }

    .vmrs-combined-row > :nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .vmrs-page {
        gap: var(--vm-space-3) !important;
    }

    .vmrs-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .vmrs-toolbar-primary {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .vmc-date-tools {
        grid-column: 1 / -1;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .vmrs-date-picker {
        flex: 1 0 10.5rem;
        min-width: 10.5rem;
    }

    .vmrs-segmented {
        max-width: 100%;
    }

    .vmrs-filter-drawer {
        width: 100%;
    }

    .vmrs-filter-drawer > summary {
        width: 100%;
    }

    .vmrs-filters {
        grid-template-columns: 1fr;
        left: 0;
        position: absolute;
        right: auto;
        width: 100%;
    }

    .vmrs-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vmrs-summary-item,
    .vmrs-summary-item:nth-child(3) {
        border-bottom: 1px solid var(--vm-border);
        border-right: 1px solid var(--vm-border);
    }

    .vmrs-summary-item:nth-child(even) {
        border-right: 0;
    }

    .vmrs-summary-item:last-child {
        border-bottom: 0;
        grid-column: 1 / -1;
    }

    .vmrs-scheduler {
        display: none;
    }

    .vmrs-mobile-agenda {
        display: grid;
        overflow: hidden;
    }

    .vmrs-mobile-job {
        align-items: center;
        background: var(--vm-surface) !important;
        border-bottom: 1px solid var(--vm-border) !important;
        border-left: 3px solid var(--vm-primary) !important;
        display: grid;
        gap: var(--vm-space-2);
        grid-template-columns: minmax(0, 1fr) auto;
        padding: var(--vm-space-3);
    }

    .vmrs-mobile-job:last-child {
        border-bottom: 0 !important;
    }

    .vmrs-mobile-job > button:first-child {
        background: transparent;
        border: 0;
        color: var(--vm-text);
        display: grid;
        gap: 3px;
        min-width: 0;
        text-align: left;
    }

    .vmrs-mobile-job > button:first-child > span:first-child {
        align-items: center;
        display: flex;
        gap: var(--vm-space-2);
    }

    .vmrs-mobile-job > button:first-child strong {
        font-size: var(--vm-font-size-body);
        font-weight: var(--vm-weight-medium);
    }

    .vmrs-mobile-job > button:first-child span,
    .vmrs-mobile-job > button:first-child small {
        color: var(--vm-text-secondary);
        font-size: var(--vm-font-size-supporting);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .vmrs-combined-row,
    .vmrs-agenda-event {
        gap: var(--vm-space-2);
        grid-template-columns: 1fr 1.5fr;
    }

    .vmrs-combined-row > :nth-child(n + 3),
    .vmrs-agenda-event > :nth-child(n + 3) {
        display: none;
    }

    .vmrs-unassigned-job {
        grid-template-columns: 1fr auto;
    }

    .vmrs-unassigned-job > :nth-child(2),
    .vmrs-unassigned-job > :nth-child(3) {
        display: none;
    }

    .vmrs-drawer {
        border-radius: var(--vm-radius-panel) var(--vm-radius-panel) 0 0;
        margin: auto -1rem -1rem;
        max-height: calc(100vh - 1rem);
        width: calc(100vw - 2rem);
    }

    .vmrs-overlay {
        align-items: flex-end;
    }

    .vmrs-dialog {
        padding: var(--vm-space-4);
    }

    .vmrs-dialog > header {
        margin: calc(var(--vm-space-4) * -1) calc(var(--vm-space-4) * -1) var(--vm-space-4);
        padding: var(--vm-space-4);
    }

    .vmrs-form-grid,
    .vmrs-preview-details,
    .vmrs-move-comparison {
        grid-template-columns: 1fr;
    }

    .vmrs-full-field {
        grid-column: auto;
    }

    .vmrs-quick-form,
    .vmrs-drawer > form,
    .vmrs-preview-details,
    .vmrs-drawer > section {
        padding: var(--vm-space-4);
    }

    .vmrs-form-grid footer.vmrs-full-field {
        margin: var(--vm-space-2) calc(var(--vm-space-4) * -1) calc(var(--vm-space-4) * -1);
    }
}

@media (max-width: 430px) {
    .vmrs-page-head {
        align-items: stretch !important;
    }

    .vmrs-page-head .vmc-new-booking {
        justify-content: center;
        width: 100%;
    }

    .vmrs-toolbar-primary {
        display: flex;
        flex-direction: column;
    }

    .vmc-date-tools {
        width: 100%;
    }

    .vmrs-summary {
        grid-template-columns: 1fr;
    }

    .vmrs-summary-item,
    .vmrs-summary-item:nth-child(3),
    .vmrs-summary-item:nth-child(even),
    .vmrs-summary-item:last-child {
        border-bottom: 1px solid var(--vm-border);
        border-right: 0;
        grid-column: auto;
    }

    .vmrs-summary-item:last-child {
        border-bottom: 0;
    }

    .vmrs-mobile-job {
        grid-template-columns: 1fr;
    }

    .vmrs-mobile-job > .vmrs-secondary-button {
        width: 100%;
    }

    .vmrs-drawer > footer,
    .vmrs-dialog > footer,
    .vmrs-form-grid footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .vmrs-drawer > footer > *,
    .vmrs-dialog > footer > *,
    .vmrs-form-grid footer > * {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Customer data migration */
html:has(.vmdm-page),
body:has(.vmdm-page) {
    max-width: 100%;
    overflow-x: clip;
}

body:has(.vmdm-page) :where(
    .fi-layout,
    .fi-main-ctn,
    .fi-main,
    .fi-page,
    .fi-page-content
) {
    max-width: 100%;
    min-width: 0;
}

body:has(.vmdm-page) .fi-main-ctn,
body:has(.vmdm-page) .fi-main {
    overflow-x: clip;
}

body:has(.vmdm-page) .fi-page {
    background: transparent !important;
    margin-inline: auto !important;
    max-width: 96rem !important;
    padding: 0 !important;
    width: 100% !important;
}

body:has(.vmdm-page) .fi-page-content,
body:has(.vmdm-page) .fi-topbar,
body:has(.vmdm-page) .fi-topbar > nav,
body:has(.vmdm-page) .fi-topbar [x-persist*="topbar.end"],
body:has(.vmdm-page) .vmx-topbar-actions {
    max-width: 100% !important;
    min-width: 0 !important;
}

.vmdm-page {
    display: grid;
    gap: var(--vm-space-5);
    max-width: 100%;
    min-width: 0;
    width: 100%;
    color: var(--vm-text);
    font-family: var(--vm-font-family);
}

.vmdm-page > * {
    max-width: 100%;
    min-width: 0;
}

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

.vmdm-page-header,
.vmdm-panel-heading,
.vmdm-title-row,
.vmdm-header-actions,
.vmdm-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--vm-space-4);
}

.vmdm-page-header {
    align-items: flex-end;
    min-width: 0;
}

.vmdm-page-header > div:first-child,
.vmdm-panel-heading > div:first-child,
.vmdm-history-main {
    min-width: 0;
}

.vmdm-page h1 {
    margin: var(--vm-space-2) 0 0;
    color: var(--vm-text);
    font-size: var(--vm-font-size-page-title);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-page-title);
    letter-spacing: 0;
}

.vmdm-page h2 {
    margin: 0;
    color: var(--vm-text);
    font-size: var(--vm-font-size-section);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-section);
    letter-spacing: 0;
}

.vmdm-page h3 {
    margin: 0;
    color: var(--vm-text);
    font-size: var(--vm-font-size-subsection);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-subsection);
}

.vmdm-page p {
    margin: var(--vm-space-1) 0 0;
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-body);
}

.vmdm-breadcrumb,
.vmdm-back {
    display: inline-flex;
    align-items: center;
    gap: var(--vm-space-2);
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
    text-decoration: none;
}

.vmdm-breadcrumb svg,
.vmdm-back svg {
    width: 16px;
    height: 16px;
}

.vmdm-breadcrumb strong,
.vmdm-back:hover {
    color: var(--vm-primary);
}

.vmdm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--vm-space-2);
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: var(--vm-radius-control);
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-medium);
    line-height: 20px;
    text-decoration: none;
    transition: background-color var(--vm-motion), border-color var(--vm-motion), color var(--vm-motion);
}

.vmdm-button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.vmdm-button:focus-visible,
.vmdm-page input:focus,
.vmdm-page select:focus,
.vmdm-page button:focus-visible,
.vmdm-page a:focus-visible {
    outline: 3px solid rgba(36, 107, 253, 0.2);
    outline-offset: 2px;
}

.vmdm-button--primary {
    border-color: var(--vm-primary);
    background: var(--vm-primary);
    color: #fff;
}

.vmdm-button--primary:hover {
    border-color: var(--vm-primary-hover);
    background: var(--vm-primary-hover);
}

.vmdm-button--secondary {
    border-color: var(--vm-border-strong);
    background: var(--vm-surface);
    color: var(--vm-text);
}

.vmdm-button--secondary:hover,
.vmdm-button--ghost:hover {
    border-color: var(--vm-primary);
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
}

.vmdm-button--ghost {
    border-color: transparent;
    background: transparent;
    color: var(--vm-text-secondary);
}

.vmdm-button--danger {
    border-color: #fecaca;
    background: #fff;
    color: #dc2626;
}

.vmdm-button--danger:hover {
    background: var(--vm-danger-soft);
}

.vmdm-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.vmdm-panel,
.vmdm-metrics article,
.vmdm-preview-card,
.vmdm-result article {
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    background: var(--vm-surface);
    box-shadow: var(--vm-shadow-card);
}

.vmdm-panel {
    min-width: 0;
    overflow: hidden;
}

.vmdm-panel-heading {
    padding: var(--vm-space-5);
    border-bottom: 1px solid var(--vm-border);
}

.vmdm-panel-heading p {
    font-size: var(--vm-font-size-supporting);
    line-height: var(--vm-line-height-supporting);
}

.vmdm-metrics,
.vmdm-preview-grid,
.vmdm-result {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--vm-space-4);
}

.vmdm-metrics article {
    display: flex;
    align-items: center;
    gap: var(--vm-space-4);
    min-height: 100px;
    padding: var(--vm-space-5);
}

.vmdm-metrics article div,
.vmdm-preview-card {
    display: grid;
    gap: var(--vm-space-1);
}

.vmdm-metrics small,
.vmdm-preview-card small,
.vmdm-result small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
}

.vmdm-metrics strong,
.vmdm-preview-card strong,
.vmdm-result strong {
    color: var(--vm-text);
    font-size: 22px;
    font-weight: var(--vm-weight-semibold);
    line-height: 28px;
}

.vmdm-icon,
.vmdm-file-icon,
.vmdm-progress-icon,
.vmdm-empty > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: var(--vm-radius-control);
}

.vmdm-icon svg,
.vmdm-file-icon svg,
.vmdm-progress-icon svg,
.vmdm-empty > span svg {
    width: 22px;
    height: 22px;
}

.vmdm-icon--blue,
.vmdm-file-icon {
    background: var(--vm-primary-soft);
    color: var(--vm-primary);
}

.vmdm-icon--green {
    background: var(--vm-success-soft);
    color: var(--vm-success-text);
}

.vmdm-icon--amber {
    background: var(--vm-warning-soft);
    color: var(--vm-warning-text);
}

.vmdm-icon--purple {
    background: var(--vm-purple-soft);
    color: var(--vm-purple);
}

.vmdm-filters {
    display: flex;
    align-items: center;
    gap: var(--vm-space-2);
}

.vmdm-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.vmdm-page select {
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid var(--vm-control-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface);
    color: var(--vm-text);
    font: inherit;
    font-size: var(--vm-font-size-body);
    line-height: 20px;
}

.vmdm-page input::placeholder {
    color: var(--vm-text-muted);
}

.vmdm-search {
    position: relative;
    min-width: min(280px, 34vw);
}

.vmdm-search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--vm-text-secondary);
    transform: translateY(-50%);
    pointer-events: none;
}

.vmdm-search input {
    padding-left: 39px;
}

.vmdm-history {
    overflow-x: auto;
}

.vmdm-history-row {
    display: grid;
    grid-template-columns: 44px minmax(220px, 1fr) 90px 170px 20px;
    align-items: center;
    gap: var(--vm-space-4);
    min-width: 680px;
    padding: var(--vm-space-4) var(--vm-space-5);
    border-bottom: 1px solid var(--vm-border);
    color: var(--vm-text);
    text-decoration: none;
}

.vmdm-history-row:last-child {
    border-bottom: 0;
}

.vmdm-history-row:hover {
    background: var(--vm-surface-subtle);
}

.vmdm-history-main {
    display: grid;
    gap: 2px;
}

.vmdm-history-main strong {
    overflow: hidden;
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-body);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-history-main small,
.vmdm-history-count {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-regular);
    line-height: var(--vm-line-height-meta);
}

.vmdm-row-arrow {
    width: 18px;
    color: var(--vm-text-muted);
}

.vmdm-status,
.vmdm-required,
.vmdm-muted-badge,
.vmdm-valid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: max-content;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    line-height: 16px;
}

.vmdm-status--completed,
.vmdm-status--ready,
.vmdm-valid {
    background: var(--vm-success-soft);
    color: var(--vm-success-text);
}

.vmdm-status--validating,
.vmdm-status--importing,
.vmdm-status--ready-for-review,
.vmdm-status--uploaded {
    background: var(--vm-primary-soft);
    color: var(--vm-primary-hover);
}

.vmdm-status--completed-with-errors,
.vmdm-status--review,
.vmdm-status--duplicate,
.vmdm-required {
    background: var(--vm-warning-soft);
    color: var(--vm-warning-text);
}

.vmdm-status--failed,
.vmdm-status--invalid,
.vmdm-status--cancelled {
    background: var(--vm-danger-soft);
    color: #c62828;
}

.vmdm-status--rolled-back,
.vmdm-status--rollback-protected,
.vmdm-status--skipped,
.vmdm-muted-badge {
    background: #eef1f5;
    color: var(--vm-text-secondary);
}

.vmdm-valid svg {
    width: 14px;
    height: 14px;
}

.vmdm-pagination {
    padding: var(--vm-space-4) var(--vm-space-5);
    border-top: 1px solid var(--vm-border);
}

.vmdm-empty {
    display: grid;
    justify-items: center;
    gap: var(--vm-space-2);
    padding: var(--vm-space-10) var(--vm-space-5);
    text-align: center;
}

.vmdm-empty > span {
    background: var(--vm-primary-soft);
    color: var(--vm-primary);
}

.vmdm-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: var(--vm-space-4);
}

.vmdm-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--vm-space-3);
    padding: var(--vm-space-5);
}

.vmdm-template {
    display: flex;
    align-items: center;
    gap: var(--vm-space-3);
    min-height: 62px;
    padding: var(--vm-space-3);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-control);
    background: var(--vm-surface);
    color: var(--vm-text);
    text-align: left;
}

.vmdm-template:hover {
    border-color: #bcd0ff;
    background: var(--vm-primary-soft);
}

.vmdm-template > svg {
    width: 20px;
    height: 20px;
    color: var(--vm-primary);
}

.vmdm-template span {
    display: grid;
}

.vmdm-template strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

.vmdm-template small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
}

.vmdm-settings-form {
    display: grid;
    gap: var(--vm-space-3);
    padding: var(--vm-space-5);
}

.vmdm-settings-form label,
.vmdm-form-grid label,
.vmdm-decision {
    display: grid;
    gap: 6px;
    color: var(--vm-text);
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-supporting);
}

.vmdm-settings-form .vmdm-button {
    justify-self: end;
}

.vmdm-error,
.vmdm-inline-error {
    color: #c62828;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-medium);
    line-height: var(--vm-line-height-meta);
}

.vmdm-inline-error {
    margin: var(--vm-space-4) var(--vm-space-5) 0;
    padding: var(--vm-space-3);
    border: 1px solid #fecaca;
    border-radius: var(--vm-radius-control);
    background: var(--vm-danger-soft);
}

.vmdm-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-card);
    background: var(--vm-surface);
    list-style: none;
}

.vmdm-steps li {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 var(--vm-space-3);
    min-height: 70px;
    padding: var(--vm-space-4);
    border-right: 1px solid var(--vm-border);
}

.vmdm-steps li:last-child {
    border-right: 0;
}

.vmdm-steps li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-row: 1 / 3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eef1f5;
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
}

.vmdm-steps li > strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-supporting);
}

.vmdm-steps li > small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vmdm-steps li.is-active {
    background: var(--vm-primary-soft);
}

.vmdm-steps li.is-active > span,
.vmdm-steps li.is-complete > span {
    background: var(--vm-primary);
    color: #fff;
}

.vmdm-steps li.is-complete > strong {
    color: var(--vm-primary-hover);
}

.vmdm-upload-form {
    width: min(880px, 100%);
    justify-self: center;
    padding: var(--vm-space-5);
}

.vmdm-form-section {
    display: flex;
    align-items: flex-start;
    gap: var(--vm-space-3);
    margin-bottom: var(--vm-space-4);
}

.vmdm-form-section:not(:first-child) {
    margin-top: var(--vm-space-6);
    padding-top: var(--vm-space-5);
    border-top: 1px solid var(--vm-border);
}

.vmdm-section-number,
.vmdm-row-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--vm-primary);
    color: #fff;
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
}

.vmdm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--vm-space-4);
}

.vmdm-decision-grid {
    align-items: start;
}

.vmdm-duplicate-field {
    align-self: start;
    align-content: start;
}

.vmdm-form-grid label > span {
    color: var(--vm-danger);
}

.vmdm-form-grid label > small {
    color: var(--vm-text-secondary);
    font-weight: var(--vm-weight-regular);
}

.vmdm-wide {
    grid-column: 1 / -1;
}

.vmdm-dropzone {
    position: relative;
    display: grid;
    justify-items: center;
    gap: var(--vm-space-2);
    min-height: 170px;
    padding: var(--vm-space-6);
    border: 1px dashed #9db8f5;
    border-radius: var(--vm-radius-card);
    background: #f8faff;
    color: var(--vm-text);
    text-align: center;
    cursor: pointer;
}

.vmdm-dropzone:hover {
    border-color: var(--vm-primary);
    background: var(--vm-primary-soft);
}

.vmdm-dropzone > svg {
    width: 34px;
    height: 34px;
    color: var(--vm-primary);
}

.vmdm-dropzone > strong {
    font-size: var(--vm-font-size-body);
    font-weight: var(--vm-weight-semibold);
}

.vmdm-dropzone > span,
.vmdm-dropzone > em {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    font-style: normal;
}

.vmdm-dropzone > em {
    display: inline-flex;
    align-items: center;
    gap: var(--vm-space-2);
    color: var(--vm-primary-hover);
}

.vmdm-dropzone > em svg {
    width: 18px;
    height: 18px;
}

.vmdm-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vmdm-security-note {
    display: flex;
    align-items: flex-start;
    gap: var(--vm-space-3);
    margin-top: var(--vm-space-4);
    padding: var(--vm-space-4);
    border: 1px solid #cfe0ff;
    border-radius: var(--vm-radius-control);
    background: var(--vm-primary-soft);
}

.vmdm-security-note > svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: var(--vm-primary);
}

.vmdm-security-note > div {
    display: grid;
    gap: 2px;
}

.vmdm-security-note strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-semibold);
}

.vmdm-security-note span {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
}

.vmdm-form-actions {
    justify-content: flex-end;
    margin: var(--vm-space-5) calc(var(--vm-space-5) * -1) calc(var(--vm-space-5) * -1);
    padding: var(--vm-space-4) var(--vm-space-5);
    border-top: 1px solid var(--vm-border);
    background: var(--vm-surface-subtle);
}

.vmdm-title-row {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.vmdm-title-row h1 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.vmdm-header-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.vmdm-mapping-list {
    overflow-x: auto;
}

.vmdm-mapping-head,
.vmdm-mapping-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.2fr) minmax(220px, 1fr) 100px;
    align-items: center;
    gap: var(--vm-space-4);
    min-width: 800px;
    padding: var(--vm-space-3) var(--vm-space-5);
    border-bottom: 1px solid var(--vm-border);
}

.vmdm-mapping-head {
    background: var(--vm-surface-subtle);
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
    font-weight: var(--vm-weight-semibold);
    line-height: var(--vm-line-height-meta);
}

.vmdm-mapping-row > div,
.vmdm-mapping-row label {
    min-width: 0;
}

.vmdm-mapping-row strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

.vmdm-sample {
    display: block;
    overflow: hidden;
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-supporting);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-progress-panel {
    display: grid;
    justify-items: center;
    gap: var(--vm-space-3);
    padding: var(--vm-space-10);
    text-align: center;
}

.vmdm-progress-icon {
    background: var(--vm-primary-soft);
    color: var(--vm-primary);
}

.vmdm-progress-icon svg {
    animation: vmdm-spin 1s linear infinite;
}

@keyframes vmdm-spin {
    to {
        transform: rotate(360deg);
    }
}

.vmdm-progress {
    width: min(600px, 100%);
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf6;
}

.vmdm-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--vm-primary);
    transition: width var(--vm-motion);
}

.vmdm-progress-panel > strong {
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

.vmdm-preview-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: var(--vm-space-3);
}

.vmdm-preview-card {
    min-width: 0;
    padding: var(--vm-space-4);
    border-top: 3px solid var(--vm-primary);
}

.vmdm-preview-card--green {
    border-top-color: var(--vm-success);
}

.vmdm-preview-card--red {
    border-top-color: var(--vm-danger);
}

.vmdm-preview-card--amber {
    border-top-color: var(--vm-warning);
}

.vmdm-preview-card--purple {
    border-top-color: var(--vm-purple);
}

.vmdm-preview-card--gray {
    border-top-color: var(--vm-text-muted);
}

.vmdm-preview-card strong {
    font-size: 20px;
    line-height: 26px;
}

.vmdm-review-list {
    display: grid;
}

.vmdm-review-list > article {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(360px, 1.6fr) 170px;
    align-items: center;
    gap: var(--vm-space-5);
    padding: var(--vm-space-4) var(--vm-space-5);
    border-bottom: 1px solid var(--vm-border);
}

.vmdm-review-list > article:last-child {
    border-bottom: 0;
}

.vmdm-review-summary {
    display: flex;
    align-items: center;
    gap: var(--vm-space-3);
    min-width: 0;
}

.vmdm-review-summary > div {
    display: grid;
    min-width: 0;
}

.vmdm-review-summary strong {
    overflow: hidden;
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-review-summary small {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
}

.vmdm-review-list dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--vm-space-2) var(--vm-space-4);
    margin: 0;
}

.vmdm-review-list dl div {
    min-width: 0;
}

.vmdm-review-list dt,
.vmdm-review-list dd {
    overflow: hidden;
    margin: 0;
    font-size: var(--vm-font-size-meta);
    line-height: var(--vm-line-height-meta);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vmdm-review-list dt {
    color: var(--vm-text-muted);
}

.vmdm-review-list dd {
    color: var(--vm-text);
}

.vmdm-result {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.vmdm-result article {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 var(--vm-space-3);
    padding: var(--vm-space-4);
}

.vmdm-result article > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    border-radius: var(--vm-radius-control);
    background: var(--vm-primary-soft);
    color: var(--vm-primary);
}

.vmdm-result article > span svg {
    width: 18px;
    height: 18px;
}

.vmdm-result strong {
    font-size: 18px;
    line-height: 24px;
}

.vmdm-error-list {
    display: grid;
}

.vmdm-error-list > div {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: var(--vm-space-3);
    padding: var(--vm-space-3) var(--vm-space-5);
    border-bottom: 1px solid var(--vm-border);
}

.vmdm-error-list > div:last-child {
    border-bottom: 0;
}

.vmdm-error-list span {
    color: var(--vm-text-secondary);
    font-size: var(--vm-font-size-meta);
}

.vmdm-error-list strong {
    color: #b42318;
    font-size: var(--vm-font-size-supporting);
    font-weight: var(--vm-weight-medium);
}

@media (max-width: 1280px) {
    .vmdm-preview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .vmdm-bottom-grid {
        grid-template-columns: 1fr;
    }

    .vmdm-review-list > article {
        grid-template-columns: minmax(180px, 0.8fr) minmax(300px, 1.4fr) 150px;
    }
}

@media (max-width: 1024px) {
    .vmdm-metrics,
    .vmdm-result {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vmdm-steps {
        overflow-x: auto;
    }

    .vmdm-steps li {
        min-width: 190px;
    }

    .vmdm-review-list > article {
        grid-template-columns: 1fr 180px;
    }

    .vmdm-review-list dl {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .vmdm-batch-page .vmdm-form-actions,
    .vmdm-wizard-page .vmdm-form-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
    }
}

@media (max-width: 768px) {
    .vmdm-page {
        gap: var(--vm-space-4);
    }

    .vmdm-page-header,
    .vmdm-panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .vmdm-page h1 {
        font-size: 22px;
        line-height: 30px;
    }

    .vmdm-page-header .vmdm-button,
    .vmdm-header-actions {
        width: 100%;
    }

    .vmdm-header-actions .vmdm-button {
        flex: 1 1 auto;
    }

    .vmdm-filters {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .vmdm-search {
        width: 100%;
        min-width: 0;
    }

    .vmdm-history-row {
        grid-template-columns: 40px minmax(190px, 1fr) 150px 18px;
        min-width: 520px;
        padding-inline: var(--vm-space-4);
    }

    .vmdm-history-count {
        display: none;
    }

    .vmdm-template-grid,
    .vmdm-form-grid {
        grid-template-columns: 1fr;
    }

    .vmdm-wide {
        grid-column: auto;
    }

    .vmdm-upload-form {
        padding: var(--vm-space-4);
    }

    .vmdm-form-actions {
        margin: var(--vm-space-5) calc(var(--vm-space-4) * -1) calc(var(--vm-space-4) * -1);
        padding-inline: var(--vm-space-4);
    }

    .vmdm-review-list > article {
        grid-template-columns: 1fr;
        gap: var(--vm-space-3);
        padding-inline: var(--vm-space-4);
    }

    .vmdm-mapping-list {
        overflow: visible;
        padding: var(--vm-space-3);
    }

    .vmdm-mapping-head {
        display: none;
    }

    .vmdm-mapping-row {
        grid-template-columns: 1fr;
        gap: var(--vm-space-3);
        min-width: 0;
        margin-bottom: var(--vm-space-3);
        padding: var(--vm-space-4);
        border: 1px solid var(--vm-border);
        border-radius: var(--vm-radius-control);
        background: var(--vm-surface);
    }

    .vmdm-mapping-row:last-child {
        margin-bottom: 0;
    }

    .vmdm-mapping-row > [data-label]::before {
        display: block;
        margin-bottom: 4px;
        color: var(--vm-text-muted);
        content: attr(data-label);
        font-size: var(--vm-font-size-meta);
        font-weight: var(--vm-weight-medium);
        line-height: var(--vm-line-height-meta);
    }

    .vmdm-review-list dl {
        grid-column: auto;
        grid-row: auto;
    }

    .vmdm-decision {
        width: 100%;
    }

    .vmdm-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .vmdm-metrics,
    .vmdm-result {
        grid-template-columns: 1fr;
    }

    .vmdm-metrics article {
        min-height: 88px;
        padding: var(--vm-space-4);
    }

    .vmdm-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--vm-space-2);
    }

    .vmdm-preview-card {
        padding: var(--vm-space-3);
    }

    .vmdm-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .vmdm-form-actions > * {
        width: 100%;
    }

    .vmdm-review-list dl {
        grid-template-columns: 1fr;
    }

    .vmdm-error-list > div {
        grid-template-columns: 1fr;
        gap: 2px;
        padding-inline: var(--vm-space-4);
    }
}
