/*
================================================================================
MaidBaseKit look: matched to today's DevExpress controls, measured on Employee Edit's
Edit Employee popup (2026-10-16). Spec: Documentation/Projects/DevExpress-Replacement-Kit/Controls-Spec.md

  Text boxes, dropdowns, date boxes: 34px tall, 1px #ddd border, 4px corners,
    14px #333 text, padding 5px 12px 7px 11px.
  Labels: bold 14px, 2px below.
  Open lists: shadow rgba(0,0,0,.176) 0 6px 12px, items 27px tall, padding 2px 8px.
  Chosen items in a multi-select: blue (#0096D6) chips with an x.
  Calendar: blue uppercase month title and chevrons, small uppercase weekday names,
    the chosen day a blue square.
  On / Off: chosen #e0e0e0 with a #bbb border, the other white with #ddd.
  Buttons: 34px tall, 4px corners; primary #0096D6 with white text, default white with #ddd.
  Popup: 1px #ddd border, square corners, no shadow; title bar 51px with an x; body padding 15px.
Every rule is scoped to an rcm- class so it cannot restyle a DevExpress control still on the page.
================================================================================
*/

/* ---- Labels ------------------------------------------------------------------------------------------ */
.rcm-label { display: block; font-weight: 700; font-size: 14px; color: var(--rcm-text); margin: 0 0 2px 0; }
.rcm-field { margin-bottom: 10px; }

/* ---- Text box, number, text area ------------------------------------------------------------------- */
input.rcm-input, textarea.rcm-input, .rcm-dropdown.ts-wrapper .ts-control {
    box-sizing: border-box; width: 100%; height: 34px; margin: 0;
    padding: 5px 12px 7px 11px; border: 1px solid var(--rcm-border); border-radius: 4px;
    background: var(--rcm-surface); color: var(--rcm-text); font-family: inherit; font-size: 14px; line-height: 20px;
    box-shadow: none; outline: none;
}
textarea.rcm-input { display: block; height: 36px; min-height: 36px; padding: 6px 12px; line-height: 18.67px; resize: vertical; }
/* A box marked invalid by its page (an adapter's option('isValid', false)), as DevExtreme drew it. */
input.rcm-input.rcm-invalid, input.rcm-input.rcm-invalid:focus { border-color: var(--rcm-danger-border); }   /* red while typing too, as DevExtreme */
input.rcm-input:focus, textarea.rcm-input:focus, .rcm-dropdown.ts-wrapper.focus .ts-control { border-color: var(--rcm-brand-border); }
input.rcm-input:disabled, textarea.rcm-input:disabled { opacity: .5; cursor: default; }
input.rcm-input::placeholder, textarea.rcm-input::placeholder { color: var(--rcm-text-placeholder); }
/* An empty plain dropdown shows its placeholder (maidbase-kit.js sets data-placeholder; Tom Select would show nothing).
   Plain only: a searchable one shows it in its search box, and both together read "Select employee...Select employee..."
   (Edit Issue, 2026-10-18). */
.rcm-dropdown.rcm-dropdown-plain.single:not(.has-items) .ts-control[data-placeholder]::before { content: attr(data-placeholder); color: var(--rcm-text-placeholder); }
/* A searchable dropdown's search box shows the placeholder too: hidden once the chosen item shows text (maidbase-kit.js _syncShown). */
.rcm-dropdown.single.rcm-has-text .ts-control > input::placeholder { color: transparent; }

/* ---- Checkbox -------------------------------------------------------------------------------------- */
label.rcm-check { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; font-size: 14px; color: var(--rcm-text); margin: 0; cursor: pointer; }
label.rcm-check input[type=checkbox], .ts-dropdown .option input[type=checkbox], .ts-dropdown .rcm-select-all input[type=checkbox] {            /* the DevExpress box: white, #ddd, a blue tick */
    -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: 0 0 auto; width: 16px; height: 16px; margin: 0;
    border: 1px solid var(--rcm-border); border-radius: 2px; background: var(--rcm-surface) no-repeat center / 10px 10px; cursor: pointer; vertical-align: -3px;
}
label.rcm-check input[type=checkbox]:checked, .ts-dropdown .option input[type=checkbox]:checked, .ts-dropdown .rcm-select-all input[type=checkbox]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 5.2l2.6 2.6L9 2.2' fill='none' stroke='%23337ab7' stroke-width='1.8'/%3E%3C/svg%3E");
}
label.rcm-check input[type=checkbox]:focus-visible { outline: 2px solid var(--rcm-brand-border); outline-offset: 1px; }
label.rcm-check input[type=checkbox]:disabled { opacity: .5; cursor: default; }
/* A read-only yes/no in a grid cell, as DevExtreme drew a boolean column: the same box with a faint border, empty when no.
   A span, not an input, so it never takes focus or a click. Write it with MaidBaseKit.checkView(value).
   The tick is two CSS border lines, not an image: under dark mode plus a browser dark-mode extension the image tick
   vanished and the owner saw an empty box on every row (2026-11-15). A border color is recolored like any other. */
.rcm-check-view {
    display: inline-block; position: relative; box-sizing: border-box; width: 16px; height: 16px; vertical-align: middle;
    border: 1px solid var(--rcm-border-readonly); border-radius: 2px; background-color: var(--rcm-surface);
}
.rcm-check-view-on::after {
    content: ''; position: absolute; box-sizing: content-box; left: 4px; top: 1px; width: 4px; height: 8px;
    border: solid var(--rcm-accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---- Buttons --------------------------------------------------------------------------------------- */
/* Each rule also as .rcm-popup .rcm-btn: rcm-design-system.css (every Site.Master page) has its own .rcm-btn and
   .rcm-btn-primary, and it can come later in the page than this file, which gave Edit Employee's Save and Cancel
   12.5px text, 6px corners and a Cancel with no outline (2026-10-18). Inside a kit popup the kit's rules win; on the
   page itself the design system's buttons (Customer Edit's email Send and Attach, an .rcm-btn-ghost) keep their look. */
.rcm-btn, .rcm-popup .rcm-btn {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; min-width: 80px; padding: 6px 18px; margin: 0;   /* 18px a side, as DevExtreme's buttons (measured 2026-10-17) */
    border: 1px solid var(--rcm-border); border-radius: 4px; background: var(--rcm-surface); color: var(--rcm-text);
    font-family: inherit; font-size: 14px; font-weight: 400; line-height: 20px; cursor: pointer; white-space: nowrap;
}
.rcm-btn:hover, .rcm-popup .rcm-btn:hover { background: var(--rcm-surface-hover); }
.rcm-btn:focus-visible, .rcm-popup .rcm-btn:focus-visible { outline: 2px solid var(--rcm-brand-border); outline-offset: 1px; }
.rcm-btn-primary, .rcm-popup .rcm-btn-primary { background: var(--rcm-brand-bg); border-color: var(--rcm-brand-border); color: var(--rcm-on-brand); }
.rcm-btn-primary:hover, .rcm-popup .rcm-btn-primary:hover { background: var(--rcm-brand-bg-hover); border-color: var(--rcm-brand-border); }
.rcm-btn-danger, .rcm-popup .rcm-btn-danger { background: var(--rcm-surface); border-color: var(--rcm-danger-border); color: var(--rcm-danger-text); }
.rcm-btn-danger:hover, .rcm-popup .rcm-btn-danger:hover { background: var(--rcm-danger-surface); }
/* THE toolbar icon-button size: 40 x 34, what the DevExpress buttons on most pages draw (Refresh, New, Print).
   Every page moved off DevExpress uses it so its toolbar matches its neighbors (2026-10-23: Supplies Items drew 26 x 26
   beside 40 x 34 on the other Supplies tabs). Page-Layout-Standards.md, "Toolbars". */
.rcm-btn-icon, .rcm-popup .rcm-btn-icon { width: 40px; min-width: 40px; padding: 0; }
.rcm-btn:disabled, .rcm-popup .rcm-btn:disabled { opacity: .5; cursor: default; }
.rcm-btn:disabled:hover, .rcm-popup .rcm-btn:disabled:hover { background: inherit; }

/* ---- Dropdown (Tom Select) --------------------------------------------------------------------------- */
.rcm-dropdown.ts-wrapper { position: relative; width: 100%; }
.rcm-dropdown.ts-wrapper .ts-control { display: flex; align-items: center; flex-wrap: nowrap; overflow: hidden; padding-right: 28px; cursor: pointer; }
.rcm-dropdown.ts-wrapper .ts-control > input { flex: 1 1 auto; min-width: 2em; border: 0; padding: 0; margin: 0; height: auto; background: transparent; box-shadow: none; outline: none; font: inherit; color: inherit; }
.rcm-dropdown.ts-wrapper.input-hidden .ts-control > input { position: absolute; left: -10000px; opacity: 0; }   /* Tom Select's own rule: no typing box while chips show */
.rcm-dropdown.ts-wrapper.single .ts-control > .item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcm-dropdown.ts-wrapper.single:not(.rcm-dropdown-plain).rcm-typing .ts-control > .item { display: none; }   /* typing replaces the shown value; only WHILE there is typed text, or a pick showed a blank box until focus left (review, 2026-10-18) */
.rcm-dropdown.ts-wrapper.single .ts-control::after {                                   /* the caret, like the DevExpress box */
    content: ''; position: absolute; right: 11px; top: 50%; margin-top: -2px;
    border: 4px solid transparent; border-top-color: var(--rcm-text); border-bottom: 0;
}
.rcm-dropdown.ts-wrapper.disabled .ts-control { opacity: .5; cursor: default; }
/* clear: true puts an x left of the caret while something is chosen, like DevExpress showClearButton. Tom Select's own
   stylesheet (which places it) is not loaded, so it is placed here; hidden when empty or locked (review, 2026-10-18). */
.rcm-dropdown.ts-wrapper.plugin-clear_button .ts-control { padding-right: 46px; }
.rcm-dropdown.ts-wrapper .clear-button { display: none; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 16px; text-align: center; font-size: 16px; line-height: 16px; color: var(--rcm-text-muted, #888); cursor: pointer; }
.rcm-dropdown.ts-wrapper.has-items:not(.disabled) .clear-button { display: block; }
.rcm-dropdown.ts-wrapper .clear-button:hover { color: var(--rcm-text); }
/* A heading over a run of items (grouped list, like the DevExpress one): not pickable, set apart from the items. */
.rcm-dropdown .ts-dropdown .optgroup-header { padding: 6px 8px 3px; font-weight: 600; font-size: 12px; color: var(--rcm-text-muted, #888); cursor: default; background: var(--rcm-surface); }
.rcm-dropdown .ts-dropdown .optgroup + .optgroup { border-top: 1px solid var(--rcm-border); }
.rcm-dropdown.ts-wrapper.multi .ts-control { height: auto; min-height: 34px; flex-wrap: wrap; gap: 0; padding: 0 6px 2px 0; }   /* no caret, like the tag box */
.rcm-dropdown.ts-wrapper.multi .ts-control > .item {               /* the blue chips */
    display: inline-flex; align-items: center; box-sizing: border-box; height: 27px; padding: 0 0 0 10px; margin: 2px 0 0 2px;
    background: var(--rcm-brand-bg); color: var(--rcm-on-brand); border: 0; border-radius: 3px; font-size: 14px; line-height: 17px;
}
.rcm-dropdown.ts-wrapper.multi .ts-control > .item .remove {
    color: var(--rcm-on-brand); text-decoration: none; padding: 0 8px 0 7px; margin-left: 2px; border: 0; font-size: 19px; font-weight: 700; line-height: 27px;
}
.rcm-dropdown.ts-wrapper.multi .ts-control > .item .remove:hover { background: var(--rcm-press); }

.ts-dropdown { position: fixed; z-index: 10000; box-sizing: border-box;   /* placed by maidbase-kit.js against the window */
    margin: 0; background: var(--rcm-surface); border: 1px solid var(--rcm-border); border-radius: 0;
    box-shadow: var(--rcm-shadow) 0 6px 12px; font-size: 14px; color: var(--rcm-text); }
.ts-dropdown .ts-dropdown-content { max-height: 240px; overflow-y: auto; overflow-x: hidden; scroll-behavior: auto; }
.ts-dropdown .option, .ts-dropdown .no-results { box-sizing: border-box; min-height: 27px; padding: 2px 8px; line-height: 23px; cursor: pointer; }
.ts-dropdown .no-results { color: var(--rcm-text-4); cursor: default; }
/* A value typed into a custom dropdown is held as an option but not listed (DevExtreme listed only the items, 2026-10-29). */
.ts-dropdown .option.rcm-dd-custom { display: none; }
.ts-dropdown .option.active { background: var(--rcm-surface-active); color: var(--rcm-text); }
.ts-dropdown .option.selected { color: var(--rcm-brand-text); }
.ts-dropdown .option .highlight { background: var(--rcm-highlight); border-radius: 1px; }
.ts-dropdown .option input[type=checkbox] { margin-right: 8px; pointer-events: none; }
.ts-dropdown .rcm-select-all { box-sizing: border-box; min-height: 30px; padding: 4px 8px; border-bottom: 1px solid var(--rcm-border); cursor: pointer; user-select: none; }
.ts-dropdown .rcm-select-all input[type=checkbox] { margin-right: 8px; pointer-events: none; }
.rcm-dropdown.ts-wrapper.multi .ts-control > input { margin: 2px 0 0 4px; }
.ts-hidden-accessible { border: 0 !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important;
    overflow: hidden !important; padding: 0 !important; position: absolute !important; width: 1px !important; white-space: nowrap !important; }
/* The hidden native select sits at its static position and is as tall as a select, so on the last field of a popup it stuck out 5px under the
   content and made the body scroll. Pin it to a 1px box at the top (2026-11-13, Schedule Preferences). */
.rcm-popup-body .ts-hidden-accessible { top: 0 !important; left: 0 !important; height: 1px !important; margin: 0 !important; }

/* ---- Number box clear x and spin buttons (opt-in, 2026-10-29), measured on DevExtreme's in dx.light.compact ---- */
.rcm-number { position: relative; }
.rcm-number-clearable input.rcm-input { padding-right: 30px; }
.rcm-number-spinnable input.rcm-input { padding-right: 26px; }
.rcm-number-clearable.rcm-number-spinnable input.rcm-input { padding-right: 50px; }
.rcm-number-clear { position: absolute; top: 1px; bottom: 1px; right: 1px; width: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rcm-number-spinnable .rcm-number-clear { right: 21px; }
.rcm-number-clear-icon { width: 14px; height: 14px; border-radius: 50%; background: var(--rcm-text-placeholder); color: var(--rcm-surface);
    font-size: 13px; line-height: 13px; text-align: center; font-weight: 700; }
.rcm-number-clear:hover .rcm-number-clear-icon { background: var(--rcm-text-3); }
.rcm-number-empty .rcm-number-clear, .rcm-number-disabled .rcm-number-clear { display: none; }
.rcm-number-spin { position: absolute; top: 1px; bottom: 1px; right: 1px; width: 20px; display: flex; flex-direction: column; }
.rcm-number-spin > span { flex: 1 1 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rcm-number-spin > span > span { width: 18px; height: 14px; border-radius: 3px; }
.rcm-number-spin > span:hover > span { background: var(--rcm-spin-hover); }

/* ---- Switch (2026-10-29): DevExtreme's dxSwitch in dx.light.compact ---- */
.rcm-switch { display: inline-flex; align-items: center; box-sizing: border-box; position: relative; width: 36px; height: 18px; padding: 1px;
    border: 1px solid var(--rcm-border); border-radius: 2px; background: var(--rcm-surface); cursor: pointer; vertical-align: middle;
    font-size: 8px; font-weight: 600; text-transform: uppercase; user-select: none; overflow: hidden; }
.rcm-switch:focus-visible { outline: 1px solid var(--rcm-accent-bg); }
.rcm-switch-handle { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 2px; background: var(--rcm-accent-soft); }
.rcm-switch-on, .rcm-switch-off { flex: 1 1 auto; text-align: center; line-height: 14px; }
.rcm-switch-on { color: var(--rcm-text); display: none; }
.rcm-switch-off { color: var(--rcm-text-placeholder); }
.rcm-switch-checked .rcm-switch-on { display: block; }
.rcm-switch-checked .rcm-switch-off { display: none; }
.rcm-switch-checked .rcm-switch-handle { background: var(--rcm-accent-bg); }
.rcm-switch-disabled { opacity: .5; cursor: default; }

/* ---- Month picker (MaidBaseKit.date with month: true, 2026-10-29): DevExtreme's calendar zoomed to months ---- */
.rcm-month-cal { position: fixed; z-index: 1600; width: 232px; box-sizing: border-box; background: var(--rcm-surface); color: var(--rcm-text);
    border: 1px solid var(--rcm-border); box-shadow: var(--rcm-shadow) 0 6px 12px; font-size: 13px; padding: 0 1px 1px; }
dialog .rcm-month-cal { z-index: 10; }
.rcm-month-head { display: flex; align-items: center; height: 43px; }
.rcm-month-nav { width: 24px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--rcm-accent-text); cursor: pointer; font-size: 15px; }
.rcm-month-nav:hover { color: var(--rcm-accent-text-hover); }
.rcm-month-caption { flex: 1 1 auto; text-align: center; color: var(--rcm-accent-text); font-weight: 700; font-size: 14px; cursor: pointer; }
.rcm-month-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.rcm-month-cell { height: 60.8px; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; }
.rcm-month-cell:hover { background: var(--rcm-surface-hover); }
.rcm-month-today { font-weight: 700; }
.rcm-month-other { color: var(--rcm-text-placeholder); }
.rcm-month-chosen, .rcm-month-chosen:hover { background: var(--rcm-accent-bg); color: var(--rcm-on-brand); font-weight: 600; }
.rcm-month-open input.rcm-date-input { border-color: var(--rcm-accent-bg); }

/* ---- Date box (flatpickr) ---------------------------------------------------------------------------- */
.rcm-date { position: relative; }
.rcm-date input.rcm-date-input { padding-right: 32px; cursor: pointer; }
/* clear: true (opt-in, 2026-10-26): an x left of the caret while a date is set, like DevExpress showClearButton. */
.rcm-date-clearable input.rcm-date-input { padding-right: 46px; }
.rcm-date-clear { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 16px; text-align: center;
    font-size: 16px; line-height: 16px; color: var(--rcm-text-4); cursor: pointer; }
.rcm-date-clear:hover { color: var(--rcm-text); }
.rcm-date input.rcm-date-input:placeholder-shown ~ .rcm-date-clear,
.rcm-date input.rcm-date-input:disabled ~ .rcm-date-clear,
.rcm-month input.rcm-date-input:read-only ~ .rcm-date-clear { display: none; }   /* read-only month box: no x, as DevExtreme */
.rcm-date::after {                                                      /* the caret at the right, like the DevExpress date box */
    content: ''; position: absolute; right: 11px; top: 15px; pointer-events: none;
    border: 4px solid transparent; border-top-color: var(--rcm-text); border-bottom: 0;
}
/* The calendar: compact like the DevExpress one (254px wide, 26px days, #337ab7 accents). */
.flatpickr-calendar { background: var(--rcm-surface); width: 254px; box-sizing: border-box; padding: 0 11px 11px; font-family: inherit; font-size: 13px; color: var(--rcm-text);
    border-radius: 0; border: 1px solid var(--rcm-border); box-shadow: var(--rcm-shadow) 0 6px 12px; }
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after,
.flatpickr-calendar.arrowBottom::before, .flatpickr-calendar.arrowBottom::after { display: none; }
.flatpickr-months { position: relative; }
.flatpickr-months .flatpickr-month { height: 40px; color: var(--rcm-accent-text); fill: var(--rcm-accent-text); }
.flatpickr-current-month { left: 0; width: 100%; padding-top: 11px; font-size: 14px; font-weight: 700; text-transform: uppercase; }
.flatpickr-current-month span.cur-month { font-weight: 700; margin-left: 0; }
.flatpickr-current-month span.cur-month:hover, .flatpickr-current-month input.cur-year:hover { background: transparent; }
.flatpickr-current-month .numInputWrapper { width: 5ch; }
.flatpickr-current-month input.cur-year { font-weight: 700; color: var(--rcm-accent-text); padding: 0 0 0 .3ch; }
.flatpickr-current-month .numInputWrapper span { display: none; }   /* no year spinner arrows */
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { top: 0; height: 40px; padding: 11px 6px; color: var(--rcm-accent-text); fill: var(--rcm-accent-text); font-size: 15px; line-height: 18px; }
.flatpickr-months .flatpickr-prev-month:hover, .flatpickr-months .flatpickr-next-month:hover { color: var(--rcm-accent-text-hover); }
.flatpickr-months .flatpickr-prev-month:hover svg, .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--rcm-accent-text-hover); }
.flatpickr-rContainer, .flatpickr-days, .flatpickr-weekdays, .dayContainer { width: 232px !important; min-width: 232px !important; max-width: 232px !important; }
.flatpickr-weekdays { height: 25px; box-shadow: inset 0 -1px 0 var(--rcm-border); margin-bottom: 2px; }
span.flatpickr-weekday { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--rcm-text-placeholder); line-height: 22px; }
.flatpickr-day { flex-basis: 14.2857%; max-width: none; height: 26px; line-height: 24px; margin: 0; border-radius: 4px; font-size: 13px; color: var(--rcm-text); border: 1px solid transparent; }
.flatpickr-day.today { border-color: transparent; font-weight: 700; }
.flatpickr-day.today:hover, .flatpickr-day:hover, .flatpickr-day:focus { background: var(--rcm-surface-active); color: var(--rcm-text); border-color: transparent; }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.selected:focus { background: var(--rcm-accent-bg); border-color: var(--rcm-accent-bg); color: var(--rcm-on-brand); }
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: var(--rcm-text-faint); }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover { color: var(--rcm-text-faint); background: transparent; }
/* MaidBaseKit.dateTime (2026-10-30): the hour, minute and AM/PM under the calendar, where the DevExpress box had its time
   spinner: a 34px row below a line, in the box's own text and borders. */
.flatpickr-calendar.hasTime .flatpickr-time { height: 34px; max-height: 34px; line-height: 34px; margin-top: 8px; border: 1px solid var(--rcm-border-input);
    border-radius: 4px; background: var(--rcm-surface); }
.flatpickr-calendar.hasTime.noCalendar .flatpickr-time { margin-top: 0; }
.flatpickr-time input, .flatpickr-time .flatpickr-am-pm, .flatpickr-time .flatpickr-time-separator { height: 32px; line-height: 32px; font-size: 14px; color: var(--rcm-text); }
.flatpickr-time input.flatpickr-hour { font-weight: 400; }
.flatpickr-time input:hover, .flatpickr-time input:focus, .flatpickr-time .flatpickr-am-pm:hover, .flatpickr-time .flatpickr-am-pm:focus { background: var(--rcm-surface-active); }
.flatpickr-time .numInputWrapper span.arrowUp::after { border-bottom-color: var(--rcm-text-4); }
.flatpickr-time .numInputWrapper span.arrowDown::after { border-top-color: var(--rcm-text-4); }

/* ---- Calendar on the page (MaidBaseKit.calendar: flatpickr inline) ----------------------------------------- */
/* The date box's calendar, framed as the DevExpress BootstrapCalendar it replaces: 282px wide (its width measured on the
   applicant page's Start Date popup, 2026-10-31), 28px days, today with a 1px border in its own color (there on plain
   text, here on the kit's bold). Focus is shown on the frame, as the keys work while the calendar has it. */
.rcm-calendar { display: inline-block; outline: none; vertical-align: top; }
.rcm-calendar .flatpickr-calendar.inline { width: 282px; margin: 0; top: 0; border: 1px solid var(--rcm-border); border-radius: 4px; box-shadow: none; }
.rcm-calendar .flatpickr-rContainer, .rcm-calendar .flatpickr-days, .rcm-calendar .flatpickr-weekdays, .rcm-calendar .dayContainer {
    width: 258px !important; min-width: 258px !important; max-width: 258px !important; }
.rcm-calendar .flatpickr-day { height: 28px; line-height: 26px; }
.rcm-calendar .flatpickr-day.today { border-color: currentColor; }
.rcm-calendar .flatpickr-day.today.selected { border-color: var(--rcm-accent-bg); }
.rcm-calendar:focus .flatpickr-calendar.inline { border-color: var(--rcm-brand-border); }
.rcm-calendar.rcm-calendar-disabled { opacity: .5; pointer-events: none; }

/* ---- On / Off toggle --------------------------------------------------------------------------------- */
.rcm-toggle { display: inline-flex; }
.rcm-toggle .rcm-toggle-btn {
    box-sizing: border-box; height: 34px; min-width: 56px; padding: 6px 12px; margin: 0 0 0 -1px;
    border: 1px solid var(--rcm-border); background: var(--rcm-surface); color: var(--rcm-text); font-family: inherit; font-size: 14px; line-height: 20px; cursor: pointer;
}
.rcm-toggle .rcm-toggle-btn:first-child { margin-left: 0; border-radius: 4px 0 0 4px; }
.rcm-toggle .rcm-toggle-btn:last-child { border-radius: 0 4px 4px 0; }
.rcm-toggle .rcm-toggle-btn.active { background: var(--rcm-toggle-on); border-color: var(--rcm-border-strong); position: relative; z-index: 1; }
.rcm-toggle.rcm-toggle-fill { display: flex; width: 100%; }
.rcm-toggle.rcm-toggle-fill .rcm-toggle-btn { flex: 1 1 0; }
.rcm-toggle .rcm-toggle-btn:disabled { color: var(--rcm-text-placeholder); cursor: default; }

/* ---- Search box (BootstrapButtonEdit: a box with search and reset buttons joined on its right) ---------- */
/* Measured on the Contacts list (2026-10-30): 34px tall, the search button 40px and the reset 36.5px wide (12px a side
   around the icon), each overlapping the border before it by 1px, square inside corners and 4px outside ones. */
.rcm-search { display: flex; width: 100%; }
.rcm-search input.rcm-input { flex: 1 1 auto; min-width: 0; border-radius: 4px 0 0 4px; }
.rcm-search .rcm-search-btn {
    box-sizing: border-box; flex: 0 0 auto; height: 34px; padding: 6px 12px; margin: 0 0 0 -1px;
    border: 1px solid var(--rcm-border); border-radius: 0; background: var(--rcm-surface); color: var(--rcm-text);
    font-family: inherit; font-size: 14px; line-height: 20px; cursor: pointer;
}
.rcm-search .rcm-search-btn:last-child { border-radius: 0 4px 4px 0; }
.rcm-search .rcm-search-btn:hover { background: var(--rcm-surface-hover); }
.rcm-search .rcm-search-btn:focus-visible { outline: 2px solid var(--rcm-brand-border); outline-offset: -2px; position: relative; z-index: 1; }
.rcm-search input.rcm-input:focus { position: relative; z-index: 1; }

/* ---- Tabs (Bootstrap 3 nav-tabs look) -------------------------------------------------------------- */
ul.rcm-tabs { display: flex; list-style: none; margin: 0 0 10px 0; padding: 0; border-bottom: 1px solid var(--rcm-border); }
ul.rcm-tabs > li { margin-bottom: -1px; }
ul.rcm-tabs > li > a { display: block; padding: 10px 15px; margin-right: 2px; border: 1px solid transparent; border-radius: 4px 4px 0 0;
    color: var(--rcm-text); text-decoration: none; font-size: 14px; line-height: 20px; }
ul.rcm-tabs > li > a:hover { background: var(--rcm-surface-hover); border-color: var(--rcm-border-soft) var(--rcm-border-soft) var(--rcm-border); }
ul.rcm-tabs > li.active > a, ul.rcm-tabs > li.active > a:hover { color: var(--rcm-text-2); font-weight: 700; background: var(--rcm-surface); border-color: var(--rcm-border) var(--rcm-border) transparent; cursor: default; }

/* ---- Popup (<dialog>) -------------------------------------------------------------------------------- */
dialog.rcm-popup {
    box-sizing: border-box; padding: 0; margin: auto; max-width: calc(100vw - 32px); max-height: 90%;
    border: 1px solid var(--rcm-border); border-radius: 0; box-shadow: none; background: var(--rcm-surface); color: var(--rcm-text); font-size: 14px;
}
/* Opened with show(), not as a modal (see maidbase-kit.js), so it centers itself and the shade is our own element. */
dialog.rcm-popup[open] { display: flex; flex-direction: column; position: fixed; inset: 0; height: fit-content; }
dialog.rcm-popup:focus { outline: none; }
.rcm-popup-shade { display: none; position: fixed; inset: 0; background: var(--rcm-backdrop); }   /* the DevExpress white haze */
.rcm-popup-title { flex: 0 0 auto; display: flex; align-items: center; min-height: 51px; box-sizing: border-box;
    padding: 12px 15px; border-bottom: 1px solid var(--rcm-border); font-size: 14px; font-weight: 400; }
.rcm-popup-title-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcm-popup-close { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; margin: 0 -4px 0 8px; border: 0; background: transparent;
    color: var(--rcm-text-3); font-size: 22px; line-height: 24px; cursor: pointer; border-radius: 4px; }
.rcm-popup-close:hover { background: var(--rcm-surface-active); color: var(--rcm-text); }
/* No padding under the content: the button strip owns the gap above the buttons (20px, owner 2026-11-13). A popup must not add its
   own bottom padding or last-row margin on top of it, or the gap doubles. */
/* 14px, the page's size (owner, 2026-11-03: "Why are you using a smaller font on all these pop-ups?"); 12px only matched DevExpress. */
.rcm-popup-body { flex: 1 1 auto; overflow-y: auto; padding: 15px 15px 0; font-size: 14px; line-height: 1.9; }
.rcm-popup-body .rcm-label { line-height: 26.6px; margin-bottom: 4px; }               /* as in the DevExpress popup */
.rcm-popup-body ul.rcm-tabs > li > a { font-size: 14px; line-height: 20px; }   /* 14px like page tabs: today's 12px was too small (Ben, 2026-10-16) */
.rcm-popup-body .rcm-field { margin-bottom: 0; }
/* Popup text is the page's 14px, and nothing a person reads in a popup is smaller (2026-11). These pieces are shared with
   pages, where they stay as they are, so they are lifted here and only inside a popup: Bootstrap's small, code, badge and
   small button, the brand tag, and the call recording player. */
.rcm-popup-body small, .rcm-popup-body .small, .rcm-popup-body code, .rcm-popup-body .badge, .rcm-popup-body .btn-sm,
.rcm-popup-body .rcm-brand-tag, .rcm-popup-body .rcm-rp .rcm-rp-time, .rcm-popup-body .rcm-rp .rcm-rp-speed,
.rcm-popup-body .dx-fileuploader-file-size, .rcm-popup-body .dx-fileuploader-file-status-message { font-size: 14px; }
dialog.rcm-popup-nostrip .rcm-popup-body { padding-bottom: 15px; }
.rcm-popup-buttons { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 20px 15px 15px 15px; }
.rcm-popup-buttons-left, .rcm-popup-buttons-right { display: flex; gap: 10px; }
.rcm-popup-buttons-right { margin-left: auto; }

/* ---- Small screens ----------------------------------------------------------------------------------- */
@media (max-width: 640px) {
    dialog.rcm-popup { width: calc(100vw - 32px) !important; }
}

.ts-dropdown .rcm-select-all input[type=checkbox]:indeterminate {                            /* some chosen: a small blue square */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect x='2' y='2' width='6' height='6' fill='%23337ab7'/%3E%3C/svg%3E");
}

/* ---- Dark versions of the two pictures the kit draws (a named color cannot reach inside an image) ---------------- */
html[data-rcm-theme="dark"] label.rcm-check input[type=checkbox]:checked,
html[data-rcm-theme="dark"] .ts-dropdown .option input[type=checkbox]:checked,
html[data-rcm-theme="dark"] .ts-dropdown .rcm-select-all input[type=checkbox]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 5.2l2.6 2.6L9 2.2' fill='none' stroke='%2369a6d5' stroke-width='1.8'/%3E%3C/svg%3E");
}
html[data-rcm-theme="dark"] .ts-dropdown .rcm-select-all input[type=checkbox]:indeterminate {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect x='2' y='2' width='6' height='6' fill='%2369a6d5'/%3E%3C/svg%3E");
}

/* ---- Upload (MaidBaseKit.upload, 2026-10-30), measured on the DevExpress BootstrapUploadControl of the Apply pages: a read-only
   box and a Browse... button joined (34px, 14px, #ccc border, 4px outer corners), a Bootstrap progress bar with Cancel while it
   uploads, and the reason in red under the box when a file is refused. ---- */
.rcm-upload { width: 100%; }
.rcm-upload-row { display: flex; width: 100%; }
/* Both halves turn blue while a file is dragged over the row: the box has no right border of its own (Browse draws it),
   so coloring only the box left a gray right edge, and the whole row accepts the drop (2026-11-16). */
.rcm-upload-row.rcm-upload-over .rcm-upload-name, .rcm-upload-row.rcm-upload-over .rcm-upload-browse { border-color: var(--rcm-brand-border); }
.rcm-upload-name { flex: 1 1 auto; min-width: 0; box-sizing: border-box; height: 34px; margin: 0; padding: 6px 12px; border: 1px solid var(--rcm-border-input);
    border-right: 0; border-radius: 4px 0 0 4px; background: var(--rcm-surface); color: var(--rcm-text-2); font: inherit; font-size: 14px; line-height: 20px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); outline: none; cursor: text; }
.rcm-upload-browse { flex: 0 0 auto; box-sizing: border-box; height: 34px; margin: 0; padding: 6px 12px; border: 1px solid var(--rcm-border-input);
    border-radius: 0 4px 4px 0; background: var(--rcm-surface); color: var(--rcm-text); font: inherit; font-size: 14px; line-height: 20px; cursor: pointer; }
.rcm-upload-browse:hover { background: var(--rcm-toggle-on); }
.rcm-upload-browse:disabled { opacity: .65; cursor: default; }
/* Scoped so it outranks Bootstrap 3's input[type=file] { display: block } on the public Apply pages, which showed the
   native file input and squeezed the box (HOMEDEV29, 2026-10-30). */
.rcm-upload input.rcm-upload-file { display: none; }
.rcm-upload-progress { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rcm-upload-progress[hidden], .rcm-upload-error[hidden] { display: none; }
.rcm-upload-bar { flex: 1 1 auto; height: 20px; overflow: hidden; border-radius: 4px; background: var(--rcm-surface-hover); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); }
.rcm-upload-fill { height: 100%; min-width: 2em; background: var(--rcm-accent-bg); color: var(--rcm-on-brand); font-size: 12px; line-height: 20px; text-align: center; }
.rcm-upload-cancel { padding: 0; border: 0; background: none; color: var(--rcm-accent-text); font: inherit; font-size: 14px; cursor: pointer; }
.rcm-upload-error { margin-top: 6px; color: var(--rcm-danger-text-form); font-size: 14px; }

/* ---- List box (MaidBaseKit.listbox, 2026-10-31), measured on the DevExpress BootstrapListBox of /settings/permissions: a
   Bootstrap form box (1px #ccc, 4px corners, the faint inset shadow, #555 14px text) of 30px rows (5px 10px), the chosen
   row 15% darker, a row under the pointer #f5f5f5; focus changes nothing, as there. ---- */
.rcm-listbox { position: relative; box-sizing: border-box; width: 100%; overflow-y: auto; border: 1px solid var(--rcm-border-input); border-radius: 4px;
    background: var(--rcm-surface); color: var(--rcm-text-2); font-size: 14px; line-height: 20px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); outline: none; }
.rcm-listbox-item { padding: 5px 10px; cursor: pointer; }
.rcm-listbox-item:hover { background: var(--rcm-surface-hover); }
.rcm-listbox-item.active, .rcm-listbox-item.active:hover { background: var(--rcm-list-chosen); }
.rcm-listbox-disabled { opacity: .5; }
.rcm-listbox-disabled .rcm-listbox-item { cursor: default; }

/* ===================== MaidBaseHtmlEditor: the one standard look (owner, 2026-11-14) =====================
   Every editor built by MaidBaseHtmlEditor carries .rcm-mb-editor on its container. One 1px border around toolbar + editable (brand
   border on focus), a divider under the toolbar, no second border on the sticky panel, none on the editable, no "Powered by CKEditor"
   badge. A page that needs a different look overrides by its own id; it never rebuilds these rules. Same look the Management topic
   notes editor had first. */
.rcm-mb-editor .ck.ck-editor {
    border: 1px solid var(--rcm-border);
    border-radius: 4px;
    background: var(--rcm-surface);
}
.rcm-mb-editor .ck.ck-editor:focus-within { border-color: var(--rcm-brand-border); }
/* CKEditor's own `.ck-editor__top .ck-sticky-panel .ck-toolbar { border: 0 }` is more specific than a plain toolbar rule, so the divider needs the same ancestors */
.rcm-mb-editor .ck.ck-editor__top .ck-sticky-panel .ck.ck-toolbar {
    border: 0;
    border-bottom: 1px solid var(--rcm-border);
    border-radius: 3px 3px 0 0;
    background: var(--rcm-surface);
}
.rcm-mb-editor .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content,
.rcm-mb-editor .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-sticky-panel__content_sticky {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.rcm-mb-editor .ck.ck-editor__main { border: 0; }
.rcm-mb-editor .ck.ck-editor__editable.ck-editor__editable_inline,
.rcm-mb-editor .ck.ck-editor__editable.ck-editor__editable_inline.ck-focused {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 0 3px 3px !important;
    outline: none;
    background: var(--rcm-surface);
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
/* the badge is a body-level floating element, so it cannot be scoped to the editor */
.ck.ck-balloon-panel.ck-powered-by-balloon,
.ck-powered-by { display: none !important; }
/* compact editors (the Email panel): the old editor's 14px text, 1.42 line height, tight paragraphs and 12px 15px padding */
.rcm-mb-editor.rcm-mb-compact .ck.ck-editor__editable.ck-editor__editable_inline {
    font-size: 14px;
    line-height: 1.42;
    font-family: inherit;   /* the old editor used the page's font and color, not CKEditor's Helvetica and black */
    color: inherit;
    padding: 12px 15px !important;
}
.rcm-mb-compact .ck.ck-editor__editable p,
.rcm-mb-compact .ck.ck-editor__editable ul,
.rcm-mb-compact .ck.ck-editor__editable ol { margin: 0; }
.rcm-mb-compact .ck.ck-editor__editable blockquote {
    border-left: 4px solid #ddd;
    border-right: 0;
    padding: 0 0 0 12px;
    margin: 0;
    font-style: normal;
}
