﻿/* ==========================================================================
   1) FONTS & THEME TOKENS
   ========================================================================== */

@font-face {
    font-family: 'Russo One';
    src: url('/_content/MonkeyManager.Shared/fonts/RussoOne/RussoOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* --------------------------------------------------------------------------
   FIXED TOKENS - dimensions, layout, typography
   These remain the same regardless of color theme.
   -------------------------------------------------------------------------- */
:root {
    /* Typography / text presentation */
    --font-primary: 'Russo One', sans-serif;
    --issue-font-size-label: .8rem;
    --issue-font-size-value: 1.35rem;
    --issue-font-size-chip: .85rem;
    --issue-font-weight-normal-strong: 600;
    --issue-font-weight-strong: 700;
    --issue-opacity-label: .75;
    --issue-opacity-chip-detail: .9;
    /* General layout / roster / drawer */
    --frame-pad: 10px;
    --default-radius: 4px;
    --roster-toolbar-h: 64px;
    --roster-column-width: 180px;
    --drawer-width: 600px; /* sdílené s App.css */
    /* Rental issue - gaps and dimensions */
    --issue-gap-page: 1rem;
    --issue-gap-grid: .75rem;
    --issue-gap-chip-list: .4rem;
    --issue-gap-chip: .35rem;
    --issue-summary-min-col-width: 160px;
    --issue-border-width: 1px;
    --issue-status-border-width: 4px;
    --issue-radius-card: .75rem;
    --issue-radius-badge: .5rem;
    --issue-radius-chip: 999px;
    --issue-padding-card: .75rem 1rem;
    --issue-padding-header: .75rem 1rem;
    --issue-padding-table-cell: .65rem .75rem;
    --issue-padding-badge: .15rem .45rem;
    --issue-padding-chip: .25rem .6rem;
    /* Modal - dimensions */
    --mm-modal-radius: 1rem;
    --mm-modal-width: 760px;
    /* Stacking order (z-index) */
    --issue-z-scan-panel: 5;
    --mm-z-navigation: 1000;
    --mm-z-dropdown: 2000;
    --mm-z-drawer: 3000;
    --mm-modal-z: 5000;
    --mm-loader-z: 10000;
}

    /* --------------------------------------------------------------------------
   COLOR THEMES - 3 palettes x (normal / inverse)

   Default (no data-mm-theme): BRAND, original dark purple/gold UI.
   Explicit selection: data-mm-theme="brand" or one of the five variants.

   Only color tokens are changed per theme. FIXED TOKENS above are shared.

   brand           dark purple/gold            (DEFAULT)
   brand-inverse   light purple/gold            (formerly brand-light)
   outdoor         dark blue/yellow             (formerly outdoor-max)
   outdoor-inverse light blue/yellow
   alpine          dark blue/ice                (formerly alpine-clear)
   alpine-inverse  light blue/ice

   Note: --color-primary is currently used for PAGE BACKGROUNDS as well
   as brand controls, so its value is light in inverse variants.
   -------------------------------------------------------------------------- */

    /* ==========================================================================
   BRAND - DEFAULT. Original dark purple/gold palette, unchanged.
   ========================================================================== */
    :root,
    :root[data-mm-theme="brand"] {
        /* Global palette / page background */
        --color-primary: #411051;
        --color-primary-dark: #30003a;
        --color-primary-focus: rgba(65, 16, 81, 0.4);
        --color-secondary: #f8b133;
        --color-secondary-hover: #e6a52f;
        --color-link-hover: #d59c2e;
        --color-success: #4CAF50;
        --color-error: #E53935;
        --color-bg-light: #F9F7FA;
        --color-text: #1E1E1E;
        --color-text-light: #F9F7FA;
        --color-border: #D0C9D6;
        /* Application surfaces / text / borders */
        --mm-color-bg: #14021d;
        --mm-color-surface-1: #2b0f3d;
        --mm-color-surface-2: #3a1552;
        --mm-color-text: #f3e8ff;
        --mm-color-text-dim: #d6baf7;
        --mm-color-border-subtle: rgba(255, 255, 255, .12);
        --mm-color-border-strong: rgba(255, 255, 255, .25);
        /* Lessons */
        --mm-lesson-surface: rgba(59, 130, 246, .26);
        --mm-lesson-border: #3b82f6;
        --mm-lesson-accent: #2563eb;
        /* Focus / state / accents */
        --mm-color-focus: #a78bfa;
        --mm-color-success: #22c55e;
        --mm-color-danger: #ef4444;
        --mm-color-accent: #ffd166;
        --mm-color-info: #3b82f6;
        /* Shadows and sticky wizard toolbar */
        --mm-color-shadow-strong: rgba(0, 0, 0, .30);
        --mm-color-shadow-soft: rgba(0, 0, 0, .25);
        --mm-color-shadow-inset: rgba(255, 255, 255, .05);
        --mm-color-shadow-inset-soft: rgba(255, 255, 255, .04);
        --mm-wtab-background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
        /* Rental issue: surfaces and border colors */
        --issue-color-surface-card: rgba(255,255,255,.04);
        --issue-color-surface-header: rgba(255,255,255,.06);
        --issue-color-border-subtle: var(--mm-color-border-subtle);
        --issue-color-border-table: rgba(255,255,255,.08);
        /* Rental issue: status colors */
        --issue-color-success: #198754;
        --issue-color-warning: #ffc107;
        --issue-color-danger: #dc3545;
        --issue-color-success-border: rgba(25,135,84,.55);
        --issue-color-warning-border: rgba(255,193,7,.65);
        --issue-color-warning-border-soft: rgba(255,193,7,.35);
        --issue-color-success-bg-soft: rgba(25,135,84,.06);
        --issue-color-success-bg-chip: rgba(25,135,84,.12);
        --issue-color-warning-bg-soft: rgba(255,193,7,.08);
        --issue-color-warning-bg-badge: rgba(255,193,7,.18);
        --issue-color-warning-bg-chip: rgba(255,193,7,.16);
        --issue-color-danger-bg-soft: rgba(220,53,69,.06);
        --issue-color-danger-bg-badge: rgba(220,53,69,.16);
        /* Modal windows */
        --mm-modal-backdrop-bg: rgba(20, 2, 29, .78);
        --mm-modal-bg: linear-gradient(180deg, var(--mm-color-surface-1) 0%, var(--color-primary-dark) 100%);
        --mm-modal-border: rgba(255, 255, 255, .14);
        --mm-modal-border-strong: rgba(255, 255, 255, .22);
        --mm-modal-shadow: 0 24px 70px rgba(0, 0, 0, .55);
        --mm-modal-info-bg: rgba(255, 255, 255, .045);
        --mm-modal-info-border: rgba(248, 177, 51, .45);
        --mm-modal-close-color: var(--mm-color-text-dim);
        --mm-modal-close-hover-bg: rgba(255, 255, 255, .08);
        --mm-modal-close-hover-color: var(--color-text-light);
        /* Reports */
        --mm-report-issued: var(--mm-color-info);
        --mm-report-reserved: var(--color-secondary);
        --mm-report-available: var(--mm-color-success);
        --mm-report-unavailable: var(--mm-color-danger);
        /* MonkeyTable: text, row states, borders and mobile cards */
        --mm-table-text: var(--color-text-light);
        --mm-table-text-dim: var(--mm-color-text-dim);
        --mm-table-row-even-bg: rgba(255, 255, 255, .02);
        --mm-table-row-hover-bg: rgba(255, 255, 255, .04);
        --mm-table-row-cancelled-bg: rgba(255, 255, 255, .015);
        --mm-table-header-bg: rgba(255, 255, 255, .06);
        --mm-table-header-border: rgba(255, 255, 255, .10);
        --mm-table-cell-border: rgba(255, 255, 255, .06);
        --mm-table-mobile-card-bg: rgba(255, 255, 255, .035);
        --mm-table-mobile-card-border: rgba(255, 255, 255, .12);
        --mm-table-empty-text: #ccc;
        --mm-table-bool-bg: rgba(255, 255, 255, .08);
        /* Shared theme-aware colors for scoped CSS components */
        --mm-ui-wash-weak: rgba(255, 255, 255, .03);
        --mm-ui-wash-min: rgba(255, 255, 255, .025);
        --mm-ui-wash-soft: rgba(255, 255, 255, .04);
        --mm-ui-wash-mid: rgba(255, 255, 255, .06);
        --mm-ui-wash-hover: rgba(255, 255, 255, .08);
        --mm-ui-wash-active: rgba(255, 255, 255, .12);
        --mm-ui-stroke-weak: rgba(255, 255, 255, .08);
        --mm-ui-stroke-mid: rgba(255, 255, 255, .12);
        --mm-ui-stroke-strong: rgba(255, 255, 255, .25);
        --mm-ui-text-muted: rgba(255, 255, 255, .6);
        --mm-ui-text-faint: rgba(255, 255, 255, .35);
        --mm-ui-link-color: #c4b5fd;
        --mm-ui-primary-button-bg: #411051;
        --mm-ui-primary-button-hover: #30003a;
        --mm-ui-primary-button-text: var(--color-text-light);
        --mm-ui-secondary-button-text: #1E1E1E;
        --mm-ui-on-accent: #14021d;
        --mm-ui-on-danger: #FFFFFF;
        --mm-ui-switch-track: #411051;
        --mm-ui-switch-thumb: var(--color-text-light);
        --mm-ui-switch-focus-ring: rgba(13, 110, 253, .35);
        --mm-ui-highlight-background: radial-gradient(120px 60px at 50% 0%, rgba(124,58,237,.25), rgba(255,255,255,.04));
        --mm-ui-highlight-border: rgba(124,58,237,.55);
        --mm-ui-highlight-shadow: 0 0 0 2px rgba(124,58,237,.18) inset, 0 6px 18px rgba(124,58,237,.20);
        --mm-ui-alert-background: linear-gradient(180deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .03) 100%);
        --mm-ui-auth-field-bg: rgba(65, 16, 81, .58);
        --mm-ui-auth-field-hover-bg: rgba(65, 16, 81, .75);
        --mm-ui-auth-error-text: #ffd7d7;
        --mm-ui-auth-validation-text: #ff9b9b;
        --mm-ui-auth-error-icon-bg: #ff9b9b;
        --mm-ui-auth-error-icon-text: #30003a;
        --mm-ui-auth-spinner-track: rgba(48, 0, 58, .3);
        --mm-ui-roster-header-bg: rgba(48, 0, 58, .96);
        --mm-ui-roster-header-text: var(--color-text-light);
        --mm-ui-roster-header-border: rgba(255, 255, 255, .12);
        --mm-ui-roster-today-border: rgba(248, 177, 51, .7);
        --mm-ui-roster-today-shadow: rgba(248, 177, 51, .18);
        --mm-ui-roster-lesson-text: var(--color-text-light);
        --mm-ui-roster-hold-bg: rgba(245, 158, 11, .22);
        --mm-ui-roster-hold-border: #f59e0b;
        --mm-ui-roster-hold-accent: #d97706;
        --mm-ui-roster-hold-action-bg: rgba(120, 53, 15, .28);
        --mm-ui-roster-hold-text: var(--color-text-light);
        --mm-ui-roster-timeoff-bg: rgba(239, 68, 68, .18);
        --mm-ui-roster-timeoff-text: var(--color-text-light);
        --mm-ui-schedule-lesson-bg: #3b82f6;
        --mm-ui-schedule-lesson-text: #FFFFFF;
        --mm-ui-schedule-valid-bg: rgba(100, 149, 237, .2);
        --mm-ui-schedule-valid-border: #3b82f6;
        --mm-ui-schedule-conflict-bg: rgba(239, 68, 68, .3);
        --mm-ui-schedule-conflict-border: #ef4444;
        --mm-ui-schedule-action-border: rgba(255, 255, 255, .42);
        --mm-ui-schedule-action-bg: rgba(255, 255, 255, .1);
        --mm-ui-schedule-action-hover-bg: rgba(255, 255, 255, .18);
        --mm-ui-schedule-action-hover-border: rgba(255, 255, 255, .74);
        --mm-ui-schedule-action-hover-inset: rgba(255, 255, 255, .16);
        --mm-ui-schedule-action-disabled-border: rgba(255, 255, 255, .22);
        --mm-ui-schedule-action-disabled-bg: rgba(255, 255, 255, .06);
        --mm-ui-staff-warning-text: #ffe3a8;
        --mm-ui-staff-warning-bg: rgba(248, 177, 51, .13);
        --mm-ui-staff-warning-badge-bg: rgba(248, 177, 51, .25);
        --mm-ui-staff-success-text: #c8f2dc;
        --mm-ui-staff-success-bg: rgba(58, 185, 122, .12);
        --mm-ui-staff-success-badge-bg: rgba(58, 185, 122, .22);
        --mm-ui-staff-attention-border: rgba(248, 177, 51, .5);
        --mm-ui-instructor-match-bg: rgba(66, 99, 235, 0.16);
        --mm-ui-instructor-match-border: #4263eb;
        --mm-ui-instructor-match-badge-bg: #ffc247;
        --mm-ui-instructor-match-badge-text: #30133d;
        --mm-ui-chart-grid: rgba(255, 255, 255, .10);
        --mm-ui-chart-axis: rgba(255, 255, 255, .18);
        --mm-ui-scrollbar-track: rgba(255, 255, 255, .12);
        --mm-ui-scrollbar-thumb: rgba(248, 177, 51, .9);
        --mm-ui-scrollbar-thumb-hover: rgb(255, 197, 92);
        --mm-ui-scrollbar-border: rgba(48, 0, 58, .96);
        --mm-ui-availability-badge-bg: rgba(255, 0, 0, 0.1);
        --mm-ui-block-bg: #ef4444;
        --mm-ui-pause-bg: lightgray;
        --mm-ui-pause-text: gray;
        --mm-ui-overview-badge-bg: #f5f7fa;
        --mm-ui-overview-badge-text: #1B1022;
        --mm-ui-auth-layout-radial: rgba(248, 177, 51, .12);
        --mm-ui-error-strong-bg: rgba(220, 53, 69, .08);
        --mm-ui-warning-strong-bg: rgba(255, 193, 7, .08);
        --mm-ui-capacity-orange-bg: #ffe5cc;
        --mm-ui-capacity-orange-text: #653208;
        --mm-ui-qr-viewfinder-border: rgba(255, 255, 255, .9);
        --mm-ui-qr-video-bg: #111;
        --mm-ui-preview-chip-text: #000000;
        --mm-ui-panel-text: var(--mm-color-text);
        --mm-ui-panel-text-dim: var(--mm-color-text-dim);
        --mm-ui-panel-accent-text: #ffd166;
        --mm-ui-tab-index-text: #F9F7FA;
        --mm-ui-panel-header-text: var(--mm-ui-panel-text);
        --mm-ui-panel-header-link: #ffd166;
        --mm-ui-badge-accent-bg: #ffd166;
    }

        /* ==========================================================================
   BRAND-INVERSE - Light purple/gold palette (formerly brand-light).
   ========================================================================== */
        :root[data-mm-theme="brand-inverse"] {
            /* Global palette / page background */
            --color-primary: #F9F7FA;
            --color-primary-dark: #ECE3F0;
            --color-primary-focus: rgba(65, 16, 81, .30);
            --color-secondary: #F8B133;
            --color-secondary-hover: #E6A52F;
            --color-link-hover: #5C1A70;
            --color-success: #176536;
            --color-error: #A51C30;
            --color-bg-light: #F9F7FA;
            --color-text: #1B1022;
            --color-text-light: #411051;
            --color-border: #92849A;
            /* Application surfaces / text / borders */
            --mm-color-bg: #F9F7FA;
            --mm-color-surface-1: #FFFFFF;
            --mm-color-surface-2: #F1EAF5;
            --mm-color-text: #1B1022;
            --mm-color-text-dim: #51445B;
            --mm-color-border-subtle: #92849A;
            --mm-color-border-strong: #63546F;
            /* Lessons */
            --mm-lesson-surface: #E7F1FF;
            --mm-lesson-border: #2C5F9A;
            --mm-lesson-accent: #194E83;
            /* Focus / state / accents */
            --mm-color-focus: #651C80;
            --mm-color-success: #176536;
            --mm-color-danger: #A51C30;
            --mm-color-accent: #795000;
            --mm-color-info: #1D538C;
            /* Shadows and sticky wizard toolbar */
            --mm-color-shadow-strong: rgba(34, 16, 44, .17);
            --mm-color-shadow-soft: rgba(34, 16, 44, .10);
            --mm-color-shadow-inset: rgba(65, 16, 81, .06);
            --mm-color-shadow-inset-soft: rgba(65, 16, 81, .035);
            --mm-wtab-background: linear-gradient(180deg, var(--mm-color-surface-1) 0%, var(--color-primary-dark) 100%);
            /* Rental issue: surfaces and border colors */
            --issue-color-surface-card: #FFFFFF;
            --issue-color-surface-header: #F1EAF5;
            --issue-color-border-subtle: var(--mm-color-border-subtle);
            --issue-color-border-table: #A99AB1;
            /* Rental issue: status colors */
            --issue-color-success: #176536;
            --issue-color-warning: #805200;
            --issue-color-danger: #A51C30;
            --issue-color-success-border: #176536;
            --issue-color-warning-border: #805200;
            --issue-color-warning-border-soft: #B18532;
            --issue-color-success-bg-soft: #ECF8F0;
            --issue-color-success-bg-chip: #DDF1E4;
            --issue-color-warning-bg-soft: #FFF6DF;
            --issue-color-warning-bg-badge: #FFE9AB;
            --issue-color-warning-bg-chip: #FFF0C2;
            --issue-color-danger-bg-soft: #FFF0F1;
            --issue-color-danger-bg-badge: #FFDDE1;
            /* Modal windows */
            --mm-modal-backdrop-bg: rgba(20, 2, 29, .58);
            --mm-modal-bg: linear-gradient(180deg, var(--mm-color-surface-1) 0%, var(--mm-color-surface-2) 100%);
            --mm-modal-border: #92849A;
            --mm-modal-border-strong: #63546F;
            --mm-modal-shadow: 0 22px 56px rgba(34, 16, 44, .24);
            --mm-modal-info-bg: #FFF2DB;
            --mm-modal-info-border: #805200;
            --mm-modal-close-color: var(--mm-color-text-dim);
            --mm-modal-close-hover-bg: #E9DFF0;
            --mm-modal-close-hover-color: var(--mm-color-text);
            /* Reports */
            --mm-report-issued: var(--mm-color-info);
            --mm-report-reserved: var(--issue-color-warning);
            --mm-report-available: var(--mm-color-success);
            --mm-report-unavailable: var(--mm-color-danger);
            /* MonkeyTable: text, row states, borders and mobile cards */
            --mm-table-text: var(--color-text-light);
            --mm-table-text-dim: var(--mm-color-text-dim);
            --mm-table-row-even-bg: rgba(65, 16, 81, .035);
            --mm-table-row-hover-bg: rgba(65, 16, 81, .105);
            --mm-table-row-cancelled-bg: rgba(65, 16, 81, .025);
            --mm-table-header-bg: rgba(65, 16, 81, .09);
            --mm-table-header-border: rgba(65, 16, 81, .24);
            --mm-table-cell-border: rgba(65, 16, 81, .16);
            --mm-table-mobile-card-bg: rgba(65, 16, 81, .035);
            --mm-table-mobile-card-border: rgba(65, 16, 81, .24);
            --mm-table-empty-text: var(--mm-color-text-dim);
            --mm-table-bool-bg: rgba(65, 16, 81, .095);
            /* Shared theme-aware colors for scoped CSS components */
            --mm-ui-wash-weak: rgba(65, 16, 81, .035);
            --mm-ui-wash-min: rgba(65, 16, 81, .025);
            --mm-ui-wash-soft: rgba(65, 16, 81, .055);
            --mm-ui-wash-mid: rgba(65, 16, 81, .075);
            --mm-ui-wash-hover: rgba(65, 16, 81, .105);
            --mm-ui-wash-active: rgba(65, 16, 81, .15);
            --mm-ui-stroke-weak: rgba(65, 16, 81, .14);
            --mm-ui-stroke-mid: rgba(65, 16, 81, .24);
            --mm-ui-stroke-strong: rgba(65, 16, 81, .42);
            --mm-ui-text-muted: var(--mm-color-text-dim);
            --mm-ui-text-faint: var(--mm-color-text-dim);
            --mm-ui-link-color: #5C1A70;
            --mm-ui-primary-button-bg: #411051;
            --mm-ui-primary-button-hover: #30003a;
            --mm-ui-primary-button-text: #FFFFFF;
            --mm-ui-secondary-button-text: #1B1022;
            --mm-ui-on-accent: #1B1022;
            --mm-ui-on-danger: #FFFFFF;
            --mm-ui-switch-track: #411051;
            --mm-ui-switch-thumb: #FFFFFF;
            --mm-ui-switch-focus-ring: rgba(65, 16, 81, .35);
            --mm-ui-highlight-background: radial-gradient(120px 60px at 50% 0%, rgba(65, 16, 81, .16), rgba(65, 16, 81, .035));
            --mm-ui-highlight-border: rgba(65, 16, 81, .55);
            --mm-ui-highlight-shadow: 0 0 0 2px rgba(65, 16, 81, .18) inset, 0 6px 18px rgba(65, 16, 81, .20);
            --mm-ui-alert-background: linear-gradient(180deg, #F1EAF5 0%, #FFFFFF 100%);
            --mm-ui-auth-field-bg: #FFFFFF;
            --mm-ui-auth-field-hover-bg: #F1EAF5;
            --mm-ui-auth-error-text: #8A1525;
            --mm-ui-auth-validation-text: #A51C30;
            --mm-ui-auth-error-icon-bg: #FFDCDC;
            --mm-ui-auth-error-icon-text: #1B1022;
            --mm-ui-auth-spinner-track: rgba(65, 16, 81, .25);
            --mm-ui-roster-header-bg: #F1EAF5;
            --mm-ui-roster-header-text: var(--mm-color-text);
            --mm-ui-roster-header-border: rgba(65, 16, 81, .24);
            --mm-ui-roster-today-border: rgba(65, 16, 81, .7);
            --mm-ui-roster-today-shadow: rgba(65, 16, 81, .18);
            --mm-ui-roster-lesson-text: #1B1022;
            --mm-ui-roster-hold-bg: #FFF0C2;
            --mm-ui-roster-hold-border: #A97000;
            --mm-ui-roster-hold-accent: #805200;
            --mm-ui-roster-hold-action-bg: #FFE9AB;
            --mm-ui-roster-hold-text: #422B00;
            --mm-ui-roster-timeoff-bg: #FFF0F0;
            --mm-ui-roster-timeoff-text: #8A1525;
            --mm-ui-schedule-lesson-bg: #1D538C;
            --mm-ui-schedule-lesson-text: #FFFFFF;
            --mm-ui-schedule-valid-bg: #E7F1FF;
            --mm-ui-schedule-valid-border: #651C80;
            --mm-ui-schedule-conflict-bg: #FFDCDC;
            --mm-ui-schedule-conflict-border: #991B1B;
            --mm-ui-schedule-action-border: rgba(65, 16, 81, .44);
            --mm-ui-schedule-action-bg: rgba(65, 16, 81, .07);
            --mm-ui-schedule-action-hover-bg: rgba(65, 16, 81, .14);
            --mm-ui-schedule-action-hover-border: rgba(65, 16, 81, .75);
            --mm-ui-schedule-action-hover-inset: rgba(65, 16, 81, .16);
            --mm-ui-schedule-action-disabled-border: rgba(65, 16, 81, .28);
            --mm-ui-schedule-action-disabled-bg: rgba(65, 16, 81, .045);
            --mm-ui-staff-warning-text: #805200;
            --mm-ui-staff-warning-bg: #FFF6DF;
            --mm-ui-staff-warning-badge-bg: #FFE9AB;
            --mm-ui-staff-success-text: #135C31;
            --mm-ui-staff-success-bg: #ECF8F0;
            --mm-ui-staff-success-badge-bg: #D7F0E1;
            --mm-ui-staff-attention-border: #805200;
            --mm-ui-instructor-match-bg: #E7F1FF;
            --mm-ui-instructor-match-border: #651C80;
            --mm-ui-instructor-match-badge-bg: #F8B133;
            --mm-ui-instructor-match-badge-text: #1B1022;
            --mm-ui-chart-grid: rgba(65, 16, 81, .13);
            --mm-ui-chart-axis: rgba(65, 16, 81, .28);
            --mm-ui-scrollbar-track: rgba(65, 16, 81, .12);
            --mm-ui-scrollbar-thumb: #651C80;
            --mm-ui-scrollbar-thumb-hover: #30003a;
            --mm-ui-scrollbar-border: #F1EAF5;
            --mm-ui-availability-badge-bg: #FFF0F0;
            --mm-ui-block-bg: #991B1B;
            --mm-ui-pause-bg: #EEEEEE;
            --mm-ui-pause-text: #444444;
            --mm-ui-overview-badge-bg: #f5f7fa;
            --mm-ui-overview-badge-text: #1B1022;
            --mm-ui-auth-layout-radial: rgba(65, 16, 81, .08);
            --mm-ui-error-strong-bg: #FFF0F0;
            --mm-ui-warning-strong-bg: #FFF6DF;
            --mm-ui-capacity-orange-bg: #ffe5cc;
            --mm-ui-capacity-orange-text: #653208;
            --mm-ui-qr-viewfinder-border: rgba(255, 255, 255, .9);
            --mm-ui-qr-video-bg: #111;
            --mm-ui-preview-chip-text: #000000;
            --mm-ui-panel-text: var(--mm-color-text);
            --mm-ui-panel-text-dim: var(--mm-color-text-dim);
            --mm-ui-panel-accent-text: #795000;
            --mm-ui-tab-index-text: #1B1022;
            --mm-ui-panel-header-text: var(--mm-color-text);
            --mm-ui-panel-header-link: #795000;
            --mm-ui-badge-accent-bg: #F8B133;
            /* Sidebar / breadcrumb */
            --mm-sidebar-button-bg: #E7DCEB;
            --mm-sidebar-button-hover: #D9C8E1;
            --mm-sidebar-button-text: #411051;
            /* Brand Inverse: roster-only palette */
            --mm-roster-lesson-surface: #EDE2F2;
            --mm-roster-lesson-border: #855B95;
            --mm-roster-lesson-accent: #612C75;
            --mm-roster-lesson-text: #2B1335;
            --mm-roster-card-accent: #58246D;
        }

        /* ==========================================================================
   OUTDOOR - Original dark blue/yellow Outdoor Max palette, unchanged.
   ========================================================================== */
        :root[data-mm-theme="outdoor"] {
            /* Global palette / page background */
            --color-primary: #003B7A;
            --color-primary-dark: #002B5C;
            --color-primary-focus: rgba(0, 59, 122, .35);
            --color-secondary: #FFE000;
            --color-secondary-hover: #E5C900;
            --color-link-hover: #003B7A;
            --color-success: #135C31;
            --color-error: #991B1B;
            --color-bg-light: #FFFFFF;
            --color-text: #000000;
            --color-text-light: #FFFFFF;
            --color-border: #777777;
            /* Application surfaces / text / borders */
            --mm-color-bg: #FFFFFF;
            --mm-color-surface-1: #003B7A;
            --mm-color-surface-2: #F1F1F1;
            --mm-color-text: #000000;
            --mm-color-text-dim: #303030;
            --mm-color-border-subtle: #777777;
            --mm-color-border-strong: #404040;
            /* Lessons */
            --mm-lesson-surface: #DDEAFF;
            --mm-lesson-border: #003B7A;
            --mm-lesson-accent: #003B7A;
            /* Focus / state / accents */
            --mm-color-focus: #003B7A;
            --mm-color-success: #135C31;
            --mm-color-danger: #991B1B;
            --mm-color-accent: #86E0FF;
            --mm-color-info: #003B7A;
            /* Shadows and sticky wizard toolbar */
            --mm-color-shadow-strong: rgba(0, 0, 0, .16);
            --mm-color-shadow-soft: rgba(0, 0, 0, .10);
            --mm-color-shadow-inset: rgba(0, 0, 0, .08);
            --mm-color-shadow-inset-soft: rgba(0, 0, 0, .04);
            --mm-wtab-background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
            /* Rental issue: surfaces and border colors */
            --issue-color-surface-card: #FFFFFF;
            --issue-color-surface-header: #124B7D;
            --issue-color-border-subtle: var(--mm-color-border-subtle);
            --issue-color-border-table: #777777;
            /* Rental issue: status colors */
            --issue-color-success: #135C31;
            --issue-color-warning: #705000;
            --issue-color-danger: #991B1B;
            --issue-color-success-border: #135C31;
            --issue-color-warning-border: #705000;
            --issue-color-warning-border-soft: #A08532;
            --issue-color-success-bg-soft: #ECF8F0;
            --issue-color-success-bg-chip: #D7F0E1;
            --issue-color-warning-bg-soft: #FFFBE0;
            --issue-color-warning-bg-badge: #FFE96D;
            --issue-color-warning-bg-chip: #FFF4AD;
            --issue-color-danger-bg-soft: #FFF0F0;
            --issue-color-danger-bg-badge: #FFDCDC;
            /* Modal windows */
            --mm-modal-backdrop-bg: rgba(0, 0, 0, .62);
            --mm-modal-bg: linear-gradient(180deg, #092B58 0%, #124577 100%);
            --mm-modal-border: rgba(225, 235, 251, .36);
            --mm-modal-border-strong: rgba(225, 235, 251, .56);
            --mm-modal-shadow: 0 22px 56px rgba(0, 0, 0, .26);
            --mm-modal-info-bg: rgba(225, 235, 251, .10);
            --mm-modal-info-border: rgba(225, 235, 251, .40);
            --mm-modal-close-color: #E1EBFB;
            --mm-modal-close-hover-bg: rgba(225, 235, 251, .14);
            --mm-modal-close-hover-color: #FFFFFF;
            /* Reports */
            --mm-report-issued: var(--mm-color-info);
            --mm-report-reserved: var(--issue-color-warning);
            --mm-report-available: var(--mm-color-success);
            --mm-report-unavailable: var(--mm-color-danger);
            /* MonkeyTable: text, row states, borders and mobile cards */
            --mm-table-text: var(--color-text-light);
            --mm-table-text-dim: #E1EBFB;
            --mm-table-row-even-bg: rgba(255, 255, 255, .05);
            --mm-table-row-hover-bg: rgba(37, 178, 224, .22);
            --mm-table-row-cancelled-bg: rgba(255, 255, 255, .025);
            --mm-table-header-bg: rgba(255, 255, 255, .14);
            --mm-table-header-border: rgba(255, 255, 255, .26);
            --mm-table-cell-border: rgba(255, 255, 255, .18);
            --mm-table-mobile-card-bg: rgba(255, 255, 255, .075);
            --mm-table-mobile-card-border: rgba(255, 255, 255, .28);
            --mm-table-empty-text: #E1EBFB;
            --mm-table-bool-bg: rgba(37, 178, 224, .16);
            /* Shared theme-aware colors for scoped CSS components */
            --mm-ui-wash-weak: rgba(255, 255, 255, .03);
            --mm-ui-wash-min: rgba(255, 255, 255, .025);
            --mm-ui-wash-soft: rgba(255, 255, 255, .04);
            --mm-ui-wash-mid: rgba(255, 255, 255, .06);
            --mm-ui-wash-hover: rgba(255, 255, 255, .08);
            --mm-ui-wash-active: rgba(255, 255, 255, .12);
            --mm-ui-stroke-weak: rgba(255, 255, 255, .08);
            --mm-ui-stroke-mid: rgba(255, 255, 255, .12);
            --mm-ui-stroke-strong: rgba(255, 255, 255, .25);
            --mm-ui-text-muted: rgba(255, 255, 255, .6);
            --mm-ui-text-faint: rgba(255, 255, 255, .35);
            --mm-ui-link-color: #BDEBFF;
            --mm-ui-primary-button-bg: #003B7A;
            --mm-ui-primary-button-hover: #002B5C;
            --mm-ui-primary-button-text: var(--color-text-light);
            --mm-ui-secondary-button-text: #000000;
            --mm-ui-on-accent: #002B5C;
            --mm-ui-on-danger: #FFFFFF;
            --mm-ui-switch-track: #003B7A;
            --mm-ui-switch-thumb: var(--color-text-light);
            --mm-ui-switch-focus-ring: rgba(13, 110, 253, .35);
            --mm-ui-highlight-background: radial-gradient(120px 60px at 50% 0%, rgba(0, 59, 122, .25), rgba(255, 255, 255, .04));
            --mm-ui-highlight-border: rgba(0, 59, 122, .55);
            --mm-ui-highlight-shadow: 0 0 0 2px rgba(0, 59, 122, .18) inset, 0 6px 18px rgba(0, 59, 122, .20);
            --mm-ui-alert-background: linear-gradient(180deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .03) 100%);
            --mm-ui-auth-field-bg: rgba(0, 59, 122, .58);
            --mm-ui-auth-field-hover-bg: rgba(0, 59, 122, .75);
            --mm-ui-auth-error-text: #ffd7d7;
            --mm-ui-auth-validation-text: #ff9b9b;
            --mm-ui-auth-error-icon-bg: #ff9b9b;
            --mm-ui-auth-error-icon-text: #002B5C;
            --mm-ui-auth-spinner-track: rgba(48, 0, 58, .3);
            --mm-ui-roster-header-bg: rgba(0, 59, 122, .96);
            --mm-ui-roster-header-text: var(--color-text-light);
            --mm-ui-roster-header-border: rgba(255, 255, 255, .12);
            --mm-ui-roster-today-border: rgba(248, 177, 51, .7);
            --mm-ui-roster-today-shadow: rgba(248, 177, 51, .18);
            --mm-ui-roster-lesson-text: #002B5C;
            --mm-ui-roster-hold-bg: rgba(245, 158, 11, .22);
            --mm-ui-roster-hold-border: #f59e0b;
            --mm-ui-roster-hold-accent: #d97706;
            --mm-ui-roster-hold-action-bg: rgba(120, 53, 15, .28);
            --mm-ui-roster-hold-text: var(--color-text-light);
            --mm-ui-roster-timeoff-bg: rgba(239, 68, 68, .18);
            --mm-ui-roster-timeoff-text: var(--color-text-light);
            --mm-ui-schedule-lesson-bg: #3b82f6;
            --mm-ui-schedule-lesson-text: #FFFFFF;
            --mm-ui-schedule-valid-bg: rgba(100, 149, 237, .2);
            --mm-ui-schedule-valid-border: #3b82f6;
            --mm-ui-schedule-conflict-bg: rgba(239, 68, 68, .3);
            --mm-ui-schedule-conflict-border: #ef4444;
            --mm-ui-schedule-action-border: rgba(255, 255, 255, .42);
            --mm-ui-schedule-action-bg: rgba(255, 255, 255, .1);
            --mm-ui-schedule-action-hover-bg: rgba(255, 255, 255, .18);
            --mm-ui-schedule-action-hover-border: rgba(255, 255, 255, .74);
            --mm-ui-schedule-action-hover-inset: rgba(255, 255, 255, .16);
            --mm-ui-schedule-action-disabled-border: rgba(255, 255, 255, .22);
            --mm-ui-schedule-action-disabled-bg: rgba(255, 255, 255, .06);
            --mm-ui-staff-warning-text: #ffe3a8;
            --mm-ui-staff-warning-bg: rgba(248, 177, 51, .13);
            --mm-ui-staff-warning-badge-bg: rgba(248, 177, 51, .25);
            --mm-ui-staff-success-text: #c8f2dc;
            --mm-ui-staff-success-bg: rgba(58, 185, 122, .12);
            --mm-ui-staff-success-badge-bg: rgba(58, 185, 122, .22);
            --mm-ui-staff-attention-border: rgba(248, 177, 51, .5);
            --mm-ui-instructor-match-bg: rgba(66, 99, 235, 0.16);
            --mm-ui-instructor-match-border: #4263eb;
            --mm-ui-instructor-match-badge-bg: #ffc247;
            --mm-ui-instructor-match-badge-text: #30133d;
            --mm-ui-chart-grid: rgba(255, 255, 255, .10);
            --mm-ui-chart-axis: rgba(255, 255, 255, .18);
            --mm-ui-scrollbar-track: rgba(255, 255, 255, .12);
            --mm-ui-scrollbar-thumb: #E5C900;
            --mm-ui-scrollbar-thumb-hover: #FFE000;
            --mm-ui-scrollbar-border: #002B5C;
            --mm-ui-availability-badge-bg: rgba(255, 0, 0, 0.1);
            --mm-ui-block-bg: #ef4444;
            --mm-ui-pause-bg: lightgray;
            --mm-ui-pause-text: gray;
            --mm-ui-overview-badge-bg: #002B5C;
            --mm-ui-overview-badge-text: #FFFFFF;
            --mm-ui-auth-layout-radial: rgba(248, 177, 51, .12);
            --mm-ui-error-strong-bg: rgba(220, 53, 69, .08);
            --mm-ui-warning-strong-bg: rgba(255, 193, 7, .08);
            --mm-ui-capacity-orange-bg: #ffe5cc;
            --mm-ui-capacity-orange-text: #653208;
            --mm-ui-qr-viewfinder-border: rgba(255, 255, 255, .9);
            --mm-ui-qr-video-bg: #111;
            --mm-ui-preview-chip-text: #000000;
            --mm-ui-panel-text: #FFFFFF;
            --mm-ui-panel-text-dim: #E1EBFB;
            --mm-ui-panel-accent-text: #FFE000;
            --mm-ui-tab-index-text: #000000;
            --mm-ui-panel-header-text: var(--mm-color-text);
            --mm-ui-panel-header-link: #86E0FF;
            --mm-ui-badge-accent-bg: #FFE000;
            /* Dashboard selector */
            --mm-dashboard-choice-bg: #DBF1FC;
            --mm-dashboard-choice-hover: #C9E8F9;
            --mm-dashboard-choice-border: #5B91AE;
            --mm-dashboard-choice-text: #062B4A;
            --mm-dashboard-choice-muted: #274961;
            --mm-dashboard-choice-icon-bg: #B9E1F4;
            --mm-dashboard-choice-icon: #005786;
        }

        /* ==========================================================================
   OUTDOOR-INVERSE - Light surfaces + black text, Outdoor blue/yellow accents.
   ========================================================================== */
        :root[data-mm-theme="outdoor-inverse"] {
            /* Global palette / page background */
            --color-primary: #FFFFFF;
            --color-primary-dark: #F1F1F1;
            --color-primary-focus: rgba(0, 59, 122, .35);
            --color-secondary: #FFE000;
            --color-secondary-hover: #E5C900;
            --color-link-hover: #003B7A;
            --color-success: #135C31;
            --color-error: #991B1B;
            --color-bg-light: #FFFFFF;
            --color-text: #000000;
            --color-text-light: #000000;
            --color-border: #777777;
            /* Application surfaces / text / borders */
            --mm-color-bg: #FFFFFF;
            --mm-color-surface-1: #FFFFFF;
            --mm-color-surface-2: #F1F1F1;
            --mm-color-text: #000000;
            --mm-color-text-dim: #303030;
            --mm-color-border-subtle: #777777;
            --mm-color-border-strong: #404040;
            /* Lessons */
            --mm-lesson-surface: #DDEAFF;
            --mm-lesson-border: #003B7A;
            --mm-lesson-accent: #003B7A;
            /* Focus / state / accents */
            --mm-color-focus: #003B7A;
            --mm-color-success: #135C31;
            --mm-color-danger: #991B1B;
            --mm-color-accent: #005D8A;
            --mm-color-info: #003B7A;
            /* Shadows and sticky wizard toolbar */
            --mm-color-shadow-strong: rgba(0, 0, 0, .16);
            --mm-color-shadow-soft: rgba(0, 0, 0, .10);
            --mm-color-shadow-inset: rgba(0, 0, 0, .08);
            --mm-color-shadow-inset-soft: rgba(0, 0, 0, .04);
            --mm-wtab-background: linear-gradient(180deg, var(--mm-color-surface-1) 0%, var(--color-primary-dark) 100%);
            /* Rental issue: surfaces and border colors */
            --issue-color-surface-card: #FFFFFF;
            --issue-color-surface-header: #D8ECF9;
            --issue-color-border-subtle: var(--mm-color-border-subtle);
            --issue-color-border-table: #777777;
            /* Rental issue: status colors */
            --issue-color-success: #135C31;
            --issue-color-warning: #705000;
            --issue-color-danger: #991B1B;
            --issue-color-success-border: #135C31;
            --issue-color-warning-border: #705000;
            --issue-color-warning-border-soft: #A08532;
            --issue-color-success-bg-soft: #ECF8F0;
            --issue-color-success-bg-chip: #D7F0E1;
            --issue-color-warning-bg-soft: #FFFBE0;
            --issue-color-warning-bg-badge: #FFE96D;
            --issue-color-warning-bg-chip: #FFF4AD;
            --issue-color-danger-bg-soft: #FFF0F0;
            --issue-color-danger-bg-badge: #FFDCDC;
            /* Modal windows */
            --mm-modal-backdrop-bg: rgba(0, 0, 0, .62);
            --mm-modal-bg: linear-gradient(180deg, #FFFFFF 0%, #F1F1F1 100%);
            --mm-modal-border: #777777;
            --mm-modal-border-strong: #404040;
            --mm-modal-shadow: 0 22px 56px rgba(0, 0, 0, .26);
            --mm-modal-info-bg: #FFF8CB;
            --mm-modal-info-border: #705000;
            --mm-modal-close-color: #303030;
            --mm-modal-close-hover-bg: #DFDFDF;
            --mm-modal-close-hover-color: #000000;
            /* Reports */
            --mm-report-issued: var(--mm-color-info);
            --mm-report-reserved: var(--issue-color-warning);
            --mm-report-available: var(--mm-color-success);
            --mm-report-unavailable: var(--mm-color-danger);
            /* MonkeyTable: text, row states, borders and mobile cards */
            --mm-table-text: var(--mm-color-text);
            --mm-table-text-dim: var(--mm-color-text-dim);
            --mm-table-row-even-bg: rgba(0, 59, 122, .035);
            --mm-table-row-hover-bg: rgba(0, 135, 195, .14);
            --mm-table-row-cancelled-bg: rgba(0, 59, 122, .025);
            --mm-table-header-bg: rgba(0, 59, 122, .09);
            --mm-table-header-border: rgba(0, 59, 122, .28);
            --mm-table-cell-border: rgba(0, 59, 122, .16);
            --mm-table-mobile-card-bg: #FFFFFF;
            --mm-table-mobile-card-border: #777777;
            --mm-table-empty-text: var(--mm-color-text-dim);
            --mm-table-bool-bg: rgba(0, 135, 195, .10);
            /* Shared theme-aware colors for scoped CSS components */
            --mm-ui-wash-weak: rgba(0, 59, 122, .035);
            --mm-ui-wash-min: rgba(0, 59, 122, .025);
            --mm-ui-wash-soft: rgba(0, 59, 122, .055);
            --mm-ui-wash-mid: rgba(0, 59, 122, .075);
            --mm-ui-wash-hover: rgba(0, 59, 122, .105);
            --mm-ui-wash-active: rgba(0, 59, 122, .15);
            --mm-ui-stroke-weak: rgba(0, 59, 122, .14);
            --mm-ui-stroke-mid: rgba(0, 59, 122, .24);
            --mm-ui-stroke-strong: rgba(0, 59, 122, .42);
            --mm-ui-text-muted: var(--mm-color-text-dim);
            --mm-ui-text-faint: var(--mm-color-text-dim);
            --mm-ui-link-color: #003B7A;
            --mm-ui-primary-button-bg: #003B7A;
            --mm-ui-primary-button-hover: #002B5C;
            --mm-ui-primary-button-text: #FFFFFF;
            --mm-ui-secondary-button-text: #000000;
            --mm-ui-on-accent: #000000;
            --mm-ui-on-danger: #FFFFFF;
            --mm-ui-switch-track: #003B7A;
            --mm-ui-switch-thumb: #FFFFFF;
            --mm-ui-switch-focus-ring: rgba(0, 59, 122, .35);
            --mm-ui-highlight-background: radial-gradient(120px 60px at 50% 0%, rgba(0, 59, 122, .16), rgba(0, 59, 122, .035));
            --mm-ui-highlight-border: rgba(0, 59, 122, .55);
            --mm-ui-highlight-shadow: 0 0 0 2px rgba(0, 59, 122, .18) inset, 0 6px 18px rgba(0, 59, 122, .20);
            --mm-ui-alert-background: linear-gradient(180deg, #F1F1F1 0%, #FFFFFF 100%);
            --mm-ui-auth-field-bg: #FFFFFF;
            --mm-ui-auth-field-hover-bg: #F1F1F1;
            --mm-ui-auth-error-text: #991B1B;
            --mm-ui-auth-validation-text: #991B1B;
            --mm-ui-auth-error-icon-bg: #FFDCDC;
            --mm-ui-auth-error-icon-text: #000000;
            --mm-ui-auth-spinner-track: rgba(0, 59, 122, .25);
            --mm-ui-roster-header-bg: #F1F1F1;
            --mm-ui-roster-header-text: var(--mm-color-text);
            --mm-ui-roster-header-border: rgba(0, 59, 122, .24);
            --mm-ui-roster-today-border: rgba(0, 59, 122, .7);
            --mm-ui-roster-today-shadow: rgba(0, 59, 122, .18);
            --mm-ui-roster-lesson-text: #000000;
            --mm-ui-roster-hold-bg: #FFF0C2;
            --mm-ui-roster-hold-border: #A97000;
            --mm-ui-roster-hold-accent: #805200;
            --mm-ui-roster-hold-action-bg: #FFE9AB;
            --mm-ui-roster-hold-text: #422B00;
            --mm-ui-roster-timeoff-bg: #FFF0F0;
            --mm-ui-roster-timeoff-text: #8A1525;
            --mm-ui-schedule-lesson-bg: #1D538C;
            --mm-ui-schedule-lesson-text: #FFFFFF;
            --mm-ui-schedule-valid-bg: #DDEAFF;
            --mm-ui-schedule-valid-border: #003B7A;
            --mm-ui-schedule-conflict-bg: #FFDCDC;
            --mm-ui-schedule-conflict-border: #991B1B;
            --mm-ui-schedule-action-border: rgba(0, 59, 122, .44);
            --mm-ui-schedule-action-bg: rgba(0, 59, 122, .07);
            --mm-ui-schedule-action-hover-bg: rgba(0, 59, 122, .14);
            --mm-ui-schedule-action-hover-border: rgba(0, 59, 122, .75);
            --mm-ui-schedule-action-hover-inset: rgba(0, 59, 122, .16);
            --mm-ui-schedule-action-disabled-border: rgba(0, 59, 122, .28);
            --mm-ui-schedule-action-disabled-bg: rgba(0, 59, 122, .045);
            --mm-ui-staff-warning-text: #805200;
            --mm-ui-staff-warning-bg: #FFF6DF;
            --mm-ui-staff-warning-badge-bg: #FFE9AB;
            --mm-ui-staff-success-text: #135C31;
            --mm-ui-staff-success-bg: #ECF8F0;
            --mm-ui-staff-success-badge-bg: #D7F0E1;
            --mm-ui-staff-attention-border: #805200;
            --mm-ui-instructor-match-bg: #DDEAFF;
            --mm-ui-instructor-match-border: #003B7A;
            --mm-ui-instructor-match-badge-bg: #FFE000;
            --mm-ui-instructor-match-badge-text: #000000;
            --mm-ui-chart-grid: rgba(0, 59, 122, .13);
            --mm-ui-chart-axis: rgba(0, 59, 122, .28);
            --mm-ui-scrollbar-track: rgba(0, 59, 122, .12);
            --mm-ui-scrollbar-thumb: #003B7A;
            --mm-ui-scrollbar-thumb-hover: #002B5C;
            --mm-ui-scrollbar-border: #F1F1F1;
            --mm-ui-availability-badge-bg: #FFF0F0;
            --mm-ui-block-bg: #991B1B;
            --mm-ui-pause-bg: #EEEEEE;
            --mm-ui-pause-text: #444444;
            --mm-ui-overview-badge-bg: #f5f7fa;
            --mm-ui-overview-badge-text: #1B1022;
            --mm-ui-auth-layout-radial: rgba(0, 59, 122, .08);
            --mm-ui-error-strong-bg: #FFF0F0;
            --mm-ui-warning-strong-bg: #FFF6DF;
            --mm-ui-capacity-orange-bg: #ffe5cc;
            --mm-ui-capacity-orange-text: #653208;
            --mm-ui-qr-viewfinder-border: rgba(255, 255, 255, .9);
            --mm-ui-qr-video-bg: #111;
            --mm-ui-preview-chip-text: #000000;
            --mm-ui-panel-text: var(--mm-color-text);
            --mm-ui-panel-text-dim: var(--mm-color-text-dim);
            --mm-ui-panel-accent-text: #003B7A;
            --mm-ui-tab-index-text: #000000;
            --mm-ui-panel-header-text: var(--mm-color-text);
            --mm-ui-panel-header-link: #003B7A;
            --mm-ui-badge-accent-bg: #FFE000;
            /* Sidebar / breadcrumb */
            --mm-sidebar-button-bg: #DAECFA;
            --mm-sidebar-button-hover: #C5E0F3;
            --mm-sidebar-button-text: #073762;
            /* Dashboard selector */
            --mm-dashboard-choice-bg: #E5F5FF;
            --mm-dashboard-choice-hover: #D5EDFC;
            --mm-dashboard-choice-border: #75A5C0;
            --mm-dashboard-choice-text: #082A43;
            --mm-dashboard-choice-muted: #36566B;
            --mm-dashboard-choice-icon-bg: #CAE9FA;
            --mm-dashboard-choice-icon: #005786;
        }

        /* ==========================================================================
   ALPINE - Original dark blue Alpine Clear palette, unchanged.
   ========================================================================== */
        :root[data-mm-theme="alpine"] {
            /* Global palette / page background */
            --color-primary: #004A75;
            --color-primary-dark: #003452;
            --color-primary-focus: rgba(0, 74, 117, .32);
            --color-secondary: #BDEBFF;
            --color-secondary-hover: #9FDFFB;
            --color-link-hover: #004A75;
            --color-success: #166534;
            --color-error: #A52220;
            --color-bg-light: #F5FAFF;
            --color-text: #092231;
            --color-text-light: #FFFFFF;
            --color-border: #758998;
            /* Application surfaces / text / borders */
            --mm-color-bg: #F5FAFF;
            --mm-color-surface-1: #005D91;
            --mm-color-surface-2: #E8F3FB;
            --mm-color-text: #092231;
            --mm-color-text-dim: #345066;
            --mm-color-border-subtle: #758998;
            --mm-color-border-strong: #415A69;
            /* Lessons */
            --mm-lesson-surface: #DAEEFF;
            --mm-lesson-border: #005D91;
            --mm-lesson-accent: #004A75;
            /* Focus / state / accents */
            --mm-color-focus: #00527D;
            --mm-color-success: #166534;
            --mm-color-danger: #A52220;
            --mm-color-accent: #BDEBFF;
            --mm-color-info: #005786;
            /* Shadows and sticky wizard toolbar */
            --mm-color-shadow-strong: rgba(9, 34, 49, .17);
            --mm-color-shadow-soft: rgba(9, 34, 49, .10);
            --mm-color-shadow-inset: rgba(9, 34, 49, .06);
            --mm-color-shadow-inset-soft: rgba(9, 34, 49, .035);
            --mm-wtab-background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
            /* Rental issue: surfaces and border colors */
            --issue-color-surface-card: #FFFFFF;
            --issue-color-surface-header: #0E4567;
            --issue-color-border-subtle: var(--mm-color-border-subtle);
            --issue-color-border-table: #8C9DA8;
            /* Rental issue: status colors */
            --issue-color-success: #166534;
            --issue-color-warning: #765100;
            --issue-color-danger: #A52220;
            --issue-color-success-border: #166534;
            --issue-color-warning-border: #765100;
            --issue-color-warning-border-soft: #AA872F;
            --issue-color-success-bg-soft: #EBF8EF;
            --issue-color-success-bg-chip: #DDF0E5;
            --issue-color-warning-bg-soft: #FFF5D9;
            --issue-color-warning-bg-badge: #FFE6A2;
            --issue-color-warning-bg-chip: #FFF0BF;
            --issue-color-danger-bg-soft: #FFF0F0;
            --issue-color-danger-bg-badge: #FFDFDC;
            /* Modal windows */
            --mm-modal-backdrop-bg: rgba(5, 27, 43, .60);
            --mm-modal-bg: linear-gradient(180deg, #073451 0%, #0B4569 100%);
            --mm-modal-border: rgba(189, 235, 255, .38);
            --mm-modal-border-strong: rgba(189, 235, 255, .58);
            --mm-modal-shadow: 0 22px 56px rgba(9, 34, 49, .25);
            --mm-modal-info-bg: rgba(189, 235, 255, .10);
            --mm-modal-info-border: rgba(189, 235, 255, .45);
            --mm-modal-close-color: #D1E8F6;
            --mm-modal-close-hover-bg: rgba(189, 235, 255, .14);
            --mm-modal-close-hover-color: #FFFFFF;
            /* Reports */
            --mm-report-issued: var(--mm-color-info);
            --mm-report-reserved: var(--issue-color-warning);
            --mm-report-available: var(--mm-color-success);
            --mm-report-unavailable: var(--mm-color-danger);
            /* MonkeyTable: text, row states, borders and mobile cards */
            --mm-table-text: var(--color-text-light);
            --mm-table-text-dim: #D1E8F6;
            --mm-table-row-even-bg: rgba(255, 255, 255, .045);
            --mm-table-row-hover-bg: rgba(189, 235, 255, .17);
            --mm-table-row-cancelled-bg: rgba(255, 255, 255, .025);
            --mm-table-header-bg: rgba(255, 255, 255, .12);
            --mm-table-header-border: rgba(189, 235, 255, .30);
            --mm-table-cell-border: rgba(189, 235, 255, .19);
            --mm-table-mobile-card-bg: rgba(255, 255, 255, .07);
            --mm-table-mobile-card-border: rgba(189, 235, 255, .29);
            --mm-table-empty-text: #D1E8F6;
            --mm-table-bool-bg: rgba(189, 235, 255, .16);
            /* Shared theme-aware colors for scoped CSS components */
            --mm-ui-wash-weak: rgba(255, 255, 255, .03);
            --mm-ui-wash-min: rgba(255, 255, 255, .025);
            --mm-ui-wash-soft: rgba(255, 255, 255, .04);
            --mm-ui-wash-mid: rgba(255, 255, 255, .06);
            --mm-ui-wash-hover: rgba(255, 255, 255, .08);
            --mm-ui-wash-active: rgba(255, 255, 255, .12);
            --mm-ui-stroke-weak: rgba(255, 255, 255, .08);
            --mm-ui-stroke-mid: rgba(255, 255, 255, .12);
            --mm-ui-stroke-strong: rgba(255, 255, 255, .25);
            --mm-ui-text-muted: rgba(255, 255, 255, .6);
            --mm-ui-text-faint: rgba(255, 255, 255, .35);
            --mm-ui-link-color: #BDEBFF;
            --mm-ui-primary-button-bg: #004A75;
            --mm-ui-primary-button-hover: #003452;
            --mm-ui-primary-button-text: var(--color-text-light);
            --mm-ui-secondary-button-text: #092231;
            --mm-ui-on-accent: #003452;
            --mm-ui-on-danger: #FFFFFF;
            --mm-ui-switch-track: #004A75;
            --mm-ui-switch-thumb: var(--color-text-light);
            --mm-ui-switch-focus-ring: rgba(13, 110, 253, .35);
            --mm-ui-highlight-background: radial-gradient(120px 60px at 50% 0%, rgba(0, 74, 117, .25), rgba(255, 255, 255, .04));
            --mm-ui-highlight-border: rgba(0, 74, 117, .55);
            --mm-ui-highlight-shadow: 0 0 0 2px rgba(0, 74, 117, .18) inset, 0 6px 18px rgba(0, 74, 117, .20);
            --mm-ui-alert-background: linear-gradient(180deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .03) 100%);
            --mm-ui-auth-field-bg: rgba(0, 74, 117, .58);
            --mm-ui-auth-field-hover-bg: rgba(0, 74, 117, .75);
            --mm-ui-auth-error-text: #ffd7d7;
            --mm-ui-auth-validation-text: #ff9b9b;
            --mm-ui-auth-error-icon-bg: #ff9b9b;
            --mm-ui-auth-error-icon-text: #003452;
            --mm-ui-auth-spinner-track: rgba(48, 0, 58, .3);
            --mm-ui-roster-header-bg: rgba(0, 74, 117, .96);
            --mm-ui-roster-header-text: var(--color-text-light);
            --mm-ui-roster-header-border: rgba(255, 255, 255, .12);
            --mm-ui-roster-today-border: rgba(248, 177, 51, .7);
            --mm-ui-roster-today-shadow: rgba(248, 177, 51, .18);
            --mm-ui-roster-lesson-text: #003452;
            --mm-ui-roster-hold-bg: rgba(245, 158, 11, .22);
            --mm-ui-roster-hold-border: #f59e0b;
            --mm-ui-roster-hold-accent: #d97706;
            --mm-ui-roster-hold-action-bg: rgba(120, 53, 15, .28);
            --mm-ui-roster-hold-text: var(--color-text-light);
            --mm-ui-roster-timeoff-bg: rgba(239, 68, 68, .18);
            --mm-ui-roster-timeoff-text: var(--color-text-light);
            --mm-ui-schedule-lesson-bg: #3b82f6;
            --mm-ui-schedule-lesson-text: #FFFFFF;
            --mm-ui-schedule-valid-bg: rgba(100, 149, 237, .2);
            --mm-ui-schedule-valid-border: #3b82f6;
            --mm-ui-schedule-conflict-bg: rgba(239, 68, 68, .3);
            --mm-ui-schedule-conflict-border: #ef4444;
            --mm-ui-schedule-action-border: rgba(255, 255, 255, .42);
            --mm-ui-schedule-action-bg: rgba(255, 255, 255, .1);
            --mm-ui-schedule-action-hover-bg: rgba(255, 255, 255, .18);
            --mm-ui-schedule-action-hover-border: rgba(255, 255, 255, .74);
            --mm-ui-schedule-action-hover-inset: rgba(255, 255, 255, .16);
            --mm-ui-schedule-action-disabled-border: rgba(255, 255, 255, .22);
            --mm-ui-schedule-action-disabled-bg: rgba(255, 255, 255, .06);
            --mm-ui-staff-warning-text: #ffe3a8;
            --mm-ui-staff-warning-bg: rgba(248, 177, 51, .13);
            --mm-ui-staff-warning-badge-bg: rgba(248, 177, 51, .25);
            --mm-ui-staff-success-text: #c8f2dc;
            --mm-ui-staff-success-bg: rgba(58, 185, 122, .12);
            --mm-ui-staff-success-badge-bg: rgba(58, 185, 122, .22);
            --mm-ui-staff-attention-border: rgba(248, 177, 51, .5);
            --mm-ui-instructor-match-bg: rgba(66, 99, 235, 0.16);
            --mm-ui-instructor-match-border: #4263eb;
            --mm-ui-instructor-match-badge-bg: #ffc247;
            --mm-ui-instructor-match-badge-text: #30133d;
            --mm-ui-chart-grid: rgba(255, 255, 255, .10);
            --mm-ui-chart-axis: rgba(255, 255, 255, .18);
            --mm-ui-scrollbar-track: rgba(255, 255, 255, .12);
            --mm-ui-scrollbar-thumb: #9FDFFB;
            --mm-ui-scrollbar-thumb-hover: #BDEBFF;
            --mm-ui-scrollbar-border: #003452;
            --mm-ui-availability-badge-bg: rgba(255, 0, 0, 0.1);
            --mm-ui-block-bg: #ef4444;
            --mm-ui-pause-bg: lightgray;
            --mm-ui-pause-text: gray;
            --mm-ui-overview-badge-bg: #003452;
            --mm-ui-overview-badge-text: #FFFFFF;
            --mm-ui-auth-layout-radial: rgba(248, 177, 51, .12);
            --mm-ui-error-strong-bg: rgba(220, 53, 69, .08);
            --mm-ui-warning-strong-bg: rgba(255, 193, 7, .08);
            --mm-ui-capacity-orange-bg: #ffe5cc;
            --mm-ui-capacity-orange-text: #653208;
            --mm-ui-qr-viewfinder-border: rgba(255, 255, 255, .9);
            --mm-ui-qr-video-bg: #111;
            --mm-ui-preview-chip-text: #000000;
            --mm-ui-panel-text: #FFFFFF;
            --mm-ui-panel-text-dim: #D1E8F6;
            --mm-ui-panel-accent-text: #BDEBFF;
            --mm-ui-tab-index-text: #092231;
            --mm-ui-panel-header-text: var(--mm-color-text);
            --mm-ui-panel-header-link: #BDEBFF;
            --mm-ui-badge-accent-bg: #BDEBFF;
            /* Dashboard selector */
            --mm-dashboard-choice-bg: #DCEFFB;
            --mm-dashboard-choice-hover: #CFEBFA;
            --mm-dashboard-choice-border: #5B8AA6;
            --mm-dashboard-choice-text: #092231;
            --mm-dashboard-choice-muted: #305069;
            --mm-dashboard-choice-icon-bg: #C2E1F3;
            --mm-dashboard-choice-icon: #005786;
        }

        /* ==========================================================================
   ALPINE-INVERSE - Snow/light blue surfaces + dark text, Alpine accents.
   ========================================================================== */
        :root[data-mm-theme="alpine-inverse"] {
            /* Global palette / page background */
            --color-primary: #F5FAFF;
            --color-primary-dark: #E8F3FB;
            --color-primary-focus: rgba(0, 74, 117, .32);
            --color-secondary: #BDEBFF;
            --color-secondary-hover: #9FDFFB;
            --color-link-hover: #004A75;
            --color-success: #166534;
            --color-error: #A52220;
            --color-bg-light: #F5FAFF;
            --color-text: #092231;
            --color-text-light: #092231;
            --color-border: #758998;
            /* Application surfaces / text / borders */
            --mm-color-bg: #F5FAFF;
            --mm-color-surface-1: #FFFFFF;
            --mm-color-surface-2: #E8F3FB;
            --mm-color-text: #092231;
            --mm-color-text-dim: #345066;
            --mm-color-border-subtle: #758998;
            --mm-color-border-strong: #415A69;
            /* Lessons */
            --mm-lesson-surface: #DAEEFF;
            --mm-lesson-border: #005D91;
            --mm-lesson-accent: #004A75;
            /* Focus / state / accents */
            --mm-color-focus: #00527D;
            --mm-color-success: #166534;
            --mm-color-danger: #A52220;
            --mm-color-accent: #005478;
            --mm-color-info: #005786;
            /* Shadows and sticky wizard toolbar */
            --mm-color-shadow-strong: rgba(9, 34, 49, .17);
            --mm-color-shadow-soft: rgba(9, 34, 49, .10);
            --mm-color-shadow-inset: rgba(9, 34, 49, .06);
            --mm-color-shadow-inset-soft: rgba(9, 34, 49, .035);
            --mm-wtab-background: linear-gradient(180deg, var(--mm-color-surface-1) 0%, var(--color-primary-dark) 100%);
            /* Rental issue: surfaces and border colors */
            --issue-color-surface-card: #FFFFFF;
            --issue-color-surface-header: #D1E7F4;
            --issue-color-border-subtle: var(--mm-color-border-subtle);
            --issue-color-border-table: #8C9DA8;
            /* Rental issue: status colors */
            --issue-color-success: #166534;
            --issue-color-warning: #765100;
            --issue-color-danger: #A52220;
            --issue-color-success-border: #166534;
            --issue-color-warning-border: #765100;
            --issue-color-warning-border-soft: #AA872F;
            --issue-color-success-bg-soft: #EBF8EF;
            --issue-color-success-bg-chip: #DDF0E5;
            --issue-color-warning-bg-soft: #FFF5D9;
            --issue-color-warning-bg-badge: #FFE6A2;
            --issue-color-warning-bg-chip: #FFF0BF;
            --issue-color-danger-bg-soft: #FFF0F0;
            --issue-color-danger-bg-badge: #FFDFDC;
            /* Modal windows */
            --mm-modal-backdrop-bg: rgba(5, 27, 43, .60);
            --mm-modal-bg: linear-gradient(180deg, #FFFFFF 0%, var(--mm-color-surface-2) 100%);
            --mm-modal-border: #758998;
            --mm-modal-border-strong: #415A69;
            --mm-modal-shadow: 0 22px 56px rgba(9, 34, 49, .25);
            --mm-modal-info-bg: #E4F3FF;
            --mm-modal-info-border: #005786;
            --mm-modal-close-color: var(--mm-color-text-dim);
            --mm-modal-close-hover-bg: #D8ECF9;
            --mm-modal-close-hover-color: var(--mm-color-text);
            /* Reports */
            --mm-report-issued: var(--mm-color-info);
            --mm-report-reserved: var(--issue-color-warning);
            --mm-report-available: var(--mm-color-success);
            --mm-report-unavailable: var(--mm-color-danger);
            /* MonkeyTable: text, row states, borders and mobile cards */
            --mm-table-text: var(--mm-color-text);
            --mm-table-text-dim: var(--mm-color-text-dim);
            --mm-table-row-even-bg: rgba(0, 74, 117, .035);
            --mm-table-row-hover-bg: rgba(0, 93, 145, .12);
            --mm-table-row-cancelled-bg: rgba(0, 74, 117, .025);
            --mm-table-header-bg: rgba(0, 93, 145, .09);
            --mm-table-header-border: rgba(0, 93, 145, .27);
            --mm-table-cell-border: rgba(0, 93, 145, .16);
            --mm-table-mobile-card-bg: #FFFFFF;
            --mm-table-mobile-card-border: #758998;
            --mm-table-empty-text: var(--mm-color-text-dim);
            --mm-table-bool-bg: rgba(0, 93, 145, .11);
            /* Shared theme-aware colors for scoped CSS components */
            --mm-ui-wash-weak: rgba(0, 74, 117, .035);
            --mm-ui-wash-min: rgba(0, 74, 117, .025);
            --mm-ui-wash-soft: rgba(0, 74, 117, .055);
            --mm-ui-wash-mid: rgba(0, 74, 117, .075);
            --mm-ui-wash-hover: rgba(0, 74, 117, .105);
            --mm-ui-wash-active: rgba(0, 74, 117, .15);
            --mm-ui-stroke-weak: rgba(0, 74, 117, .14);
            --mm-ui-stroke-mid: rgba(0, 74, 117, .24);
            --mm-ui-stroke-strong: rgba(0, 74, 117, .42);
            --mm-ui-text-muted: var(--mm-color-text-dim);
            --mm-ui-text-faint: var(--mm-color-text-dim);
            --mm-ui-link-color: #004A75;
            --mm-ui-primary-button-bg: #004A75;
            --mm-ui-primary-button-hover: #003452;
            --mm-ui-primary-button-text: #FFFFFF;
            --mm-ui-secondary-button-text: #092231;
            --mm-ui-on-accent: #092231;
            --mm-ui-on-danger: #FFFFFF;
            --mm-ui-switch-track: #004A75;
            --mm-ui-switch-thumb: #FFFFFF;
            --mm-ui-switch-focus-ring: rgba(0, 74, 117, .35);
            --mm-ui-highlight-background: radial-gradient(120px 60px at 50% 0%, rgba(0, 74, 117, .16), rgba(0, 74, 117, .035));
            --mm-ui-highlight-border: rgba(0, 74, 117, .55);
            --mm-ui-highlight-shadow: 0 0 0 2px rgba(0, 74, 117, .18) inset, 0 6px 18px rgba(0, 74, 117, .20);
            --mm-ui-alert-background: linear-gradient(180deg, #E8F3FB 0%, #FFFFFF 100%);
            --mm-ui-auth-field-bg: #FFFFFF;
            --mm-ui-auth-field-hover-bg: #E8F3FB;
            --mm-ui-auth-error-text: #991B1B;
            --mm-ui-auth-validation-text: #991B1B;
            --mm-ui-auth-error-icon-bg: #FFDCDC;
            --mm-ui-auth-error-icon-text: #092231;
            --mm-ui-auth-spinner-track: rgba(0, 74, 117, .25);
            --mm-ui-roster-header-bg: #E8F3FB;
            --mm-ui-roster-header-text: var(--mm-color-text);
            --mm-ui-roster-header-border: rgba(0, 74, 117, .24);
            --mm-ui-roster-today-border: rgba(0, 74, 117, .7);
            --mm-ui-roster-today-shadow: rgba(0, 74, 117, .18);
            --mm-ui-roster-lesson-text: #092231;
            --mm-ui-roster-hold-bg: #FFF0C2;
            --mm-ui-roster-hold-border: #A97000;
            --mm-ui-roster-hold-accent: #805200;
            --mm-ui-roster-hold-action-bg: #FFE9AB;
            --mm-ui-roster-hold-text: #422B00;
            --mm-ui-roster-timeoff-bg: #FFF0F0;
            --mm-ui-roster-timeoff-text: #8A1525;
            --mm-ui-schedule-lesson-bg: #1D538C;
            --mm-ui-schedule-lesson-text: #FFFFFF;
            --mm-ui-schedule-valid-bg: #DAEEFF;
            --mm-ui-schedule-valid-border: #00527D;
            --mm-ui-schedule-conflict-bg: #FFDCDC;
            --mm-ui-schedule-conflict-border: #991B1B;
            --mm-ui-schedule-action-border: rgba(0, 74, 117, .44);
            --mm-ui-schedule-action-bg: rgba(0, 74, 117, .07);
            --mm-ui-schedule-action-hover-bg: rgba(0, 74, 117, .14);
            --mm-ui-schedule-action-hover-border: rgba(0, 74, 117, .75);
            --mm-ui-schedule-action-hover-inset: rgba(0, 74, 117, .16);
            --mm-ui-schedule-action-disabled-border: rgba(0, 74, 117, .28);
            --mm-ui-schedule-action-disabled-bg: rgba(0, 74, 117, .045);
            --mm-ui-staff-warning-text: #805200;
            --mm-ui-staff-warning-bg: #FFF6DF;
            --mm-ui-staff-warning-badge-bg: #FFE9AB;
            --mm-ui-staff-success-text: #135C31;
            --mm-ui-staff-success-bg: #ECF8F0;
            --mm-ui-staff-success-badge-bg: #D7F0E1;
            --mm-ui-staff-attention-border: #805200;
            --mm-ui-instructor-match-bg: #DAEEFF;
            --mm-ui-instructor-match-border: #00527D;
            --mm-ui-instructor-match-badge-bg: #BDEBFF;
            --mm-ui-instructor-match-badge-text: #092231;
            --mm-ui-chart-grid: rgba(0, 74, 117, .13);
            --mm-ui-chart-axis: rgba(0, 74, 117, .28);
            --mm-ui-scrollbar-track: rgba(0, 74, 117, .12);
            --mm-ui-scrollbar-thumb: #00527D;
            --mm-ui-scrollbar-thumb-hover: #003452;
            --mm-ui-scrollbar-border: #E8F3FB;
            --mm-ui-availability-badge-bg: #FFF0F0;
            --mm-ui-block-bg: #991B1B;
            --mm-ui-pause-bg: #EEEEEE;
            --mm-ui-pause-text: #444444;
            --mm-ui-overview-badge-bg: #f5f7fa;
            --mm-ui-overview-badge-text: #1B1022;
            --mm-ui-auth-layout-radial: rgba(0, 74, 117, .08);
            --mm-ui-error-strong-bg: #FFF0F0;
            --mm-ui-warning-strong-bg: #FFF6DF;
            --mm-ui-capacity-orange-bg: #ffe5cc;
            --mm-ui-capacity-orange-text: #653208;
            --mm-ui-qr-viewfinder-border: rgba(255, 255, 255, .9);
            --mm-ui-qr-video-bg: #111;
            --mm-ui-preview-chip-text: #000000;
            --mm-ui-panel-text: var(--mm-color-text);
            --mm-ui-panel-text-dim: var(--mm-color-text-dim);
            --mm-ui-panel-accent-text: #005478;
            --mm-ui-tab-index-text: #092231;
            --mm-ui-panel-header-text: var(--mm-color-text);
            --mm-ui-panel-header-link: #004A75;
            --mm-ui-badge-accent-bg: #BDEBFF;
            /* Sidebar / breadcrumb */
            --mm-sidebar-button-bg: #DCEFFA;
            --mm-sidebar-button-hover: #C7E3F2;
            --mm-sidebar-button-text: #092231;
            --mm-sidebar-breadcrumb-text: #00527D;
        }


        /* --------------------------------------------------------------------------
   INVERSE THEMES - existing App.css hard-coded dark-mode compatibility.
   This selector matches exactly the three *-inverse themes.
   Reuse existing color tokens; no changes to dimensions, layout or spacing.
   -------------------------------------------------------------------------- */
        :root[data-mm-theme$="-inverse"] {
            color-scheme: light;
        }

            /* Existing form CSS uses #fff for text. Override for all inverse themes. */
            :root[data-mm-theme$="-inverse"] input.form-control,
            :root[data-mm-theme$="-inverse"] input.form-control:hover,
            :root[data-mm-theme$="-inverse"] input.form-control:focus,
            :root[data-mm-theme$="-inverse"] input.form-control.active,
            :root[data-mm-theme$="-inverse"] input.form-control[readonly],
            :root[data-mm-theme$="-inverse"] input.form-control:read-only,
            :root[data-mm-theme$="-inverse"] select.form-select {
                color: var(--mm-color-text);
            }

                :root[data-mm-theme$="-inverse"] input.form-control::placeholder {
                    color: var(--mm-color-text-dim);
                    opacity: 1;
                }

            :root[data-mm-theme$="-inverse"] .form-check-input:checked {
                background-color: var(--mm-color-focus);
                border-color: var(--mm-color-focus);
            }

            :root[data-mm-theme$="-inverse"] .form-select:focus {
                border-color: var(--mm-color-focus);
            }

            :root[data-mm-theme$="-inverse"] .group-frame {
                border-color: var(--mm-color-border-strong);
            }

            /* Toolbar and drawer use original hard-coded light-on-dark borders. */
            :root[data-mm-theme$="-inverse"] .mm-sticky-toolbar {
                color: var(--mm-color-text);
                border-color: var(--mm-color-border-subtle);
                box-shadow: 0 2px 6px var(--mm-color-shadow-soft), inset 0 0 0 1px var(--mm-color-shadow-inset);
            }

            :root[data-mm-theme$="-inverse"] .drawer {
                color: var(--mm-color-text);
                border-left-color: var(--mm-color-border-subtle);
                box-shadow: -2px 0 12px var(--mm-color-shadow-soft);
            }

@media (max-width: 991.98px) {
    :root[data-mm-theme$="-inverse"] .mm-responsive-table tbody td {
        border-bottom-color: var(--mm-color-border-subtle);
    }
}

/* Inverse dashboard grid lines and scrollbar tracks must stay visible. */
:root[data-mm-theme$="-inverse"] .mm-dashboard .rz-chart .rz-grid-line {
    stroke: color-mix(in srgb, var(--mm-color-text) 13%, transparent);
}

:root[data-mm-theme$="-inverse"] .mm-dashboard .rz-chart .rz-axis-line {
    stroke: color-mix(in srgb, var(--mm-color-text) 28%, transparent);
}

/* Preserve the exact original Brand Light chart line colors after renaming. */
:root[data-mm-theme="brand-inverse"] .mm-dashboard .rz-chart .rz-grid-line {
    stroke: rgba(65, 16, 81, .13);
}

:root[data-mm-theme="brand-inverse"] .mm-dashboard .rz-chart .rz-axis-line {
    stroke: rgba(65, 16, 81, .28);
}

:root[data-mm-theme$="-inverse"] .mm-body-main {
    scrollbar-color: var(--mm-color-focus) var(--mm-color-surface-2);
}

    :root[data-mm-theme$="-inverse"] .mm-body-main::-webkit-scrollbar-track {
        background: var(--mm-color-surface-2);
    }

    :root[data-mm-theme$="-inverse"] .mm-body-main::-webkit-scrollbar-thumb {
        background: var(--mm-color-focus);
        border-color: var(--mm-color-surface-2);
    }


/* ==========================================================================
   2) GLOBAL SCROLLBAR & RESETS
   ========================================================================== */

::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
}

html {
    scrollbar-width: none;
}

* {
    -ms-overflow-style: none;
}


/* ==========================================================================
   3) BASE TYPOGRAPHY & BODY
   ========================================================================== */

html,
body {
    height: 100%;
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
    overflow: hidden; /* page itself never scrolls on desktop */
}

.app-page-body {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding-right: 5px;
    height: 100%;
    overflow-x: hidden;
}

hr {
    color: var(--color-border);
}

.dark-bg {
    background-color: var(--color-primary-dark);
}

.framed {
    padding: var(--frame-pad);
}

.scroll-content {
    overflow-x: auto !important;
}

.frame-content {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}


/* ==========================================================================
   4) ROOT PAGE LAYOUT (header | main | footer)
   ========================================================================== */

.page {
    position: relative;
    min-width: 100dvw;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background-color: var(--color-primary);
}

    .page > main {
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

.top-container {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: var(--color-primary);
}

.footer {
    margin-top: 0;
    width: 100%;
    position: relative;
    z-index: 100;
}

.page > main {
    min-height: 0;
    overflow: hidden;
}


/* ==========================================================================
   5) CONTENT GRID (sidebar | content)
   ========================================================================== */

.mm-layout {
    height: 100%;
    min-height: 0;
}

@media (min-width: 768px) {
    .mm-layout {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 1rem;
        align-items: stretch;
    }
}

.mm-sidebar-column {
    min-width: 0;
    min-height: 0;
}

@media (min-width: 768px) {
    .mm-sidebar-column {
        display: flex;
        flex-direction: column;
        gap: var(--frame-pad);
        height: 100%;
        min-height: 0;
    }

    .mm-desktop-brand {
        flex: 0 0 auto;
        min-height: 54px;
        display: flex;
        align-items: center;
        /*padding: .35rem .75rem;*/
        /*background: var(--color-primary-dark);*/
        border-radius: .75rem;
    }

    .mm-sidebar-column > .mm-sidebar {
        flex: 1 1 auto;
        min-height: 0;
    }
}

.mm-brand-link {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.mm-logo {
    display: block;
    width: auto;
    /*    height: 44px;
    max-width: 100%;*/
    object-fit: contain;
    border-radius: 5px;
}

.mm-content {
    position: relative;
}

.mm-desktop-utilities {
    display: none;
}

@media (min-width: 768px) {
    .mm-desktop-utilities {
        position: absolute;
        top: .5rem;
        right: .5rem;
        z-index: var(--mm-z-navigation);
        display: flex;
        align-items: center;
        gap: .5rem;
    }
}

.mm-mobile-topbar {
    display: none;
}

@media (max-width: 767.98px) {

    .mm-mobile-topbar {
        display: block;
        position: sticky;
        top: 0;
        z-index: var(--mm-z-navigation);
        background: var(--color-primary);
    }

    .mm-mobile-topbar__inner {
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding: .4rem .6rem;
    }

    .mm-mobile-topbar .mm-logo {
        height: 38px;
    }

    .mm-desktop-brand,
    .mm-desktop-utilities {
        display: none;
    }
}

/* ==========================================================================
   6) MAIN CONTENT AREA (desktop)
   ========================================================================== */

/* Right column */
.mm-content {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: auto !important; /* default pages can scroll */
}

/*
    content-wrap is ALWAYS a flex column now.
    This is the key to make the new .content-body wrapper safe for every page.
*/
.content-wrap {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: var(--frame-pad);
    display: flex;
    flex-direction: column;
    overflow: auto; /* default scroll inside content-wrap */
    overscroll-behavior: contain;
}

/* Main slot for page body */
.content-body {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: block;
    overflow-x: hidden;
}

    .content-body > form {
        width: 100%;
    }

/* Optional: small content offset utility */
.content {
    padding-top: 1.1rem;
}


/* ==========================================================================
   7) SPECIAL SCROLL MODES (Roster / Wizard)
   ========================================================================== */

/*
    ROSTER:
    - outer content-wrap must NOT scroll
    - roster provides its own scroll containers (.table-scroll, drawer-body)
*/
.content-wrap:has(.roster-page) {
    overflow: hidden;
}

    .content-wrap:has(.roster-page) > .content-body {
        overflow: hidden;
        display: flex; /* gives roster-page a real height context */
        min-height: 0;
    }

/*
    WIZARD:
    - outer content-wrap must NOT scroll
    - wizard body scrolls internally
*/
.content-wrap:has(.mm-wizard-page) {
    overflow: hidden;
}

    .content-wrap:has(.mm-wizard-page) > .mm-alert-host--sticky {
        flex: 0 0 auto;
    }

    .content-wrap:has(.mm-wizard-page) > .content-body {
        overflow: hidden;
        display: flex; /* wizard shell needs height context */
        min-height: 0;
    }


/* ==========================================================================
   8) MOBILE FALLBACK – WHOLE PAGE SCROLLS
   ========================================================================== */

@media (max-width: 767.98px) {

    html,
    body {
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .page {
        min-width: 100%;
        width: 100%;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

        .page > main {
            height: auto;
            min-height: 0;
            overflow: visible;
        }

    .mm-layout,
    .mm-content,
    .content-wrap,
    .content-body {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    /* Mobile document scrolling for ordinary pages */
    .content-wrap {
        overscroll-behavior-y: auto;
    }
}


/* ==========================================================================
   9) FORMS, VALIDATION & ERRORS
   ========================================================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--color-success);
}

.invalid {
    outline: 1px solid var(--color-error);
}

.validation-message {
    color: var(--color-error);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,...) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: var(--mm-ui-on-danger);
}

    .blazor-error-boundary::after {
        content: "Nastala chyba pri vykresleni komponenty.";
    }

.darker-border-checkbox.form-check-input {
    border-color: var(--color-border);
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-border);
}

.form-select:focus {
    outline: 2px solid var(--color-border);
    box-shadow: 0 0 0 3px var(--color-border);
    border-color: var(--color-primary);
}

input.form-control {
    color: var(--mm-ui-primary-button-text);
    background-color: var(--color-primary);
    border-color: var(--color-primary-dark);
    box-shadow: none;
}

    input.form-control:hover,
    input.form-control.active,
    input.form-control:focus {
        color: var(--mm-ui-primary-button-text);
        background-color: var(--color-primary-dark);
        border-color: var(--color-secondary-hover);
        box-shadow: none;
    }

    input.form-control[readonly],
    input.form-control:read-only {
        color: var(--mm-ui-primary-button-text);
        background-color: var(--color-primary) !important;
        border-color: var(--color-primary-dark) !important;
        box-shadow: none !important;
        opacity: 1;
    }

label {
    color: var(--color-text-light);
}

select.form-select {
    color: var(--mm-ui-primary-button-text);
    background-color: var(--color-primary);
    border-color: var(--color-primary-dark);
    box-shadow: none;
}

    select.form-select:hover,
    select.form-select:focus,
    select.form-select.active {
        background-color: var(--color-primary-dark);
        border-color: var(--color-secondary-hover);
        box-shadow: none;
    }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.expand-button {
    height: 58px;
}


/* ==========================================================================
   10) TABLES & TEXT STATES
   ========================================================================== */

.table {
    color: var(--color-text-light);
}

.table-striped > tbody > tr:nth-of-type(2n+1) {
    color: var(--color-border);
}

.group-frame {
    border: 3px solid var(--color-primary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--default-radius);
}

.pause {
    background-color: var(--mm-ui-pause-bg);
    color: var(--mm-ui-pause-text);
}

.block {
    background-color: var(--mm-ui-block-bg);
    color: var(--mm-ui-on-danger);
    font-weight: bold;
    border-radius: var(--default-radius);
}


/* ==========================================================================
   11) MEDIA (IMG / SVG / CANVAS)
   ========================================================================== */

img,
svg,
canvas {
    max-width: 100%;
}


/* ==========================================================================
   12) WIDTH HOTFIX – PREVENT HORIZONTAL OVERFLOW
   ========================================================================== */

.mm-layout,
.mm-content,
.framed > .frame-content,
.roster-body .frame-content,
.roster-columns,
.roster-main,
.drawer-body {
    min-width: 0 !important;
    overflow: hidden;
}


/* ==========================================================================
   13) ALERT HOST HELPERS
   ========================================================================== */

h1:focus {
    outline: none;
}

.alert-scope {
    position: relative;
}

.mm-alert-host--overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2000;
    padding: var(--frame-pad);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

    .mm-alert-host--overlay .mm-alert {
        pointer-events: auto;
    }

/* ==========================================================================
   LAYOUT EXTENSION: global sticky toolbar + right-side drawer everywhere
   ========================================================================== */

.mm-sticky-toolbar {
    position: sticky;
    top: 0; /* we’ll tune later to match wizard/navbar offsets */
    z-index: 300; /* above content, below top bar (1020) */
    margin-bottom: 10px;
    padding: 0.75rem 1rem;
    background: var(--mm-wtab-background);
    border-radius: 1rem;
    border: 1px solid var(--mm-ui-stroke-weak);
    box-shadow: 0 2px 6px var(--mm-color-shadow-strong), inset 0 0 0 1px var(--mm-color-shadow-inset);
}

/* Body area with overlay drawer */
.mm-body-columns {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    height: 100%;
}

.mm-body-main {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: auto;
}

/* Roster owns its vertical workspace scroll. Displaying the wrapper chain as
   contents lets its dynamically-sized date navigation define a shared first
   grid row for both the roster body and the slotted overlay drawer. */
.mm-body-columns:has(.roster-page) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0;
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 0;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.mm-body-columns.drawer-open:has(.roster-page) {
    grid-template-columns: minmax(0, 1fr) minmax(0, min(var(--drawer-width), 45%));
}

.mm-body-columns:has(.roster-page) > .mm-body-main,
.mm-body-columns:has(.roster-page) .app-page-body {
    display: contents;
}

.mm-body-columns:has(.roster-page) > .drawer {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    inset: auto;
    justify-self: end;
    width: 0;
    max-width: none;
    height: 100%;
    min-height: 0;
    visibility: hidden;
    pointer-events: none;
}

.mm-body-columns.drawer-open:has(.roster-page) > .drawer {
    width: 100%;
    visibility: visible;
    pointer-events: auto;
}

.mm-body-columns:has(.roster-page) > .drawer > .drawer-body {
    min-height: 0;
}

/* IMPORTANT:
   Drawer is overlay. It must not reserve layout space. */
.mm-body-columns.drawer-open .mm-body-main {
    margin-right: 0;
}

.mm-toolbar__tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
    align-items: stretch;
    width: 100%;
}

/* RIGHT-SIDE DRAWER */
.drawer {
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--drawer-width);
    max-width: min(var(--drawer-width), 90vw);
    box-shadow: -2px 0 12px var(--mm-color-shadow-strong);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 50;
    overflow: hidden;
    background: var(--color-primary-dark);
    border-left: 1px solid var(--mm-ui-stroke-mid);
}

    .drawer.open {
        transform: translateX(0);
    }

.drawer-header {
    flex: 0 0 auto;
}

.drawer > .drawer-body {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    overflow: auto;
}

.mm-input-select-readonly {
    opacity: 0.85;
    cursor: default;
    pointer-events: none;
}

.availability-badge {
    position: absolute;
    top: -32px;
    left: 0px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--mm-ui-availability-badge-bg);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ==========================================================================
   RENTAL ISSUE PAGE
   ========================================================================== */

.rental-issue-page {
    display: flex;
    flex-direction: column;
    gap: var(--issue-gap-page);
}

.issue-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--issue-summary-min-col-width), 1fr));
    gap: var(--issue-gap-grid);
}

.issue-summary-card {
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    border-radius: var(--issue-radius-card);
    padding: var(--issue-padding-card);
    background: var(--issue-color-surface-card);
}

.issue-summary-label {
    font-size: var(--issue-font-size-label);
    opacity: var(--issue-opacity-label);
}

.issue-summary-value {
    font-size: var(--issue-font-size-value);
    font-weight: var(--issue-font-weight-strong);
}

.issue-summary-success {
    border-color: var(--issue-color-success-border);
}

.issue-summary-warning {
    border-color: var(--issue-color-warning-border);
}

.issue-groups {
    display: flex;
    flex-direction: column;
    gap: var(--issue-gap-page);
}

.issue-category-group,
.rental-order-group,
.school-order-group {
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    border-radius: var(--issue-radius-card);
    overflow: hidden;
}

.issue-category-header,
.rental-order-group-header,
.school-order-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--issue-padding-header);
    background: var(--issue-color-surface-header);
}

.rental-order-group-header,
.school-order-group-header {
    cursor: pointer;
    font-weight: var(--issue-font-weight-strong);
}

.rental-order-group-body,
.school-order-group-body {
    display: flex;
    flex-direction: column;
    gap: var(--issue-gap-page);
    padding: var(--issue-gap-page);
}

    .rental-order-group-body > :last-child,
    .school-order-group-body > :last-child {
        margin-bottom: 0 !important;
    }

.school-order-groups {
    display: flex;
    flex-direction: column;
    gap: var(--issue-gap-page);
}

.school-order-group {
}

.school-order-group-header {
    gap: var(--issue-gap-grid);
}

.school-order-group-header__heading {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: var(--issue-gap-grid);
    justify-content: space-between;
    min-width: 0;
}

.school-order-group-header__title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.school-order-group-header__meta {
    color: var(--mm-color-text-dim);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: flex-end;
    min-width: 0;
    font-size: var(--issue-font-size-chip);
}

@media (max-width: 640px) {
    .school-order-group-header {
        align-items: flex-start;
    }

    .school-order-group-header__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .school-order-group-header__meta {
        justify-content: flex-start;
    }
}

.rental-order-item {
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    border-radius: var(--issue-radius-card);
    overflow: hidden;
}

.rental-order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--issue-padding-header);
    background: var(--issue-color-surface-header);
    cursor: pointer;
    font-weight: var(--issue-font-weight-strong);
}

.rental-order-item-body {
    padding: var(--issue-gap-page);
}

/* Shared presentation primitive for editable cards nested in order branches. */
.mm-nested-card {
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    border-radius: var(--issue-radius-card);
    box-shadow: 0 .35rem 1rem var(--mm-color-shadow-soft);
    min-width: 0;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .mm-nested-card:hover {
        border-color: var(--mm-color-border-strong);
    }

    .mm-nested-card:focus-within {
        border-color: var(--mm-color-focus);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--mm-color-focus) 35%, transparent);
        overflow: visible;
    }

.mm-nested-card--attention {
    border-left: var(--issue-status-border-width) solid var(--issue-color-warning);
}

.mm-nested-card__header {
    align-items: flex-start;
    background: var(--issue-color-surface-header);
    border-bottom: var(--issue-border-width) solid var(--issue-color-border-subtle);
    display: flex;
    gap: var(--issue-gap-grid);
    justify-content: space-between;
    padding: var(--issue-padding-header);
}

.mm-nested-card--rental-set .mm-nested-card__header {
    background: color-mix(in srgb, var(--mm-color-surface-2) 70%, transparent);
}

.mm-nested-card__heading {
    min-width: 0;
}

.mm-nested-card__title {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: var(--issue-font-weight-strong);
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.mm-nested-card__eyebrow {
    color: var(--mm-color-text-dim);
    font-size: .72rem;
    font-weight: var(--issue-font-weight-strong);
    letter-spacing: .06em;
    margin-bottom: .15rem;
    text-transform: uppercase;
}

.mm-nested-card__meta {
    align-items: center;
    color: var(--mm-color-text-dim);
    display: flex;
    flex-wrap: wrap;
    font-size: var(--issue-font-size-chip);
    gap: .3rem .75rem;
    margin-top: .35rem;
    min-width: 0;
}

.mm-nested-card__status {
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    border-radius: var(--issue-radius-chip);
    padding: var(--issue-padding-badge);
}

.mm-nested-card__attention {
    color: var(--issue-color-warning);
    font-weight: var(--issue-font-weight-strong);
    overflow-wrap: anywhere;
}

.mm-nested-card__actions {
    align-items: center;
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: var(--issue-gap-chip-list);
    justify-content: flex-end;
    min-width: 0;
}

.mm-nested-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--issue-gap-grid);
    min-width: 0;
    padding: var(--issue-padding-card);
}

@media (max-width: 640px) {
    .mm-nested-card__header {
        align-items: flex-start;
    }
}

@media (max-width: 390px) {
    .mm-nested-card__header,
    .mm-nested-card__body {
        padding: .7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mm-nested-card {
        transition: none;
    }
}

.issue-category-header-complete,
.rental-order-group-header-success {
    border-left: var(--issue-status-border-width) solid var(--issue-color-success);
}

.issue-category-header-warning,
.rental-order-group-header-warning {
    border-left: var(--issue-status-border-width) solid var(--issue-color-warning);
}

.issue-category-header-missing,
.rental-order-group-header-danger {
    border-left: var(--issue-status-border-width) solid var(--issue-color-danger);
}

.issue-category-progress {
    font-weight: var(--issue-font-weight-strong);
}

.issue-warning-badge {
    display: inline-block;
    margin-left: .5rem;
    padding: var(--issue-padding-badge);
    border-radius: var(--issue-radius-badge);
    background: var(--issue-color-warning-bg-badge);
    color: var(--issue-color-warning);
    font-size: var(--issue-font-size-label);
}

.issue-table-wrapper {
    overflow-x: auto;
}

.issue-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

    .issue-table th:nth-child(1),
    .issue-table td:nth-child(1) {
        width: 24%;
    }

    .issue-table th:nth-child(2),
    .issue-table td:nth-child(2),
    .issue-table th:nth-child(3),
    .issue-table td:nth-child(3),
    .issue-table th:nth-child(4),
    .issue-table td:nth-child(4) {
        width: 12%;
    }

    .issue-table th:nth-child(5),
    .issue-table td:nth-child(5) {
        width: 40%;
    }

    .issue-table th,
    .issue-table td {
        padding: var(--issue-padding-table-cell);
        border-top: var(--issue-border-width) solid var(--issue-color-border-table);
        vertical-align: top;
    }

    .issue-table th {
        font-size: var(--issue-font-size-label);
        opacity: var(--issue-opacity-label);
        font-weight: var(--issue-font-weight-normal-strong);
    }

.issue-line-complete {
    background: var(--issue-color-success-bg-soft);
}

.issue-line-warning {
    background: var(--issue-color-warning-bg-soft);
}

.issue-line-missing {
    background: var(--issue-color-danger-bg-soft);
}

.issue-missing-badge {
    display: inline-block;
    min-width: 1.75rem;
    text-align: center;
    border-radius: var(--issue-radius-badge);
    padding: var(--issue-padding-badge);
    background: var(--issue-color-danger-bg-badge);
    color: var(--issue-color-danger);
    font-weight: var(--issue-font-weight-strong);
}

.issued-chip-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--issue-gap-chip-list);
    max-width: 100%;
}

.issued-chip {
    display: inline-flex;
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
    gap: var(--issue-gap-chip);
    align-items: center;
    border-radius: var(--issue-radius-chip);
    padding: var(--issue-padding-chip);
    font-size: var(--issue-font-size-chip);
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    white-space: nowrap;
}

    .issued-chip > span:first-child {
        overflow-wrap: anywhere;
    }

.issued-chip-success {
    background: var(--issue-color-success-bg-chip);
}

.issued-chip-warning {
    background: var(--issue-color-warning-bg-chip);
    border-color: var(--issue-color-warning-border-soft);
}

.issued-chip-detail {
    opacity: var(--issue-opacity-chip-detail);
}

.issue-scan-panel {
    position: sticky;
    bottom: 0;
    z-index: var(--issue-z-scan-panel);
    padding-top: .75rem;
}

.mm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--mm-modal-z);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--mm-modal-backdrop-bg);
    backdrop-filter: blur(3px);
}

    .mm-modal-backdrop[data-mm-blocking="true"] {
        pointer-events: auto;
        touch-action: none;
    }

.mm-loader-backdrop {
    z-index: var(--mm-loader-z);
    cursor: wait;
}

body.mm-scroll-locked {
    overflow: hidden;
    padding-right: var(--mm-scrollbar-compensation, 0);
}

.mm-loader-modal {
    width: min(30rem, 100%);
}

    .mm-loader-modal .mm-modal-header {
        justify-content: center;
        padding-bottom: .75rem;
    }

    .mm-loader-modal .mm-modal-body {
        padding-top: .75rem;
    }

.mm-modal {
    width: min(var(--mm-modal-width), 100%);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--mm-modal-radius);
    border: 1px solid var(--mm-modal-border);
    background: var(--mm-modal-bg);
    color: var(--color-text-light);
    box-shadow: var(--mm-modal-shadow);
}

.mm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--mm-modal-border);
}

.mm-modal-title {
    margin: 0;
    color: var(--color-text-light);
    font-size: 1.35rem;
    font-weight: 700;
}

.mm-modal-close {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: .75rem;
    background: transparent;
    color: var(--mm-modal-close-color);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

    .mm-modal-close:hover,
    .mm-modal-close:focus {
        background: var(--mm-modal-close-hover-bg);
        color: var(--mm-modal-close-hover-color);
        outline: none;
    }

.mm-modal-body {
    padding: 1.5rem;
    overflow: auto;
}

.mm-modal-message {
    margin: 0 0 1rem 0;
    color: var(--color-text-light);
    font-size: 1rem;
}

.mm-modal-info-box {
    display: grid;
    gap: .5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--mm-modal-info-border);
    border-radius: .75rem;
    background: var(--mm-modal-info-bg);
}

.mm-modal-info-label {
    color: var(--mm-color-text-dim);
}

.mm-modal-info-value {
    color: var(--color-text-light);
    font-weight: 700;
}

.mm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--mm-modal-border);
}

@media (max-width: 575.98px) {
    .mm-modal-backdrop {
        align-items: flex-end;
        padding: .5rem;
    }

    .mm-modal {
        max-height: calc(100dvh - 1rem);
        border-radius: 1rem 1rem .75rem .75rem;
    }

    .mm-modal-header,
    .mm-modal-body,
    .mm-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mm-modal-footer {
        flex-direction: column-reverse;
    }

        .mm-modal-footer .monkey-button,
        .mm-modal-footer button {
            width: 100%;
        }
}

/* ==========================================================================
   RADZEN CHARTS INSIDE MONKEY DASHBOARDS
   ========================================================================== */

.mm-dashboard .rz-chart {
    color: var(--color-text-light);
}

    .mm-dashboard .rz-chart .rz-axis-title,
    .mm-dashboard .rz-chart .rz-axis-label,
    .mm-dashboard .rz-chart .rz-legend-item-text {
        fill: var(--mm-color-text-dim);
        color: var(--mm-color-text-dim);
    }

    .mm-dashboard .rz-chart .rz-grid-line {
        stroke: var(--mm-ui-chart-grid);
    }

    .mm-dashboard .rz-chart .rz-axis-line {
        stroke: var(--mm-ui-chart-axis);
    }

/*
   Radzen chart palette override.
   These colors are intentionally aligned with Monkey Manager dark UI:
   - issued: accent amber
   - reserved: focus purple
   - available: success green
   - unavailable: danger red
*/
.mm-dashboard .rz-chart {
    --rz-series-0: var(--mm-color-accent);
    --rz-series-1: var(--mm-color-focus);
    --rz-series-2: var(--mm-color-success);
    --rz-series-3: var(--mm-color-danger);
    --rz-series-4: var(--color-secondary);
    --rz-series-5: var(--mm-color-text-dim);
}


/* Collapsible tělo (stejný pattern jako u menu – max-height + padding) */
.order-card-target {
    outline: 3px solid var(--mm-color-focus);
    outline-offset: 3px;
    scroll-margin-block: 7rem;
}

.mm-collapsible__body {
    overflow: hidden;
    transition: max-height .22s ease-out, padding-top .22s ease-out, padding-bottom .22s ease-out;
}

/* otevřeno */
.mm-collapsible__body--open {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

/* zavřeno – bez výšky i paddingu */
.mm-collapsible__body--closed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.rental-queue {
    display: flex;
    flex-direction: column;
    gap: var(--issue-gap-page);
    padding: var(--issue-gap-page);
}

.rental-queue__header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: var(--issue-gap-page);
}

.rental-queue__title {
    font-size: 1.25rem;
    font-weight: var(--issue-font-weight-strong);
    margin: 0;
}

.rental-queue__count,
.rental-queue__empty {
    color: var(--mm-color-text-dim);
}

.rental-queue__empty {
    background: var(--issue-color-surface-card);
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    border-radius: var(--issue-radius-card);
    padding: var(--issue-padding-card);
}

.rental-filter-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--issue-gap-chip-list);
    margin-bottom: var(--issue-gap-page);
}

.rental-filter-summary__label {
    color: var(--mm-color-text-dim);
    font-weight: var(--issue-font-weight-strong);
}

.rental-filter-summary__chip {
    background: var(--issue-color-surface-header);
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    border-radius: var(--issue-radius-badge);
    padding: var(--issue-padding-badge);
}

.rental-order-group__header {
    background: var(--issue-color-surface-header);
    border-bottom: var(--issue-border-width) solid var(--issue-color-border-subtle);
    display: grid;
    gap: var(--issue-gap-grid);
    grid-template-columns: minmax(7rem, 0.7fr) minmax(12rem, 1.4fr) minmax(11rem, 1fr) minmax(8rem, 0.7fr) minmax(9rem, auto);
    padding: var(--issue-padding-header);
}

.rental-order-group-header-success {
    border-left: var(--issue-status-border-width) solid var(--issue-color-success);
}

.rental-order-group-header-warning {
    border-left: var(--issue-status-border-width) solid var(--issue-color-warning);
}

.rental-order-group-header-danger {
    border-left: var(--issue-status-border-width) solid var(--issue-color-danger);
}

.rental-order-group__cell,
.rental-order-child__cell {
    min-width: 0;
}

.rental-order-group__value,
.rental-order-child__value,
.rental-order-child__title {
    font-weight: var(--issue-font-weight-strong);
}

.rental-order-group__label,
.rental-order-child__label {
    color: var(--mm-color-text-dim);
    font-size: var(--issue-font-size-chip);
    font-weight: var(--issue-font-weight-strong);
}

.rental-order-group__value,
.rental-order-child__value {
    overflow-wrap: anywhere;
}

.rental-order-group__phone {
    color: var(--mm-color-text-dim);
    display: block;
    font-size: var(--issue-font-size-chip);
    font-weight: var(--issue-font-weight-normal-strong);
}

.rental-order-group__children {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: var(--issue-gap-page);
}

.rental-order-child {
    background: var(--issue-color-surface-card);
    border: var(--issue-border-width) solid var(--issue-color-border-subtle);
    border-bottom-width: 0;
    display: grid;
    gap: var(--issue-gap-grid);
    grid-template-columns: minmax(11rem, 1.1fr) minmax(9rem, 0.8fr) minmax(12rem, 1fr) minmax(15rem, 1.3fr) minmax(8rem, 0.8fr) minmax(10rem, auto);
    padding: var(--issue-padding-card);
}

    .rental-order-child:first-child {
        border-top-left-radius: var(--issue-radius-card);
        border-top-right-radius: var(--issue-radius-card);
    }

    .rental-order-child:last-child {
        border-bottom-left-radius: var(--issue-radius-card);
        border-bottom-right-radius: var(--issue-radius-card);
        border-bottom-width: var(--issue-border-width);
    }

.rental-order-child--success {
    border-left: var(--issue-status-border-width) solid var(--issue-color-success);
}

.rental-order-child--warning {
    background: var(--issue-color-warning-bg-soft);
    border-left: var(--issue-status-border-width) solid var(--issue-color-warning);
}

.rental-order-child--danger {
    background: var(--issue-color-danger-bg-soft);
    border-left: var(--issue-status-border-width) solid var(--issue-color-danger);
}

.rental-order-child__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--issue-gap-chip-list);
    justify-content: flex-end;
    min-width: 0;
}

.rental-order-group__actions {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.rental-order-group__action {
    width: 100%;
}

@media (max-width: 720px) {
    .rental-order-group__header {
        grid-template-columns: 1fr;
    }

    .rental-order-child {
        border-bottom-width: var(--issue-border-width);
        border-radius: var(--issue-radius-card);
        grid-template-columns: 1fr;
    }

    .rental-order-group__action,
    .rental-order-child__action {
        width: 100%;
    }

    .rental-order-group__actions,
    .rental-order-child__actions {
        justify-content: stretch;
    }
}

.mm-confirm-stock-error {
    margin-top: .75rem;
    padding: 1rem;
    border: 1px solid var(--mm-color-danger);
    border-radius: .5rem;
    overflow-wrap: anywhere;
}

    .mm-confirm-stock-error h4 {
        margin: 0 0 .75rem;
    }

.mm-confirm-stock-error__item {
    padding: .75rem;
    border-radius: .35rem;
    background: color-mix(in srgb, var(--mm-color-danger) 8%, transparent);
    white-space: normal;
}

    .mm-confirm-stock-error__item + .mm-confirm-stock-error__item {
        margin-top: .5rem;
    }

    .mm-confirm-stock-error__item details {
        margin-top: .35rem;
        font-size: .875rem;
    }

.mm-confirm-stock-error__diagnostics {
    margin-top: .75rem;
    white-space: pre-wrap;
}

/* ==========================================================================
   NON-ROSTER RESPONSIVE APPLICATION LAYOUT
   ========================================================================== */

@media (max-width: 991.98px) {
    .app-page-body:not(:has(.roster-page)) {
        padding-right: 0;
        overflow: visible;
    }

    .mm-body-main:not(:has(.roster-page)) {
        overflow: visible;
    }

    .content-wrap:not(:has(.roster-page)) {
        padding: .75rem !important;
    }

    .app-page-body:not(:has(.roster-page)),
    .app-page-body:not(:has(.roster-page)) form,
    .app-page-body:not(:has(.roster-page)) fieldset,
    .app-page-body:not(:has(.roster-page)) .row,
    .app-page-body:not(:has(.roster-page)) [class*="col-"],
    .app-page-body:not(:has(.roster-page)) .card,
    .app-page-body:not(:has(.roster-page)) .input-group {
        min-width: 0;
        max-width: 100%;
    }

        .app-page-body:not(:has(.roster-page)) input:not([type="checkbox"]):not([type="radio"]),
        .app-page-body:not(:has(.roster-page)) select,
        .app-page-body:not(:has(.roster-page)) textarea {
            max-width: 100%;
        }

        .app-page-body:not(:has(.roster-page)) p,
        .app-page-body:not(:has(.roster-page)) dd,
        .app-page-body:not(:has(.roster-page)) code,
        .app-page-body:not(:has(.roster-page)) a,
        .app-page-body:not(:has(.roster-page)) .alert,
        .app-page-body:not(:has(.roster-page)) .validation-message {
            overflow-wrap: anywhere;
            word-break: break-word;
        }

    .content-wrap:not(:has(.roster-page)) .mm-toolbar__tabs {
        display: flex;
        flex-wrap: wrap;
    }

        .content-wrap:not(:has(.roster-page)) .mm-toolbar__tabs > * {
            flex: 1 1 9rem;
            min-width: 0;
        }

    .mm-body-columns:not(:has(.roster-page)) > .drawer {
        /* Keep the close header above the mobile topbar and sticky page toolbar. */
        z-index: var(--mm-z-drawer);
        position: fixed;
        top: 0;
        width: min(var(--drawer-width), calc(100vw - 1rem));
        max-width: calc(100vw - 1rem);
        height: 100dvh;
    }

    .app-page-body:not(:has(.roster-page)) .mm-form-actions {
        flex-wrap: wrap;
    }

        .app-page-body:not(:has(.roster-page)) .mm-form-actions > * {
            flex: 1 1 9rem;
        }

    .mm-page-header-actions {
        width: 100%;
        margin-left: 0 !important;
    }

        .mm-page-header-actions > * {
            flex: 1 1 9rem;
        }

    .rental-queue {
        padding: .75rem;
    }

    .rental-queue__header {
        align-items: stretch;
        flex-direction: column;
    }

    .mm-responsive-table {
        display: block;
        width: 100%;
        margin: 0;
    }

        .mm-responsive-table colgroup,
        .mm-responsive-table thead {
            display: none;
        }

        .mm-responsive-table tbody {
            display: grid;
            gap: .75rem;
            width: 100%;
        }

            .mm-responsive-table tbody tr {
                display: grid;
                grid-template-columns: minmax(0, 1fr);
                width: 100%;
                padding: .75rem;
                border: 1px solid var(--mm-color-border-subtle);
                border-radius: .75rem;
                background: var(--issue-color-surface-card);
            }

            .mm-responsive-table tbody td {
                display: grid;
                grid-template-columns: minmax(6.5rem, 40%) minmax(0, 1fr);
                gap: .75rem;
                width: 100%;
                padding: .4rem 0;
                border: 0;
                border-bottom: 1px solid var(--mm-ui-stroke-weak);
                overflow-wrap: anywhere;
                white-space: normal;
            }

                .mm-responsive-table tbody td::before {
                    content: attr(data-label);
                    color: var(--mm-color-text-dim);
                    font-size: .8rem;
                    font-weight: 700;
                    overflow-wrap: anywhere;
                }

                .mm-responsive-table tbody td:last-child {
                    border-bottom: 0;
                }
}

/* ==========================================================================
   MONKEY WIZARD TOOLBAR

   The wizard publishes its tabs into MainLayout, so these rules must live
   with the rendered toolbar rather than in the wizard's isolated stylesheet.
   Base toolbars retain their auto-fit behavior; wizard toolbars deliberately
   switch between one row and one full-width tab per row.
   ========================================================================== */

.mm-sticky-toolbar.mm-wizard-toolbar {
    container-name: mm-wizard-toolbar;
    container-type: inline-size;
}

.content-wrap .mm-sticky-toolbar.mm-wizard-toolbar .mm-toolbar__tabs {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: .5rem;
    width: 100%;
}

.mm-sticky-toolbar.mm-wizard-toolbar .mm-toolbar__tabs > .mm-tabbtn {
    min-width: 0;
    width: 100%;
    justify-content: center;
    text-align: center;
}

.mm-sticky-toolbar.mm-wizard-toolbar .mm-tabbtn__labels {
    min-width: 0;
}

.mm-sticky-toolbar.mm-wizard-toolbar .mm-tabbtn__title {
    white-space: normal;
    overflow-wrap: anywhere;
}

/*@container mm-wizard-toolbar (max-width: 64rem) {
    .content-wrap .mm-sticky-toolbar.mm-wizard-toolbar .mm-toolbar__tabs {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-flow: row;
        grid-auto-columns: auto;
    }

    .mm-sticky-toolbar.mm-wizard-toolbar .mm-toolbar__tabs > .mm-tabbtn {
        justify-content: flex-start;
        text-align: left;
    }
}*/


/* Desktop + notebooks */
.content-wrap .mm-sticky-toolbar.mm-wizard-toolbar
.mm-toolbar__tabs {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(10rem, 1fr);
    overflow-x: auto;
}

/* Mobile */
@media (max-width: 767.98px) {
    .content-wrap .mm-sticky-toolbar.mm-wizard-toolbar
    .mm-toolbar__tabs {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-flow: row;
        grid-auto-columns: auto;
        overflow-x: visible;
    }
}

/* Order steps must not consume the notebook's vertical workspace. Keep one
   row sized by the toolbar's available width (after the sidebar). If the
   readable minimum widths do not fit, only the tab strip scrolls; keyboard
   focus and touch scrolling keep every step reachable. Other toolbars retain
   their existing container-query layout. */
.mm-sticky-toolbar.mm-order-step-toolbar {
    flex: 0 0 auto;
}

.content-wrap .mm-sticky-toolbar.mm-order-step-toolbar .mm-toolbar__tabs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(11rem, 1fr);
    overflow-x: auto;
    /* Chromium may leave a partially visible focused tab clipped. Reserve a
       tab's width in the scrollport so keyboard focus reveals its full label;
       cap at half the available width on phones. */
    scroll-padding-inline: min(11.25rem, 50%);
    /* Leave room for focus outlines and the hover translation inside the strip. */
    padding: .25rem;
}

.mm-sticky-toolbar.mm-order-step-toolbar .mm-toolbar__tabs > .mm-tabbtn {
    min-height: 44px;
    justify-content: center;
    text-align: center;
}

.mm-sticky-toolbar.mm-order-step-toolbar .mm-tabbtn__index,
.mm-sticky-toolbar.mm-order-step-toolbar .mm-tabbtn__badge {
    flex-shrink: 0;
}

/* Keep order navigation outside the form's scrollport at narrow widths too.
   The mobile application bar gets its natural height; the remaining row and
   the existing flex toolbar layout determine the available form height. */
@media (max-width: 991.98px) {
    .mm-body-main:has(.order-sticky-context) {
        overflow: hidden;
    }

    .app-page-body:has(.order-sticky-context) {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

@media (max-width: 767.98px) {
    .page:has(.order-sticky-context) {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

        .page:has(.order-sticky-context) > main {
            height: 100%;
            overflow: hidden;
        }

    .mm-layout:has(.order-sticky-context),
    .mm-content:has(.order-sticky-context),
    .content-wrap:has(.order-sticky-context) {
        height: 100%;
        min-height: 0;
    }
}

@media (max-width: 359.98px) {
    .mm-responsive-table tbody td {
        grid-template-columns: minmax(5.5rem, 38%) minmax(0, 1fr);
        gap: .5rem;
    }
}

/* ==========================================================================
   MONKEY MANAGER SCROLLBARS
   ========================================================================== */

.mm-body-main {
    scrollbar-width: auto;
    scrollbar-color: var(--mm-ui-scrollbar-thumb) var(--mm-ui-scrollbar-track);
}

    .mm-body-main::-webkit-scrollbar {
        width: 12px !important;
        height: 12px !important;
    }

    .mm-body-main::-webkit-scrollbar-track {
        background: var(--mm-ui-scrollbar-track);
        border-radius: 999px;
    }

    .mm-body-main::-webkit-scrollbar-thumb {
        min-width: 32px;
        min-height: 32px;
        border: 2px solid var(--mm-ui-scrollbar-border);
        border-radius: 999px;
        background: var(--mm-ui-scrollbar-thumb);
    }

        .mm-body-main::-webkit-scrollbar-thumb:hover {
            background: var(--mm-ui-scrollbar-thumb-hover);
        }

/* ==========================================================================
   THEME-AWARE COMPONENT RULES

   These rules only select WHERE a color token applies. All selected color
   VALUES live in the six theme blocks above. No v1/v2/v3 overrides remain.
   Keep this near the end of App.css so it retains the original cascade.
   ========================================================================== */

/* Order cards: secondary text on dark Alpine/Outdoor headers. */
:root[data-mm-theme="outdoor"] .school-order-group-header__meta,
:root[data-mm-theme="alpine"] .school-order-group-header__meta,
:root[data-mm-theme="outdoor"] .mm-nested-card__header .mm-nested-card__meta,
:root[data-mm-theme="alpine"] .mm-nested-card__header .mm-nested-card__meta {
    color: var(--mm-ui-panel-text-dim);
}

/* Detail modal: dark shell with a light group-summary and dark lesson card. */
:root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"])
.school-order-detail-modal {
    color: var(--color-text-light);
}

    :root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"])
    .school-order-detail-modal .school-group__summary {
        color: var(--mm-color-text);
    }

    :root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"])
    .school-order-detail-modal .lesson-summary {
        color: var(--color-text-light);
    }

    :root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"])
    .school-order-detail-modal .lesson-summary__clients > span,
    :root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"])
    .school-order-detail-modal .lesson-summary__instructors h5,
    :root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"])
    .school-order-detail-modal .school-group__lessons-heading > span,
    :root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"])
    .school-order-detail-modal .school-group__empty {
        color: var(--mm-ui-panel-text-dim);
    }

/* Summary cards: limit the light-on-dark text correction to the dark palettes. */
:root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"]) .summary-card {
    --mm-color-text: var(--color-text-light);
    --mm-color-text-dim: var(--mm-ui-panel-text-dim);
    --mm-ui-panel-text: var(--color-text-light);
    --mm-ui-panel-header-text: var(--color-text-light);
    background: var(--mm-color-surface-1);
    color: var(--color-text-light);
}

:root:is([data-mm-theme="alpine"], [data-mm-theme="outdoor"])
.summary-card__edit:is(:hover, :focus-visible) {
    background: var(--color-primary-dark);
    color: var(--color-text-light);
}

/* Roster-only Brand Inverse colors; other Brand Inverse surfaces are unchanged. */
:root[data-mm-theme="brand-inverse"] .roster-page,
:root[data-mm-theme="brand-inverse"] .roster-body {
    --mm-lesson-surface: var(--mm-roster-lesson-surface);
    --mm-lesson-border: var(--mm-roster-lesson-border);
    --mm-lesson-accent: var(--mm-roster-lesson-accent);
    --mm-ui-roster-lesson-text: var(--mm-roster-lesson-text);
    --mm-ui-schedule-lesson-bg: var(--mm-roster-lesson-surface);
    --mm-ui-schedule-lesson-text: var(--mm-roster-lesson-text);
}

    :root[data-mm-theme="brand-inverse"] .roster-body .card-container,
    :root[data-mm-theme="brand-inverse"] .roster-body .compact-schedule-block--lesson {
        --mm-color-accent: var(--mm-roster-card-accent);
    }

/* Cilime pouze na interaktivni polozky sidebaru. Ne na samotny obsah,
   obrazek loga ani primarni tlacitka v ostatnich castech aplikace. */
:root[data-mm-theme$="-inverse"] .mm-sidebar :is( button, [role="button"], .nav-link[aria-expanded], .mm-nav-button, .mm-nav-item__button, .sidebar-nav__button, .sidebar-menu__toggle ) {
    background: var(--mm-sidebar-button-bg) !important;
    color: var(--mm-sidebar-button-text) !important;
}

    :root[data-mm-theme$="-inverse"] .mm-sidebar :is( button, [role="button"], .nav-link[aria-expanded], .mm-nav-button, .mm-nav-item__button, .sidebar-nav__button, .sidebar-menu__toggle ):is(:hover, :focus-visible) {
        background: var(--mm-sidebar-button-hover) !important;
        color: var(--mm-sidebar-button-text) !important;
    }

/* SVG ikony obvykle pouzivaji currentColor. Border aktivni sekce
   zamerne nemenime (aktivni ramecek / focus zustava zachovan). */

/* ========================================================================
   2) ALPINE INVERSE — breadcrumb / vedlejsi odkazy v sidebaru
   ======================================================================== */

:root[data-mm-theme="alpine-inverse"] .mm-sidebar :is( .breadcrumb, .breadcrumb *, .mm-breadcrumb, .mm-breadcrumb *, .nav-breadcrumb, .nav-breadcrumb *, .sidebar-breadcrumb, .sidebar-breadcrumb *, .mm-sidebar__breadcrumb, .mm-sidebar__breadcrumb *, .nav-trail, .nav-trail *, .nav-path, .nav-path * ) {
    color: var(--mm-sidebar-breadcrumb-text) !important;
}

/* Odkazy mimo rozbalovaci tlacitka — vcetne bezneho breadcrumb anchoru.
   Pokud konkretni breadcrumb nema zadnou z vyse uvedenych trid,
   tato deklarace zachyti jeho bezne <a>. */
:root[data-mm-theme="alpine-inverse"] .mm-sidebar a:not(.nav-link):not([role="button"]) {
    color: var(--mm-sidebar-breadcrumb-text);
}

/* ========================================================================
   3) DASHBOARD SELECTION — zadna bezova, hneda ani okrova plocha

   Drzime svetle, chladne karty s TMAVYM textem ve vsech 3 motivech.
   Zachovavame puvodni velikosti, paddingy, icon layout i animace.
   ======================================================================== */

/* DashboardSelectionCard je sdilena komponenta; nazvy trid se mohou lisit.
   Nize jsou pokryte bezne varianty. Zadna globalni .card ani .btn! */
:root:is( [data-mm-theme="alpine"], [data-mm-theme="outdoor"], [data-mm-theme="outdoor-inverse"] ) :is( .dashboard-selection-card, .mm-dashboard-selection-card, .dashboard-select-card, .mm-dashboard-select-card, .dashboard-selector-card, .dashboard-selector__card, .dashboard-selection__card, .dashboard-choice-card, .dashboard-role-card, .dashboard-picker__option, .dashboard-selection-tile, .dashboard-select-tile, .dashboard-option-card, .dashboard-selection__option ) {
    background: var(--mm-dashboard-choice-bg) !important;
    border-color: var(--mm-dashboard-choice-border) !important;
    color: var(--mm-dashboard-choice-text) !important;
}

    :root:is( [data-mm-theme="alpine"], [data-mm-theme="outdoor"], [data-mm-theme="outdoor-inverse"] ) :is( .dashboard-selection-card, .mm-dashboard-selection-card, .dashboard-select-card, .mm-dashboard-select-card, .dashboard-selector-card, .dashboard-selector__card, .dashboard-selection__card, .dashboard-choice-card, .dashboard-role-card, .dashboard-picker__option, .dashboard-selection-tile, .dashboard-select-tile, .dashboard-option-card, .dashboard-selection__option ):is(:hover, :focus-visible, :focus-within) {
        background: var(--mm-dashboard-choice-hover) !important;
    }

    /* Bezpecny fallback i pro markup, kde titul neni <h3>, ale <div>/<span>.
   Barvy se meni jen uvnitr vyberove karty, ne v jinych dashboardech. */
    :root:is( [data-mm-theme="alpine"], [data-mm-theme="outdoor"], [data-mm-theme="outdoor-inverse"] ) :is( .dashboard-selection-card, .mm-dashboard-selection-card, .dashboard-select-card, .mm-dashboard-select-card, .dashboard-selector-card, .dashboard-selector__card, .dashboard-selection__card, .dashboard-choice-card, .dashboard-role-card, .dashboard-picker__option, .dashboard-selection-tile, .dashboard-select-tile, .dashboard-option-card, .dashboard-selection__option ) :is(div, span, p, a, h1, h2, h3, h4, h5, h6, strong, b, small) {
        color: var(--mm-dashboard-choice-text) !important;
    }

    /* Puvodni scoped CSS dava nekterym nadpisum natvrdo svetly text. */
    :root:is( [data-mm-theme="alpine"], [data-mm-theme="outdoor"], [data-mm-theme="outdoor-inverse"] ) :is( .dashboard-selection-card, .mm-dashboard-selection-card, .dashboard-select-card, .mm-dashboard-select-card, .dashboard-selector-card, .dashboard-selector__card, .dashboard-selection__card, .dashboard-choice-card, .dashboard-role-card, .dashboard-picker__option, .dashboard-selection-tile, .dashboard-select-tile, .dashboard-option-card, .dashboard-selection__option ) :is(h2, h3, h4, h5, h6, strong, a, .card-title, [class$="__title"], [class$="__name"]) {
        color: var(--mm-dashboard-choice-text) !important;
    }

    :root:is( [data-mm-theme="alpine"], [data-mm-theme="outdoor"], [data-mm-theme="outdoor-inverse"] ) :is( .dashboard-selection-card, .mm-dashboard-selection-card, .dashboard-select-card, .mm-dashboard-select-card, .dashboard-selector-card, .dashboard-selector__card, .dashboard-selection__card, .dashboard-choice-card, .dashboard-role-card, .dashboard-picker__option, .dashboard-selection-tile, .dashboard-select-tile, .dashboard-option-card, .dashboard-selection__option ) :is(p, small, .text-muted, [class$="__description"], [class$="__subtitle"]) {
        color: var(--mm-dashboard-choice-muted) !important;
    }

    :root:is( [data-mm-theme="alpine"], [data-mm-theme="outdoor"], [data-mm-theme="outdoor-inverse"] ) :is( .dashboard-selection-card, .mm-dashboard-selection-card, .dashboard-select-card, .mm-dashboard-select-card, .dashboard-selector-card, .dashboard-selector__card, .dashboard-selection__card, .dashboard-choice-card, .dashboard-role-card, .dashboard-picker__option, .dashboard-selection-tile, .dashboard-select-tile, .dashboard-option-card, .dashboard-selection__option ) :is( .dashboard-selection-card__icon, .dashboard-selection-card__icon-wrap, .dashboard-choice-card__icon, .dashboard-role-card__icon, .dashboard-selector__icon ) {
        background: var(--mm-dashboard-choice-icon-bg);
        color: var(--mm-dashboard-choice-icon) !important;
    }

/* ========================================================================
   4) ALPINE — School Order Group formular

   School Group melo bily povrch, kde texty z dark theme mizely.
   Rentalova vetev pouziva tmavy povrch. Zarovname jen School Group,
   nikoli vsechny formulare nebo vsechny nested lesson karty.
   ======================================================================== */

:root[data-mm-theme="alpine"] .school-order-group,
:root[data-mm-theme="alpine"] .school-order-group > .school-order-group-body {
    background: var(--color-primary-dark) !important;
    color: var(--color-text-light);
}

    /* Nadpisy a labely primo ve skolni skupine; inputy si zachovaji
   vlastni barevne tokeny a layout. */
    :root[data-mm-theme="alpine"] .school-order-group > .school-order-group-body > :is( h1, h2, h3, h4, label, .form-label ),
    :root[data-mm-theme="alpine"] .school-order-group > .school-order-group-body > :not(.mm-collapsible__body) :is( h1, h2, h3, h4, label, .form-label ) {
        color: var(--color-text-light);
    }

/* Shared order / rental issue presentation. */
.order-summary { display: grid; gap: 1.75rem; min-width: 0; }
.order-summary__section { display: grid; gap: .8rem; min-width: 0; }
.order-summary__section > h2, .order-summary__section-heading h2, .order-summary-totals h2 { margin: 0; font-size: 1.15rem; }
.order-summary__section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.order-summary__section-heading strong { color: var(--mm-color-text-dim); white-space: nowrap; }
.order-summary__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); gap: 1rem; }
.order-summary-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: var(--issue-border-width) solid var(--issue-color-border-subtle); border-radius: var(--issue-radius-card); background: var(--issue-color-surface-card); box-shadow: 0 .35rem 1rem var(--mm-color-shadow-soft); }
.order-summary-card[role="link"] { cursor: pointer; }
.order-summary-card[role="link"]:focus-visible { outline: 2px solid var(--mm-color-text-dim); outline-offset: 2px; }
.order-summary-card--cancelled { border-left: var(--issue-status-border-width) solid var(--mm-color-text-dim); background: color-mix(in srgb, var(--issue-color-surface-card) 82%, var(--mm-color-surface-2)); }
.order-summary-card--cancelled .order-summary-card__lead, .order-summary-card--cancelled .order-summary-card__facts, .order-summary-card--cancelled .order-summary-card__detail { opacity: .72; }
.order-summary-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: var(--issue-padding-header); border-bottom: var(--issue-border-width) solid var(--issue-color-border-subtle); background: var(--issue-color-surface-header); }
.order-summary-card__header > div { min-width: 0; }
.order-summary-card__header h3 { margin: 0; overflow-wrap: anywhere; font-size: 1.05rem; }
.order-summary-card__eyebrow { display: block; margin-bottom: .15rem; color: var(--mm-color-text-dim); font-size: .72rem; font-weight: var(--issue-font-weight-strong); letter-spacing: .06em; text-transform: uppercase; }
.order-summary-card__detail { display: block; margin-top: .25rem; color: var(--mm-color-text-dim); font-size: .85rem; overflow-wrap: anywhere; }
.order-summary-card__status { flex: 0 0 auto; padding: var(--issue-padding-badge); border: var(--issue-border-width) solid var(--issue-color-border-subtle); border-radius: var(--issue-radius-chip); font-size: var(--issue-font-size-chip); font-weight: var(--issue-font-weight-strong); text-transform: uppercase; }
.order-summary-card--cancelled .order-summary-card__status { color: var(--mm-color-text-dim); }
.order-summary-card__lead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem .75rem; padding: 1rem 1rem .6rem; }
.order-summary-card__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .75rem; margin: 0; padding: .35rem 1rem 1rem; }
.order-summary-card__facts div { min-width: 0; }
.order-summary-card__facts dt { color: var(--mm-color-text-dim); font-size: .75rem; font-weight: normal; }
.order-summary-card__facts dd { margin: .1rem 0 0; font-weight: var(--issue-font-weight-strong); }
.order-summary-card__legacy { margin: 0; padding: 1rem; color: var(--mm-color-text-dim); overflow-wrap: anywhere; }
.order-summary-card__price { margin-top: auto; padding: .8rem 1rem 1rem; text-align: right; font-size: 1.15rem; font-weight: var(--issue-font-weight-strong); }
.order-summary-adjustments, .order-summary-totals { overflow: hidden; border: var(--issue-border-width) solid var(--issue-color-border-subtle); border-radius: var(--issue-radius-card); background: var(--issue-color-surface-card); box-shadow: 0 .35rem 1rem var(--mm-color-shadow-soft); }
.order-summary-adjustments__row { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; }
.order-summary-adjustments__row + .order-summary-adjustments__row { border-top: var(--issue-border-width) solid var(--issue-color-border-subtle); }
.order-summary-adjustments__row strong { text-align: right; white-space: nowrap; }
.order-summary-adjustments__negative { color: var(--bs-success); }
.order-summary-totals { justify-self: end; width: min(100%, 32rem); padding: 1rem; }
.order-summary-totals dl { margin: .75rem 0 0; }
.order-summary-totals dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; }
.order-summary-totals dd { margin: 0; text-align: right; white-space: nowrap; }
.order-summary-totals__net { margin-top: .45rem; padding-top: .85rem !important; border-top: 2px solid var(--issue-color-border-subtle); font-size: 1.2rem; font-weight: var(--issue-font-weight-strong); }

@media (max-width: 575.98px) {
    .order-summary__section-heading, .order-summary-card__lead { align-items: flex-start; flex-direction: column; }
    .order-summary-adjustments__row { align-items: flex-start; }
    .order-summary-totals { width: 100%; }
}

/* Shared order / rental issue presentation. */
.order-sticky-context {
    position: sticky;
    top: var(--mm-toolbar-sticky-offset, 0);
    z-index: 20;
    background-color: var(--color-primary-dark);
    padding-bottom: 0.75rem;
}

.order-client-label {
    padding: 0.25rem 5px;
    overflow-wrap: anywhere;
}


/* Shared order / rental issue presentation. */
.financial-summary {
    display: grid;
    gap: 1rem;
}

.financial-summary__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: .5rem;
}

.financial-summary__amount {
    display: block;
    overflow-wrap: anywhere;
}

/* Rental keeps its context triggers outside the scrollable drawer on phones.
   Size the workspace from the viewport; the topbar and toolbar take their
   natural height and the drawer fills only the remaining body area. */
@media (max-width: 991.98px) {
    .page:has(.rental-worker-toolbar) {
        display: flex;
        flex-direction: column;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .page:has(.rental-worker-toolbar) > main {
        flex: 1 1 0;
        height: auto;
        min-height: 0;
        overflow: hidden;
    }

    .mm-layout:has(.rental-worker-toolbar),
    .mm-content:has(.rental-worker-toolbar) {
        height: 100%;
        min-height: 0;
        overflow: hidden !important;
    }

    .content-wrap:has(> .rental-worker-toolbar) {
        overflow: hidden;
    }

    .rental-worker-toolbar {
        flex: 0 0 auto;
    }

    .content-wrap .mm-sticky-toolbar.rental-worker-toolbar .mm-toolbar__tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: auto;
    }

    .rental-worker-toolbar .btn {
        white-space: normal;
    }

    .content-wrap:has(> .rental-worker-toolbar) > .content-body {
        flex: 1 1 0;
        overflow: hidden;
    }

    .content-wrap:has(> .rental-worker-toolbar) .mm-body-main {
        overflow: auto;
    }

    .content-wrap:has(> .rental-worker-toolbar) .drawer {
        position: absolute;
        top: 0;
        bottom: 0;
        height: 100%;
        width: 100%;
        max-width: 100%;
    }
}
