/* ---------------------------------------------------------------------------
   Design tokens. Everything below uses these; do not add raw colours, radii or
   shadows to components. Dark values live in the two blocks after :root.
   --------------------------------------------------------------------------- */
:root {
    color-scheme: light;

    /* Surfaces and text */
    --relax-bg: #f8fafc;
    --relax-surface: #ffffff;
    --relax-surface-2: #f1f5f9;
    --relax-border: #e2e8f0;
    /* The edge that shows where a field or box is: at least 3:1 on every surface (WCAG 1.4.11). */
    --relax-field-border: #7c8798;
    --relax-header-bg: #ffffff;
    --relax-sidebar: #0f172a;
    /* Text on --relax-sidebar, which is dark in both themes. */
    --relax-sidebar-text: #e6edf3;
    --relax-sidebar-text-muted: #94a3b8;
    --relax-sidebar-accent: #2dd4bf;
    --relax-text: #0f172a;
    --relax-text-muted: #5b6b80;

    /* Brand. --relax-accent is for accents on the page (links, borders, icons); filled buttons use
       --relax-accent-fill with --relax-on-accent text, which keeps AA contrast. */
    --relax-accent: #0f766e;
    --relax-accent-hover: #115e59;
    --relax-accent-muted: rgba(15, 118, 110, 0.10);
    --relax-accent-fill: #0f766e;
    --relax-accent-fill-hover: #115e59;
    --relax-on-accent: #ffffff;
    --relax-hero-gradient: linear-gradient(135deg, #0f766e 0%, #0e8f86 55%, #0e7490 100%);

    /* Status */
    --relax-danger: #ef4444;
    --relax-danger-text: #b91c1c;
    --relax-danger-bg: #fef2f2;
    --relax-danger-border: #fecaca;
    --relax-success: #10b981;
    --relax-success-text: #047857;
    --relax-warning: #f59e0b;
    --relax-warning-text: #92400e;
    --relax-info: #0ea5e9;
    --relax-info-text: #0369a1;

    /* Shape */
    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-pill: 999px;

    /* Spacing (4px scale) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.14);

    /* Type scale */
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-md: 15px;
    --fs-lg: 18px;
    --fs-xl: 22px;

    /* Motion */
    --dur-fast: 120ms;
    --dur-med: 220ms;
    --ease: cubic-bezier(0.2, 0, 0, 1);

    /* Layers */
    --z-header: 20;
    --z-nav: 20;
    --z-sheet: 40;
    --z-toast: 50;

    /* Layout */
    --nav-h: 72px;
    --touch-min: 44px;
}

/* Dark theme: follows the phone unless the guest picked light explicitly (data-theme on <html>). */
/* The palette is declared twice (system dark, and explicit dark) because CSS has no way to share
   one block between a media query and an attribute selector. Keep the two in sync. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --relax-bg: #161b22;
        --relax-surface: #21262d;
        --relax-surface-2: #2b323b;
        --relax-border: #30363d;
        --relax-field-border: #848d97;
        --relax-header-bg: #21262d;
        --relax-sidebar: #0d1117;
        --relax-text: #e6edf3;
        --relax-text-muted: #8b949e;
        --relax-accent: #2dd4bf;
        --relax-accent-hover: #5eead4;
        --relax-accent-muted: rgba(45, 212, 191, 0.14);
        --relax-accent-fill: #2dd4bf;
        --relax-accent-fill-hover: #5eead4;
        --relax-on-accent: #04302c;
        --relax-hero-gradient: linear-gradient(135deg, #115e59 0%, #0f766e 55%, #155e75 100%);
        --relax-danger: #f87171;
        --relax-danger-text: #fca5a5;
        --relax-danger-bg: rgba(248, 113, 113, 0.12);
        --relax-danger-border: rgba(248, 113, 113, 0.35);
        --relax-success: #34d399;
        --relax-success-text: #6ee7b7;
        --relax-warning: #fbbf24;
        --relax-warning-text: #fcd34d;
        --relax-info: #38bdf8;
        --relax-info-text: #7dd3fc;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --relax-field-border: #848d97;
    --relax-bg: #161b22;
    --relax-surface: #21262d;
    --relax-surface-2: #2b323b;
    --relax-border: #30363d;
    --relax-header-bg: #21262d;
    --relax-sidebar: #0d1117;
    --relax-text: #e6edf3;
    --relax-text-muted: #8b949e;
    --relax-accent: #2dd4bf;
    --relax-accent-hover: #5eead4;
    --relax-accent-muted: rgba(45, 212, 191, 0.14);
    --relax-accent-fill: #2dd4bf;
    --relax-accent-fill-hover: #5eead4;
    --relax-on-accent: #04302c;
    --relax-hero-gradient: linear-gradient(135deg, #115e59 0%, #0f766e 55%, #155e75 100%);
    --relax-danger: #f87171;
    --relax-danger-text: #fca5a5;
    --relax-danger-bg: rgba(248, 113, 113, 0.12);
    --relax-danger-border: rgba(248, 113, 113, 0.35);
    --relax-success: #34d399;
    --relax-success-text: #6ee7b7;
    --relax-warning: #fbbf24;
    --relax-warning-text: #fcd34d;
    --relax-info: #38bdf8;
    --relax-info-text: #7dd3fc;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
}


/* One visible focus ring for everything focusable (keyboard and TalkBack/switch users). */
:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
    outline: 2px solid var(--relax-accent);
    outline-offset: 2px;
}

/* Honour the phone's "reduce motion" setting everywhere, including the staggered entrances. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================================================
   Shared components (GuestUI/Shared): Icon, StatusBadge, ConfirmInline, QuantityStepper,
   MenuItemRow, PageLoader, Toast, Sheet
   ========================================================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.icon {
    font-size: 1.25em;
    line-height: 1;
    vertical-align: middle;
}

/* A menu row that is a <button>: look like the old div row. */
button.menu-item {
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    background: var(--relax-surface);
}

/* Inline confirm */
.cancel-confirm {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
    font-size: var(--fs-sm);
}

.confirm-btn {
    min-height: var(--touch-min);
    padding: 0 var(--sp-4);
    border: 1px solid var(--relax-border);
    border-radius: var(--r-pill);
    background: var(--relax-surface);
    color: var(--relax-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.confirm-btn--danger {
    background: var(--relax-danger-text);
    border-color: var(--relax-danger-text);
    color: var(--relax-surface);
}

.confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Quantity stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}

.qty-stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    height: var(--touch-min);
    border-radius: 50%;
    border: 1px solid var(--relax-border);
    background: var(--relax-surface);
    color: var(--relax-text);
    cursor: pointer;
}

.qty-stepper-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-stepper-value {
    min-width: 2ch;
    text-align: center;
    font-weight: 600;
}

/* Page states: error and empty */
.page-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--sp-2);
    padding: var(--sp-8) var(--sp-5);
    color: var(--relax-text-muted);
}

.page-state-icon {
    font-size: 48px;
    color: var(--relax-text-muted);
}

.page-state--error .page-state-icon {
    color: var(--relax-danger);
}

.page-state-title {
    margin: 0;
    font-size: var(--fs-lg);
    color: var(--relax-text);
}

.page-state-text {
    margin: 0;
    max-width: 32ch;
    font-size: var(--fs-md);
}

.page-state-action {
    margin-top: var(--sp-3);
}

/* Toast */
.toast-host {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + var(--sp-3));
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: var(--z-toast);
}

.toast {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    max-width: calc(100% - 2 * var(--sp-4));
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-pill);
    background: var(--relax-text);
    color: var(--relax-bg);
    box-shadow: var(--shadow-lg);
    font-size: var(--fs-sm);
    font-weight: 600;
    animation: fadeSlideUp var(--dur-med) var(--ease);
}

.toast--error {
    background: var(--relax-danger-text);
    color: var(--relax-surface);
}

/* RequestFailureNotice.razor: above the bottom menu and any dialog, until dismissed. */
.request-failure-host {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--sp-3));
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 2100;
}

/* While the notice shows, a focused control is scrolled clear of it (WCAG 2.4.11). */
html:has(.request-failure) {
    scroll-padding-bottom: 10rem;
}

html:has(.bottom-nav) .request-failure-host {
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + var(--sp-3));
}

.request-failure {
    pointer-events: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
    max-width: min(640px, calc(100% - 2 * var(--sp-4)));
    padding: var(--sp-3) var(--sp-4);
    border: 2px solid var(--relax-danger-text);
    border-radius: var(--r-md);
    background: var(--relax-surface);
    color: var(--relax-text);
    box-shadow: var(--shadow-lg);
    font-size: var(--fs-sm);
}

.request-failure > .icon { color: var(--relax-danger-text); }
.request-failure-text { flex: 1 1 200px; }

.request-failure-button {
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    padding: 0 var(--sp-3);
    border: 1px solid var(--relax-border);
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--relax-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* Bottom sheet */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.5);
    z-index: var(--z-sheet);
    animation: fadeIn var(--dur-med) var(--ease);
}

.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85dvh;
    display: flex;
    flex-direction: column;
    background: var(--relax-surface);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: var(--shadow-lg);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: calc(var(--z-sheet) + 1);
    animation: sheetUp var(--dur-med) var(--ease);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    margin: var(--sp-2) auto 0;
    border-radius: var(--r-pill);
    background: var(--relax-border);
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-2) var(--sp-4) 0 var(--sp-5);
}

.sheet-title {
    margin: 0;
    font-size: var(--fs-lg);
}

.sheet-body {
    overflow-y: auto;
    padding: var(--sp-3) var(--sp-5) var(--sp-5);
}

@media (min-width: 700px) {
    .sheet {
        left: 50%;
        right: auto;
        bottom: 50%;
        width: 480px;
        transform: translate(-50%, 50%);
        border-radius: var(--r-xl);
        animation: fadeIn var(--dur-med) var(--ease);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}


/* ==========================================================================
   Radzen theme alignment: Radzen's material stylesheet sets its own variables on :root; these
   override the ones that decide how buttons, inputs and alerts look so they match our tokens
   (and follow light/dark). :root:root wins over the theme stylesheet regardless of load order.
   ========================================================================== */
:root:root {
    --rz-text-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --rz-body-background-color: var(--relax-bg);
    --rz-base-background-color: var(--relax-surface);
    --rz-text-color: var(--relax-text);
    --rz-text-secondary-color: var(--relax-text-muted);
    --rz-primary: var(--relax-accent-fill);
    --rz-primary-light: var(--relax-accent-fill-hover);
    --rz-primary-lighter: var(--relax-accent-muted);
    --rz-primary-dark: var(--relax-accent-fill-hover);
    --rz-primary-darker: var(--relax-accent-fill-hover);
    --rz-on-primary: var(--relax-on-accent);
    --rz-on-primary-light: var(--relax-on-accent);
    --rz-on-primary-lighter: var(--relax-text);
    --rz-on-primary-dark: var(--relax-on-accent);
    --rz-on-primary-darker: var(--relax-on-accent);
    --rz-border-radius: var(--r-sm);
    --rz-input-background-color: var(--relax-surface);
}

.rz-alert.rz-variant-filled:not(.rz-shade-lighter):not(.rz-shade-light), .rz-button.rz-variant-filled, .rz-badge.rz-variant-filled {
    --rz-info: #0369a1;
    --rz-info-light: #075985;
    --rz-info-lighter: #075985;
    --rz-info-dark: #075985;
    --rz-success: #047857;
    --rz-success-light: #065f46;
    --rz-success-lighter: #065f46;
    --rz-success-dark: #065f46;
    --rz-warning: #b45309;
    --rz-warning-light: #92400e;
    --rz-warning-lighter: #92400e;
    --rz-warning-dark: #92400e;
    --rz-danger: #b91c1c;
    --rz-danger-light: #991b1b;
    --rz-danger-lighter: #991b1b;
    --rz-danger-dark: #991b1b;
}

/* A navigation panel on --relax-sidebar: what is on it takes the colours that are readable there. */
.on-sidebar {
    --relax-text: var(--relax-sidebar-text);
    --relax-text-muted: var(--relax-sidebar-text-muted);
    --relax-accent: var(--relax-sidebar-accent);
    --relax-accent-muted: rgba(45, 212, 191, 0.14);
    --relax-on-accent: #04302c;
}

/* Fields and boxes have an edge that can be seen. Focus keeps its accent edge and errors their red one. */
:root:root input:not([type="checkbox"], [type="radio"], [type="range"], [type="submit"], [type="button"], :focus, .invalid, [aria-invalid="true"]),
:root:root textarea:not(:focus, .invalid, [aria-invalid="true"]),
:root:root select:not(:focus, .invalid, [aria-invalid="true"]),
:root:root .rz-dropdown:not(:focus-within, .invalid),
:root:root .rz-multiselect:not(:focus-within, .invalid),
:root:root .rz-numeric:not(:focus-within, .invalid),
:root:root .rz-datepicker > .rz-inputtext:not(:focus),
:root:root .rz-chkbox-box:not(.rz-state-active),
:root:root .rz-colorpicker {
    border-color: var(--relax-field-border);
}

:root:root .rz-switch:not(.rz-switch-checked) .rz-switch-circle {
    background-color: var(--relax-field-border);
}

/* On: a solid track; the theme's faint tint hid where the knob sits. */
:root:root .rz-switch.rz-switch-checked .rz-switch-circle {
    background-color: var(--relax-accent-fill);
}

:root:root .rz-switch.rz-switch-checked .rz-switch-circle::before {
    background-color: var(--relax-on-accent);
}

/* The theme's quiet placeholder and light info box are too faint to read. */
:root:root {
    --rz-input-placeholder-color: var(--relax-text-muted);
}

:root .rz-alert.rz-info.rz-shade-lighter {
    --rz-alert-background-color: var(--relax-surface-2);
    --rz-alert-color: var(--relax-text);
    --rz-alert-title-color: var(--relax-text);
    --rz-alert-icon-color: var(--relax-info-text);
}

/* The grid's sort arrows are icon-font words: not read out (the column header carries the sort state). */
:root .rz-sortable-column .rzi-sort::before { content: "sort" / ""; }
:root .rz-sortable-column .rzi-sort-asc::before { content: "arrow_drop_up" / ""; }
:root .rz-sortable-column .rzi-sort-desc::before { content: "arrow_drop_down" / ""; }

/* Notifications are tinted by severity; the theme's own shades are too faint to read. */
:root:root {
    --rz-notification-error-color: var(--relax-danger-text);
    --rz-notification-success-color: var(--relax-success-text);
    --rz-notification-warning-color: var(--relax-warning-text);
    --rz-notification-info-color: var(--relax-info-text);
    --rz-notification-error-background-color: var(--relax-surface);
    --rz-notification-success-background-color: var(--relax-surface);
    --rz-notification-warning-background-color: var(--relax-surface);
    --rz-notification-info-background-color: var(--relax-surface);
}

/* Wider text spacing set by the user (1.4.12) makes a drop-down or grid text wrap, never cuts it off. */
:root .rz-dropdown,
:root .rz-multiselect {
    height: auto !important; /* the theme sets a fixed height with a selector that differs per variant */
    min-height: var(--rz-input-height);
}

:root .rz-dropdown-label,
:root .rz-multiselect-label-container,
:root .rz-grid-table thead th .rz-column-title-content,
:root .rz-grid-table td .rz-cell-data {
    white-space: normal;
    overflow-wrap: break-word;
}

/* Also a value without spaces (a date, an e-mail address) may break when the column cannot widen. */
:root .rz-grid-table td .rz-cell-data {
    overflow-wrap: anywhere;
}

:root .rz-grid-table td .rz-cell-data .status-badge {
    white-space: normal;
}

:root .rz-grid-table thead th .rz-column-title {
    height: auto;
    min-width: 0;
    overflow: visible;
}

:root .rz-grid-table thead th .rz-column-title-content {
    overflow-wrap: anywhere;
}

/* The native time field has no focus ring of its own in every theme. */
.time-input:focus-visible,
.time-input:focus-within {
    outline: 2px solid var(--relax-accent);
    outline-offset: 2px;
}

/* Pinch-zoom stays available (accessibility) but double-tap no longer delays or zooms taps. */
a, button, input, select, textarea, label, summary, [role="button"] {
    touch-action: manipulation;
}

/* Radzen overlays (dropdown panels, grid filter popups) follow the surface colour in both themes. */
:root:root {
    --rz-overlay-background-color: var(--relax-surface);
    --rz-grid-filter-background-color: var(--relax-surface);
    --rz-grid-filter-buttons-background-color: var(--relax-surface);
    --rz-grid-apply-filter-button-background-color: var(--relax-surface);
    --rz-grid-clear-filter-button-background-color: var(--relax-surface);
}

/* Modal (DesignSystem/Modal.razor): centred card on wide screens, bottom sheet on phones. */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    background: rgba(2, 6, 23, 0.55);
    animation: fadeIn var(--dur-fast) var(--ease);
}

.modal-overlay--blocking {
    z-index: 2000;
    background: rgba(2, 6, 23, 0.85);
}

.modal-card {
    width: 100%;
    max-width: var(--modal-max, 480px);
    max-height: 90dvh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--sp-5);
    background: var(--relax-surface);
    color: var(--relax-text);
    border: 1px solid var(--relax-border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    outline: none;
}

.modal-card--center {
    text-align: center;
    padding: var(--sp-8) var(--sp-6);
}

@media (max-width: 600px) {
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal-card {
        max-width: none;
        max-height: 92dvh;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
        border-bottom: 0;
        padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
        animation: sheetUp var(--dur-med) var(--ease);
    }

    .modal-card--center {
        border-radius: var(--r-xl);
        margin: var(--sp-4);
        max-width: calc(100% - 2 * var(--sp-4));
        border-bottom: 1px solid var(--relax-border);
    }

    .modal-overlay--blocking {
        align-items: center;
    }
}

/* Status badges (StatusBadge.razor; also any element with a badge--* modifier). Kept off the bare
   Bootstrap .badge so the management app's own badges are unaffected. */
.status-badge,
.badge[class*="badge--"] {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--r-md);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge--paid {
    background: color-mix(in srgb, var(--relax-success) 14%, transparent);
    color: var(--relax-success-text);
}

.badge--partial {
    background: color-mix(in srgb, var(--relax-warning) 14%, transparent);
    color: var(--relax-warning-text);
}

.badge--unpaid {
    background: color-mix(in srgb, var(--relax-text-muted) 14%, transparent);
    color: var(--relax-text);
}

.badge--cancelled {
    background: color-mix(in srgb, var(--relax-danger) 14%, transparent);
    color: var(--relax-danger-text);
}

/* Search box (SearchBox.razor) */
.search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 220px;
    max-width: 100%;
}

.search-box .search-box-icon {
    position: absolute;
    left: 0.6rem;
    color: var(--relax-text-muted);
    pointer-events: none;
}

.search-box-input {
    width: 100%;
    min-height: 36px;
    padding: 0 2.25rem;
    border: 1px solid var(--relax-border);
    border-radius: var(--r-sm);
    background: var(--relax-surface);
    color: var(--relax-text);
    font: inherit;
}

.search-box-input:focus {
    border-color: var(--relax-accent);
    outline: none;
}

.search-box-clear {
    position: absolute;
    right: 0.1rem;
    min-width: 32px;
    min-height: 32px;
}

/* Time input (TimeInput.razor) */
.time-input {
    width: 8rem;
    min-height: 36px;
    background: var(--relax-surface);
    color: var(--relax-text);
    border-color: var(--relax-border);
}

/* Form fields fill the width on a phone instead of keeping the desktop's fixed or percentage widths. */
@media (max-width: 767.98px) {
    .form-group .rz-textbox,
    .form-group .rz-dropdown,
    .form-group .rz-spinner,
    .form-group .rz-datepicker,
    .form-group .rz-textarea,
    .form-group .time-input {
        width: 100% !important;
    }
}

/* ═══ Utilities: replace the one-off inline styles in pages. Widths are !important so they win over Radzen's own widths, as the inline styles did. ═══ */
.u-w-full { width: 100% !important; }
.u-w-auto { width: auto !important; }
.u-mb-xs { margin-bottom: .25rem; }
.u-mb-sm { margin-bottom: .5rem; }
.u-mb-md-sm { margin-bottom: .75rem; }
.u-mb-md { margin-bottom: 1rem; }
.u-mb-md-lg { margin-bottom: 1.25rem; }
.u-mb-lg { margin-bottom: 1.5rem; }
.u-mb-xl { margin-bottom: 2rem; }
.u-mb-3 { margin-bottom: 12px; }
.u-mt-xs { margin-top: .25rem; }
.u-mt-sm { margin-top: .4rem; }
.u-mt-md { margin-top: 1rem; }
.u-mt-lg { margin-top: 1.5rem; }
.u-ml-md { margin-left: 1rem; }
.u-m-0 { margin: 0; }
.u-py-2 { padding: 8px 0; }
.u-block { display: block; }
.u-flex-center { display: flex; align-items: center; }
.u-flex-gap-1 { display: flex; gap: 4px; }
.u-flex-gap-2 { display: flex; gap: 8px; }
.u-flex-wrap { display: flex; flex-wrap: wrap; }
.u-flex-col { display: flex; flex-direction: column; }
.u-gap-2 { gap: .4rem; }
.u-gap-3 { gap: .75rem; }
.u-justify-end { justify-content: flex-end; }
.u-justify-center { justify-content: center; }
.u-flex-1 { flex: 1; }
.u-v-middle { vertical-align: middle; }
.u-italic { font-style: italic; }
.u-muted { color: var(--relax-text-muted); }
.u-accent { color: var(--relax-accent); }
.u-danger { color: var(--relax-danger-text); }
.u-fs-sm { font-size: .85rem; }
.u-fs-xs { font-size: .8rem; }
.u-title-lg { font-size: 1.4rem; font-weight: 600; }
.u-title-md { font-size: 1.05rem; font-weight: 600; }
.u-title-sm { font-size: 1rem; font-weight: 600; }
.u-minh-180 { min-height: 180px; }
.u-maxw-600 { max-width: 600px; }
.u-minw-180 { min-width: 180px; }
.u-minw-360 { min-width: 360px; }
.u-w-80 { width: 80px !important; }
.u-w-100 { width: 100px !important; }
.u-w-120 { width: 120px !important; }
.u-w-130 { width: 130px !important; }
.u-w-140 { width: 140px !important; }
.u-w-145 { width: 145px !important; }
.u-w-150 { width: 150px !important; }
.u-w-160 { width: 160px !important; }
.u-w-180 { width: 180px !important; }
.u-w-200 { width: 200px !important; }
.u-w-220 { width: 220px !important; }
.u-w-240 { width: 240px !important; }

/* utilities, second set */
.u-flex { display: flex; }
.u-flex-between { display: flex; align-items: center; justify-content: space-between; }
.u-inline-flex-center { display: inline-flex; align-items: center; gap: .3rem; }
.u-flex-wrap-only { flex-wrap: wrap; }
.u-gap-4 { gap: 1rem; }
.u-gap-8 { gap: 8px; }
.u-gap-sm { gap: .5rem; }
.u-gap-xs { gap: .35rem; }
.u-items-center { align-items: center; }
.u-success { color: var(--relax-success-text); }
.u-warning { color: var(--relax-warning-text); }
.u-mono { font-family: monospace; }
.u-nowrap { white-space: nowrap; }
.u-center { text-align: center; }
.u-fs-md { font-size: 1rem; }
.u-fs-lg { font-size: 1.25rem; }
.u-fs-xxs { font-size: .75rem; }
.u-fw-500 { font-weight: 500; }
.u-mr-sm { margin-right: .5rem; }
.u-ml-sm { margin-left: .5rem; }
.u-mb-0 { margin-bottom: 0; }
.u-mt-1 { margin-top: 4px; }
.u-py-xl { padding: 4rem 0; }
.u-p-xl { padding: 2rem; }
.u-my-xl { margin: 2rem 0; }
.u-shrink-0 { flex-shrink: 0; }
.u-row-divider { padding: .75rem 0; border-bottom: 1px solid var(--relax-border); }
.u-border-accent { border-color: var(--relax-accent); }
.u-h-120 { height: 120px; }
.u-h-350 { height: 350px; }
.u-minh-200 { min-height: 200px; }
.u-maxw-300 { max-width: 300px; }
.u-maxw-480 { max-width: 480px; }
.u-maxw-900 { max-width: 900px; }
.u-minw-38 { min-width: 38px; }
.u-minw-80 { min-width: 80px; }
.u-minw-110 { min-width: 110px; }
.u-minw-160 { min-width: 160px; }
.u-minw-200 { min-width: 200px; }
.u-minw-220 { min-width: 220px; }
.u-w-90 { width: 90px !important; }
.u-w-300 { width: 300px !important; }
.u-w-320 { width: 320px !important; }
