/* MudBlazor + Radzen restyle: makes EXISTING pages pick up the new language with no page edits.
   Loaded after app.css and the MudBlazor/Radzen stylesheets. app.css has many !important rules, so the ones that
   collide are repeated here with `body` + !important. Colors come from uw-tokens.css (and the MudTheme in Helper/UwTheme.cs).
   Shared file, edit in InternalPortal then run scripts/sync-ui-kit.sh. */

html, body { font-family: var(--uw-font); color: var(--uw-text); background: var(--uw-bg); letter-spacing: -0.006em; -webkit-text-size-adjust: 100%; }
body .mud-typography { font-family: var(--uw-font); }
body a { color: var(--uw-primary); }
body a:hover { color: var(--uw-primary-hover); }
::selection { background: #c7d2fe; }
body .mud-typography-h4 { font-weight: 800; letter-spacing: -0.02em; }
body .mud-typography-h5 { font-weight: 700 !important; letter-spacing: -0.015em; color: var(--uw-text); }
body .mud-typography-h6 { font-weight: 700; letter-spacing: -0.01em; }
body .mud-typography-subtitle1 { font-weight: 600; }
body .mud-typography-caption { color: var(--uw-muted); }
body .mud-main-content { background: var(--uw-bg) !important; }

/* ---------- buttons ---------- */
body .mud-button-root { font-family: var(--uw-font); text-transform: none !important; letter-spacing: 0; font-weight: 600; border-radius: var(--uw-r-md); transition: background var(--uw-dur) var(--uw-ease), border-color var(--uw-dur) var(--uw-ease), color var(--uw-dur) var(--uw-ease); }
body .mud-button-root.mud-button { min-height: var(--uw-control); padding: 0 16px; font-size: 14px; line-height: 1.1; }
body .mud-button-root.mud-button-size-small { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--uw-r-sm); }
body .mud-button-root.mud-button-size-large { min-height: 48px; padding: 0 22px; font-size: 15px; }
body .mud-button-filled, body .mud-button-filled:hover { box-shadow: none; }
body .mud-button-filled.mud-button-filled-primary { background: var(--uw-primary); color: #fff; }
body .mud-button-filled.mud-button-filled-primary:hover { background: var(--uw-primary-hover); }
body .mud-button-filled.mud-button-filled-error { background: var(--uw-danger); }
body .mud-button-filled.mud-button-filled-success { background: var(--uw-success); }
body .mud-button-filled.mud-button-filled-warning { background: var(--uw-warning); color: #fff; }
body .mud-button-filled.mud-button-filled-info { background: var(--uw-sky); }
body .mud-button-filled.mud-button-filled-default { background: var(--uw-surface-2); color: var(--uw-text); }
/* Outlined = secondary button. Replaces the old orange outlined rule in app.css. */
body button.mud-button-root.mud-button.mud-button-outlined, body .mud-button-outlined.mud-button-outlined-warning, body a.mud-button-root.mud-button-outlined { background: var(--uw-surface); color: var(--uw-text); border: 1px solid var(--uw-border-strong); text-transform: none; }
body button.mud-button-root.mud-button.mud-button-outlined:hover, body .mud-button-outlined.mud-button-outlined-warning:hover, body a.mud-button-root.mud-button-outlined:hover { background: var(--uw-bg); color: var(--uw-text); border-color: var(--uw-faint); }
body button.mud-button-root.mud-button.mud-button-outlined.mud-button-outlined-primary { color: var(--uw-primary); border-color: #a5b4fc; background: var(--uw-surface); }
body button.mud-button-root.mud-button.mud-button-outlined.mud-button-outlined-primary:hover { background: var(--uw-primary-tint); color: var(--uw-primary-hover); border-color: var(--uw-primary); }
body button.mud-button-root.mud-button.mud-button-outlined.mud-button-outlined-error { color: var(--uw-danger-ink); border-color: #fecaca; }
body button.mud-button-root.mud-button.mud-button-outlined.mud-button-outlined-error:hover { background: var(--uw-danger-bg); color: var(--uw-danger-ink); border-color: var(--uw-danger); }
body button.mud-button-root.mud-button.mud-button-outlined.mud-button-outlined-success { color: var(--uw-success-ink); border-color: #a7f3d0; }
body button.mud-button-root.mud-button.mud-button-outlined.mud-button-outlined-success:hover { background: var(--uw-success-bg); border-color: var(--uw-success); }
body .mud-button-text.mud-button-text-primary { text-transform: none; }
body .mud-button-text:hover { background: var(--uw-surface-2); }
body .mud-button-text.mud-button-text-primary:hover { background: var(--uw-primary-tint); }
body .mud-icon-button { border-radius: var(--uw-r-sm); }
body .mud-icon-button:hover { background: var(--uw-surface-2); }
body .mud-button-root:disabled, body .mud-button-root.mud-disabled { opacity: 0.45; }
@media (pointer: coarse), (max-width: 700px) {
    body .mud-button-root.mud-button { min-height: var(--uw-touch); }
    body .mud-button-root.mud-button-size-small { min-height: 40px; }
    body .mud-icon-button { min-width: var(--uw-touch); min-height: var(--uw-touch); }
    body .mud-icon-button.mud-icon-button-size-small { min-width: 40px; min-height: 40px; }
}

/* ---------- inputs ---------- */
body .mud-input-control { font-family: var(--uw-font); }
body .mud-input.mud-input-outlined .mud-input-outlined-border { border: 1px solid var(--uw-border-strong); border-radius: var(--uw-r-md); transition: border-color var(--uw-dur) var(--uw-ease), box-shadow var(--uw-dur) var(--uw-ease); }
body .mud-input.mud-input-outlined:hover:not(.mud-disabled):not(.mud-input-error) .mud-input-outlined-border { border-color: var(--uw-faint); }
body .mud-input.mud-input-outlined.mud-input-focused .mud-input-outlined-border, body .mud-input-outlined.mud-focused .mud-input-outlined-border { border: 2px solid var(--uw-primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12); }
body .mud-input.mud-input-outlined.mud-input-error .mud-input-outlined-border { border-color: var(--uw-danger); }
body .mud-input.mud-input-outlined.mud-input-adorned-start { background: var(--uw-surface); }
body .mud-input-slot, body .mud-input > input.mud-input-root, body .mud-input > textarea.mud-input-root { font-size: 14px; color: var(--uw-text); }
body .mud-input-outlined .mud-input-slot.mud-input-root-outlined { padding: 11px 14px; }
body .mud-input-label { color: var(--uw-text-2); font-weight: 500; }
body .mud-input-label.mud-input-label-outlined.mud-input-label-inputcontrol { color: var(--uw-muted); }
body .mud-input-control > .mud-input-control-input-container > .mud-input-label-outlined.mud-input-label-inputcontrol.mud-input-label-margin-dense { color: var(--uw-muted); }
body .mud-input-helper-text { color: var(--uw-muted); }
body .mud-input-helper-text.mud-input-error { color: var(--uw-danger-ink); }
body .mud-input-outlined.mud-disabled { background: var(--uw-surface-2); }
body .mud-checkbox .mud-button-root, body .mud-switch .mud-button-root { min-height: 0; }
body .mud-select .mud-input-adornment-end .mud-icon-root { color: var(--uw-muted); }
body .mud-picker-container, body .mud-picker-paper { border-radius: var(--uw-r-lg); }
body .mud-picker .mud-button-root { min-height: 0; }
body .mud-picker-calendar-container .mud-button-root { min-height: 0; padding: 0; }
@media (pointer: coarse), (max-width: 700px) { body .mud-input-outlined .mud-input-slot.mud-input-root-outlined { padding-top: 13px; padding-bottom: 13px; } body .mud-input { font-size: 16px; } body .mud-input-slot, body .mud-input > input.mud-input-root { font-size: 16px; } }

/* ---------- surfaces ---------- */
body .mud-paper { border-radius: var(--uw-r-lg); }
body .mud-paper-outlined { border: 1px solid var(--uw-border); }
body .mud-paper.mud-elevation-1, body .mud-paper.mud-elevation-2 { box-shadow: var(--uw-shadow-sm); }
body .mud-paper.mud-elevation-3, body .mud-paper.mud-elevation-4, body .mud-paper.mud-elevation-5, body .mud-paper.mud-elevation-6 { box-shadow: var(--uw-shadow-md); }
body .mud-card { border-radius: var(--uw-r-lg); border: 1px solid var(--uw-border); box-shadow: var(--uw-shadow-sm); background: var(--uw-surface); }
body .mud-card.mud-elevation-0 { box-shadow: none; }
body .mud-card-header { padding: 16px 20px; }
body .mud-card-content { padding: 16px 20px; }
body .mud-card-actions { padding: 12px 20px; }
body .mud-divider { border-color: var(--uw-border); }
body .mud-alert { border-radius: var(--uw-r-md); font-size: 14px; }
body .mud-alert-text-info { background: var(--uw-sky-bg); color: var(--uw-sky-ink); }
body .mud-alert-text-success { background: var(--uw-success-bg); color: var(--uw-success-ink); }
body .mud-alert-text-warning { background: var(--uw-warning-bg); color: var(--uw-warning-ink); }
body .mud-alert-text-error { background: var(--uw-danger-bg); color: var(--uw-danger-ink); }
body .mud-alert-outlined { background: var(--uw-surface); }
/* Filled alerts (not snackbars) use the kit tints, never the saturated Mud colours. */
body .mud-alert.mud-alert-filled-info:not(.mud-snackbar) { background: var(--uw-sky-bg); color: var(--uw-sky-ink); }
body .mud-alert.mud-alert-filled-success:not(.mud-snackbar) { background: var(--uw-success-bg); color: var(--uw-success-ink); }
body .mud-alert.mud-alert-filled-warning:not(.mud-snackbar) { background: var(--uw-warning-bg); color: var(--uw-warning-ink); }
body .mud-alert.mud-alert-filled-error:not(.mud-snackbar) { background: var(--uw-danger-bg); color: var(--uw-danger-ink); }
body .mud-alert-filled:not(.mud-snackbar) .mud-alert-icon, body .mud-alert-filled:not(.mud-snackbar) .mud-alert-close .mud-icon-button { color: inherit; }

/* ---------- tables + data grid ---------- */
body .mud-table { background: transparent; }
body .mud-table-container { background: var(--uw-surface); border: 1px solid var(--uw-border); border-radius: var(--uw-r-lg); margin-top: 12px; overflow: auto; -webkit-overflow-scrolling: touch; }
body .mud-table-container table.mud-table-root { border: 0; }
body .mud-table-head .mud-table-cell, body .mud-table-head th, body .mud-data-grid th.mud-table-cell { text-transform: none !important; letter-spacing: 0 !important; font-size: 12px !important; line-height: 1.4; font-weight: 700 !important; color: var(--uw-text-2) !important; background-color: var(--uw-surface-2) !important; border-bottom: 1px solid var(--uw-border); }
/* Sortable and plain headers share one size and weight (the plain ones used to inherit 14.9px). */
body .mud-data-grid th.mud-table-cell .column-header, body .mud-data-grid th.mud-table-cell .column-header p.mud-typography, body .mud-table-head th .mud-table-sort-label { font-size: 12px !important; font-weight: 700 !important; line-height: 1.4; letter-spacing: 0; }
body .mud-table-container table.mud-table-root thead.mud-table-head { background: var(--uw-surface-2); }
body .mud-data-grid .mud-table-cell, body .mud-table .mud-table-cell { padding: 12px 16px !important; border-bottom: 1px solid var(--uw-surface-2); color: var(--uw-text); font-size: 14px; }
body .mud-table-dense .mud-table-cell, body .mud-table-dense.mud-data-grid .mud-table-cell { padding: 8px 12px !important; font-size: 13px; }
body .mud-table-body .mud-table-row:last-child .mud-table-cell { border-bottom: 0; }
body .mud-table-hover .mud-table-body .mud-table-row:hover, body .mud-table-body .mud-table-row:hover { background-color: var(--uw-bg); }
body .mud-table-body .mud-table-row.mud-table-row-selected, body .mud-table-body .mud-table-row.selected { background-color: var(--uw-primary-tint); }
body .mud-table-sticky-header .mud-table-root .mud-table-head .mud-table-cell { position: sticky; top: 0; z-index: 2; }
body .mud-table-pagination-toolbar, body .mud-table-pager { background: var(--uw-surface); border: 1px solid var(--uw-border); border-radius: var(--uw-r-lg); margin-top: 8px; color: var(--uw-text-2); }
body .mud-table-toolbar { padding: 0 !important; }
body .mud-simple-table { border-radius: var(--uw-r-lg); border: 1px solid var(--uw-border); background: var(--uw-surface); overflow: hidden; }
body .mud-sort-icon, body .mud-table-sort-label { color: var(--uw-muted); }

/* ---------- chips ---------- */
body .mud-chip { font-family: var(--uw-font); border-radius: var(--uw-r-pill); height: 26px; font-size: 12px; }
body .mud-chip > .mud-chip-content { font-weight: 600; letter-spacing: 0; }
body .mud-chip.mud-chip-filled.mud-chip-color-default { background: var(--uw-surface-2); color: var(--uw-text-2); }
body .mud-chip.mud-chip-filled.mud-chip-color-primary { background: var(--uw-primary-tint); color: var(--uw-primary); }
body .mud-chip.mud-chip-filled.mud-chip-color-success { background: var(--uw-success-bg); color: var(--uw-success-ink); }
body .mud-chip.mud-chip-filled.mud-chip-color-error { background: var(--uw-danger-bg); color: var(--uw-danger-ink); }
body .mud-chip.mud-chip-filled.mud-chip-color-warning { background: var(--uw-warning-bg); color: var(--uw-warning-ink); }
body .mud-chip.mud-chip-filled.mud-chip-color-info { background: var(--uw-sky-bg); color: var(--uw-sky-ink); }
body .mud-chip.mud-chip-filled.mud-chip-color-secondary { background: var(--uw-surface-2); color: var(--uw-text); }
body .mud-chip.mud-chip-filled.mud-chip-color-tertiary { background: var(--uw-indigo-bg); color: var(--uw-indigo-ink); }
body .mud-chip.mud-chip-outlined { background: transparent; border-color: var(--uw-border-strong); color: var(--uw-text-2); }
body .mud-chip.mud-chip-size-small { height: 22px; font-size: 11px; }
/* legacy status classes from app.css, moved to the new tones */
body .status-chip { border-radius: var(--uw-r-pill) !important; height: 24px !important; font-weight: 700 !important; font-size: 12px !important; padding: 0 10px !important; }
body .status-active { background-color: var(--uw-success-bg) !important; color: var(--uw-success-ink) !important; }
body .status-warning { background-color: var(--uw-orange-bg) !important; color: var(--uw-orange-ink) !important; }
body .status-error { background-color: var(--uw-danger-bg) !important; color: var(--uw-danger-ink) !important; }
body .status-info { background-color: var(--uw-sky-bg) !important; color: var(--uw-sky-ink) !important; }
body .status-violet { background-color: var(--uw-indigo-bg) !important; color: var(--uw-indigo-ink) !important; }
body .status-default { background-color: var(--uw-surface-2) !important; color: var(--uw-text-2) !important; }

/* ---------- tabs ---------- */
body .mud-tabs-tabbar { background: transparent; }
body .mud-tabs-tabbar-content { border-bottom: 1px solid var(--uw-border); }
body .mud-tab { font-family: var(--uw-font); text-transform: none !important; font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--uw-muted); padding: 10px 18px; min-height: 44px; border-radius: 0; opacity: 1; }
body .mud-tab:hover { color: var(--uw-text); background: transparent; }
body .mud-tab:not(.mud-tab-active):hover { color: var(--uw-text) !important; }
body .mud-tab.mud-tab-active { color: var(--uw-primary); }
body .mud-tab-slider { background-color: var(--uw-primary); height: 3px; border-radius: 3px 3px 0 0; }
body .mud-tabs-scroll-button { color: var(--uw-muted); }

/* ---------- dialogs, popovers, menus, snackbars ---------- */
body .mud-overlay-dialog .mud-overlay-scrim, body .mud-overlay-scrim { background-color: var(--uw-scrim); }
body .mud-dialog { border-radius: var(--uw-r-xl); box-shadow: var(--uw-shadow-modal); border: 0; }
body .mud-dialog-fullscreen { border-radius: 0; }
body .mud-dialog .mud-dialog-title { padding: 20px 24px 12px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
body .mud-dialog .mud-dialog-title .mud-typography-h6 { font-size: 18px; font-weight: 700; }
body .mud-dialog .mud-dialog-content { padding: 4px 24px 16px; font-size: 14px; color: var(--uw-text-2); }
body .mud-dialog .mud-dialog-actions { padding: 12px 24px 20px; gap: 8px; flex-wrap: wrap; }
@media (max-width: 700px) { body .mud-dialog:not(.mud-dialog-fullscreen) { width: calc(100vw - 24px); max-width: none; margin: 12px; max-height: calc(100dvh - 24px); } body .mud-dialog .mud-dialog-actions .mud-button-root { flex: 1 1 auto; } }
body .mud-popover { border-radius: var(--uw-r-md); box-shadow: var(--uw-shadow-pop); border: 1px solid var(--uw-border); }
body .mud-popover .mud-list-item { font-size: 14px; min-height: 40px; }
body .mud-list-item:hover { background: var(--uw-surface-2); }
body .mud-list-item.mud-selected-item { background: var(--uw-primary-tint); color: var(--uw-primary); }
body .mud-menu-list { padding: 6px; }
body .mud-menu-list .mud-menu-item { border-radius: var(--uw-r-sm); }
body .mud-tooltip { background: var(--uw-text); color: #fff; font-size: 12px; font-weight: 500; border-radius: var(--uw-r-sm); padding: 6px 10px; }
body .mud-snackbar { border-radius: var(--uw-r-md); box-shadow: var(--uw-shadow-pop); font-family: var(--uw-font); font-size: 14px; }
body .mud-snackbar.mud-alert-filled-success { background: var(--uw-success); }
body .mud-snackbar.mud-alert-filled-error { background: var(--uw-danger); }
body .mud-snackbar.mud-alert-filled-info { background: var(--uw-text); }
body .mud-snackbar.mud-alert-filled-warning { background: var(--uw-warning-ink); }
body .mud-progress-linear { border-radius: 4px; }
body .mud-skeleton { background: var(--uw-surface-2); }
body .mud-expand-panel { border-radius: var(--uw-r-lg); }
body .mud-checkbox .mud-icon-root, body .mud-radio .mud-icon-root { color: var(--uw-faint); }
body .mud-checkbox .mud-checked .mud-icon-root, body .mud-radio .mud-checked .mud-icon-root, body .mud-checkbox .mud-primary-text .mud-icon-root { color: var(--uw-primary); }

/* ---------- Radzen (Html editor, dialog, notification, context menu, tooltip) ---------- */
:root {
    --rz-primary: var(--uw-primary);
    --rz-primary-light: #4f6fe0;
    --rz-primary-lighter: var(--uw-primary-tint);
    --rz-primary-dark: var(--uw-primary-hover);
    --rz-secondary: var(--uw-text-2);
    --rz-success: var(--uw-success);
    --rz-danger: var(--uw-danger);
    --rz-warning: var(--uw-warning);
    --rz-info: var(--uw-sky);
    --rz-text-font-family: var(--uw-font);
    --rz-base-background-color: var(--uw-bg);
    --rz-border-radius: 10px;
    --rz-input-border: 1px solid var(--uw-border-strong);
    --rz-input-focus-border: 1px solid var(--uw-primary);
    --rz-dialog-border-radius: 18px;
}
.rz-dialog { border-radius: var(--uw-r-xl) !important; box-shadow: var(--uw-shadow-modal) !important; border: 0 !important; font-family: var(--uw-font); }
.rz-dialog-titlebar { padding: 18px 24px !important; border-bottom: 1px solid var(--uw-border); }
.rz-dialog-title { font-size: 18px !important; font-weight: 700 !important; color: var(--uw-text); }
.rz-dialog-content { padding: 20px 24px !important; }
.rz-dialog-mask { background-color: var(--uw-scrim) !important; }
.rz-dialog-wrapper { font-family: var(--uw-font); }
.rz-notification-item, .rz-growl-item-container .rz-growl-item { border-radius: var(--uw-r-md) !important; box-shadow: var(--uw-shadow-pop) !important; font-family: var(--uw-font); }
.rz-menu, .rz-contextmenu, .rz-context-menu { border-radius: var(--uw-r-md) !important; box-shadow: var(--uw-shadow-pop) !important; border: 1px solid var(--uw-border) !important; }
.rz-tooltip-content { background: var(--uw-text) !important; color: #fff !important; border-radius: var(--uw-r-sm) !important; font-size: 12px !important; font-family: var(--uw-font); }
.rz-html-editor { border: 1px solid var(--uw-border-strong) !important; border-radius: var(--uw-r-md) !important; overflow: hidden; font-family: var(--uw-font); }
.rz-html-editor-content { font-family: var(--uw-font); font-size: 14px; color: var(--uw-text); }
.rz-html-editor .rz-html-editor-toolbar, .rz-html-editor-toolbar { background: var(--uw-bg) !important; border-bottom: 1px solid var(--uw-border) !important; }
.rz-button { border-radius: var(--uw-r-md) !important; font-family: var(--uw-font); font-weight: 600; text-transform: none !important; letter-spacing: 0; box-shadow: none; }
.rz-button.rz-primary { background: var(--uw-primary) !important; color: #fff !important; }
.rz-button.rz-primary:hover { background: var(--uw-primary-hover) !important; }
.rz-textbox, .rz-dropdown, .rz-numeric, .rz-datepicker input { border-radius: var(--uw-r-md) !important; border-color: var(--uw-border-strong) !important; font-family: var(--uw-font); }
.rz-textbox:focus, .rz-dropdown:focus-within { border-color: var(--uw-primary) !important; box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12) !important; }
.rz-chkbox-box { border-radius: 5px !important; }
.rz-chkbox-box.rz-state-active, .rz-chkbox-box.rz-state-checked { background: var(--uw-primary) !important; border-color: var(--uw-primary) !important; }
.rz-tabview-nav li.rz-tabview-selected a, .rz-tabview-selected .rz-tabview-title { color: var(--uw-primary) !important; }

/* Tabs (legacy tab-panel-style-02): the kit's segmented look everywhere. Sentence case, weight 600, dark active pill on a soft track.
   app.css styles these with !important, so these rules repeat its selectors with an extra html prefix. */
html body .tab-panel-style-02 .mud-tabs-toolbar,
html body .tab-panel-style-02 .mud-tabs-tabbar { display: inline-flex; padding: 3px !important; gap: 2px; background: var(--uw-surface-2) !important; border: 0 !important; border-radius: var(--uw-r-md) !important; box-shadow: none; }
html body .mud-tabs.mud-tabs-rounded.tab-panel-style-02 .mud-tabs-tabbar .mud-tab,
html body .mud-tabs.tab-panel-style-02 .mud-tabs-tabbar .mud-tab,
html body .mud-tabs.tab-panel-style-02 .mud-tabs-toolbar .mud-tab,
html body .tab-panel-style-02 .mud-tabs-tabbar .mud-tab,
html body .tab-panel-style-02 .mud-tabs-toolbar .mud-tab { min-height: 34px !important; padding: 0 16px !important; border-radius: 8px !important; font-size: 13px !important; line-height: 1.3 !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--uw-text-2) !important; opacity: 1 !important; }
html body .tab-panel-style-02 .mud-tabs-tabbar .mud-tab:hover,
html body .tab-panel-style-02 .mud-tabs-toolbar .mud-tab:hover { color: var(--uw-text) !important; }
html body .mud-tabs.mud-tabs-rounded.tab-panel-style-02 .mud-tabs-tabbar .mud-tab.mud-tab-active,
html body .mud-tabs.tab-panel-style-02 .mud-tabs-tabbar .mud-tab.mud-tab-active,
html body .mud-tabs.tab-panel-style-02 .mud-tabs-toolbar .mud-tab.mud-tab-active,
html body .tab-panel-style-02 .mud-tabs-tabbar .mud-tab.mud-tab-active,
html body .tab-panel-style-02 .mud-tabs-toolbar .mud-tab.mud-tab-active { background: var(--uw-text) !important; color: #fff !important; box-shadow: var(--uw-shadow-sm); }
html body .tab-panel-style-02 .mud-tab-slider { display: none !important; }
@media (pointer: coarse), (max-width: 700px) { html body .tab-panel-style-02 .mud-tabs-tabbar .mud-tab { min-height: 40px !important; } }

/* ---------- phones (mobile pack 1) ----------
   iOS Safari zooms the page when a focused field's text is under 16px, and doesn't zoom back out. The 16px rule above
   loses to Radzen's bare input rule and to page styles, hence !important here. */
@media (pointer: coarse), (max-width: 700px) {
    body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), body select, body textarea { font-size: 16px !important; }
}
/* Stand-alone links (back links, breadcrumbs) get a finger-sized target on phones. Not links inside sentences. */
@media (max-width: 700px) {
    body .mud-breadcrumbs a, body .order-back { display: inline-flex; align-items: center; min-height: 40px; }
}

/* ---- Mobile polish (phones and touch) ---- */
/* Tooltips need hover: on a touch screen they stick open after a tap, so they are switched off there. */
@media (hover: none) {
    body .mud-tooltip-root .mud-tooltip, body .mud-popover-provider .mud-tooltip { display: none !important; }
    /* A tapped radio / checkbox keeps its :hover/:focus background (the grey box behind "Yes"): no tint on touch. */
    body .mud-radio .mud-button-root:hover, body .mud-radio .mud-button-root:focus,
    body .mud-checkbox .mud-button-root:hover, body .mud-checkbox .mud-button-root:focus { background-color: transparent !important; }
}
@media (max-width: 700px) {
    /* Search boxes fill their card instead of stopping at 340px */
    body .tbl-search { max-width: none; width: 100%; margin-right: 0 !important; }
    .mud-toolbar:has(.tbl-search), .mud-toolbar:has(.tbl-search) .mud-input-control { width: 100%; }
    /* "Rows per page" is noise on a phone: keep the page arrows and the "1-1 of 1" count */
    body .mud-table-pagination-toolbar .mud-table-pagination-caption:first-of-type,
    body .mud-table-pagination-toolbar .mud-table-pagination-select { display: none; }
}

/* Profile edit on phones (the form is ~2,900px tall): Save / Cancel pinned to the bottom of the screen. */
@media (max-width: 700px) {
    .profile-root { display: flex; flex-direction: column; }
    .profile-root > .profile-actions--editing {
        order: 99; position: sticky; bottom: 0; z-index: 5; margin: 16px -16px 0 !important;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--uw-surface, #fff);
        border-top: 1px solid var(--uw-border, #e5e7eb); box-shadow: 0 -4px 12px rgb(15 23 42 / 0.08);
    }
    .profile-root > .profile-actions--editing .mud-stack { width: 100%; }
    .profile-root > .profile-actions--editing .mud-button-root { flex: 1; min-height: 48px; }
}

/* Phones: the account tabs clip their corners with overflow:hidden, which would trap the sticky Save bar inside
   them. overflow:clip keeps the rounded corners without making the tabs a scroll container. */
@media (max-width: 700px) { .account-tabs { overflow: clip !important; } }
