/* ==========================================================================
   Site theme: Modern-2026 - design tokens
   Design reference: "Design Alternative 1" mockup (AI.Workspace/new site mockups) - navy menu and section
   headers, light blue panels, orange main actions, blue checked controls, Classic density.
   Loaded only for accounts whose Site Theme configuration is "Modern-2026". Every rule is scoped to
   html.kh-theme-modern-2026.

   HOW TO CHANGE THE LOOK
   - Brand colours: edit the BRAND block below.
       --kh-brand*   navy menu bar and section header bars
       --kh-primary* links, primary/search buttons, checked checkboxes and radios
       --kh-accent*  main actions (Submit Encounter, Save and Close, Update Patient) and the active menu underline
   - Density: the DENSITY block controls text sizes.
   - A single account can override any variable in its custom CSS, e.g.
       html.kh-theme-modern-2026 { --kh-brand: #3B2A5C; --kh-brand-2: #54407F; }
   ========================================================================== */

html.kh-theme-modern-2026 {
    /* ---- BRAND (change these to re-colour the theme) ---- */
    --kh-brand: #1E3A5F;
    --kh-brand-2: #2B5282;
    --kh-brand-ink: #FFFFFF;
    --kh-primary: #2C6DB5;
    --kh-primary-2: #3E86D0;
    --kh-primary-strong: #1F5594;
    --kh-primary-soft: #E8F1FB;
    --kh-accent: #F7941D;
    --kh-accent-2: #FBA94A;
    --kh-accent-strong: #E07B0C;
    --kh-accent-soft: #FFF1E0;
    --kh-accent-ink: #FFFFFF;

    /* ---- Neutrals ---- */
    --kh-ink: #1E2A38;
    --kh-ink-2: #34404F;
    --kh-muted: #66768A;
    --kh-page: #EEF3F9;
    --kh-surface: #FFFFFF;
    --kh-panel: #F3F7FC;
    --kh-subheader: #DDE8F5;
    --kh-table-header: #E6EEF7;
    --kh-line: #D4E0EC;
    --kh-line-strong: #B8C9DD;
    --kh-control-border: #C6D4E3;

    /* ---- Status ---- */
    --kh-ok: #2E7D32;
    --kh-ok-soft: #E8F5E9;
    --kh-warn: #8A5A00;
    --kh-warn-soft: #FFF4E0;
    --kh-alert: #C62828;
    --kh-alert-soft: #FDECEA;
    --kh-info: #1F4E85;
    --kh-info-soft: #E8F2FD;
    --kh-info-line: #BBD5F1;

    /* ---- Shape, depth, type ---- */
    --kh-radius-sm: 4px;
    --kh-radius: 6px;
    --kh-radius-card: 8px;
    --kh-radius-pill: 999px;
    --kh-shadow-sm: 0 1px 2px rgba(30, 58, 95, .08), 0 2px 6px rgba(30, 58, 95, .06);
    --kh-shadow: 0 2px 4px rgba(30, 58, 95, .08), 0 10px 24px rgba(30, 58, 95, .12);
    --kh-focus-ring: 0 0 0 3px rgba(44, 109, 181, .22);
    /* Same font stack as Classic (Bootstrap 3 default) */
    --kh-font: "Helvetica Neue", Helvetica, Arial, sans-serif;

    /* ---- DENSITY ---- */
    --kh-font-size: 12px;
    --kh-font-size-sm: 12px;
    --kh-header-font-size: 12px;
    --kh-subheader-font-size: 13px;
}

/* ==========================================================================
   Site theme: Modern-2026 - base styles (typography, header, menu, Bootstrap 3 components, shared widgets)
   Design reference: "Design Alternative 1" mockup. Loaded only for accounts whose Site Theme configuration is
   "Modern-2026"; every selector is scoped to html.kh-theme-modern-2026. Colours and sizes come from
   modern-2026-tokens.css. Broad element rules use :where(html.kh-theme-modern-2026) so they only replace the
   Classic element defaults and never beat contextual class rules.
   ========================================================================== */

/* ---- Page and typography ---- */
html.kh-theme-modern-2026 body {
    font-family: var(--kh-font);
    font-size: var(--kh-font-size);
    color: var(--kh-ink-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.kh-theme-modern-2026 #body-wrapper {
    background-color: var(--kh-page);
}

/* T45 (2026-11-17 trial): short pages showed the Classic charcoal body background (#252525) below the navy footer.
   On pages with the site footer, the background behind everything matches the footer. */
html.kh-theme-modern-2026:has(.footer),
html.kh-theme-modern-2026 body:has(.footer) {
    background-color: var(--kh-brand);
}

/* T175: on short pages the light page area grows so the footer sits at the bottom of the window at its normal height
   (no navy block below it). Column layout on the element that holds the footer: WebForms pages (Main.Master) have
   .footer inside #body-wrapper, so .main-content grows; MVC layouts have #body-wrapper and .footer side by side in body,
   and the public/login master has them side by side in form#form1, so #body-wrapper (light background) grows. Their
   direct children are plain blocks (no floats), and the Classic footer margin-top -150px still works in a column layout.
   Pages taller than the window are unchanged. */
html.kh-theme-modern-2026 #body-wrapper:has(> .footer) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html.kh-theme-modern-2026 #body-wrapper:has(> .footer) > .main-content {
    flex: 1 0 auto;
}

html.kh-theme-modern-2026 :is(body, form):has(> #body-wrapper ~ .footer) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html.kh-theme-modern-2026 :is(body, form):has(> #body-wrapper ~ .footer) > #body-wrapper {
    flex: 1 0 auto;
}

/* T247: the Classic footer is pulled up 150px (margin-top: -150px) into the 150px bottom padding of .main-content. Layouts
   without .main-content (the MVC account-configuration admin layout, e.g. CareFlow Designer) have no such padding, so the
   footer covered the last 150px of the page; there the footer sits right after the content. */
html.kh-theme-modern-2026 #body-wrapper:not(:has(.main-content)) ~ .footer {
    margin-top: 0;
}

:where(html.kh-theme-modern-2026) h1,
:where(html.kh-theme-modern-2026) h2,
:where(html.kh-theme-modern-2026) h3,
:where(html.kh-theme-modern-2026) h4,
:where(html.kh-theme-modern-2026) h5,
:where(html.kh-theme-modern-2026) h6,
:where(html.kh-theme-modern-2026) .h1,
:where(html.kh-theme-modern-2026) .h2,
:where(html.kh-theme-modern-2026) .h3,
:where(html.kh-theme-modern-2026) .h4,
:where(html.kh-theme-modern-2026) .h5,
:where(html.kh-theme-modern-2026) .h6 {
    font-family: var(--kh-font);
}

/* T188 (2026-11-18): page titles (Classic style.css .page-title, orange-red #D73F2F) navy semibold on every page. Pages
   with a more specific Classic title rule may still need their own (T113 CareDesk, T157 Encounter History, T170
   Overwatch also add page-specific alignment). */
html.kh-theme-modern-2026 .page-title {
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 input,
html.kh-theme-modern-2026 button,
html.kh-theme-modern-2026 select,
html.kh-theme-modern-2026 textarea {
    font-family: var(--kh-font);
}

:where(html.kh-theme-modern-2026) a {
    color: var(--kh-primary);
}

:where(html.kh-theme-modern-2026) a:hover,
:where(html.kh-theme-modern-2026) a:focus {
    color: var(--kh-primary-strong);
}

:where(html.kh-theme-modern-2026) label {
    color: var(--kh-ink);
}

html.kh-theme-modern-2026 .text-muted,
html.kh-theme-modern-2026 .help-block {
    color: var(--kh-muted);
}

:where(html.kh-theme-modern-2026) hr {
    border-top-color: var(--kh-line);
}

html.kh-theme-modern-2026 :focus-visible {
    outline: 2px solid var(--kh-primary);
    outline-offset: 2px;
}

/* The tiny search inputs inside searchable dropdowns: the dropdown shows its own focus border */
html.kh-theme-modern-2026 .Select-input > input:focus-visible,
html.kh-theme-modern-2026 .selectize-input input:focus-visible {
    outline: none;
}

/* T236 (2026-11-18): Material UI fields draw their own focus border (the outline around .MuiInputBase-input), so the
   theme's focus ring on the inner input made a double border */
html.kh-theme-modern-2026 .MuiInputBase-input:focus-visible {
    outline: none;
}

html.kh-theme-modern-2026 .text-primary {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 .text-success {
    color: var(--kh-ok);
}

html.kh-theme-modern-2026 .text-warning {
    color: var(--kh-warn);
}

html.kh-theme-modern-2026 .text-danger {
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 .text-info {
    color: var(--kh-info);
}

/* ---- Site header (Views/Shared/_SiteHeader.cshtml, MasterPages/Main.Master): white with a soft shadow ---- */
html.kh-theme-modern-2026 .site-header {
    background-color: var(--kh-surface);
    border-bottom: 1px solid var(--kh-line);
    box-shadow: 0 1px 4px rgba(30, 58, 95, .08);
    position: relative;
    z-index: 2;
}

html.kh-theme-modern-2026 .site-header .site-header-links {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 .site-header .site-header-links .links {
    font-size: 13px;
}

html.kh-theme-modern-2026 .site-header .site-header-links .bold {
    color: var(--kh-ink);
}

html.kh-theme-modern-2026 .site-header .site-header-links a {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 .site-header .site-header-links a:hover {
    color: var(--kh-primary-strong);
}

/* ---- T183-T186 (2026-11-18): header user area. Three markups: WebForms Main.Master (.site-header-links >
   #divLogLinks.links [cog #btnGoToUserPreferences, #lblLoggedInAs, #lblUserName (inline bold), #lblRole] +
   ul.site-navbar > li.default / .faq / .contact / .login [#lnkLogOut or #lnkLogIn]); MVC _SiteHeader.cshtml logged in
   (.site-header-links > .links [a.kh-header-icon-link cog, spans, span > a#lnkLogOut], already one row, no nav links);
   MVC logged out (.site-header-links > .links (empty) + ul.site-navbar with Home / About / Contact / Login). ---- */

/* T183: Home, About and Contact are hidden in the header on every page (logged in or out); the footer Quick Links still
   have them. Login / Logout stay. */
html.kh-theme-modern-2026 .site-header ul.site-navbar > li:is(.default, .faq, .contact) {
    display: none;
}

/* T184: one row, vertically centred: user area, then Logout (WebForms); MVC logged-in is already one row */
@media (min-width: 992px) {
    html.kh-theme-modern-2026 .site-header .site-header-links:has(> ul.site-navbar) {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-height: 52px;
    }

    html.kh-theme-modern-2026 .site-header .site-header-links:has(> ul.site-navbar) > .links {
        position: static;
    }

    html.kh-theme-modern-2026 .site-header .site-header-links > ul.site-navbar {
        float: none;
        margin: 0;
        padding: 0;
    }
}

/* T185 + T193-T196: user area, left to right: [user icon] user name, role pill, divider, settings cog button, Logout
   button. Bootstrap's .hidden-xs / .hidden-sm force .links to display: block !important, so it cannot be a flex row:
   the name and role float left, and the divider (.links::before), cog and Logout follow inline, all 28px tall and
   vertically centred. .links floats right (shrinks to its content; ignored inside the WebForms T184 flex row).
   WebForms: name [id$="lblUserName"] (inline bold), role [id$="lblRole"], "Logged in as" [id$="lblLoggedInAs"], cog
   #btnGoToUserPreferences, Logout in the sibling ul. MVC: "Logged in as" span, span.bold name, role span, cog
   a.kh-header-icon-link (not for patients), span > a#lnkLogOut. */
html.kh-theme-modern-2026 .site-header .site-header-links .links {
    float: right;
    line-height: 20px;
    white-space: nowrap;
}

/* MVC logged-in header: .site-header-links has a fixed 10px top margin (not a centring flex row like WebForms T184), so
   the 20px row is nudged down to the header's middle */
html.kh-theme-modern-2026 .site-header .site-header-links.marg-top-10 > .links {
    margin-top: 6px;
}

/* T193: no "Logged in as:" text */
html.kh-theme-modern-2026 .site-header .site-header-links .links > :is([id$="lblLoggedInAs"], span:has(+ span.bold)) {
    display: none;
}

/* T185 / T194: user name dark, with a light blue round person icon in front */
html.kh-theme-modern-2026 .site-header .site-header-links .links > :is([id$="lblUserName"], span.bold):not(:empty) {
    float: left;
    display: inline-flex;
    align-items: center;
    height: 20px;
    margin-right: 8px;
    color: var(--kh-ink);
    font-size: 11px;
}

html.kh-theme-modern-2026 .site-header .site-header-links .links > :is([id$="lblUserName"], span.bold):not(:empty):before {
    content: "\f007";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 5px;
    border-radius: 50%;
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
    font-family: FontAwesome;
    font-size: 10px;
    font-weight: 400;
}

/* T195: role as a small grey pill */
html.kh-theme-modern-2026 .site-header .site-header-links .links > :is([id$="lblRole"], span.bold + span):not(:empty) {
    float: left;
    margin-top: 2px;
    padding: 0 7px;
    border-radius: var(--kh-radius-pill);
    background-color: #EEF2F7;
    color: var(--kh-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
}

/* Divider between the role and the cog / Logout (only when a user name is shown) */
html.kh-theme-modern-2026 .site-header .site-header-links .links:has(> :is([id$="lblUserName"], span.bold):not(:empty)):before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 14px;
    margin: 0 6px 0 8px;
    background-color: var(--kh-line);
    vertical-align: middle;
}

/* T196: settings cog as a square icon button next to Logout (T197: 20px) */
html.kh-theme-modern-2026 .site-header .site-header-links .links > a:has(> i.icon-cog) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius-sm);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
}

html.kh-theme-modern-2026 .site-header .site-header-links .links > a:has(> i.icon-cog):is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

/* The FontAwesome 3 icon has line-height: normal and an odd 11px size left a half-pixel gap (18px inner space), so the
   glyph rounded off-centre; the icon is a 12px square (line-height 1, centred text) that sits on whole pixels */
html.kh-theme-modern-2026 .site-header .site-header-links .links > a > i.icon-cog {
    display: block;
    width: 12px;
    height: 12px;
    line-height: 1;
    text-align: center;
}

html.kh-theme-modern-2026 .site-header .site-header-links .links > a > i.icon-cog:before {
    display: block;
    line-height: 12px;
}

/* Logout right after the cog (MVC: inside .links; WebForms: the next flex item after .links) */
html.kh-theme-modern-2026 .site-header .site-header-links .links > span:has(> #lnkLogOut) {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}

html.kh-theme-modern-2026 .site-header .site-header-links:has(> .links [id$="lblUserName"]:not(:empty)) > ul.site-navbar > li.login:has(> a) {
    margin-left: 6px;
}

/* T186: Logout (and Login when logged out) as a small outlined button (T197: 20px, 11px text) */
html.kh-theme-modern-2026 .site-header .site-header-links :is(#lnkLogOut, #lnkLogIn, ul.site-navbar > li.login > a) {
    display: inline-block;
    height: 20px;
    padding: 0 8px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius-sm);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-decoration: none;
}

html.kh-theme-modern-2026 .site-header .site-header-links :is(#lnkLogOut, #lnkLogIn, ul.site-navbar > li.login > a):is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

/* ---- Primary menu (Views/Shared/_Menu.cshtml): navy bar, orange underline on the active item ---- */
html.kh-theme-modern-2026 .navbar-inverse.primary-menu {
    background-color: var(--kh-brand);
    background-image: linear-gradient(to bottom, var(--kh-brand-2) 0%, var(--kh-brand) 100%);
    border-color: var(--kh-brand);
    box-shadow: none;
    filter: none;
}

html.kh-theme-modern-2026 .navbar-inverse.primary-menu .navbar-nav > li > a {
    color: rgba(255, 255, 255, .86);
    text-shadow: none;
}

html.kh-theme-modern-2026 .navbar-inverse.primary-menu .navbar-nav > li > a:hover,
html.kh-theme-modern-2026 .navbar-inverse.primary-menu .navbar-nav > li > a:focus {
    background-color: rgba(255, 255, 255, .08);
    color: var(--kh-brand-ink);
}

html.kh-theme-modern-2026 .navbar-inverse.primary-menu .navbar-nav > li > a.selected,
html.kh-theme-modern-2026 .navbar-inverse.primary-menu .navbar-nav > .active > a,
html.kh-theme-modern-2026 .navbar-inverse.primary-menu .navbar-nav > .open > a {
    background-color: rgba(255, 255, 255, .10);
    background-image: none;
    box-shadow: inset 0 -3px 0 var(--kh-accent);
    color: var(--kh-brand-ink);
    font-weight: 600;
}

/* ---- Footer: navy band ---- */
html.kh-theme-modern-2026 .footer {
    background-color: var(--kh-brand);
}

html.kh-theme-modern-2026 .footer h4 {
    color: #A9BCD3;
}

html.kh-theme-modern-2026 .footer #footer-floor {
    background-color: #172E4B;
}

/* ---- Buttons: rounded, soft gradients; warning = orange main actions ---- */
html.kh-theme-modern-2026 .btn {
    border-radius: var(--kh-radius);
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 1px 1px rgba(30, 58, 95, .06);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
}

html.kh-theme-modern-2026 .btn:active,
html.kh-theme-modern-2026 .btn.active {
    box-shadow: inset 0 2px 3px rgba(30, 58, 95, .15);
}

html.kh-theme-modern-2026 .btn-default {
    background-color: var(--kh-surface);
    background-image: linear-gradient(to bottom, #FFFFFF 0%, #F3F6FA 100%);
    border-color: var(--kh-line-strong);
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 .btn-default:hover,
html.kh-theme-modern-2026 .btn-default:focus {
    background-color: var(--kh-primary-soft);
    background-image: none;
    border-color: var(--kh-primary);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 .btn-primary {
    background-color: var(--kh-primary);
    background-image: linear-gradient(to bottom, var(--kh-primary-2) 0%, var(--kh-primary) 100%);
    border-color: var(--kh-primary-strong);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .btn-warning {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 .btn-success {
    background-color: var(--kh-ok);
    background-image: linear-gradient(to bottom, #43A047 0%, var(--kh-ok) 100%);
    border-color: #23652A;
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .btn-danger {
    background-color: var(--kh-alert);
    background-image: linear-gradient(to bottom, #E04848 0%, var(--kh-alert) 100%);
    border-color: #A51F1F;
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .btn-info {
    background-color: var(--kh-primary-soft);
    background-image: none;
    border-color: var(--kh-info-line);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 .btn-primary:hover,
html.kh-theme-modern-2026 .btn-primary:focus,
html.kh-theme-modern-2026 .btn-warning:hover,
html.kh-theme-modern-2026 .btn-warning:focus,
html.kh-theme-modern-2026 .btn-success:hover,
html.kh-theme-modern-2026 .btn-success:focus,
html.kh-theme-modern-2026 .btn-danger:hover,
html.kh-theme-modern-2026 .btn-danger:focus {
    filter: brightness(.94);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .btn-info:hover,
html.kh-theme-modern-2026 .btn-info:focus {
    background-color: #D7E7F8;
    color: var(--kh-primary-strong);
}

/* ---- T220 (2026-11-18): outlined "bordered" buttons (Classic inline style: .btn-bordered:not(:hover) white with coloured
   text). The theme's .btn-primary / .btn-info backgrounds outranked the white, leaving blue text on blue (Add a trigger,
   Add Advanced Rule) or light blue on light blue (Add Show CareFlow Rule). Now: white with theme-coloured text and border,
   a soft fill of the same colour on hover. ---- */
html.kh-theme-modern-2026 .btn.btn-bordered:not(:hover) {
    background-color: var(--kh-surface);
    background-image: none;
}

html.kh-theme-modern-2026 .btn.btn-bordered:is(.btn-primary, .btn-info) {
    border-color: var(--kh-primary);
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 .btn.btn-bordered.btn-info {
    border-color: var(--kh-info-line);
}

html.kh-theme-modern-2026 .btn.btn-bordered.btn-success {
    border-color: var(--kh-ok);
    color: var(--kh-ok);
}

html.kh-theme-modern-2026 .btn.btn-bordered.btn-warning {
    border-color: var(--kh-accent);
    color: var(--kh-accent-strong);
}

html.kh-theme-modern-2026 .btn.btn-bordered.btn-danger {
    border-color: var(--kh-alert);
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 .btn.btn-bordered:is(.btn-primary, .btn-info):is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    background-image: none;
    color: var(--kh-primary-strong);
    filter: none;
}

html.kh-theme-modern-2026 .btn.btn-bordered.btn-success:is(:hover, :focus) {
    background-color: var(--kh-ok-soft);
    background-image: none;
    color: var(--kh-ok);
    filter: none;
}

html.kh-theme-modern-2026 .btn.btn-bordered.btn-warning:is(:hover, :focus) {
    background-color: var(--kh-accent-soft);
    background-image: none;
    color: var(--kh-accent-strong);
    filter: none;
}

html.kh-theme-modern-2026 .btn.btn-bordered.btn-danger:is(:hover, :focus) {
    background-color: var(--kh-alert-soft);
    background-image: none;
    color: var(--kh-alert);
    filter: none;
}

/* The CareFlow Designer "Add Question" bars (.add-question-btn) are thin dashed lines that expand on hover; their text is
   forced white (!important) until focused, so the expanded bar is solid blue to keep it readable */
html.kh-theme-modern-2026 .btn.btn-bordered.add-question-btn {
    border-color: var(--kh-info-line);
}

html.kh-theme-modern-2026 .btn.btn-bordered.add-question-btn:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .btn-link {
    background-color: transparent;
    background-image: none;
    border-color: transparent;
    box-shadow: none;
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 .btn.disabled,
html.kh-theme-modern-2026 .btn[disabled],
html.kh-theme-modern-2026 fieldset[disabled] .btn {
    opacity: .5;
}

/* ---- Forms ---- */
html.kh-theme-modern-2026 .form-control {
    border-color: var(--kh-control-border);
    border-radius: var(--kh-radius);
    color: var(--kh-ink);
    box-shadow: inset 0 1px 1px rgba(30, 58, 95, .04);
}

html.kh-theme-modern-2026 .form-control:focus {
    border-color: var(--kh-primary);
    box-shadow: var(--kh-focus-ring);
    outline: none;
}

html.kh-theme-modern-2026 .form-control[disabled],
html.kh-theme-modern-2026 .form-control[readonly],
html.kh-theme-modern-2026 fieldset[disabled] .form-control {
    background-color: var(--kh-panel);
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 .input-group-addon {
    background-color: var(--kh-panel);
    border-color: var(--kh-control-border);
    border-radius: var(--kh-radius);
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 .has-error .form-control {
    border-color: var(--kh-alert);
}

html.kh-theme-modern-2026 .has-error .help-block,
html.kh-theme-modern-2026 .has-error .control-label {
    color: var(--kh-alert);
}

/* ---- iCheck checkboxes and radios (Styles/libs/iCheck-1.x): drawn in CSS, blue with a white tick when checked ---- */
html.kh-theme-modern-2026 [class*="icheckbox_square"],
html.kh-theme-modern-2026 [class*="iradio_square"] {
    background-image: none;
    background-color: var(--kh-surface);
    border: 1.5px solid #9FB3CA;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

html.kh-theme-modern-2026 [class*="icheckbox_square"] {
    border-radius: var(--kh-radius-sm);
}

html.kh-theme-modern-2026 [class*="iradio_square"] {
    border-radius: 50%;
}

html.kh-theme-modern-2026 [class*="icheckbox_square"].hover,
html.kh-theme-modern-2026 [class*="iradio_square"].hover {
    border-color: var(--kh-primary);
    box-shadow: var(--kh-focus-ring);
}

html.kh-theme-modern-2026 [class*="icheckbox_square"].checked,
html.kh-theme-modern-2026 [class*="iradio_square"].checked {
    background-color: var(--kh-primary);
    border-color: var(--kh-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
}

html.kh-theme-modern-2026 [class*="icheckbox_square"].disabled,
html.kh-theme-modern-2026 [class*="iradio_square"].disabled {
    opacity: .5;
}

/* ---- Panels and wells ---- */
html.kh-theme-modern-2026 .panel {
    border-color: var(--kh-line);
    border-radius: var(--kh-radius-card);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 .panel > .panel-heading {
    border-top-left-radius: calc(var(--kh-radius-card) - 1px);
    border-top-right-radius: calc(var(--kh-radius-card) - 1px);
}

html.kh-theme-modern-2026 .panel-primary > .panel-heading {
    background-color: var(--kh-brand);
    background-image: linear-gradient(to bottom, var(--kh-brand-2) 0%, var(--kh-brand) 100%);
    border-color: var(--kh-brand);
    color: var(--kh-brand-ink);
}

html.kh-theme-modern-2026 .panel-default > .panel-heading {
    background-color: var(--kh-subheader);
    background-image: none;
    border-color: var(--kh-line);
    color: var(--kh-brand);
    font-weight: 700;
}

html.kh-theme-modern-2026 .panel-body {
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 .well {
    background-color: var(--kh-surface);
    background-image: none;
    border-color: var(--kh-line);
    border-radius: var(--kh-radius);
    box-shadow: none;
}

/* ---- Tables ---- */
html.kh-theme-modern-2026 .table > thead > tr > th {
    background-color: var(--kh-table-header);
    border-bottom: 1px solid var(--kh-line-strong);
    color: var(--kh-brand);
    font-weight: 700;
}

html.kh-theme-modern-2026 .table > tbody > tr > td,
html.kh-theme-modern-2026 .table > tbody > tr > th,
html.kh-theme-modern-2026 .table > tfoot > tr > td,
html.kh-theme-modern-2026 .table-bordered,
html.kh-theme-modern-2026 .table-bordered > thead > tr > th,
html.kh-theme-modern-2026 .table-bordered > tbody > tr > td,
html.kh-theme-modern-2026 .table-bordered > tbody > tr > th {
    border-color: var(--kh-line);
}

html.kh-theme-modern-2026 .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--kh-panel);
}

html.kh-theme-modern-2026 .table-hover > tbody > tr:hover {
    background-color: var(--kh-primary-soft);
}

/* Classic grid tables (table.gridviewdarkgray / gridviewgray, style.less) use header rows inside tbody.
   gridviewdarkgray forces its grey header with !important, so the theme must use !important to replace it. */
html.kh-theme-modern-2026 table.gridviewdarkgray > thead > tr > th,
html.kh-theme-modern-2026 table.gridviewdarkgray > tbody > tr > th {
    background-color: var(--kh-table-header) !important;
    color: var(--kh-brand) !important;
    border-color: var(--kh-line-strong);
    font-weight: 700;
}

html.kh-theme-modern-2026 table.gridviewdarkgray > thead > tr > th a,
html.kh-theme-modern-2026 table.gridviewdarkgray > tbody > tr > th a {
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 .table.gridviewdarkgray > tbody > tr th.sortable:hover,
html.kh-theme-modern-2026 .table th.sortable.sorted {
    background-color: #D3E2F2 !important;
}

html.kh-theme-modern-2026 table.gridviewgray thead tr th,
html.kh-theme-modern-2026 table.gridviewgray tbody tr th {
    background: var(--kh-table-header);
    border-color: var(--kh-line-strong);
    color: var(--kh-brand);
}

/* ---- Tabs, pills, dropdowns ---- */
html.kh-theme-modern-2026 .nav-tabs {
    border-bottom-color: var(--kh-line-strong);
}

html.kh-theme-modern-2026 .nav-tabs > li > a {
    border-radius: var(--kh-radius) var(--kh-radius) 0 0;
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 .nav-tabs > li.active > a,
html.kh-theme-modern-2026 .nav-tabs > li.active > a:hover,
html.kh-theme-modern-2026 .nav-tabs > li.active > a:focus {
    border-color: var(--kh-line-strong);
    border-top: 3px solid var(--kh-accent);
    border-bottom-color: transparent;
    color: var(--kh-ink);
    font-weight: 600;
}

html.kh-theme-modern-2026 .nav-pills > li > a {
    border-radius: var(--kh-radius);
}

html.kh-theme-modern-2026 .nav-pills > li.active > a,
html.kh-theme-modern-2026 .nav-pills > li.active > a:hover,
html.kh-theme-modern-2026 .nav-pills > li.active > a:focus {
    background-color: var(--kh-primary);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .dropdown-menu {
    border-color: var(--kh-line);
    border-radius: var(--kh-radius);
    box-shadow: var(--kh-shadow);
}

html.kh-theme-modern-2026 .dropdown-menu > li > a:hover,
html.kh-theme-modern-2026 .dropdown-menu > li > a:focus,
html.kh-theme-modern-2026 .dropdown-menu > .active > a,
html.kh-theme-modern-2026 .dropdown-menu > .active > a:hover,
html.kh-theme-modern-2026 .dropdown-menu > .active > a:focus {
    background-color: var(--kh-primary-soft);
    background-image: none;
    color: var(--kh-primary-strong);
}

/* ---- Modals ----
   No overflow:hidden on .modal-content (it would clip dropdown menus and react-select lists near the bottom of a modal);
   the header and footer round their own outer corners instead. */
html.kh-theme-modern-2026 .modal-content {
    border: 0;
    border-radius: var(--kh-radius-card);
    box-shadow: 0 20px 50px rgba(30, 58, 95, .28);
}

html.kh-theme-modern-2026 .modal-header {
    background-color: var(--kh-brand);
    background-image: linear-gradient(to bottom, var(--kh-brand-2) 0%, var(--kh-brand) 100%);
    border-bottom: 0;
    border-radius: var(--kh-radius-card) var(--kh-radius-card) 0 0;
    color: var(--kh-brand-ink);
}

html.kh-theme-modern-2026 .modal-header .modal-title,
html.kh-theme-modern-2026 .modal-header h4,
html.kh-theme-modern-2026 .modal-header .close {
    color: var(--kh-brand-ink);
    opacity: 1;
    text-shadow: none;
}

html.kh-theme-modern-2026 .modal-footer {
    background-color: var(--kh-panel);
    border-top-color: var(--kh-line);
    border-radius: 0 0 var(--kh-radius-card) var(--kh-radius-card);
}

/* T83 (2026-11-17 trial): one pop-up style everywhere - slim header with a left-aligned 16px title, slim footer, normal-size
   footer buttons. Site-wide so pop-ups rendered outside page containers (e.g. react-bootstrap modals, which mount on
   body) match. Replaces the Ticket-only header/footer/button-size rules (T37, T42, T43, T56, T60, T65, T71, T73). */
html.kh-theme-modern-2026 .modal-header,
html.kh-theme-modern-2026 .modal-header.text-center {
    padding: 10px 16px;
    text-align: left;
}

html.kh-theme-modern-2026 .modal-header .modal-title {
    font-size: 16px;
}

html.kh-theme-modern-2026 .modal-footer {
    padding: 10px 16px;
}

html.kh-theme-modern-2026 .modal-footer .btn {
    height: auto;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    border-radius: var(--kh-radius);
}

/* T84 (2026-11-17 trial): field labels in pop-ups use the muted grey-blue label style (like T4 on the Ticket page).
   T88 adds plain labels with no class (e.g. Edit Invitation). Labels that wrap, or directly follow, a checkbox or radio
   are option labels and keep the normal text style. */
html.kh-theme-modern-2026 .modal-body label.control-label:not(:has(input)):not(input[type="radio"] + label):not(input[type="checkbox"] + label),
html.kh-theme-modern-2026 .modal-body label.lbl:not(:has(input)):not(input[type="radio"] + label):not(input[type="checkbox"] + label),
html.kh-theme-modern-2026 .modal-body label:is(:not([class]), [class=""]):not(:has(input)):not(input[type="radio"] + label):not(input[type="checkbox"] + label) {
    color: var(--kh-muted);
    font-weight: 600;
}

/* T114 (2026-11-17 trial): an icon at the start of a pop-up title gets a small gap before the text */
html.kh-theme-modern-2026 .modal-header .modal-title > i[class^="icon-"]:first-child {
    margin-right: 6px;
}

/* ---- Alerts, labels, badges ---- */
html.kh-theme-modern-2026 .alert {
    border-radius: var(--kh-radius);
    background-image: none;
    box-shadow: none;
    text-shadow: none;
}

html.kh-theme-modern-2026 .alert-info {
    background-color: var(--kh-info-soft);
    border-color: var(--kh-info-line);
    color: var(--kh-info);
}

html.kh-theme-modern-2026 .alert-success {
    background-color: var(--kh-ok-soft);
    border-color: #BFE0C1;
    color: var(--kh-ok);
}

html.kh-theme-modern-2026 .alert-warning {
    background-color: var(--kh-warn-soft);
    border-color: #F1D29A;
    color: var(--kh-warn);
}

html.kh-theme-modern-2026 .alert-danger {
    background-color: var(--kh-alert-soft);
    border-color: #F2C2BE;
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 .label {
    border-radius: var(--kh-radius-sm);
}

html.kh-theme-modern-2026 .label-primary {
    background-color: var(--kh-primary);
}

html.kh-theme-modern-2026 .badge {
    background-color: var(--kh-brand);
}

/* ---- List groups, pagination, progress ---- */
html.kh-theme-modern-2026 .list-group-item {
    border-color: var(--kh-line);
}

html.kh-theme-modern-2026 .list-group-item.active,
html.kh-theme-modern-2026 .list-group-item.active:hover,
html.kh-theme-modern-2026 .list-group-item.active:focus {
    background-color: var(--kh-primary);
    background-image: none;
    border-color: var(--kh-primary);
    color: #FFFFFF;
    text-shadow: none;
}

html.kh-theme-modern-2026 .pagination > .active > a,
html.kh-theme-modern-2026 .pagination > .active > a:hover,
html.kh-theme-modern-2026 .pagination > .active > a:focus,
html.kh-theme-modern-2026 .pagination > .active > span {
    background-color: var(--kh-primary);
    border-color: var(--kh-primary);
}

html.kh-theme-modern-2026 .progress-bar {
    background-color: var(--kh-primary);
}

/* ---- Shared widgets ---- */
html.kh-theme-modern-2026 .selectize-input,
html.kh-theme-modern-2026 .selectize-control.single .selectize-input,
html.kh-theme-modern-2026 .Select-control {
    border-color: var(--kh-control-border);
    border-radius: var(--kh-radius);
    background-image: none;
    box-shadow: inset 0 1px 1px rgba(30, 58, 95, .04);
}

html.kh-theme-modern-2026 .selectize-input.focus,
html.kh-theme-modern-2026 .is-focused:not(.is-open) > .Select-control {
    border-color: var(--kh-primary);
    box-shadow: var(--kh-focus-ring);
}

html.kh-theme-modern-2026 .selectize-dropdown,
html.kh-theme-modern-2026 .Select-menu-outer {
    border-color: var(--kh-line);
    box-shadow: var(--kh-shadow);
}

html.kh-theme-modern-2026 .selectize-dropdown .active,
html.kh-theme-modern-2026 .Select-option.is-focused {
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 .ui-datepicker .ui-datepicker-header {
    background: var(--kh-brand);
    border-color: var(--kh-brand);
    color: var(--kh-brand-ink);
}

html.kh-theme-modern-2026 .ui-datepicker .ui-state-active {
    background: var(--kh-primary);
    border-color: var(--kh-primary-strong);
    color: #FFFFFF;
}

/* ==========================================================================
   Site theme: Modern-2026 - overrides for the kh- component classes (see Styles/components/kh-components.css).
   Loaded only for accounts whose Site Theme configuration is "Modern-2026".
   ========================================================================== */

/* Full-width alert bars stay square */
html.kh-theme-modern-2026 .alert.kh-page-alert,
html.kh-theme-modern-2026 .alert.kh-site-alerts-bar {
    border-radius: 0;
}

html.kh-theme-modern-2026 td.kh-patient-search-has-notes,
html.kh-theme-modern-2026 .table > tbody > tr > td.kh-patient-search-has-notes,
html.kh-theme-modern-2026 .table-striped > tbody > tr:nth-child(odd) > td.kh-patient-search-has-notes,
html.kh-theme-modern-2026 .table-hover > tbody > tr:hover > td.kh-patient-search-has-notes {
    background-color: var(--kh-warn-soft);
}

html.kh-theme-modern-2026 .kh-patient-authorization-divider {
    border-bottom-color: var(--kh-line);
}

html.kh-theme-modern-2026 hr.kh-ticket-questions-divider {
    border-top-color: var(--kh-line-strong);
}

html.kh-theme-modern-2026 hr.kh-symptom-checker-divider {
    border-color: var(--kh-line);
}

html.kh-theme-modern-2026 .row.kh-ticket-sticky-header,
html.kh-theme-modern-2026 .schedule-header-row.kh-scheduling-header-row {
    background-color: var(--kh-surface);
}

/* Loading overlay: navy card. #divLoading is part of the selector so it outranks "#divLoading h2 { color: white; }" */
html.kh-theme-modern-2026 .kh-loading-overlay-backdrop {
    background-color: var(--kh-brand);
    opacity: .45;
}

html.kh-theme-modern-2026 #divLoading h2.kh-loading-overlay-label {
    background-color: var(--kh-brand);
    border: 0;
    border-radius: var(--kh-radius-card);
    box-shadow: var(--kh-shadow);
    color: var(--kh-brand-ink);
    opacity: 1;
}

/* ==========================================================================
   Page messages (PageAlert.jsx, all pages) - 2026-11-17 trials T93-T96. Regular messages: .page-message > .alert
   .alert-dismissible.alert-<type> (no icon of their own); persistent messages: .page-persistent-message > .alert
   .kh-page-alert (render their own icon, inline padding 6px 15px).
   ========================================================================== */

/* ---- T94: easier to read - 13px text, a little more height, room for the close button ---- */
html.kh-theme-modern-2026 .page-message > .alert,
html.kh-theme-modern-2026 .page-persistent-message > .alert {
    font-size: 13px;
    border-width: 1px;
    border-left-width: 4px;
}

html.kh-theme-modern-2026 .page-message > .alert {
    padding: 9px 36px 9px 14px;
}

/* ---- T93 / T96: every type gets a solid coloured bar on the left and darker semibold text; regular messages get the
   type's icon (success check, info, warning, error) ---- */
html.kh-theme-modern-2026 .page-message > .alert-success,
html.kh-theme-modern-2026 .page-persistent-message > .alert-success {
    border-left-color: var(--kh-ok);
    color: #1B5E20;
}

html.kh-theme-modern-2026 .page-message > .alert-info,
html.kh-theme-modern-2026 .page-persistent-message > .alert-info {
    border-left-color: var(--kh-info);
}

html.kh-theme-modern-2026 .page-message > .alert-warning,
html.kh-theme-modern-2026 .page-persistent-message > .alert-warning {
    border-left-color: var(--kh-accent);
}

html.kh-theme-modern-2026 .page-message > .alert-danger,
html.kh-theme-modern-2026 .page-persistent-message > .alert-danger {
    border-left-color: var(--kh-alert);
}

html.kh-theme-modern-2026 .page-message > .alert {
    font-weight: 600;
}

html.kh-theme-modern-2026 .page-message > .alert:is(.alert-success, .alert-info, .alert-warning, .alert-danger):before {
    font-family: FontAwesome;
    margin-right: 8px;
    font-weight: 400;
}

html.kh-theme-modern-2026 .page-message > .alert-success:before {
    content: "\f00c";
}

html.kh-theme-modern-2026 .page-message > .alert-info:before {
    content: "\f05a";
}

html.kh-theme-modern-2026 .page-message > .alert-warning:before {
    content: "\f071";
}

html.kh-theme-modern-2026 .page-message > .alert-danger:before {
    content: "\f06a";
}

/* ---- T95: subtler close button - smaller, centred vertically, darker on hover. Also resets Classic
   ".divPageAlerts .close" (padding 3px 30px 3px 3px, 30px font, -6px top margin). ---- */
html.kh-theme-modern-2026 .page-message > .alert .close,
html.kh-theme-modern-2026 .page-persistent-message > .alert .close {
    top: 0;
    margin-top: 0;
    padding: 0 0 0 8px;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    opacity: .45;
    text-shadow: none;
}

html.kh-theme-modern-2026 .page-message > .alert .close:hover,
html.kh-theme-modern-2026 .page-message > .alert .close:focus,
html.kh-theme-modern-2026 .page-persistent-message > .alert .close:hover,
html.kh-theme-modern-2026 .page-persistent-message > .alert .close:focus {
    opacity: .85;
}

/* Regular messages reserve 36px on the right; pull their close button into that space (persistent messages have only
   15px inline padding, so they keep the default position) */
html.kh-theme-modern-2026 .page-message > .alert .close {
    position: relative;
    right: -24px;
}

/* ---- T97: regular page messages float as rounded boxes with a soft shadow, centred near the top, instead of a
   full-width strip across the page. .divPageAlerts is position:fixed full-width in Classic; when persistent messages
   show, PageAlert sets an inline top so these still appear below them. Persistent messages stay full-width bars.
   WebForms pages (ucPageAlerts) use div#divPageAlerts.container.divPageAlerts; "#divPageAlerts.divPageAlerts.container"
   (1,3,1) outranks the T9/T104 wider-page rule "body:has(#TriageNurseExpress) .container" (1,2,2) there.
   T191: 100px from the top (just below the navy menu bar, which ends at about 85-89px) instead of 12px, so the header
   user name and Logout stay visible. ---- */
html.kh-theme-modern-2026 .divPageAlerts,
html.kh-theme-modern-2026 #divPageAlerts.divPageAlerts.container {
    top: 100px;
    left: 50%;
    width: min(760px, calc(100% - 32px));
    max-width: none;
    padding: 0;
    transform: translateX(-50%);
}

html.kh-theme-modern-2026 .divPageAlerts .page-message > .alert {
    margin: 0 0 8px;
    border-radius: var(--kh-radius-card);
    box-shadow: var(--kh-shadow);
}

/* ==========================================================================
   CareDesk page (Providers/TriageNurseExpress.aspx, #TriageNurseExpress) - 2026-11-17 trials T98-T103 (T104 is in the
   T9 rule in modern-2026-ticket.css). Kept here for now to avoid a bundle change; move to a page file when the page
   styling is finalised. Markup: table#Dashboard > td.dashboard-column (queues / patient history / recommendation),
   h3.dashboard-column-header, h4.boxheader + .info-box, a.queue-item (.queue-item-priority-* colours the left bar,
   .queue-item-selected), td.lbl field labels, .views-panel view buttons.
   ========================================================================== */

/* ---- T98: column and box headers as navy bars (were Classic grey #666). The column header selector includes
   .dashboard-column to outrank style-pages.css ".triage-nurse-express #TriageNurseExpress .dashboard-column
   h3.dashboard-column-header". ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .dashboard-column h3.dashboard-column-header,
html.kh-theme-modern-2026 #TriageNurseExpress h4.boxheader,
html.kh-theme-modern-2026 #EncounterHistory .dashboard-column h3.boxheader,
html.kh-theme-modern-2026 #EncounterHistory .dashboard-column h4.boxheader {
    background-color: var(--kh-brand);
    background-image: linear-gradient(to bottom, var(--kh-brand-2) 0%, var(--kh-brand) 100%);
    color: var(--kh-brand-ink);
    font-weight: 700;
    letter-spacing: .03em;
    padding: 8px 10px;
}

html.kh-theme-modern-2026 #TriageNurseExpress h3.dashboard-column-header .btn {
    background-color: transparent;
    background-image: none;
    border-color: rgba(255, 255, 255, .6);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 #TriageNurseExpress h3.dashboard-column-header .btn:hover,
html.kh-theme-modern-2026 #TriageNurseExpress h3.dashboard-column-header .btn:focus {
    background-color: rgba(255, 255, 255, .15);
    border-color: #FFFFFF;
    color: #FFFFFF;
}

/* ---- T99: the three columns as separate light-panel cards with gaps between them ---- */
html.kh-theme-modern-2026 #TriageNurseExpress table#Dashboard,
html.kh-theme-modern-2026 #EncounterHistory table#Dashboard {
    border-collapse: separate;
    border-spacing: 12px 0;
}

html.kh-theme-modern-2026 #TriageNurseExpress td.dashboard-column,
html.kh-theme-modern-2026 #EncounterHistory td.dashboard-column {
    background-color: var(--kh-panel);
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    box-shadow: var(--kh-shadow-sm);
    vertical-align: top;
}

html.kh-theme-modern-2026 #TriageNurseExpress td.dashboard-column h3.dashboard-column-header,
html.kh-theme-modern-2026 #EncounterHistory td.dashboard-column h3.boxheader {
    margin-top: 0;
    border-top-left-radius: calc(var(--kh-radius-card) - 1px);
    border-top-right-radius: calc(var(--kh-radius-card) - 1px);
}

/* ---- T100: sub-headings - queue group names as small navy section labels; field captions and detail labels in the
   muted grey-blue label style ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column h4 {
    color: var(--kh-brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
}

html.kh-theme-modern-2026 #TriageNurseExpress .patient-history-column h4:not(.boxheader),
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column h4:not(.boxheader),
html.kh-theme-modern-2026 #EncounterHistory #PatientHistory h4:not(.boxheader) {
    color: var(--kh-muted);
    font-weight: 700;
    letter-spacing: .04em;
}

html.kh-theme-modern-2026 #TriageNurseExpress td.lbl,
html.kh-theme-modern-2026 #EncounterHistory td.lbl {
    color: var(--kh-muted);
    font-weight: 600;
}

/* ---- T101: queue entries - white cards with a thinner priority bar (colours unchanged), light blue on hover; the
   open encounter is light blue. Selectors include .queues-column .queue to outrank style-pages.css
   ".triage-nurse-express #TriageNurseExpress .queues-column .queue a.queue-item". T101 v2: the open encounter keeps the
   Classic 2px border in its priority colour (style-pages.css "...queue-item-priority-*.queue-item-selected", (1,5,0),
   outranks the (1,4,2) border rule below) instead of the blue outline. ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item {
    background-color: var(--kh-surface);
    border-top: 1px solid var(--kh-line);
    border-right: 1px solid var(--kh-line);
    border-bottom: 1px solid var(--kh-line);
    border-left-width: 5px;
    border-radius: 0 var(--kh-radius) var(--kh-radius) 0;
    margin-bottom: 4px;
    transition: background-color .15s ease, box-shadow .15s ease;
}

html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item:hover,
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item:focus {
    background-color: var(--kh-primary-soft);
    text-decoration: none;
}

html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item.queue-item-selected {
    background-color: #DCEAF8;
}

/* ---- T156: cards lift slightly on hover (soft shadow on top of the light blue) ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item:hover {
    box-shadow: 0 2px 6px rgba(30, 58, 95, .16);
}

html.kh-theme-modern-2026 #TriageNurseExpress a.queue-item .patient-name {
    color: var(--kh-ink);
    font-weight: 600;
}

html.kh-theme-modern-2026 #TriageNurseExpress a.queue-item .protocol-name,
html.kh-theme-modern-2026 #TriageNurseExpress a.queue-item .time-in-queue {
    color: var(--kh-muted);
}

/* ---- T102: view buttons ("I'm working on", "assigned to my group") in theme blue with tidy count badges; "Other
   Groups" as a matching outlined button ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .views-panel .btn.view-selected {
    background-color: var(--kh-primary);
    background-image: none;
    border-color: var(--kh-primary-strong);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 #TriageNurseExpress .views-panel .btn.view-selected:hover,
html.kh-theme-modern-2026 #TriageNurseExpress .views-panel .btn.view-selected:focus {
    background-color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 #TriageNurseExpress .views-panel .btn .badge {
    background-color: #FFFFFF;
    color: var(--kh-primary-strong);
    font-weight: 700;
}

html.kh-theme-modern-2026 #TriageNurseExpress .views-panel .multiselect.btn {
    background-color: var(--kh-surface);
    background-image: none;
    border-color: var(--kh-primary);
    color: var(--kh-primary);
}

/* ---- T103: button hierarchy - Save to Chart is the main (orange) action; Copy, Close In CareDesk and the box buttons
   (Unassign, Unlink, Add Protocol, Forward, Create New, Set Options) are consistent white outlined buttons. On Encounter
   History the Call Note and Sent Message pop-ups sit inside #Recommendation, so their buttons are excluded (T167;
   :where() keeps the exclusion at zero specificity) and keep the site-wide pop-up styles (T120 orange main button). ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .btn:not(.unload-encounter-btn),
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .btn:not(:where(.modal .btn)) {
    background-color: var(--kh-surface);
    background-image: none;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    color: var(--kh-ink-2);
    font-weight: 600;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .btn:not(.unload-encounter-btn):hover,
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .btn:not(.unload-encounter-btn):focus,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .btn:not(:where(.modal .btn)):hover,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .btn:not(:where(.modal .btn)):focus {
    background-color: var(--kh-primary-soft);
    border-color: var(--kh-primary);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column input.btn[value="Save to Chart"] {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column input.btn[value="Save to Chart"]:hover,
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column input.btn[value="Save to Chart"]:focus {
    background-image: none;
    background-color: var(--kh-accent-strong);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

/* ---- T105: collapsible rows (Paging Instructions, Denies, Reports: a.accordion-header) - light blue sub-header with a
   navy title and a chevron (right when closed, down when open) in place of the plus/minus icon ---- */
html.kh-theme-modern-2026 #TriageNurseExpress a.accordion-header,
html.kh-theme-modern-2026 #EncounterHistory a.accordion-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--kh-radius-sm);
    background-color: var(--kh-subheader);
    color: var(--kh-brand);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

html.kh-theme-modern-2026 #TriageNurseExpress a.accordion-header:hover,
html.kh-theme-modern-2026 #EncounterHistory a.accordion-header:hover {
    background-color: #CFDFF1;
}

html.kh-theme-modern-2026 #TriageNurseExpress a.accordion-header > i[class*="-sign"],
html.kh-theme-modern-2026 #EncounterHistory a.accordion-header > i[class*="-sign"] {
    display: none;
}

html.kh-theme-modern-2026 #TriageNurseExpress a.accordion-header:before,
html.kh-theme-modern-2026 #EncounterHistory a.accordion-header:before {
    content: "\f054";
    font-family: FontAwesome;
    font-size: 10px;
    width: 12px;
    text-align: center;
}

html.kh-theme-modern-2026 #TriageNurseExpress a.accordion-header:has(> i[class*="minus"]):before,
html.kh-theme-modern-2026 #EncounterHistory a.accordion-header:has(> i[class*="minus"]):before {
    content: "\f078";
}

/* ---- T106: section headings ASSESSMENT(S) and PROTOCOLS (h5.title-blue ...ucAssessments_headerText /
   ...ucProtocols_headerText) as navy section labels with a line under. Other h5.title-blue headings on the page (hidden in
   this view) are left alone. ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .patient-history-column h5.title-blue[id$="ucAssessments_headerText"],
html.kh-theme-modern-2026 #TriageNurseExpress .patient-history-column h5.title-blue[id$="ucProtocols_headerText"],
html.kh-theme-modern-2026 #EncounterHistory #PatientHistory h5.title-blue[id$="ucAssessments_headerText"],
html.kh-theme-modern-2026 #EncounterHistory #PatientHistory h5.title-blue[id$="ucProtocols_headerText"] {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

/* ---- T107: Reports list - important responses (li.important, red in Classic) stay red but in the theme's softer red with
   a red bullet; the "AI Notes" lines under them are small grey italic ---- */
html.kh-theme-modern-2026 #TriageNurseExpress li.survey-response-list-item.important,
html.kh-theme-modern-2026 #TriageNurseExpress li.survey-response-list-item.important > span,
html.kh-theme-modern-2026 #EncounterHistory li.survey-response-list-item.important,
html.kh-theme-modern-2026 #EncounterHistory li.survey-response-list-item.important > span {
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 #TriageNurseExpress li.survey-response-list-item.important::marker,
html.kh-theme-modern-2026 #EncounterHistory li.survey-response-list-item.important::marker {
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 #TriageNurseExpress li.survey-response-list-item > .text-info,
html.kh-theme-modern-2026 #EncounterHistory li.survey-response-list-item > .text-info {
    color: var(--kh-muted);
    font-size: 11px;
    font-style: italic;
}

/* ---- T108: quieter empty queues ("No Patients in Queue") ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .empty-queue {
    color: var(--kh-muted);
    font-style: italic;
}

/* ---- T155: empty queues not italic, and lined up with the text on the queue cards (T152 8px inset + 5px bar + 8px
   padding + 1px); Classic padding-left is 28px ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue .empty-queue {
    padding-left: 22px;
    font-style: normal;
}

/* ---- T152: queue cards inset 8px from both column sides; group headings ("NEEDS FOLLOW-UP") start at the same 8px so
   their text lines up with the cards' left edge ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item {
    margin-left: 8px;
    margin-right: 8px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue h4 {
    padding-left: 8px;
}

/* ---- T109: softer location tag on queue cards (was a dark grey badge) ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item .badge {
    background-color: #EEF2F7;
    color: var(--kh-muted);
    font-weight: 600;
}

/* ---- T154: time in queue as a small grey pill (same colours as the T109 tag), 11px. The span is a floated grid column
   (col-md-19), so width auto shrinks it to its text; the "in use" dot stays inside the pill. 16px tall, like the
   Classic time line, so the cards keep their height. ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item span.time-in-queue {
    width: auto;
    padding: 1px 8px;
    border-radius: var(--kh-radius-pill);
    background-color: #EEF2F7;
    color: var(--kh-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
}

/* ---- T110: softer assignee icons on queue cards (PNG images) - faded, full strength on hover ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item .assignee-icon img {
    opacity: .55;
    transition: opacity .15s ease;
}

html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item:hover .assignee-icon img,
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item.queue-item-selected .assignee-icon img {
    opacity: 1;
}

/* ---- T153: smaller, clearer assignee / call-back icons - 20px (26px images plus 3px Classic padding), 4px apart,
   80% strength (T110 was 55%); the T110 hover / selected rule (higher specificity) still gives full strength ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .queues-column .queue a.queue-item .assignee-icon img {
    width: 20px;
    height: 20px;
    margin-left: 4px;
    padding: 0;
    opacity: .8;
}

/* ---- T111: Recommendation checkboxes (span.checkbox-inline > input + label) - theme blue, 6px gap, centred ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column span.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-left: 0;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column span.checkbox-inline > input[type="checkbox"] {
    position: static;
    margin: 0;
    accent-color: var(--kh-primary);
    cursor: pointer;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column span.checkbox-inline > label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

/* ---- T112: Chart Options labels muted, values ink ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .save-to-chart-field > label.lbl,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation label.lbl {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 #TriageNurseExpress .save-to-chart-field > span,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation label.lbl ~ span {
    color: var(--kh-ink);
}

/* ---- T113: page title (patient name) navy semibold instead of orange-red ---- */
html.kh-theme-modern-2026 #TriageNurseExpress div.page-title {
    color: var(--kh-brand);
    font-weight: 600;
}

/* ---- T150: page title lines up with the left edge of the queue column card (T99 adds 12px border-spacing before the
   first column) ---- */
html.kh-theme-modern-2026 #TriageNurseExpress div.page-title {
    padding-left: 12px;
}

/* ---- Save to Chart Options pop-up (#divSetSaveToChartOptionsModal, outside #TriageNurseExpress). T114 (title icon gap)
   is site-wide in modern-2026-base.css. ---- */

/* ---- T115: priority options (td > input[type=radio] + label) - normal dark text, theme blue radios, 6px gap, centred ---- */
html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal td:has(> input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal td > input[type="radio"] {
    margin: 0;
    accent-color: var(--kh-primary);
    cursor: pointer;
}

html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal td > input[type="radio"] + label {
    margin: 0;
    color: var(--kh-ink-2);
    font-weight: 400;
    cursor: pointer;
}

/* ---- T116: Document Sub Type dropdown matches the Assigned Provider box (34px, 12px text) ---- */
html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal select.form-control {
    height: 34px;
    font-size: 12px;
}

/* ---- T117: Set Options is the main (orange) button; Cancel stays white ---- */
html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal .modal-footer input.btn[id$="btnSetSaveToChartOptions"] {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal .modal-footer input.btn[id$="btnSetSaveToChartOptions"]:hover,
html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal .modal-footer input.btn[id$="btnSetSaveToChartOptions"]:focus {
    background-image: none;
    background-color: var(--kh-accent-strong);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

/* ---- T118: less empty space under the last field ---- */
html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal .modal-body {
    padding-bottom: 10px;
}

html.kh-theme-modern-2026 #divSetSaveToChartOptionsModal .modal-body .form-group:last-child {
    margin-bottom: 0;
}

/* ---- Call Note pop-up (#divNewCallNoteModal, CareDesk) ---- */

/* ---- T119: the "Call Note" heading above the box (h4) in the small grey-blue field-label style ---- */
html.kh-theme-modern-2026 #divNewCallNoteModal .call-note-input > h4 {
    margin: 0 0 4px;
    color: var(--kh-muted);
    font-size: 12px;
    font-weight: 600;
}

/* ---- T120: Add Call Note and Save is the main (orange) button; Cancel stays white ---- */
html.kh-theme-modern-2026 #divNewCallNoteModal .modal-footer input.btn[id$="btnAddCallNote"] {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #divNewCallNoteModal .modal-footer input.btn[id$="btnAddCallNote"]:hover,
html.kh-theme-modern-2026 #divNewCallNoteModal .modal-footer input.btn[id$="btnAddCallNote"]:focus {
    background-image: none;
    background-color: var(--kh-accent-strong);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

/* ---- T121: less empty space under the note box (two nested form-groups plus body padding) ---- */
html.kh-theme-modern-2026 #divNewCallNoteModal .modal-body {
    padding-bottom: 12px;
}

html.kh-theme-modern-2026 #divNewCallNoteModal .modal-body .form-group {
    margin-bottom: 0;
}

/* ==========================================================================
   Phone Notes box (CareDesk recommendation column, div.nurse-triage-notes) - trials T123-T128. Markup: h4.boxheader
   (title + a.btn ...btnShowAddPhoneNoteModal "Create New"), ul.note-history > li (recent notes), then #OlderCallHistory
   (a.accordion-header "View Older Call Notes" + .accordion-body > ul.note-history > li). Each li: .row >
   .note-item-header (date/author) + .note-item-actions (delete, edit floated right), then .row.note-item-contents
   (recent: pre.base-format; older: bare text). Classic: .triage-nurse-express ... (0,2,x) - dotted underline, italics.
   ========================================================================== */

/* ---- T127: notes and the "View Older Call Notes" bar share the same 10px inset on both sides ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes ul.note-history {
    margin: 0;
    padding: 0 10px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes #OlderCallHistory > a.accordion-header {
    margin: 8px 10px 0;
    border: 1px solid var(--kh-line);
}

html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes #OlderCallHistory > .accordion-body {
    padding: 0;
}

/* ---- T123: every note is a soft white card instead of a dotted underline ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes ul.note-history > li,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation ul.note-history > li {
    margin: 8px 0;
    padding: 8px 10px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
}

/* ---- T165 (both pages): empty-state lines ("Encounter has not been forwarded", "No Messages" - an li with only text) are
   plain grey text, not white cards that look like text boxes ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes ul.note-history > li:not(:has(*)),
html.kh-theme-modern-2026 #EncounterHistory #Recommendation ul.note-history > li:not(:has(*)) {
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    color: var(--kh-muted);
}

/* ---- T124: one note text style - 13px, upright, dark; the recent note's pre loses its own white box but keeps the
   line breaks the user typed (white-space: pre-wrap stays) ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes .note-item-contents,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .note-item-contents {
    padding-top: 4px;
    color: var(--kh-ink);
    font-size: 13px;
    font-style: normal;
    line-height: 19px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes .note-item-contents > pre,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .note-item-contents > pre {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    color: inherit;
    font-size: inherit;
    font-style: inherit;
    line-height: inherit;
}

/* ---- T125: date and author line - 11px muted grey ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes div.note-item-header,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation div.note-item-header {
    color: var(--kh-muted);
    font-size: 11px;
    line-height: 20px;
}

/* ---- T126: edit / delete - 11px with a larger click area; delete turns muted red on hover ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes div.note-item-actions {
    font-size: 11px;
    line-height: 20px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes div.note-item-actions > a[id*="PhoneNote"] {
    padding: 0 4px;
    border-radius: var(--kh-radius-sm);
    text-decoration: none;
}

html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes div.note-item-actions > a[id*="PhoneNote"]:hover,
html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes div.note-item-actions > a[id*="PhoneNote"]:focus {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes div.note-item-actions > a[id$="btnDeletePhoneNote"]:hover,
html.kh-theme-modern-2026 #TriageNurseExpress .nurse-triage-notes div.note-item-actions > a[id$="btnDeletePhoneNote"]:focus {
    background-color: var(--kh-alert-soft);
    color: var(--kh-alert);
}

/* ---- T128 / T128b: buttons on the navy box headers (Unlink, Add Protocol, Forward, Create New, Set Options) are
   lighter outlined buttons, 12px; Create New also gets a plus icon. Outranks the T103 white button rule (1,4,1) and
   its hover (1,5,1). ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column h4.boxheader .btn {
    height: 24px;
    padding: 2px 10px;
    border: 1px solid rgba(255, 255, 255, .7);
    background-color: transparent;
    background-image: none;
    color: var(--kh-brand-ink);
    font-size: 12px;
    line-height: 18px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column h4.boxheader .btn:hover,
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column h4.boxheader .btn:focus {
    border-color: var(--kh-brand-ink);
    background-color: rgba(255, 255, 255, .15);
    color: var(--kh-brand-ink);
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .nurse-triage-notes h4.boxheader a.btn[id$="btnShowAddPhoneNoteModal"]:before {
    content: "\f067";
    margin-right: 5px;
    font-family: FontAwesome;
    font-size: 10px;
    font-weight: 400;
}

/* ==========================================================================
   Forward encounter pop-up (#divEncounterForwardingModal, .modal-dialog.wide-modal) - trials T129-T135. Body:
   .encounter-forwarding-selection > search rows (h3 + .row with input.search-box.input-lg and input.btn-lg "Search"),
   <br>, [id$="pnlSearchResults"] > ul.nav-tabs, <br>, .tab-content > two GridView tables (user groups, providers),
   last column input.btn.btn-link[id*="btnSelect"]. Classic: .wide-modal is 1800px wide on big screens; search box
   26px / 45px tall (style-pages.css).
   ========================================================================== */

/* ---- T129: narrower pop-up - capped at 960px (the Classic responsive widths still apply below that) ---- */
html.kh-theme-modern-2026 #divEncounterForwardingModal .modal-dialog {
    max-width: 960px;
}

/* ---- T130: the "Search for group or provider by name" heading becomes a small muted field label ---- */
html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection h3 {
    margin: 0 0 4px;
    color: var(--kh-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}

/* ---- T131: search box and Search button the same height (34px), button right next to the box ---- */
html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection .row:has(> div > .search-box) {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection .row:has(> div > .search-box):before,
html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection .row:has(> div > .search-box):after {
    content: none;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection .row:has(> div > .search-box) > div {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection .row:has(> div > .search-box) > div:has(> .search-box) {
    flex: 1 1 auto;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection input.search-box {
    height: 34px;
    padding: 6px 10px;
    font-size: 14px;
    line-height: 20px;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection input.btn[id$="btnSearch"] {
    margin: 0;
    padding: 6px 20px;
    font-size: 13px;
    line-height: 20px;
}

/* ---- T132: underline tabs - navy text with an orange line for the active tab; the <br> gaps above and below the tabs
   are hidden and replaced with margins ---- */
html.kh-theme-modern-2026 #divEncounterForwardingModal .encounter-forwarding-selection > br,
html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > br {
    display: none;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs {
    margin: 14px 0 10px;
    border-bottom: 1px solid var(--kh-line);
}

html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs > li > a,
html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs > li > a:hover,
html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs > li > a:focus {
    margin: 0 18px 0 0;
    padding: 6px 2px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background-color: transparent;
    color: var(--kh-muted);
    font-size: 13px;
    font-weight: 600;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs > li > a:hover,
html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs > li > a:focus {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs > li.active > a,
html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs > li.active > a:hover,
html.kh-theme-modern-2026 #divEncounterForwardingModal [id$="pnlSearchResults"] > ul.nav-tabs > li.active > a:focus {
    border-bottom-color: var(--kh-accent);
    color: var(--kh-brand);
}

/* ---- T133: results table - cells centred vertically, the Select column only as wide as its button and right-aligned,
   soft blue row highlight on hover ---- */
html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content table.table > tbody > tr > th,
html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content table.table > tbody > tr > td {
    vertical-align: middle;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content table.table > tbody > tr > th:last-child,
html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content table.table > tbody > tr > td:last-child {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content table.table > tbody > tr.rowstyle:hover > td {
    background-color: var(--kh-primary-soft);
}

/* ---- T134: Select is a small outlined button (white, blue border; soft blue on hover) instead of bold link text ---- */
html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content input.btn[id*="btnSelect"] {
    padding: 3px 14px;
    border: 1px solid var(--kh-primary);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    background-image: none;
    color: var(--kh-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-decoration: none;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content input.btn[id*="btnSelect"]:hover,
html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content input.btn[id*="btnSelect"]:focus {
    border-color: var(--kh-primary-strong);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

/* ---- T135: no extra space under the table (table margin 21px + form-group margin 10px) ---- */
html.kh-theme-modern-2026 #divEncounterForwardingModal .tab-content table.table {
    margin-bottom: 0;
}

html.kh-theme-modern-2026 #divEncounterForwardingModal .modal-body .form-group {
    margin-bottom: 0;
}

/* ==========================================================================
   Encounter summary hover pop-over (all pages) - trials T136-T141. rc-tooltip (mounted on body, outside #TicketApp) >
   .rc-tooltip-inner > div[min-width 400px] > .skinny-well > .encounter-summary.skinny-well (inline overflow-y auto,
   max-height 700px; EncounterSummary.jsx). Used by the Ticket encounter history list, CareDesk queues and returned-call
   rows. Encounter summaries embedded in pages (not in an rc-tooltip) are not affected.
   ========================================================================== */

/* ---- T136: card frame - light border, 8px corners, soft shadow, more padding; thin light scrollbar on the scrolling
   summary (a little right padding keeps text off the scrollbar); arrow in the border colour ---- */
html.kh-theme-modern-2026 .rc-tooltip-inner:has(.encounter-summary) {
    padding: 12px 6px 12px 14px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow);
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary {
    padding-right: 8px;
    color: var(--kh-ink-2);
    scrollbar-width: thin;
    scrollbar-color: var(--kh-line-strong) transparent;
}

html.kh-theme-modern-2026 .rc-tooltip-placement-left:has(.encounter-summary) .rc-tooltip-arrow {
    border-left-color: var(--kh-line-strong);
}

html.kh-theme-modern-2026 .rc-tooltip-placement-right:has(.encounter-summary) .rc-tooltip-arrow {
    border-right-color: var(--kh-line-strong);
}

/* ---- T137: section headings - navy, small bold capitals with a thin line under (same as the CareDesk T106 section
   labels); h6 sub-headings navy without the line ---- */
html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h5.title-blue,
html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h3.title-blue {
    margin: 12px 0 8px;
    padding: 0 0 4px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 18px;
    text-transform: uppercase;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h6.title-blue {
    margin: 6px 0 4px;
    padding: 0;
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
}

/* ---- T138: labels grey, values dark (same as the Existing Encounters pop-up) ---- */
html.kh-theme-modern-2026 .rc-tooltip .encounter-summary .lbl {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary .val {
    color: var(--kh-ink);
}

/* ---- T139: "Encounter ID: 1034438" (and "User Group:") on one line ---- */
html.kh-theme-modern-2026 .rc-tooltip .encounter-summary > .row:first-child > div {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary > .row:first-child > div > div:not(.lbl) {
    color: var(--kh-ink);
    font-weight: 600;
}

/* ---- T140: patient fields in four even columns that line up row to row (Name spans two) ---- */
html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h5.title-blue + .row:has(> [class*="col-sm-"]) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 12px;
    margin: 0;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h5.title-blue + .row:has(> [class*="col-sm-"]):before,
html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h5.title-blue + .row:has(> [class*="col-sm-"]):after {
    content: none;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h5.title-blue + .row:has(> [class*="col-sm-"]) > [class*="col-sm-"] {
    float: none;
    width: auto;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    overflow-wrap: anywhere;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h5.title-blue + .row:has(> [class*="col-sm-"]) > .col-sm-20 {
    grid-column: span 2;
}

/* ---- T141: Reported / Denied / Care Advice sections look like the Ticket page's nested sections - light blue header,
   navy title, chevron (right closed, down open), white body, theme border ---- */
html.kh-theme-modern-2026 .rc-tooltip .encounter-summary .react-sanfona {
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    box-shadow: none;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h3.react-sanfona-item-title {
    padding: 7px 10px;
    border-bottom: 1px solid var(--kh-line);
    background-color: var(--kh-subheader);
    background-image: none;
    color: var(--kh-brand);
    font-size: var(--kh-subheader-font-size);
    font-weight: 700;
    line-height: 18px;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h3.react-sanfona-item-title:hover {
    background-color: #CFDFF1;
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h3.react-sanfona-item-title:before,
html.kh-theme-modern-2026 .rc-tooltip .encounter-summary h3.react-sanfona-item-title:hover:before {
    content: "\f054";
    display: inline-block;
    width: 20px;
    margin: 0;
    color: var(--kh-brand);
    font-family: FontAwesome;
    font-size: 10px;
    font-weight: 400;
    text-align: center;
    vertical-align: 1px;
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary .react-sanfona-item-expanded > h3.react-sanfona-item-title:before {
    content: "\f078";
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary .react-sanfona > .react-sanfona-item:first-child > h3.react-sanfona-item-title {
    border-top-left-radius: calc(var(--kh-radius) - 1px);
    border-top-right-radius: calc(var(--kh-radius) - 1px);
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary .react-sanfona > .react-sanfona-item:last-child:not(.react-sanfona-item-expanded) > h3.react-sanfona-item-title {
    border-bottom: 0;
    border-bottom-left-radius: calc(var(--kh-radius) - 1px);
    border-bottom-right-radius: calc(var(--kh-radius) - 1px);
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary .react-sanfona-item-body {
    border-bottom-left-radius: calc(var(--kh-radius) - 1px);
    border-bottom-right-radius: calc(var(--kh-radius) - 1px);
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 .rc-tooltip .encounter-summary .react-sanfona-item-body-wrapper {
    padding: 8px 10px;
    border: 0;
}

/* ==========================================================================
   CareDesk Recommendation column, round 3 - trials T144-T149 (T143 declined). Must stay after the T128b header-button
   rules (same specificity, later wins). Markup: div.tne-right-column-div (Assigned to / linked patient lines),
   h4.boxheader (Classic: margin-top 15px, padding 5px and margin-bottom 2px are !important in style-pages.css, so they
   are left alone), .nurse-triage-notes > span.checkbox-inline, ul.note-history, .alert.interviewee-declined-secured-
   message-contact, .save-to-chart-fields > .save-to-chart-field (label.lbl, br, span), .page-actions > .page-action
   (floated right, two empty spacers).
   ========================================================================== */

/* ---- T146-alt: section headers light blue with navy text (the RECOMMENDATION column header stays navy); header
   buttons become white with a navy outline ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column h4.boxheader,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation h4.boxheader {
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-subheader);
    background-image: none;
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column h4.boxheader .btn,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation h4.boxheader .btn {
    border: 1px solid var(--kh-line-strong);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column h4.boxheader .btn:hover,
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column h4.boxheader .btn:focus,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation h4.boxheader .btn:hover,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation h4.boxheader .btn:focus {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

/* ---- T144: one inset for section content (supersedes the T127 10px inset for notes). T168: like Encounter History
   (T165), the column content - light blue section headers and bottom buttons - sits 12px in from the column sides
   ([id$="pnlForms"] padding; the Classic 2px nurse-section padding is removed), and section content lines up with the
   header titles (header 1px border + 5px Classic !important padding = 6px), so the content inset is 6px (was 12px). ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column [id$="pnlForms"] {
    padding-left: 12px;
    padding-right: 12px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .nurse-section {
    padding-left: 0;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .tne-right-column-div {
    padding: 4px 6px 0;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .nurse-triage-notes:has(> span.checkbox-inline) {
    padding-left: 6px;
    padding-right: 6px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .nurse-triage-notes ul.note-history {
    padding: 0 6px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .nurse-triage-notes #OlderCallHistory > a.accordion-header {
    margin-left: 6px;
    margin-right: 6px;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .alert.interviewee-declined-secured-message-contact {
    margin: 8px 6px 0;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .save-to-chart-fields,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .save-to-chart-fields {
    margin: 0;
    padding: 4px 6px 0;
}

/* ---- T145: no empty line under Linked EMR Patient when no patient name is shown ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column [id$="pnlLinkedPatient"]:has(span[id$="lblLinkedPatient"]:empty) {
    display: none;
}

/* ---- T147: Chart Options as compact rows - grey label on the left, value on the right, thin line between rows ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .save-to-chart-field,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .save-to-chart-fields > div {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px solid var(--kh-line);
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .save-to-chart-field:last-child,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .save-to-chart-fields > div:last-child {
    border-bottom: 0;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .save-to-chart-field > br,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .save-to-chart-fields > div > br {
    display: none;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .save-to-chart-field > label.lbl,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .save-to-chart-fields > div > label.lbl {
    margin: 0;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .save-to-chart-field > span,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .save-to-chart-fields > div > span {
    margin-left: auto;
    text-align: right;
}

/* ---- T148: bottom buttons - empty spacer slots hidden so Save to Chart lines up with the headers' right edge; 8px
   between buttons ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .page-actions > .page-action:not(:has(*)),
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .page-actions > .page-action:not(:has(*)) {
    display: none;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column .page-actions > .page-action,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .page-actions > .page-action {
    padding-left: 8px;
}

/* ---- T149: "Assigned to:" grey, assignee name dark ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column span[id$="lblEncounterAssignmentDescription"] {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 #TriageNurseExpress .recommendation-column span[id$="lblEncounterAssignee"] {
    color: var(--kh-ink);
    font-weight: 600;
}

/* ==========================================================================
   Encounter History page (Providers/EncounterHistory.aspx, body.encounter-history #EncounterHistory) - trials
   T157-T162. Option B: the parts shared with CareDesk (column/box headers and column cards T98/T99, Patient Information
   T100/T105-T107, Recommendation T103/T112/T123-T125/T144/T146-alt/T147/T148) are extra selectors on the CareDesk rules
   above. Below are the page-only rules. Markup: h3#pageTitle.page-title; table#Dashboard > td.dashboard-column (filters:
   [id$="pnlFilterForm"]; td#EncounterList > .encounter-list-items > a.list-item(.list-item-selected); td#PatientHistory;
   td#Recommendation, the read-only EncounterRecommendationInfoBox: h4.boxheader + .boxcontent / .nurse-triage-notes /
   .save-to-chart-fields > div). Classic: providers/encounter-history.css "body.encounter-history #EncounterHistory ...";
   h4.boxheader margin-top 25px, padding 5px and margin-bottom 2px are !important there and are left alone.
   ========================================================================== */

/* ---- T157: page title navy semibold, lined up with the first column card (T99 border-spacing 12px) ---- */
html.kh-theme-modern-2026 #EncounterHistory h3.page-title {
    padding-left: 12px;
    color: var(--kh-brand);
    font-weight: 600;
}

/* ---- T159: Filters - "Encounter" / "Patient" group headings as small navy section labels with a light line; field
   labels grey; light theme lines; checkboxes theme blue with a 6px gap ---- */
html.kh-theme-modern-2026 #EncounterHistory [id$="pnlFilterForm"] h4.border-bottom {
    margin: 6px 0 0;
    padding-bottom: 4px;
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

html.kh-theme-modern-2026 #EncounterHistory [id$="pnlFilterForm"] .border-bottom {
    border-bottom-color: var(--kh-line);
}

html.kh-theme-modern-2026 #EncounterHistory [id$="pnlFilterForm"] span.lbl,
html.kh-theme-modern-2026 #EncounterHistory [id$="pnlFilterForm"] label:not(input + label) {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 #EncounterHistory [id$="pnlFilterForm"] table.checkboxes input[type="checkbox"] {
    margin: 0 6px 0 0;
    vertical-align: -2px;
    accent-color: var(--kh-primary);
    cursor: pointer;
}

html.kh-theme-modern-2026 #EncounterHistory [id$="pnlFilterForm"] table.checkboxes input[type="checkbox"] + label {
    margin: 0;
    padding: 0;
    font-weight: 400;
    cursor: pointer;
}

/* ---- T160: encounter list as cards - white, 5px left bar (Classic teal kept), rounded right corners, 4px apart, 8px in
   from the column sides; light blue + soft shadow on hover; date as a grey pill (the saved-to-EMR icon moves to the card's
   top right corner); name dark semibold, other lines grey; thin scrollbar. Selected (T160-sel): light blue background
   with the Classic 2px teal border and bold name. Selectors include .encounter-list-items to outrank Classic (2,2,2). ---- */
html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items {
    padding-top: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--kh-line-strong) transparent;
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item {
    position: relative;
    margin: 0 8px 4px;
    padding: 6px 10px;
    border-top: 1px solid var(--kh-line);
    border-right: 1px solid var(--kh-line);
    border-bottom: 1px solid var(--kh-line);
    border-left: 5px solid #72CCD5;
    border-radius: 0 var(--kh-radius) var(--kh-radius) 0;
    background-color: var(--kh-surface);
    color: var(--kh-ink-2);
    transition: background-color .15s ease, box-shadow .15s ease;
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item:hover,
html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item:focus {
    background-color: var(--kh-primary-soft);
    box-shadow: 0 2px 6px rgba(30, 58, 95, .16);
    text-decoration: none;
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item.list-item-selected {
    border-top: 2px solid #72CCD5;
    border-right: 2px solid #72CCD5;
    border-bottom: 2px solid #72CCD5;
    background-color: #DCEAF8;
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item span.encounter-date {
    position: static;
    display: inline-block;
    float: none;
    width: auto;
    margin-bottom: 4px;
    padding: 1px 8px;
    border-radius: var(--kh-radius-pill);
    background-color: #EEF2F7;
    color: var(--kh-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item span.encounter-date > img {
    position: absolute;
    top: 7px;
    right: 8px;
    padding: 0;
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item span.patient-name {
    color: var(--kh-ink);
    font-weight: 600;
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item.list-item-selected span.patient-name {
    font-weight: 700;
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .encounter-list-items a.list-item :is(span.protocol-name, span.startedby-name, span.closedby-name, .text-sm) {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #EncounterHistory #EncounterList .empty-list {
    padding-left: 22px;
    color: var(--kh-muted);
}

/* ---- T162 (page-only parts): Recommendation content 12px in from the header edges; notes lists without their own
   inset; header buttons sized for their inline "padding: 5px" (Create New); no Classic 5px right margin on the bottom
   buttons (T148 gives the 8px gap) ---- */
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .boxcontent {
    padding: 6px 12px 0;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation .nurse-triage-notes {
    padding: 0 12px;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation ul.note-history {
    margin: 0;
    padding: 0;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation h4.boxheader .btn {
    height: auto;
    border-radius: var(--kh-radius);
    font-size: 12px;
    font-weight: 600;
    line-height: 12px;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation .page-actions > .page-action {
    margin-right: 0;
}

/* ---- T163: Filters and Patient Information content 12px in from the column card's sides (was 1px left / 5px right
   for Filters, 1px for the Patient Information bars); the navy column headers stay full width ---- */
html.kh-theme-modern-2026 #EncounterHistory [id$="pnlFilterForm"] {
    padding-left: 12px;
    padding-right: 12px;
}

html.kh-theme-modern-2026 #EncounterHistory #PatientHistory [id$="ucEncounterDetails_pnlEncounterPatientHistoryDetails"] {
    padding-left: 12px;
    padding-right: 12px;
}

/* ---- T166 (both pages, shared encounter-details control): the red required "*" after "LOCATION" (span.error,
   line-height 26px) made that label's line taller and pushed its text 6px below "ENCOUNTER ID"; it now uses the label's
   line height so the two labels line up ---- */
html.kh-theme-modern-2026 #TriageNurseExpress .info-box h4 > span.error,
html.kh-theme-modern-2026 #EncounterHistory .info-box h4 > span.error {
    line-height: inherit;
}

/* ---- T165: Encounter History Recommendation panel
   - Not flush: the panel content (light blue section headers and bottom buttons) sits 12px in from the column sides,
     like Filters and Patient Information (T163). Section content then lines up with the header titles (header 1px
     border + 5px Classic !important padding = 6px), so the T162 12px content inset becomes 6px here.
   - The empty line (<br>) between RECOMMENDATION and PROTOCOLS is hidden.
   - Empty states ("Encounter has not been forwarded", "No Messages": li with no child elements; "No Phone Notes": bare
     text) are plain grey text instead of white note cards (the empty-state rule for both pages is with T123).
   - Re-Open, the main action on this read-only page, is orange like Save to Chart on CareDesk; Copy stays white. ---- */
html.kh-theme-modern-2026 #EncounterHistory #Recommendation [id$="pnlRecommendation"] {
    padding-left: 12px;
    padding-right: 12px;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation .boxcontent {
    padding: 6px 6px 0;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation .nurse-triage-notes {
    padding: 6px 6px 0;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation [id$="pnlEncounterRecommendation"] > br {
    display: none;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation .call-note-history > .boxcontent {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation .call-note-history > .boxcontent:not(:has(ul)) {
    padding-top: 10px;
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation .page-actions input.btn[id$="btnReOpenEncounterStart"] {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #EncounterHistory #Recommendation .page-actions input.btn[id$="btnReOpenEncounterStart"]:hover,
html.kh-theme-modern-2026 #EncounterHistory #Recommendation .page-actions input.btn[id$="btnReOpenEncounterStart"]:focus {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
}

/* ==========================================================================
   Overwatch page (Pages/Management/Manage/Overwatch, React #OverwatchApp inside .main-content.container-fluid) - trials
   T169-T174 (T175, the footer on short pages, is site-wide in modern-2026-base.css; the header/menu/footer width for
   T169 is in the T9 rule in modern-2026-ticket.css). Markup: .page-title; Role Type (label.control-label +
   select#ddlRoleType.form-control); two .row of four [class*="col-"] > .metrics-card.metrics-card-striped-gray
   (.card-header, .card-subheader, .metric-card-value > span.warning-green / .warning-red, .metric-card-goal); a
   table.table.table-striped.table-bordered.gridviewdarkgray with span.warning-red handle times and an i.icon-zoom-in
   encounter summary column (T136 pop-over). Classic: style.less .metrics-card* (fixed heights, all-small-caps labels,
   Red / Green values). metrics-card is shared, so these rules are scoped to #OverwatchApp.
   ========================================================================== */

/* ---- T169: content the same width as the header, menu and footer (T9: 24px side margins, up to 2200px). The Classic
   .main-content side padding (0 left / 25px right) is removed on this page so the content centres like .container; the
   inner grid column's padding is 5px so the title and tiles start under the logo. ---- */
@media (min-width: 1200px) {
    html.kh-theme-modern-2026 body:has(#OverwatchApp) .main-content {
        padding-left: 0;
        padding-right: 0;
    }

    html.kh-theme-modern-2026 #OverwatchApp {
        width: calc(100% - 48px);
        max-width: 2200px;
        margin-left: auto;
        margin-right: auto;
        padding-right: 0;
    }

    /* #OverwatchApp has an inline padding-left: 15px; the -10px margin (and 10px extra width) cancels all but 5px of it */
    html.kh-theme-modern-2026 #OverwatchApp > [class*="col-"] {
        width: calc(100% + 10px);
        margin-left: -10px;
        padding-left: 0;
        padding-right: 5px;
    }
}

/* ---- T170: page title navy semibold ---- */
html.kh-theme-modern-2026 #OverwatchApp .page-title {
    color: var(--kh-brand);
    font-weight: 600;
}

/* ---- T171: stat tiles as white cards in four equal columns (two on small screens) with 12px gaps; small grey capital
   labels, 28px semibold numbers, grey sub-labels; no grey top bar ---- */
html.kh-theme-modern-2026 #OverwatchApp .row:has(> [class*="col-"] > .metrics-card) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 12px;
}

@media (max-width: 991px) {
    html.kh-theme-modern-2026 #OverwatchApp .row:has(> [class*="col-"] > .metrics-card) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

html.kh-theme-modern-2026 #OverwatchApp .row:has(> [class*="col-"] > .metrics-card):before,
html.kh-theme-modern-2026 #OverwatchApp .row:has(> [class*="col-"] > .metrics-card):after {
    content: none;
}

html.kh-theme-modern-2026 #OverwatchApp .row:has(> [class*="col-"] > .metrics-card) > [class*="col-"] {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
}

html.kh-theme-modern-2026 #OverwatchApp .metrics-card {
    height: 100%;
    min-height: 104px;
    margin: 0;
    padding: 14px 12px 12px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 #OverwatchApp .metrics-card .card-header {
    color: var(--kh-muted);
    font-size: 11px;
    font-variant: normal;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 16px;
    text-transform: uppercase;
}

html.kh-theme-modern-2026 #OverwatchApp .metrics-card .metric-card-value {
    margin-top: 6px;
    color: var(--kh-ink);
    font-size: 28px;
    font-weight: 600;
    line-height: 34px;
}

html.kh-theme-modern-2026 #OverwatchApp .metrics-card :is(.card-subheader, .metric-card-goal) {
    color: var(--kh-muted);
    font-size: 11px;
}

/* ---- T172: OK / over-goal colours in the theme's green and red (same meaning); over-goal handle times in the table
   semibold ---- */
html.kh-theme-modern-2026 #OverwatchApp .warning-green {
    color: var(--kh-ok);
}

html.kh-theme-modern-2026 #OverwatchApp .warning-red {
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 #OverwatchApp table .warning-red {
    font-weight: 600;
}

/* ---- T173: table as a white card with rounded corners (separate borders so the corners round; inner lines only),
   light blue row hover, narrow centred magnifier column ---- */
html.kh-theme-modern-2026 #OverwatchApp table.table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    overflow: hidden;
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 #OverwatchApp table.table tr > :is(th, td) {
    border-width: 0 0 1px 1px;
    border-style: solid;
    border-color: var(--kh-line);
    vertical-align: middle;
}

html.kh-theme-modern-2026 #OverwatchApp table.table tr > :is(th, td):first-child {
    border-left-width: 0;
}

html.kh-theme-modern-2026 #OverwatchApp table.table tr:last-child > td {
    border-bottom-width: 0;
}

html.kh-theme-modern-2026 #OverwatchApp table.table tr:has(> td):hover > td {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #OverwatchApp table.table tr > :is(th, td):last-child:is(:has(> i.icon-zoom-in), th) {
    width: 1%;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
    white-space: nowrap;
}

/* ---- T174: Role Type label grey like other filter labels ---- */
html.kh-theme-modern-2026 #OverwatchApp label.control-label {
    color: var(--kh-muted);
    font-weight: 600;
}

/* ==========================================================================
   Login page (Default.aspx: patient login and registration control) - trials T176-T182, option B (the card is styled
   whatever it contains; a combined login + registration card stacks its columns inside the narrower card). Markup:
   #divPatientLoginAndRegistration.container.splash > .row > #divPatientRegistrationLogin > .container >
   #divPatientRegistrationLoginWell.well.col-md-offset-2.col-md-44 > .row > div > div > [id$="divLoginForm"]
   (col-sm-offset-13 col-sm-22 col-md-offset-16 col-md-16) > div > h5 "Login", .form-group (label.control-label +
   input.form-control.input-lg), input.btn-lg[id$="btnSignIn"] + a[id$="btnShowResetPasswordModal"]. The Reset Password
   (#divResetPasswordModal) and Too Many Invalid Attempts (#divLockedOutModal) pop-ups sit inside the card.
   ========================================================================== */

/* ---- T176 / T181: compact centred card (about 420px), 8px corners, soft shadow, 28px padding, 48px below the header;
   the grid columns inside stack at full card width ---- */
html.kh-theme-modern-2026 #divPatientRegistrationLogin #divPatientRegistrationLoginWell {
    float: none;
    width: auto;
    max-width: 420px;
    margin: 48px auto 24px;
    padding: 28px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow);
}

html.kh-theme-modern-2026 #divPatientRegistrationLoginWell > .row {
    margin: 0;
}

/* The Classic .main-content right padding (25px) pushed the centred card 12px left of the page centre */
html.kh-theme-modern-2026 .main-content:has(#divPatientRegistrationLoginWell) {
    padding-right: 0;
}

html.kh-theme-modern-2026 #divPatientRegistrationLoginWell > .row > div > div > [class*="col-"] {
    float: none;
    width: auto;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
}

/* ---- T177: "Login" as the card title ---- */
html.kh-theme-modern-2026 #divPatientRegistrationLoginWell [id$="divLoginForm"] h5 {
    margin: 0 0 18px;
    color: var(--kh-brand);
    font-size: 20px;
    font-weight: 600;
    line-height: 26px;
}

/* ---- T178: labels grey semibold, 4px above the field ---- */
html.kh-theme-modern-2026 #divPatientRegistrationLoginWell label.control-label {
    margin-bottom: 4px;
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 #divPatientRegistrationLoginWell label.control-label > label {
    margin: 0;
    color: inherit;
    font-weight: inherit;
}

/* ---- T179: fields 40px tall, 14px text ---- */
html.kh-theme-modern-2026 #divPatientRegistrationLoginWell input.form-control {
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 22px;
}

html.kh-theme-modern-2026 #divPatientRegistrationLoginWell [id$="divLoginForm"] .form-group {
    margin-bottom: 16px;
}

/* ---- T180: Log In full width, 40px, 15px semibold (still orange); "Forgot your password?" centred on its own line ---- */
html.kh-theme-modern-2026 #divPatientRegistrationLoginWell input.btn[id$="btnSignIn"] {
    display: block;
    width: 100%;
    height: 40px;
    margin: 4px 0 0;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    line-height: 38px;
}

html.kh-theme-modern-2026 #divPatientRegistrationLoginWell a[id$="btnShowResetPasswordModal"] {
    display: block;
    margin-top: 12px;
    text-align: center;
}

/* ---- T182: Reset Password / Too Many Invalid Attempts pop-ups - "Reset and Email me my Password" is the orange main
   button (like T120); Cancel / Wait stay white ---- */
html.kh-theme-modern-2026 :is(#divResetPasswordModal, #divLockedOutModal) .modal-footer input.btn:is([id$="btnResetAndEmailPassword"], [id$="btnResetPasswordFromLockout"]) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 :is(#divResetPasswordModal, #divLockedOutModal) .modal-footer input.btn:is([id$="btnResetAndEmailPassword"], [id$="btnResetPasswordFromLockout"]):is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
}

/* ---- T305L: Login.aspx (staff / direct login: .container > .well > .row > col-md-offset-14 col-md-20 > fieldset >
   h4 "Login" + the same Login user control) styled like the home page login card (T176-T180): compact centred card,
   card title, grey labels, 40px fields, full-width Log In, "Forgot your password?" centred below ---- */
html.kh-theme-modern-2026 .main-content > .container > .well:has([id$="liLogin_pnlLogin"]) {
    float: none;
    width: auto;
    max-width: 420px;
    margin: 48px auto 24px;
    padding: 28px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow);
}

html.kh-theme-modern-2026 .main-content:has(> .container > .well [id$="liLogin_pnlLogin"]) {
    padding-right: 0;
}

html.kh-theme-modern-2026 .main-content > .container > .well:has([id$="liLogin_pnlLogin"]) > .row {
    margin: 0;
}

html.kh-theme-modern-2026 .main-content > .container > .well:has([id$="liLogin_pnlLogin"]) > .row > [class*="col-"] {
    float: none;
    width: auto;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
}

html.kh-theme-modern-2026 .main-content > .container > .well:has([id$="liLogin_pnlLogin"]) fieldset > div > h4 {
    margin: 0 0 18px;
    color: var(--kh-brand);
    font-size: 20px;
    font-weight: 600;
    line-height: 26px;
}

html.kh-theme-modern-2026 .main-content > .container > .well:has([id$="liLogin_pnlLogin"]) fieldset > br {
    display: none;
}

html.kh-theme-modern-2026 [id$="liLogin_pnlLogin"] label.control-label {
    margin-bottom: 4px;
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 [id$="liLogin_pnlLogin"] label.control-label > label {
    margin: 0;
    color: inherit;
    font-weight: inherit;
}

html.kh-theme-modern-2026 [id$="liLogin_pnlLogin"] > div > .form-group {
    margin-bottom: 16px;
}

html.kh-theme-modern-2026 [id$="liLogin_pnlLogin"] > div > .form-group > input.form-control {
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 22px;
}

html.kh-theme-modern-2026 [id$="liLogin_pnlLogin"] input.btn[id$="btnSignIn"] {
    display: block;
    width: 100%;
    height: 40px;
    margin: 4px 0 0;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    line-height: 38px;
}

html.kh-theme-modern-2026 [id$="liLogin_pnlLogin"] a[id$="btnShowResetPasswordModal"] {
    display: block;
    margin-top: 12px;
    text-align: center;
}

/* ---- T306F: FAQ page (FAQ.aspx: #divAllContent > .col-md-48 > .faq-content > h1, br, then h3 question + p answer pairs).
   A centred card like the login card but wider (760px) for reading; title navy; each question navy 16px 600 with a
   light divider between pairs; answers 14px ink-2 with 1.6 line height; the empty <br> spacers hidden ---- */
html.kh-theme-modern-2026 #divAllContent > [class*="col-"]:has(> .faq-content) {
    float: none;
    width: auto;
    padding: 0 16px;
}

html.kh-theme-modern-2026 #divAllContent .faq-content {
    max-width: 760px;
    margin: 40px auto 32px;
    padding: 28px 32px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow);
}

/* Classic .main-content right padding pushed the centred card left of the page centre */
html.kh-theme-modern-2026 .main-content:has(#divAllContent .faq-content) {
    padding-right: 0;
    padding-left: 0;
}

html.kh-theme-modern-2026 #divAllContent .faq-content > br {
    display: none;
}

html.kh-theme-modern-2026 #divAllContent .faq-content > h1 {
    margin: 0 0 8px;
    color: var(--kh-brand);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

html.kh-theme-modern-2026 #divAllContent .faq-content > h3 {
    margin: 0;
    padding-top: 18px;
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

html.kh-theme-modern-2026 #divAllContent .faq-content > p + h3 {
    margin-top: 18px;
    border-top: 1px solid var(--kh-line);
}

html.kh-theme-modern-2026 #divAllContent .faq-content > p {
    margin: 6px 0 0;
    color: var(--kh-ink-2);
    font-size: 14px;
    line-height: 1.6;
}

@media screen and (max-width: 500px) {
    html.kh-theme-modern-2026 #divAllContent .faq-content {
        margin-top: 20px;
        padding: 20px;
    }
}

/* ---- T307C: Contact page (Contact.aspx: #divAllContent > .col-md-48 > .contact > h1, br, [optional password-reset
   panel: h3 + p], br, h3 "For health questions...", then the account's generated address block (div.address with the
   name in <b> and <br> lines, div.contact-info with phone / web lines)). Same centred card as the FAQ page; section
   headings navy 16px; the address block a light blue panel with the practice name navy, details 14px ink-2 ---- */
html.kh-theme-modern-2026 .main-content:has(#divAllContent .contact) {
    padding-right: 0;
    padding-left: 0;
}

html.kh-theme-modern-2026 #divAllContent > [class*="col-"]:has(> .contact) {
    float: none;
    width: auto;
    padding: 0 16px;
}

html.kh-theme-modern-2026 #divAllContent .contact {
    max-width: 760px;
    margin: 40px auto 32px;
    padding: 28px 32px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow);
}

html.kh-theme-modern-2026 #divAllContent .contact > br {
    display: none;
}

html.kh-theme-modern-2026 #divAllContent .contact > h1 {
    margin: 0 0 8px;
    color: var(--kh-brand);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

html.kh-theme-modern-2026 #divAllContent .contact h3 {
    margin: 0;
    padding-top: 18px;
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

html.kh-theme-modern-2026 #divAllContent .contact p {
    margin: 6px 0 0;
    color: var(--kh-ink-2);
    font-size: 14px;
    line-height: 1.6;
}

html.kh-theme-modern-2026 #divAllContent .contact :is(.address, .contact-info) {
    color: var(--kh-ink-2);
    font-size: 14px;
    line-height: 1.6;
}

html.kh-theme-modern-2026 #divAllContent .contact .address {
    margin-top: 12px;
    padding: 14px 18px 0;
    border: 1px solid var(--kh-line);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #divAllContent .contact .address > b {
    color: var(--kh-brand);
    font-size: 15px;
    font-weight: 600;
}

html.kh-theme-modern-2026 #divAllContent .contact .address + .contact-info {
    padding: 4px 18px 14px;
    border: 1px solid var(--kh-line);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #divAllContent .contact .contact-info a {
    font-weight: 600;
    word-break: break-word;
}

html.kh-theme-modern-2026 #divAllContent .contact .contact-info + br {
    display: none;
}

@media screen and (max-width: 500px) {
    html.kh-theme-modern-2026 #divAllContent .contact {
        margin-top: 20px;
        padding: 20px;
    }
}

/* ==========================================================================
   Settings & Tools pages (Styles/layouts/settings-and-tools.css: nav.settings-and-tools-nav > ul > li >
   a.settings-and-tools-link[aria-current="page"] with i.settings-and-tools-icon; vertical list on wide screens, a
   horizontal tab strip with a bottom bar on small screens) and the User Preferences / Snippets page (React
   #UserPreferenceApp: a#btnAddSnippet, table.table-bordered with a#btnEditSnippet / a#btnDeleteSnippet, and a radium
   modal whose footer holds Cancel, Save, Save and Close in that DOM order, floated right) - trials T187-T192 (T188 page
   titles and T191 message position are site-wide).
   ========================================================================== */

/* ---- T187: the Settings & Tools menu as a white card; the selected item light blue with navy text and a blue bar (left
   bar on wide screens, bottom bar on the small-screen tab strip) ---- */
html.kh-theme-modern-2026 .settings-and-tools-nav {
    border-color: var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
    scrollbar-color: var(--kh-line-strong) transparent;
}

html.kh-theme-modern-2026 .settings-and-tools-link {
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 .settings-and-tools-link:hover {
    background-color: var(--kh-panel);
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 .settings-and-tools-link[aria-current="page"] {
    border-left-color: var(--kh-primary);
    border-bottom-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 .settings-and-tools-icon {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 .settings-and-tools-link[aria-current="page"] .settings-and-tools-icon {
    color: var(--kh-brand);
}

/* ---- T189: Add Snippet as a small outlined button with a blue plus ---- */
html.kh-theme-modern-2026 #UserPreferenceApp a#btnAddSnippet {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-weight: 600;
    line-height: 18px;
}

html.kh-theme-modern-2026 #UserPreferenceApp a#btnAddSnippet:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 #UserPreferenceApp a#btnAddSnippet > i {
    color: var(--kh-primary);
}

/* ---- T190: snippets table as a white card with rounded corners (like T173); light blue row hover; narrow centred
   edit / delete columns; the delete cross grey until hovered ---- */
html.kh-theme-modern-2026 #UserPreferenceApp table.table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    overflow: hidden;
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 #UserPreferenceApp table.table tr > :is(th, td) {
    border-width: 0 0 1px 1px;
    border-style: solid;
    border-color: var(--kh-line);
    vertical-align: middle;
}

html.kh-theme-modern-2026 #UserPreferenceApp table.table tr > :is(th, td):first-child {
    border-left-width: 0;
}

html.kh-theme-modern-2026 #UserPreferenceApp table.table tr:last-child > td {
    border-bottom-width: 0;
}

html.kh-theme-modern-2026 #UserPreferenceApp table.table tr:has(> td):hover > td {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #UserPreferenceApp table.table tr > :is(th, td):is(:first-child, :last-child) {
    width: 1%;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
    white-space: nowrap;
}

html.kh-theme-modern-2026 #UserPreferenceApp table.table a[id^="btnDelete"] > i {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #UserPreferenceApp table.table a[id^="btnDelete"]:is(:hover, :focus) > i {
    color: var(--kh-alert);
}

/* ---- T192: snippet pop-up - Save and Close (last button in the footer) is the orange main action; Save and Cancel stay
   white; normal button size instead of input-lg ---- */
html.kh-theme-modern-2026 #UserPreferenceApp .modal-footer > .btn.input-lg {
    height: auto;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 18px;
}

html.kh-theme-modern-2026 #UserPreferenceApp .modal-footer > .btn:not(:last-child) {
    border: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
    background-image: none;
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 #UserPreferenceApp .modal-footer > .btn:not(:last-child):is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 #UserPreferenceApp .modal-footer > .btn:last-child {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #UserPreferenceApp .modal-footer > .btn:last-child:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
}

/* ==========================================================================
   Admin pages - left menu (every admin page: WebForms MasterPages/AccountConfigurationMaster.master and MVC
   Views/Shared/_AdminMenuItems.cshtml; Classic Styles/layouts/left-menu.css) - trials T199-T200. Markup:
   .left-menu-wrapper(.expanded) > .hamburger-menu (3 .line) + ul.menu > li.menu-header / li.menu-item > a. T200: both
   menus add li.kh-menu-item-active to the current page's item (AdminMenuService IsSelected); Classic does not style it.
   ========================================================================== */

/* ---- T199: menu as a white panel; navy hamburger / close icon. T211 v2 (below): no scroll box - the menu shows every
   item and its panel runs the full height of the page content ---- */
html.kh-theme-modern-2026 .left-menu-wrapper,
html.kh-theme-modern-2026 .left-menu-wrapper.expanded {
    border: 0;
    border-right: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--kh-line-strong) transparent;
}

html.kh-theme-modern-2026 .left-menu-wrapper.expanded {
    height: auto;
    padding-bottom: 8px;
    overflow: visible;
}

/* T211 v2: the menu row is a flex row so the menu panel (expanded or collapsed) stretches to the full height of the page
   content, and the menu shows every item with no scrollbar of its own (Classic: a fixed 100rem box with its own scroll).
   The grid width classes the menu script toggles (col-sm-5 / col-sm-1, col-md-41 / col-md-47) still set the widths. */
html.kh-theme-modern-2026 .online-triage-configuration > .row:has(> .left-menu-wrapper) {
    display: flex;
    align-items: stretch;
}

html.kh-theme-modern-2026 .online-triage-configuration > .row:has(> .left-menu-wrapper):before,
html.kh-theme-modern-2026 .online-triage-configuration > .row:has(> .left-menu-wrapper):after {
    content: none;
}

html.kh-theme-modern-2026 .online-triage-configuration > .row > .left-menu-wrapper {
    flex: 0 0 auto;
    height: auto;
}

html.kh-theme-modern-2026 .online-triage-configuration > .row:has(> .left-menu-wrapper) > .account-config-content {
    flex: 0 1 auto;
}

html.kh-theme-modern-2026 .left-menu-wrapper:not(.expanded):hover {
    background-color: var(--kh-panel);
}

/* ---- T209: smaller close / menu icon (16px, 2px lines) lined up with the menu text, light blue rounded background on
   hover. The X keeps the Classic animation (lines 6px apart, moved +-6px and rotated). ---- */
html.kh-theme-modern-2026 .left-menu-wrapper .hamburger-menu,
html.kh-theme-modern-2026 .left-menu-wrapper.expanded .hamburger-menu {
    width: 24px;
    height: auto;
    margin: 6px 0 0 12px;
    padding: 4px;
    border-radius: var(--kh-radius);
}

html.kh-theme-modern-2026 .left-menu-wrapper .hamburger-menu:hover {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 .left-menu-wrapper .line {
    height: 2px;
    margin: 4px 0;
    background-color: var(--kh-brand);
}

html.kh-theme-modern-2026 .left-menu-wrapper .hamburger-menu:hover .line {
    background-color: var(--kh-primary);
}

/* ---- T212-T214 (expanded menu only): a title row - "Site Administration" (CSS text, the site is English only) with a
   thin line under it - and the collapse control as a small square "?" button at its top right instead of the X (the
   three lines are hidden; the click handler on .hamburger-menu is unchanged). The collapsed strip keeps the T209 lines. */
html.kh-theme-modern-2026 .left-menu-wrapper.expanded {
    position: relative;
}

html.kh-theme-modern-2026 .left-menu-wrapper.expanded:before {
    content: "Site Administration";
    display: block;
    margin-bottom: 4px;
    padding: 12px 44px 11px 16px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 16px;
    text-transform: uppercase;
    white-space: nowrap;
}

html.kh-theme-modern-2026 .left-menu-wrapper.expanded .hamburger-menu {
    position: absolute;
    top: 8px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 .left-menu-wrapper.expanded .hamburger-menu:hover {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 .left-menu-wrapper.expanded .hamburger-menu > .line {
    display: none;
}

html.kh-theme-modern-2026 .left-menu-wrapper.expanded .hamburger-menu:before {
    content: "\f100";
    color: var(--kh-brand);
    font-family: FontAwesome;
    font-size: 13px;
    line-height: 1;
}

html.kh-theme-modern-2026 .left-menu-wrapper.expanded .hamburger-menu:hover:before {
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 .left-menu-wrapper .menu li {
    border-bottom: 0;
}

/* ---- T206: section headers as small grey capitals with a thin line between sections (no bar) ---- */
html.kh-theme-modern-2026 .left-menu-wrapper li.menu-header {
    margin: 8px 6px 2px;
    padding: 10px 10px 4px;
    border-top: 1px solid var(--kh-line);
    background-color: transparent;
    color: var(--kh-muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

html.kh-theme-modern-2026 .left-menu-wrapper .menu > li.menu-header:first-child {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 0;
}

/* ---- T207 / T208: items as rounded pills set 6px in from the edges, 28px tall; hover light blue ---- */
html.kh-theme-modern-2026 .left-menu-wrapper .menu li a {
    display: block;
    width: auto;
    margin: 1px 6px;
    padding: 6px 10px 6px 9px;
    border-left: 3px solid transparent;
    border-radius: var(--kh-radius);
    background-color: transparent;
    color: var(--kh-ink-2);
    line-height: 16px;
}

html.kh-theme-modern-2026 .left-menu-wrapper .menu li.menu-item:hover {
    background-color: transparent;
}

html.kh-theme-modern-2026 .left-menu-wrapper .menu li a:hover,
html.kh-theme-modern-2026 .left-menu-wrapper .menu li a:focus {
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
}

/* ---- T210: the Keona-only eye icon smaller and grey ---- */
html.kh-theme-modern-2026 .left-menu-wrapper .menu li a .icon-eye-open {
    color: var(--kh-muted);
    font-size: 11px;
}

/* ---- T200: the current page's item light blue with navy semibold text and a blue left bar ---- */
html.kh-theme-modern-2026 .left-menu-wrapper .menu li.menu-item.kh-menu-item-active > a {
    border-left-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
    font-weight: 600;
}

/* ==========================================================================
   Admin pages (shared) - trials T259-T266. Every account configuration page wraps its content in .account-config-content
   (MVC _Layout_AccountConfiguration* and MasterPages/AccountConfigurationMaster.master). Scope: that wrapper, except
   Admin > Users (body.admin-usersagents, T201-T205) and CareFlow Designer (#ProtocolAdminApp, T221-T258), which have
   their own sections; the exclusions sit in :where() so they add no specificity (scope = 0-2-1).
   Markup varies by page: master-detail lists are table.table-hover-highlight with an inline height / overflow / display
   block (own scroll), the selected row tr.table-info (Classic cyan, !important), tr.table-selected (.resource-list:
   double cyan border + fade animation), tr.selected (Providers family: white with a grey double border) or tr.active;
   detail panels use
   react-tabs (styled at runtime by react-tabs: .react-tabs [role="tab"][aria-selected="true"], 0-3-0), <b> field labels
   and h5 section headings; Save / Cancel pairs are btn-primary + btn-default (often input-lg) or btn-success + btn-link.
   ========================================================================== */

/* ---- T259: page titles that are plain h2 / h3 (grey, 20-22.75px) navy semibold 20px like .page-title (T188). Record
   names in detail panels (h3 inside .pad-top-5 / fieldset) and section headings (Manual Retry h3) are not matched ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) :is(h2:not(.page-title, .modal h2), .clearfix > h3.pull-left, .border-bottom > h3) {
    color: var(--kh-brand);
    font-size: 20px;
    font-weight: 600;
}

/* ---- T260: master-detail lists as a white card (like T221); rows white, light blue on hover; the selected row light
   blue with a blue left bar and navy semibold text (inset shadow over Classic's !important cyan) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) {
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--kh-line-strong) transparent;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr > td {
    border-top: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr:hover > td {
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
}

/* Classic draws a 1px double cyan border around the selected row (tr) */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr:is(.table-info, .active, .table-selected, .selected) {
    border: 0;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr:is(.table-info, .active, .table-selected, .selected) > td {
    background-color: var(--kh-primary-soft);
    border-width: 1px 0 0;
    border-style: solid;
    border-color: var(--kh-line);
    box-shadow: inset 0 0 0 999px var(--kh-primary-soft);
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr:is(.table-info, .active, .table-selected, .selected) > td:first-child {
    box-shadow: inset 3px 0 0 var(--kh-primary), inset 0 0 0 999px var(--kh-primary-soft);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr:is(.table-info, .active, .table-selected, .selected) > td a {
    color: var(--kh-brand);
}

/* ---- T261: list toolbar - Add / New as small outlined buttons with a blue plus (like T189 / T202); the Search label grey
   semibold; checkboxes and radios theme blue. Add / New markup differs by page: btn-sm with an inline margin-top 18px
   (Facilities, Insurance Carriers, Locations, Providers, Referring Providers, Custom Fields, Round Robins), .search-box
   btn-sm (Resource Groups, Visit Reason Categories, Provider Groups), .float-right .marg-bottom-0 (Appointment Types,
   Resources, External Document / Message Types), .col-md-12 New (Visit Reasons, Patient Visit Menu Items), btn-primary
   (Group Categories, Patient Blacklist, Scheduling Templates) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) :is(button.btn.btn-sm[style*="margin-top: 18px"], .search-box .btn.btn-sm, .float-right .btn.marg-bottom-0, .col-md-12 > .btn.float-right, .col-md-12 > .btn-group.pull-right > .btn, .clearfix > .btn.pull-right, .large-centered > .btn.btn-sm, .filter-actions > .btn.btn-primary) {
    height: auto;
    padding: 5px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    background-image: none;
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) :is(button.btn.btn-sm[style*="margin-top: 18px"], .search-box .btn.btn-sm, .float-right .btn.marg-bottom-0, .col-md-12 > .btn.float-right, .col-md-12 > .btn-group.pull-right > .btn, .clearfix > .btn.pull-right, .large-centered > .btn.btn-sm, .filter-actions > .btn.btn-primary):is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
    filter: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) :is(button.btn.btn-sm[style*="margin-top: 18px"], .search-box .btn.btn-sm, .float-right .btn.marg-bottom-0, .col-md-12 > .btn.float-right, .col-md-12 > .btn-group.pull-right > .btn, .clearfix > .btn.pull-right, .large-centered > .btn.btn-sm, .filter-actions > .btn.btn-primary):not(:has(> i)):before {
    content: "\f067";
    margin-right: 6px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-size: 11px;
    font-weight: normal;
}

/* Buttons that already have their own plus icon (Appointment Types / External Document / Message Types New:
   i.icon-plus-sign.text-bright-success, green) - the icon theme blue */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) :is(button.btn.btn-sm[style*="margin-top: 18px"], .search-box .btn.btn-sm, .float-right .btn.marg-bottom-0, .col-md-12 > .btn.float-right, .col-md-12 > .btn-group.pull-right > .btn, .clearfix > .btn.pull-right, .large-centered > .btn.btn-sm, .filter-actions > .btn.btn-primary) > i[class*="icon-plus"] {
    color: var(--kh-primary);
}

/* The Add column (col-sm-8 / col-sm-12) is narrower than the button with its plus; the search row becomes a flex row:
   the search column takes the rest of the width, Add keeps its own width and sits level with the search box (the
   inline margin-top 18px has no effect on bottom alignment) */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .row:has(> [class*="col-"] > button.btn.btn-sm[style*="margin-top: 18px"]) {
    display: flex;
    align-items: flex-end;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .row:has(> [class*="col-"] > button.btn.btn-sm[style*="margin-top: 18px"]):before,
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .row:has(> [class*="col-"] > button.btn.btn-sm[style*="margin-top: 18px"]):after {
    content: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .row:has(> [class*="col-"] > button.btn.btn-sm[style*="margin-top: 18px"]) > [class*="col-"] {
    flex: 1 1 auto;
    width: auto;
    float: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .row:has(> [class*="col-"] > button.btn.btn-sm[style*="margin-top: 18px"]) > [class*="col-"]:has(> button.btn.btn-sm[style*="margin-top: 18px"]) {
    flex: 0 0 auto;
    padding-left: 0;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .row > [class*="col-"] > button.btn.btn-sm[style*="margin-top: 18px"] {
    margin-bottom: 2px;
}

/* Resource Groups, Visit Reason Categories, Provider Groups: .search-box.row = input.form-control.col-xs-40 + .col-xs-8
   > Add; same flex row, Add 6px after the search box */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .search-box.row {
    display: flex;
    align-items: center;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .search-box.row:before,
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .search-box.row:after {
    content: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .search-box.row > input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    float: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .search-box.row > [class*="col-"]:has(> .btn) {
    flex: 0 0 auto;
    width: auto;
    padding: 0 0 0 6px;
    float: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) label.lbl {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) input:is([type="checkbox"], [type="radio"]) {
    accent-color: var(--kh-primary);
}

/* ---- T262: react-tabs like the themed .nav-tabs - blue tab text, light blue on hover, the active tab white with a 3px
   orange top line and dark semibold text; no Classic blue focus glow ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .ReactTabs__TabList {
    border-bottom-color: var(--kh-line-strong);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .ReactTabs__Tab {
    margin-right: 2px;
    border-color: transparent;
    border-radius: var(--kh-radius) var(--kh-radius) 0 0;
    box-shadow: none;
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .ReactTabs__Tab:not(.ReactTabs__Tab--selected):hover {
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .ReactTabs__Tab.ReactTabs__Tab--selected {
    border-color: var(--kh-line-strong);
    border-top: 3px solid var(--kh-accent);
    background-color: var(--kh-surface);
    color: var(--kh-ink);
    font-weight: 600;
}

/* ---- T263: detail forms - <b> field labels grey semibold; h5 section headings small navy uppercase with a thin line
   (like T252) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) :is([class*="col-"], label) > b {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) h5:not([class*="Mui"]) {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 18px;
    text-transform: uppercase;
}

/* ---- T264: other tables (not master-detail lists, not nested .inner-table) as a white rounded card (like T190 / T203);
   light blue row hover. Scrolling tables with an inline min-height (Round Robin slots inside a tab) are left for the
   page-by-page pass: as a white card their empty min-height shows as a large white block ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table:not(.table-hover-highlight[style*="overflow"], .inner-table) {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    overflow: hidden;
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table:not(.table-hover-highlight[style*="overflow"], .inner-table) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
    border-width: 0 0 1px 1px;
    border-style: solid;
    border-color: var(--kh-line);
    vertical-align: middle;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table:not(.table-hover-highlight[style*="overflow"], .inner-table) > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child {
    border-left-width: 0;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table:not(.table-hover-highlight[style*="overflow"], .inner-table) > :is(tbody, tfoot):last-child > tr:last-child > td {
    border-bottom-width: 0;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table:not(.table-hover-highlight[style*="overflow"], .inner-table) > tbody > tr:has(> td):hover > td {
    background-color: var(--kh-primary-soft);
}

/* ---- T265: fieldset legends (not MUI outlined-field legends) as small navy section labels with a light line (like
   T201) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) fieldset:not([class*="Mui"]) > legend {
    margin: 0 0 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 18px;
    text-transform: uppercase;
}

/* ---- T266: Save next to Cancel is the orange main action (option A): btn-primary / btn-success with a btn-default /
   btn-link sibling, in either DOM order. Not orange: Search + Reset / Clear rows (Virtual Agent Sessions, Patient Merge) and
   record toolbars after a Delete button (Delete / Edit / New Setting, ExternalOrganizationCommunicationSettings.jsx). Those are not
   saves and stay blue. Large (input-lg) Save / Cancel pairs normal size (like T192) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) :is(:is(.btn-default, .btn-link) ~ :is(.btn-primary, .btn-success), :is(.btn-primary, .btn-success):has(~ :is(.btn-default, .btn-link))):where(:not(.va-session-filter-actions > *, .form-group-sm .btn, .btn-danger ~ *)) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) :is(:is(.btn-default, .btn-link) ~ :is(.btn-primary, .btn-success), :is(.btn-primary, .btn-success):has(~ :is(.btn-default, .btn-link))):where(:not(.va-session-filter-actions > *, .form-group-sm .btn, .btn-danger ~ *)):is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) div:has(> .btn.btn-default):has(> :is(.btn-primary, .btn-success)) > .btn.input-lg {
    height: auto;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 18px;
}

/* ---- T267: section bars (Classic mvc-style.css .boxheader: white on #666) as light blue bars with small navy uppercase
   text, a thin line and rounded corners (like T241) - User Management selected-user bar, Admin Settings sections ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .boxheader {
    padding: 6px 10px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-subheader);
    background-image: none;
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 16px;
    text-transform: uppercase;
}

/* ---- T268: Groups (Admin/Groups.aspx, body.admin-groups) - Add Group (a[id$="btnAdd"] > i.icon-plus-sign, green) as a
   small outlined button with a blue plus (like T202); edit / delete icon columns narrow and centred; the delete cross
   (inline style="color:red") grey until hovered, via its glyph (like T203) ---- */
html.kh-theme-modern-2026 body.admin-groups .account-config-content .section-add-item a[id$="btnAdd"] {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}

html.kh-theme-modern-2026 body.admin-groups .account-config-content .section-add-item a[id$="btnAdd"]:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 body.admin-groups .account-config-content .section-add-item a[id$="btnAdd"] > i {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 body.admin-groups .account-config-content table[id$="grdGroups"] tr > :is(th, td):is(:first-child, :last-child) {
    width: 1%;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
    white-space: nowrap;
}

html.kh-theme-modern-2026 body.admin-groups .account-config-content table[id$="grdGroups"] td:last-child a > i.icon-remove:before {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 body.admin-groups .account-config-content table[id$="grdGroups"] td:last-child a:is(:hover, :focus) > i.icon-remove:before {
    color: var(--kh-alert);
}

/* ---- T269: Groups "Edit Group Record" / add pop-up (#divCreateNewGroupModal) - Update (input submit, btn-default
   input-lg) is the orange main action; Update and Cancel normal size ---- */
html.kh-theme-modern-2026 body.admin-groups .account-config-content #divCreateNewGroupModal .modal-footer > .btn.input-lg {
    height: auto;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 18px;
}

html.kh-theme-modern-2026 body.admin-groups .account-config-content #divCreateNewGroupModal .modal-footer > input.btn[type="submit"] {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 body.admin-groups .account-config-content #divCreateNewGroupModal .modal-footer > input.btn[type="submit"]:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
}

/* ---- T270: the lone "Save Changes" at the top right of Insurance Carriers, Providers, Custom Fields and Round Robins
   (btn-primary btn-sm float-right in .col-sm-8 > .row.marg-bottom-10.marg-top-20, no Cancel next to it) is the orange main
   action ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .col-sm-8 > .row.marg-bottom-10.marg-top-20 > .btn.btn-primary {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .col-sm-8 > .row.marg-bottom-10.marg-top-20 > .btn.btn-primary:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

/* ---- T272: "Show Inactive" on the same pages is label.input-lg (15px, 46px tall) - 12px, normal height ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .checkbox > label.input-lg {
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 12px;
    line-height: 18px;
}

/* ---- T273: Locations (#ExternalOrganizationApp) section headings - a <b> alone in its column ("Geographic
   Information", "Parent Location", ...; field labels have their input next to them) - small navy uppercase with a line,
   in the tabbed edit view and the "New Organization" form (T303: was limited to .ReactTabs__TabPanel),
   like the Providers h5 headings (T263) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #ExternalOrganizationApp div > b:only-child {
    display: block;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 18px;
    text-transform: uppercase;
}

/* ---- T274: Locations actions - "Select Parent" (a.bare-link.text-success, green) a blue link with a blue plus; the
   disabled "Add Children" (span.bare-link.text-grey) muted; the delete trash icon (text-danger icon-2x) grey, red on
   hover (like T222) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #ExternalOrganizationApp a.bare-link.text-success {
    color: var(--kh-primary);
    font-weight: 600;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #ExternalOrganizationApp a.bare-link.text-success:is(:hover, :focus) {
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #ExternalOrganizationApp span.bare-link.text-grey {
    color: var(--kh-muted);
    cursor: default;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #ExternalOrganizationApp a > i.icon-trash.text-danger {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #ExternalOrganizationApp a:is(:hover, :focus) > i.icon-trash.text-danger {
    color: var(--kh-alert);
}

/* ---- T276: Patient Visit Menu Items (#VisitReasonOptionsManagementApp) expanded groups - child rows white, light blue
   on hover. The 10px grey left bar stays: it is set by an inline page style (.children-options, !important) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #VisitReasonOptionsManagementApp table.inner-table > tbody > tr > td {
    border-top: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #VisitReasonOptionsManagementApp table.inner-table > tbody > tr:hover > td {
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
}

/* ---- T277: Facilities (#AdminFacilityApp) > External Organizations - the scrolling Owned / Uses table (inside a tab, so
   not covered by T260 / T264) as a white rounded card; the search box 320px wide (was 178px, placeholder cut off) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AdminFacilityApp .ReactTabs__TabPanel table.table-hover-highlight[style*="overflow"] {
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--kh-line-strong) transparent;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AdminFacilityApp .ReactTabs__TabPanel table.table-hover-highlight[style*="overflow"] > tbody > tr > td {
    border-top: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AdminFacilityApp .ReactTabs__TabPanel table.table-hover-highlight[style*="overflow"] > tbody > tr:hover > td {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AdminFacilityApp .ReactTabs__TabPanel label.lbl > input.form-control {
    width: 320px;
    max-width: 100%;
}

/* ---- T278: "Is Active" (div.checkbox.input-lg, 15px) on Appointment Types, Resources, External Document / Message
   Types - 12px; the box keeps its height so the checkbox stays level with the Name field ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) .checkbox.input-lg {
    font-size: 12px;
}

/* ---- T279: Scheduling Limitations (#SchedulingLimitationsApp) - Add (button.add-btn.btn-link) as a small outlined
   button with a blue plus (like T261); edit form heading h4.section-header navy (was light grey 18px); the Name label
   (18px) a normal grey field label; instruction boxes (.section-instructions, #DADADA) light blue info panels with a
   blue left bar (like T254) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingLimitationsApp .limitations-header > .btn.add-btn {
    padding: 5px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-decoration: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingLimitationsApp .limitations-header > .btn.add-btn:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingLimitationsApp .limitations-header > .btn.add-btn:before {
    content: "\f067";
    margin-right: 6px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-size: 11px;
    font-weight: normal;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingLimitationsApp h4.section-header {
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingLimitationsApp .name-field > label {
    color: var(--kh-muted);
    font-size: 12px;
    font-weight: 600;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingLimitationsApp .section-instructions {
    border: 1px solid var(--kh-info-line);
    border-left: 3px solid var(--kh-primary);
    border-radius: var(--kh-radius);
    background-color: var(--kh-primary-soft);
    color: var(--kh-ink);
}

/* ---- T280: Resource Templates (#SchedulingAvailabilityApp) - the "Filter availabilities" bar (#878787, white text) light
   blue with navy text (like T267), Clear filters readable blue; Add availability (btn-primary btn-sm) a small outlined
   button with a blue plus; remove / copy icons (text-error / text-warning) grey, red / blue on hover; availability
   entries (.scheduling-availability-entry, #F7F7F7; state colours for inactive / recently-added / legacy / has-changes
   kept) white with a line and rounded corners; the dashed resource frame a solid light line ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .scheduling-availability-filters {
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-subheader);
    background-image: none;
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .scheduling-availability-filters .btn-link {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .btn.add-availability {
    border: 1px solid var(--kh-line-strong);
    background-color: var(--kh-surface);
    background-image: none;
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .btn.add-availability:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
    filter: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .btn.add-availability:before {
    content: "\f067";
    margin-right: 6px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-size: 11px;
    font-weight: normal;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .btn.availability-action:is(.cancel-button, .copy-button) {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .btn.availability-action.cancel-button:is(:hover, :focus) {
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .btn.availability-action.copy-button:is(:hover, :focus) {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .scheduling-availability-entry:not(.inactive, .recently-added, .legacy-availability, .has-changes) {
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #SchedulingAvailabilityApp .scheduling-availability-entries {
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
}

/* ---- T281: Scheduling Templates (.scheduling-template-administration-app) - the filter box and the template list frame
   (#EEE, #AAA border) a light panel with a light line; copy (olive) and deactivate (red) icons grey, blue / red on
   hover; edit pencils keep their blue. Inactive (.disabled, red) and new (.is-new, green) template cards keep their
   Classic borders ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app :is(.scheduling-templates-filters, .scheduling-template-list) {
    border-color: var(--kh-line);
    background-color: var(--kh-panel);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .scheduling-template-component:not(.disabled, .is-new) {
    border-color: var(--kh-line);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .btn.copy-button,
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .btn.scheduling-template-action.cancel-button {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .btn.copy-button:is(:hover, :focus) {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .btn.scheduling-template-action.cancel-button:is(:hover, :focus) {
    color: var(--kh-alert);
}

/* ---- T282: Scheduling Templates pop-ups (rendered inside the page) - option lists: letter headings
   (h6.alphabetical-group-heading) navy, 6px between checkbox and text; Calendar Schedule "Add new schedule"
   (btn-success.add-calendar) a small outlined button with a blue plus ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .modal-dialog h6.alphabetical-group-heading {
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .modal-dialog .option-selection-checkbox input[type="checkbox"] {
    margin-right: 6px;
    accent-color: var(--kh-primary);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .modal-dialog .btn.add-calendar {
    padding: 5px 12px;
    border: 1px solid var(--kh-line-strong);
    background-color: var(--kh-surface);
    background-image: none;
    color: var(--kh-brand);
    font-size: 12px;
    line-height: 18px;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .modal-dialog .btn.add-calendar:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
    filter: none;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content .scheduling-template-administration-app .modal-dialog .btn.add-calendar:before {
    content: "\f067";
    margin-right: 6px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-size: 11px;
    font-weight: normal;
}

/* ---- T283: Visit Reasons (#VisitReasonManagementApp) - "Time-frame:" / "Scheduling Instructions:" (h6) as small navy
   uppercase section headings (like T263); also matches "Filterable Properties" (VisitReasonFilterableProperties.jsx),
   another section heading. The dashed Time-frame box is an inline style and stays ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #VisitReasonManagementApp .marg-top-10 > h6:first-child {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 18px;
    text-transform: uppercase;
}

/* ---- T284: Round Robins (#RoundRobinAdminApp) slots table (in a tab, inline min-height 400px, so not a card: the empty
   height stays transparent) - cells white with a light line, light blue on hover ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #RoundRobinAdminApp .ReactTabs__TabPanel table.table > tbody > tr > td {
    border-top: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
    vertical-align: middle;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #RoundRobinAdminApp .ReactTabs__TabPanel table.table > tbody > tr:hover > td {
    background-color: var(--kh-primary-soft);
}

/* ---- T285: slot Remove (input.btn-danger.btn-xs) a small white button with red text, red fill on hover ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #RoundRobinAdminApp .ReactTabs__TabPanel table .btn.btn-danger {
    border-color: var(--kh-line-strong);
    background-color: var(--kh-surface);
    background-image: none;
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #RoundRobinAdminApp .ReactTabs__TabPanel table .btn.btn-danger:is(:hover, :focus) {
    border-color: var(--kh-alert);
    background-color: var(--kh-alert);
    color: #FFFFFF;
    filter: none;
}

/* ---- T286: Round Robin bold labels (label.control-label.bold: Provider Group / Visit Reasons associated..., Round Robin
   Slots) grey semibold like the other field labels; not under .has-error, so validation errors stay red ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #RoundRobinAdminApp :not(.has-error) > label.control-label.bold {
    color: var(--kh-muted);
    font-weight: 600;
}

/* ---- T287: Account Snippets (#AccountSnippetApp) like the personal Snippets page (T189 / T190 / T192) - Add Snippet
   (a#btnAddSnippet, green icon-plus-sign) a small outlined button with a blue plus; edit / delete columns narrow and
   centred; the delete cross (icon-remove.text-danger) grey, red on hover; pop-up footer (Cancel, Save, Save and Close,
   btn-normal input-lg floated right) normal size, Save and Close (last child) orange, the others white outlined ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp a#btnAddSnippet {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp a#btnAddSnippet:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp a#btnAddSnippet > i {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp table.table tr > :is(th, td):is(:first-child, :last-child) {
    width: 1%;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
    white-space: nowrap;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp table.table a[id^="btnDelete"] > i {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp table.table a[id^="btnDelete"]:is(:hover, :focus) > i {
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp .modal-footer > .btn.input-lg {
    height: auto;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 18px;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp .modal-footer > .btn:not(:last-child) {
    border: 1px solid var(--kh-line-strong);
    background-color: var(--kh-surface);
    background-image: none;
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp .modal-footer > .btn:not(:last-child):is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp .modal-footer > .btn:last-child {
    border: 1px solid var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AccountSnippetApp .modal-footer > .btn:last-child:is(:hover, :focus) {
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
}

/* ---- T288: Test Console access keys - Revoke (btn-xs btn-danger) a small white button with red text, red fill on hover
   (like T285) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #TestConsoleAccessKeyList .btn.btn-danger {
    border-color: var(--kh-line-strong);
    background-color: var(--kh-surface);
    background-image: none;
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #TestConsoleAccessKeyList .btn.btn-danger:is(:hover, :focus) {
    border-color: var(--kh-alert);
    background-color: var(--kh-alert);
    color: #FFFFFF;
    filter: none;
}

/* ---- T289: Campaign Recipient File Builder - the file picker's "Choose File" button a small outlined button ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #CampaignRecipientFileBuilderApp input[type="file"]::file-selector-button {
    margin-right: 8px;
    padding: 5px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-family: var(--kh-font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #CampaignRecipientFileBuilderApp input[type="file"]:hover::file-selector-button {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

/* ---- T290: Virtual Agents empty state - "Start Configuring Virtual Agents" (MUI h3, 41px grey) 24px navy semibold ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #VirtualAgentsApp h3.MuiTypography-h3 {
    color: var(--kh-brand);
    font-size: 24px;
    font-weight: 600;
}

/* ---- T291: Admin Settings (#AdminSettingsApp) - the green save buttons (btn-success: Save Message, Save Site Logo Url,
   Save MFA Policy) orange (option A); Generate buttons (btn-primary) stay blue ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AdminSettingsApp .btn.btn-success {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AdminSettingsApp .btn.btn-success:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

/* ---- T292: Patient Merge (#PatientMergeApp) - "Merge Patient Records" (btn-lg btn-primary) the orange main action; the
   red / green panel headings keep their meaning ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientMergeApp .btn.btn-lg.btn-primary {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientMergeApp .btn.btn-lg.btn-primary:not(:disabled):is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

/* ---- T293: Patient Blacklist (#PatientBlacklistAdminApp, react-data-grid) - header cells light blue / navy like the table
   headers; the row Delete action (blue trash + text) grey, red on hover ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientBlacklistAdminApp :is(.react-grid-HeaderRow, .react-grid-HeaderCell) {
    background-color: var(--kh-table-header);
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientBlacklistAdminApp .rdg-cell-action-button > span {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientBlacklistAdminApp .rdg-cell-action-button:hover > span {
    color: var(--kh-alert);
}

/* ---- T294: Manual Retry - the section boxes (.recreate-summaries / .reprocess-summaries: #E2E2E2 border, dark #515151
   shadow) white cards with a light line and soft shadow; their h3 headings 16px navy semibold ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content :is(.recreate-summaries, .reprocess-summaries) {
    border-color: var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content :is(.recreate-summaries, .reprocess-summaries) > h3 {
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
}

/* ==== Round 2 (visual pass at ~1400px wide): T295-T301 ==== */

/* ---- T295: the expanded admin menu at least 200px wide (col-sm-5 is 144px at 1424px), so the "Site Administration"
   title clears the collapse button and most items fit one line; the content column (flex 0 1 auto, T211) shrinks ---- */
html.kh-theme-modern-2026 .online-triage-configuration > .row > .left-menu-wrapper.expanded {
    min-width: 200px;
}

/* ---- T296: list rows - no Classic blue double border on hover (mvc-style.css .table-hover-highlight tr:hover); the
   is-selected row (Resource Groups, Visit Reason Categories, Provider Groups) styled like the other selected rows (T260) ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr:is(:hover, .is-selected) {
    border: 0;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr.is-selected > td {
    border-width: 1px 0 0;
    border-style: solid;
    border-color: var(--kh-line);
    background-color: var(--kh-primary-soft);
    box-shadow: inset 0 0 0 999px var(--kh-primary-soft);
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content:where(:not(:has(#ProtocolAdminApp))) table.table-hover-highlight[style*="overflow"]:not(.inner-table, .ReactTabs__TabPanel table) > tbody > tr.is-selected > td:first-child {
    box-shadow: inset 3px 0 0 var(--kh-primary), inset 0 0 0 999px var(--kh-primary-soft);
}

/* ---- T297: Patient Visit Menu Items order numbers (.badge.badge-primary, navy circles) light blue pills, navy text ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #VisitReasonOptionsManagementApp .badge {
    border: 1px solid var(--kh-info-line);
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
    font-weight: 600;
}

/* ---- T298: Admin Settings switches (label.switch > span.slider, #2196F3 when on) theme blue ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AdminSettingsApp .switch > input:checked + .slider {
    background-color: var(--kh-primary);
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #AdminSettingsApp .switch > input:focus + .slider {
    box-shadow: 0 0 0 2px var(--kh-primary-soft);
}

/* ---- T299: Patient Blacklist row Delete (span.glyphicon-trash " Delete": the text fell back to a serif font) - text in
   the theme font, the trash glyph keeps the icon font ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientBlacklistAdminApp .rdg-cell-action-button > span.glyphicon {
    font-family: var(--kh-font);
    font-size: 11px;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientBlacklistAdminApp .rdg-cell-action-button > span.glyphicon:before {
    font-family: "Glyphicons Halflings";
}

/* ---- T300: Patient Merge - 8px between field labels and inputs; Merge Patient Records (btn-lg) 15px ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientMergeApp .form-horizontal label.control-label {
    padding-right: 8px;
}

html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #PatientMergeApp .btn.btn-lg.btn-primary {
    padding: 9px 22px;
    font-size: 15px;
    line-height: 20px;
}

/* ---- T301: Group Categories Active / Inactive filter (select.form-control, 14.4px) 13px like the other fields ---- */
html.kh-theme-modern-2026 :where(body:not(.admin-usersagents)) .account-config-content #UserGroupCategoriesApp select.form-control {
    height: 34px;
    font-size: 13px;
}

/* ==========================================================================
   Admin > Users (Admin/UsersAgents.aspx, body.admin-usersagents) - trials T201-T205. Markup: .page-title +
   .section-add-item > a[id$="btnAdd"] (icon-plus-sign); [id$="pnlFilters"] > fieldset > legend "Filters" + .row of
   floated columns (label + input.form-control / selectize / button.multiselect "5 selected" / input[id$="btnFilter"]
   input-lg / a[id$="btnClearFilter"] > i.icon-remove.icon-2x); span.chk > input[id$="chkShowInactive"] + label;
   .record-count; a[id$="lnkNextTop"] / [id$="lnkNextBottom"]; table[id$="grdUsersAgents"] (edit, name, username, email,
   EMR ID / PM ID with info tooltips, Groups magnifier, two icon columns, the last a deactivate icon-remove).
   ========================================================================== */

/* ---- T201: filters - "Filters" as a small navy section label with a light line; labels grey semibold; the filter row
   bottom-aligned so every control is 34px on one line; Clear filters a small grey square button ---- */
html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] legend {
    margin: 0 0 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 18px;
    text-transform: uppercase;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] label:not(.checkbox) {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] fieldset > .row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-left: 0;
    margin-right: 0;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] fieldset > .row:before,
html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] fieldset > .row:after {
    content: none;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] fieldset > .row > [class*="col-"],
html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] fieldset > .row > div:not([class*="col-"]) > [class*="col-"] {
    float: none;
    margin-bottom: 0;
}

/* Server panels that wrap a filter column (Location: div[id$="pnlddlFilterExternalOrganization"], no grid class) would
   shrink to their content in the flex row; display: contents lets the column inside take its normal grid width */
html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] fieldset > .row > div:not([class*="col-"]) {
    display: contents;
}

/* Filter and Clear filters sit right next to each other (their grid columns shrink to the buttons) */
html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] fieldset > .row > [class*="col-"]:has(> :is([id$="btnFilter"], [id$="btnClearFilter"])) {
    width: auto;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] .btn-group:has(> button.multiselect) {
    display: block;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] button.multiselect.btn {
    height: 34px;
    margin-bottom: 0;
    padding: 0 12px;
    color: var(--kh-ink);
    font-size: 12px;
    font-weight: 400;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] input.btn[id$="btnFilter"] {
    height: 34px;
    padding: 0 16px;
    font-size: 13px;
    line-height: 32px;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] a[id$="btnClearFilter"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-muted);
    text-decoration: none;
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] a[id$="btnClearFilter"]:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 body.admin-usersagents [id$="pnlFilters"] a[id$="btnClearFilter"] > i {
    font-size: 13px;
    line-height: 1;
}

/* ---- T202: Add User as a small outlined button with a blue plus (like T189) ---- */
html.kh-theme-modern-2026 body.admin-usersagents .section-add-item a[id$="btnAdd"] {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-weight: 600;
    line-height: 18px;
}

html.kh-theme-modern-2026 body.admin-usersagents .section-add-item a[id$="btnAdd"]:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 body.admin-usersagents .section-add-item a[id$="btnAdd"] > i {
    color: var(--kh-primary);
}

/* ---- T203: users table as a white rounded card (like T173 / T190); light blue row hover; icon columns fit their icons
   and are centred; the deactivate cross grey until hovered; header info icons grey ---- */
html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    overflow: hidden;
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] tr > :is(th, td) {
    border-width: 0 0 1px 1px;
    border-style: solid;
    border-color: var(--kh-line);
    vertical-align: middle;
}

html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] tr > :is(th, td):first-child {
    border-left-width: 0;
}

html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] tr:last-child > td {
    border-bottom-width: 0;
}

html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] tr:has(> td):hover > td {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] tr > :is(th, td):is(:first-child, :nth-last-child(-n+2)) {
    width: 1%;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
    white-space: nowrap;
}

html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] tr > :is(th, td):nth-last-child(3) {
    text-align: center;
}

/* The deactivate icon has an inline style="color:red"; its glyph (::before) is coloured instead */
html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] td:last-child a > i.icon-remove:before {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] td:last-child a:is(:hover, :focus) > i.icon-remove:before {
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 body.admin-usersagents table[id$="grdUsersAgents"] th .tooltip i {
    color: var(--kh-muted);
}

/* ---- T204: record count grey; Next / Previous as small outlined buttons ---- */
html.kh-theme-modern-2026 body.admin-usersagents .record-count {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 body.admin-usersagents a:is([id$="lnkNextTop"], [id$="lnkNextBottom"], [id$="lnkPreviousTop"], [id$="lnkPreviousBottom"], [id$="lnkPrevTop"], [id$="lnkPrevBottom"]) {
    margin-bottom: 6px;
    margin-left: 6px;
    padding: 1px 10px;
    border: 1px solid var(--kh-line-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-brand);
    font-weight: 600;
    line-height: 18px;
    text-decoration: none;
}

html.kh-theme-modern-2026 body.admin-usersagents a:is([id$="lnkNextTop"], [id$="lnkNextBottom"], [id$="lnkPreviousTop"], [id$="lnkPreviousBottom"], [id$="lnkPrevTop"], [id$="lnkPrevBottom"]):is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

/* ---- T205: Show inactive users - theme blue checkbox lined up with its label ---- */
html.kh-theme-modern-2026 body.admin-usersagents span.chk:has(> input[id$="chkShowInactive"]) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

html.kh-theme-modern-2026 body.admin-usersagents input[id$="chkShowInactive"] {
    margin: 0;
    accent-color: var(--kh-primary);
    cursor: pointer;
}

html.kh-theme-modern-2026 body.admin-usersagents input[id$="chkShowInactive"] + label {
    margin: 0;
    cursor: pointer;
}

/* ==========================================================================
   CareFlow Designer (Pages/Admin/AccountConfiguration/ProtocolAdmin, React #ProtocolAdminApp) - trials T221-T224 (T220,
   the outlined-button fix, is site-wide in modern-2026-base.css). Markup: button.add-protocol (btn-primary "Add CareFlow")
   + "Import CareFlow" (btn-default); the CareFlow list table.table-hover-highlight (inline display block, own scroll)
   > tr(.active.table-info) > td > a.link (inline padding 12px); action icons button.cbtn-dashed.cbtn-info / -success /
   -primary / -danger (65% colours); question pages .pagination-control > .btn (inline padding 1px 10px, margin 1px).
   ========================================================================== */

/* ---- T221: CareFlow list as a white card; names dark grey, light blue on hover; the selected CareFlow light blue with
   navy semibold text and a blue left bar (no cyan double border) ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp table.table-hover-highlight {
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--kh-line-strong) transparent;
}

html.kh-theme-modern-2026 #ProtocolAdminApp table.table-hover-highlight > tbody > tr > td {
    border-top: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 #ProtocolAdminApp table.table-hover-highlight > tbody > tr > td > a.link {
    color: var(--kh-ink-2);
    text-decoration: none;
}

html.kh-theme-modern-2026 #ProtocolAdminApp table.table-hover-highlight > tbody > tr:hover > td {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #ProtocolAdminApp table.table-hover-highlight > tbody > tr:hover > td > a.link {
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 #ProtocolAdminApp table.table-hover-highlight > tbody > tr.active {
    border: 0;
}

/* Classic style.css ".table-info > td" sets a cyan background with !important; the light blue is painted with an inset
   shadow (drawn over the background) together with the blue left bar */
html.kh-theme-modern-2026 #ProtocolAdminApp table.table-hover-highlight > tbody > tr.active > td {
    background-color: var(--kh-primary-soft);
    box-shadow: inset 3px 0 0 var(--kh-primary), inset 0 0 0 999px var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #ProtocolAdminApp table.table-hover-highlight > tbody > tr.active > td > a.link {
    color: var(--kh-brand);
    font-weight: 600;
}

/* ---- T222: action icons all grey, their colour only on hover (delete turns red) ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-dashed {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-dashed:is(.cbtn-info, .cbtn-primary):is(:hover, :focus) {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-dashed.cbtn-success:is(:hover, :focus) {
    color: var(--kh-ok);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-dashed.cbtn-danger:is(:hover, :focus) {
    color: var(--kh-alert);
}

/* ---- T223: Add CareFlow is the orange main action; Import CareFlow stays white ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp button.btn.add-protocol {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #ProtocolAdminApp button.btn.add-protocol:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

/* ---- T224: compact question page numbers - 24px rounded buttons (the inline padding stays), current page filled blue,
   arrows grey ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .pagination-control > .btn {
    min-width: 26px;
    border-radius: var(--kh-radius);
    font-size: 12px;
    line-height: 20px;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .pagination-control > .btn-default:not(.btn-primary) {
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .pagination-control > .btn-default[disabled] {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .pagination-control > .btn-primary[disabled] {
    opacity: 1;
}

/* ---- CareFlow Designer round 2 - T225-T230. The question list uses Material UI (MUI Accordion / Paper cards, outlined
   TextFields with floating labels; emotion "css-..." classes) and react-select; selectors are scoped to #ProtocolAdminApp
   so they outrank MUI's single-class styles. ---- */

/* ---- T225: question cards as theme cards (MUI Accordion: Material elevation shadow, 4px corners, divider line) ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .MuiAccordion-root.MuiPaper-root {
    margin-bottom: 6px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiAccordion-root.MuiPaper-root:before {
    display: none;
}

/* ---- T226: MUI outlined fields (Order, Question Text, CareFlow fields, search) - light outline, 6px corners, darker on
   hover, theme blue on focus; grey floating labels (blue when focused); dark text ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .MuiOutlinedInput-root,
html.kh-theme-modern-2026 #ProtocolAdminApp .MuiOutlinedInput-notchedOutline {
    border-radius: var(--kh-radius);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiOutlinedInput-notchedOutline {
    border-color: var(--kh-control-border);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiOutlinedInput-root:hover:not(.Mui-disabled):not(.Mui-focused) .MuiOutlinedInput-notchedOutline {
    border-color: var(--kh-line-strong);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-color: var(--kh-primary);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiInputLabel-root {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiInputLabel-root.Mui-focused {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiInputBase-input:not(.Mui-disabled) {
    color: var(--kh-ink);
}

/* ---- T227: question type picker (react-select in .question-type) - white with a light border (its Material shadow is set
   with !important in the page's own styles, so it stays) ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .question-type .Select-control {
    border: 1px solid var(--kh-control-border);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .question-type .Select-control:hover {
    border-color: var(--kh-line-strong);
}

/* T227 fix: on hover / focus / open the picker widens and shows the type name in white (Classic question-type.less, colour
   forced with !important), so the expanded control is theme blue instead of white (was white text on white) */
html.kh-theme-modern-2026 #ProtocolAdminApp .question-type .Select:is(.active, .is-focused, .is-open, :focus, :hover) > .Select-control {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary);
}

/* The picker is searchable: its (empty) search input sits under the selected type's label, so the focused input's white
   text caret showed in front of "Radio Button". The caret is hidden while the label is shown (react-select drops
   .Select-value once you type, so the caret is back when searching); the pointer stays a hand over the label */
html.kh-theme-modern-2026 #ProtocolAdminApp .question-type .Select-value + .Select-input > input {
    caret-color: transparent;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .question-type .Select-control :is(.Select-value, .Select-value-label, .Select-input, .Select-input > input) {
    cursor: pointer;
}

/* ---- T228: Q numbers navy semibold; expand chevron, AI cog and order arrows grey, blue on hover ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .MuiAccordionSummary-root h5 {
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiAccordionSummary-expandIconWrapper,
html.kh-theme-modern-2026 #ProtocolAdminApp i.ai-icon,
html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-noborder {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiAccordionSummary-root:hover .MuiAccordionSummary-expandIconWrapper,
html.kh-theme-modern-2026 #ProtocolAdminApp i.ai-icon:hover,
html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-noborder:is(:hover, :focus) {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-noborder {
    font-size: 18px;
}

/* ---- T229: Import / Add CareFlow left-aligned under the title (the row is a wrapping flex row: Bootstrap .pull-right is
   float: right !important, and floats do not apply to flex items); action icons 15px (header and question rows) ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .form-group.row:has(> .careflow-actions-main) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .form-group.row:has(> .careflow-actions-main):before,
html.kh-theme-modern-2026 #ProtocolAdminApp .form-group.row:has(> .careflow-actions-main):after {
    content: none;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .form-group.row:has(> .careflow-actions-main) > :first-child {
    flex: 0 0 100%;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .careflow-actions-main {
    margin: 8px 0 0 5px;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-dashed {
    font-size: 15px;
}

/* ---- T230: lighter "add" buttons in the Show Rule card - 1px dashed light blue border, blue text, 32px, light blue fill
   on hover (Add a trigger to show this CareFlow, Add Advanced Rule, Add Show CareFlow Rule; not the thin Add Question
   bars) ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .btn.btn-bordered:is(.btn-primary, .btn-info):not(.add-question-btn) {
    height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    border: 1px dashed var(--kh-line-strong);
    color: var(--kh-primary);
    line-height: 30px;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .btn.btn-bordered:is(.btn-primary, .btn-info):not(.add-question-btn):is(:hover, :focus) {
    border-style: solid;
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

/* ---- T231: MUI fields white (their transparent background showed the grey panel, so they looked disabled next to the
   white dropdowns); disabled / read-only ones keep the panel colour ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .MuiOutlinedInput-root:not(.Mui-disabled) {
    background-color: var(--kh-surface);
}

/* ---- T232: quieter Add Question bars between questions - lighter dashes, no shadow; they still expand on hover ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .btn.btn-bordered.add-question-btn:not(:hover):not(:focus) {
    border-color: var(--kh-line);
    box-shadow: none;
}

/* ---- T233: question numbers (Q1, Q2...) as small light blue tags ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .MuiAccordionSummary-root h5 > span {
    display: inline-block;
    padding: 0 7px;
    border-radius: var(--kh-radius-pill);
    background-color: var(--kh-primary-soft);
    font-size: 12px;
    line-height: 20px;
    vertical-align: middle;
}

/* ---- T234: tighter Show Rule card - less space under "Add a trigger...", the "Show More Options" chevron grey (blue on
   hover) ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .precondition > .panel-body {
    padding-bottom: 4px;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .precondition .precondition-collapse-button-container {
    line-height: 14px;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .precondition .toggle-collapse-precondition-details {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .precondition .toggle-collapse-precondition-details:is(:hover, :focus) {
    color: var(--kh-primary);
}

/* ---- T235: icons written for Font Awesome 5 ("fa fa-caret-square-down" Expand Questions / "fa fa-caret-square-up"
   Collapse Questions, "fa fa-clipboard" copy-id) do
   not render (only the FA5 svg-with-js stylesheet is loaded, not its script), so the Expand Questions button showed as an
   empty 10px white square. They get the matching Font Awesome 3 glyphs (the site's icon font) and the Expand Questions
   button looks like the other grey action icons. If the FA5 script ever replaces the <i>, these rules no longer match. ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp i.fa:is(.fa-caret-square-down, .fa-caret-square-up, .fa-clipboard):before {
    font-family: FontAwesome;
    font-style: normal;
    font-weight: 400;
}

html.kh-theme-modern-2026 #ProtocolAdminApp i.fa.fa-caret-square-down:before {
    content: "\f150";
}

html.kh-theme-modern-2026 #ProtocolAdminApp i.fa.fa-caret-square-up:before {
    content: "\f151";
}

html.kh-theme-modern-2026 #ProtocolAdminApp i.fa.fa-clipboard:before {
    content: "\f0ea";
}

html.kh-theme-modern-2026 #ProtocolAdminApp .cbtn-dashed:has(> i.fa:is(.fa-caret-square-down, .fa-caret-square-up)) {
    width: auto;
    height: auto;
    padding: 2px 4px;
    background-color: transparent;
    line-height: 1;
}

/* ---- T237: the question being edited (Classic: .question-body:focus / :focus-within draws a 2px outline in the question
   group colour, .color-1 = rgb(96, 146, 192), the only colour class defined) shows a 4px bar in that colour on the card's
   left edge instead (an inset shadow, so nothing shifts). Other / no colour classes use the theme blue. The answer-filter
   highlight modes (.answer-filter-source / .answer-filter-highlight) keep their own outline. ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .MuiAccordion-root.question-body:is(:focus, :focus-within):not(:is(.answer-filter-source, .answer-filter-highlight) *) {
    outline-width: 0;
    box-shadow: inset 4px 0 0 var(--kh-primary), var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiAccordion-root.question-body.color-1:is(:focus, :focus-within):not(:is(.answer-filter-source, .answer-filter-highlight) *) {
    box-shadow: inset 4px 0 0 rgb(96, 146, 192), var(--kh-shadow-sm);
}

/* ---- T238: "Show if (N Rules)" bars like the other expandable headers - light blue, navy text, light line. Expanded,
   the page forces a grey background and #0A6EA7 text with !important; the light blue is painted over it with an inset
   shadow and the forced text colour stays. ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .precondition-list-container .MuiAccordionSummary-root.react-sanfona-item-title {
    border-bottom-color: var(--kh-line);
    border-radius: var(--kh-radius) var(--kh-radius) 0 0;
    background-color: var(--kh-subheader);
    box-shadow: inset 0 0 0 999px var(--kh-subheader);
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .precondition-list-container .MuiAccordionSummary-root.react-sanfona-item-title:hover {
    box-shadow: inset 0 0 0 999px #CFDFF1;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .precondition-list-container .MuiAccordionSummary-root.react-sanfona-item-title .MuiAccordionSummary-expandIconWrapper {
    color: var(--kh-brand);
}

/* ---- T239: MUI field text and resting (placeholder-like) labels 13px, like the other fields (were 13.7px) ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .MuiInputBase-input {
    font-size: 13px;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .MuiInputLabel-root[data-shrink="false"] {
    font-size: 13px;
}

/* ==========================================================================
   Global / Protocol-Specific Advanced Rules pop-up (Scripts/components/Admin/Protocols/ParameterValueGroup.jsx,
   react-modal-bootstrap Modal size modal-lg) - trials T240-T246. Identified by its Save button
   (aria-label="Confirm Display Condition"). Body: .row > .well > rows of react-bootstrap FormGroup columns -
   "Select to Edit a Display Group" (ControlLabel + Creatable) + Add Advanced Rule; Name (label.control-label-inline +
   input.form-control.col-sm-20); div.col-sm-48.boxheader section headings; Radio / Checkbox options
   (div.radio.checkbox-inline / div.checkbox in FormGroup col-sm-8, the Patient Record ones col-sm-16).
   ========================================================================== */

/* ---- T240: width capped at 1200px (Classic modal-lg is 1800px on wide screens) ---- */
html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) {
    width: min(1200px, calc(100vw - 40px));
}

/* ---- T241: section headings as light blue bars with navy text (like T146-alt) ---- */
html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-body .boxheader {
    padding: 6px 10px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-subheader);
    background-image: none;
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 16px;
    text-transform: uppercase;
}

/* ---- T242: no inner box - the well inside the body loses its border, background and padding ---- */
html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-body .well {
    margin-bottom: 0;
    padding: 0 4px;
    border: 0;
    background-color: transparent;
    box-shadow: none;
}

/* ---- T243: one option grid - every option column is a third of the row (Classic: col-sm-8 = a sixth for most sections,
   col-sm-16 = a third for Patient Record), so the third options line up in one column ---- */
html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-body .form-group.col-sm-8:has(> .radio, > .checkbox) {
    width: 33.3333%;
}

/* ---- T244: theme-blue radios and checkboxes, labels dark ---- */
html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-body :is(.radio, .checkbox) input:is([type="radio"], [type="checkbox"]) {
    accent-color: var(--kh-primary);
    cursor: pointer;
}

html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-body :is(.radio, .checkbox) > label {
    color: var(--kh-ink);
}

/* ---- T245: field labels grey semibold; "Name:" lined up with its 34px field ---- */
html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-body label.control-label {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-body label.control-label-inline {
    margin: 0;
    line-height: 34px;
}

/* ---- T246: Save is the orange main action; Cancel stays white ---- */
html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-footer .btn[aria-label="Confirm Display Condition"] {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 .modal-dialog:has(button[aria-label="Confirm Display Condition"]) .modal-footer .btn[aria-label="Confirm Display Condition"]:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

/* ---- CareFlow Designer bottom action bar (Validate / Save as Draft / Save & Publish) - trials T248-T250.
   The bar is the .form-group holding .save-careflow. Each button has an inline width: 31.33%, so max-width caps it
   instead of overriding the width. Validate and Save as Draft also have an inline margin-right: 3% (of the bar's
   content width); the bar is a size container so the next button's negative margin-left (8px - 3cqw) cancels it
   exactly, leaving an 8px gap at any width. ---- */

/* ---- T248 + T250: compact right-aligned button group on a sticky white bar at the bottom of the window ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .form-group:has(> .btn.save-careflow) {
    position: sticky;
    bottom: 0;
    z-index: 5;
    container-type: inline-size;
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px;
    border-top: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
    box-shadow: 0 -4px 12px rgba(30, 58, 95, .08);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .form-group:has(> .btn.save-careflow) > .btn {
    max-width: max-content;
    padding: 7px 16px;
}

html.kh-theme-modern-2026 #ProtocolAdminApp .form-group:has(> .btn.save-careflow) > .btn + .btn {
    margin-left: calc(8px - 3cqw);
}

/* ---- T249: Validate is an outlined button like Save as Draft; Save & Publish is the orange main action ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .form-group:has(> .btn.save-careflow) > .btn.validate-careflow {
    border-color: var(--kh-line-strong);
    background-color: var(--kh-surface);
    background-image: linear-gradient(to bottom, #FFFFFF 0%, #F3F6FA 100%);
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .form-group:has(> .btn.save-careflow) > .btn.validate-careflow:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    background-image: none;
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .form-group:has(> .btn.save-careflow) > .btn.save-careflow {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #ProtocolAdminApp .form-group:has(> .btn.save-careflow) > .btn.save-careflow:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

/* ---- CareFlow Designer Question Advanced Options pop-up (QuestionAdvancedOptions; the .modal has
   .question-advanced-options, or .question-advanced-options-with-preview when Show preview is on) - trials T251-T255, T257.
   The width is left as is because the preview opens side by side. ---- */

/* ---- T251: header text readable on the navy header (Classic #555 / ink was meant for a white header) ---- */
html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .question-advanced-options-question-label {
    color: rgba(255, 255, 255, .72);
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .question-advanced-options-preview-toggle {
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .question-advanced-options-preview-toggle input[type="checkbox"] {
    accent-color: var(--kh-accent);
    cursor: pointer;
}

/* ---- T252: sub-sections (AI Behavior, Question Wording, ...) as plain navy headings with a line under them, so they
   read as a level below the light blue section bars ---- */
html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .question-ai-options .ai-config-subheader {
    padding: 6px 0 4px;
    border: 0;
    border-bottom: 1px solid var(--kh-line);
    border-radius: 0;
    background-color: transparent;
    color: var(--kh-brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ---- T253: no second box inside the AI Configuration card ---- */
html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .question-ai-options {
    padding: 0;
    border: 0;
    border-radius: 0;
}

/* ---- T254: "Original question for agent" as a light blue reference panel instead of a disabled-looking grey box ---- */
html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .original-question-reminder {
    padding: 10px 12px;
    border: 1px solid var(--kh-info-line);
    border-left: 3px solid var(--kh-primary);
    border-radius: var(--kh-radius);
    background-color: var(--kh-primary-soft);
    color: var(--kh-ink);
}

/* .modal-body and the class-less label test out-rank the site-wide pop-up label rule in modern-2026-base.css */
html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .modal-body .original-question-reminder > label:is(:not([class]), [class=""]) {
    color: var(--kh-primary-strong);
}

/* ---- T255: AI Behavior checkboxes wrap evenly (24px apart) instead of fixed 1/6 columns. The row's Bootstrap clearfix
   ::before becomes a full-width line break between the checkboxes and the AI Model field; ::after is not needed. ---- */
html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .row.ai-flags {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .row.ai-flags::before {
    display: block;
    flex-basis: 100%;
    order: 1;
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .row.ai-flags::after {
    display: none;
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .row.ai-flags > .form-group:has(> .checkbox) {
    width: auto;
    padding-right: 0;
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .row.ai-flags > .form-group:not(:has(> .checkbox)) {
    order: 2;
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .row.ai-flags input[type="checkbox"] {
    accent-color: var(--kh-primary);
    cursor: pointer;
}

/* ---- T257: Cancel / Close stay at the bottom of the window while scrolling; Close is the orange main action ---- */
html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 -4px 12px rgba(30, 58, 95, .08);
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .modal-footer .btn-success {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 .modal:is(.question-advanced-options, .question-advanced-options-with-preview) .modal-footer .btn-success:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

/* ---- T302: Show preview column (.question-advanced-options-preview-column, the ProtocolPreview markup built for the
   full-width Preview tab) - "Search for patient" (.boxheader, Classic #666; not the survey's own navy bars, ticket.css) a
   light blue section bar (like T267); the
   Preview Values rows (fixed col-sm grids: label col-sm-12 + input col-sm-36 inside a col-sm-12 group) become wrapping
   flex rows with each label above its field, so labels no longer break word by word and the column does not scroll
   sideways ---- */
html.kh-theme-modern-2026 .question-advanced-options-preview-column .boxheader:not([class*="ui-test-survey-list-"] *) {
    padding: 6px 10px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-subheader);
    background-image: none;
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 16px;
    text-transform: uppercase;
}

html.kh-theme-modern-2026 .question-advanced-options-preview-column .row:has(> .form-group > label.control-label-inline) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    column-gap: 10px;
    margin-left: 0;
    margin-right: 0;
}

html.kh-theme-modern-2026 .question-advanced-options-preview-column .row:has(> .form-group > label.control-label-inline):before,
html.kh-theme-modern-2026 .question-advanced-options-preview-column .row:has(> .form-group > label.control-label-inline):after {
    content: none;
}

html.kh-theme-modern-2026 .question-advanced-options-preview-column .row:has(> .form-group > label.control-label-inline) > .form-group {
    flex: 1 1 140px;
    width: auto;
    min-width: 0;
    margin-left: 0;
    float: none;
}

html.kh-theme-modern-2026 .question-advanced-options-preview-column .row:has(> .form-group > label.control-label-inline) > .form-group > label.control-label-inline {
    display: block;
    width: auto;
    margin: 0 0 2px;
    padding: 0;
    float: none;
    line-height: 16px;
}

html.kh-theme-modern-2026 .question-advanced-options-preview-column .row:has(> .form-group > label.control-label-inline) > .form-group > .form-control {
    width: 100%;
    float: none;
}

/* T302: the age text and the Output button (shown once a ticket is loaded) keep their own size; Output stays at the
   right end of the row (it was pull-right before the row became flex) */
html.kh-theme-modern-2026 .question-advanced-options-preview-column .row:has(> .form-group > label.control-label-inline) > .form-group:not(:has(> label.control-label-inline, .Select, .MuiFormControl-root)) {
    flex: 0 0 auto;
}

html.kh-theme-modern-2026 .question-advanced-options-preview-column .row:has(> .form-group > label.control-label-inline) > .form-group.pull-right {
    margin-left: auto;
}
/* T302: with the rows wrapping, the column was still 1px too wide (scrollWidth 432 / clientWidth 431 at 1024px), which
   showed a horizontal scrollbar; vertical scrolling is unchanged */
html.kh-theme-modern-2026 .question-advanced-options-preview-column {
    overflow-x: hidden;
}
/* ==========================================================================
   CareFlow Designer Preview tab (#ProtocolAdminApp tab pane; same ProtocolPreview.jsx markup as the Advanced Options
   preview column) - trials T304-T308. The survey itself is styled by modern-2026-ticket.css (T258).
   ========================================================================== */

/* ---- T304: section titles (row > legend: Preview Patient, Preview Values, Survey Preview; also Enter Symptoms and the
   Decision Support / Question Groups legends that use the same markup) small navy uppercase with a line (like T265).
   MUI outlined-field legends sit in fieldset.MuiOutlinedInput-notchedOutline, not .row, and are not matched ---- */
html.kh-theme-modern-2026 :is(#ProtocolAdminApp, .question-advanced-options-preview-column) .row > legend {
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kh-line);
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 18px;
    text-transform: uppercase;
}

/* T304: the grey explanation after a Question Groups title (span.legend-explanation, "(used to group ...)") stays normal case */
html.kh-theme-modern-2026 :is(#ProtocolAdminApp, .question-advanced-options-preview-column) .row > legend .legend-explanation {
    color: var(--kh-muted);
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

/* ---- T305: "Search for patient" bar (PatientSearchSlim .boxheader, Classic #666) light blue (like T267 / T302); not the
   survey's own navy bars and not pop-ups ---- */
html.kh-theme-modern-2026 #ProtocolAdminApp .boxheader:not([class*="ui-test-survey-list-"] *, .modal *) {
    padding: 6px 10px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-subheader);
    background-image: none;
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 16px;
    text-transform: uppercase;
}

/* ---- T306: empty state under Survey Preview (MUI h4 29px grey, h6 in the pop-up) 16px navy semibold; the hint below
   muted ---- */
html.kh-theme-modern-2026 :is(#ProtocolAdminApp, .question-advanced-options-preview-column) .row > legend + :is(.MuiTypography-h4, .MuiTypography-h6) {
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
}

html.kh-theme-modern-2026 :is(#ProtocolAdminApp, .question-advanced-options-preview-column) .row > legend + :is(.MuiTypography-h4, .MuiTypography-h6) + .MuiTypography-h6 {
    color: var(--kh-muted);
    font-size: 13px;
}

/* ---- T307: Preview Values box (inline #FAFAFA background, #DDD border, 4px radius) painted white with an inset shadow
   (the inline background can't be overridden), card radius and a soft shadow; the inline border stays. Not inside a
   .well (Question Groups > Documentation Groups uses the same row > row > legend markup inside its well) ---- */
html.kh-theme-modern-2026 :is(#ProtocolAdminApp, .question-advanced-options-preview-column) .row:not(.well *):has(> .row > legend) {
    border-radius: var(--kh-radius-card);
    box-shadow: inset 0 0 0 999px var(--kh-surface), var(--kh-shadow-sm);
}

/* ---- T308: "Preview As" (select.form-control.input-sm in the action panel, 14.4px) 13px like the other fields ---- */
html.kh-theme-modern-2026 :is(#ProtocolAdminApp, .question-advanced-options-preview-column) .well select.form-control.input-sm {
    font-size: 13px;
}
/* ==========================================================================
   Site theme: Modern-2026 - Ticket page (CareDesk encounter page, Views/Pages/Ticket)
   Design reference: "Design Alternative 1" mockup. Loaded only for accounts whose Site Theme configuration is
   "Modern-2026". Rules are limited to the Ticket React app container (#TicketApp).
   T258: the section-card and careflow rules (section cards / nested sections, T6, T13, T18, T22, T24-T35, T74-T82) also
   cover the CareFlow Designer survey preview (Preview tab and the Question Advanced Options side-by-side preview):
   :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]).
   The :where() part adds no specificity, so the Ticket page cascade is unchanged.
   Top-level sections: navy header bar (white uppercase title), light blue body, white inner boxes, rounded card.
   Nested sections (e.g. question groups such as "Reason for Call"): light blue sub-header with navy title.
   Question-group headers with configured colours (.qdg-themed-header) are left unchanged.
   No overflow:hidden on cards so dropdowns, date pickers and tooltips are never clipped.
   ========================================================================== */

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) {
    font-family: var(--kh-font);
    color: var(--kh-ink-2);
}

/* ---- Section cards ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona {
    background-color: var(--kh-panel);
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) h3.react-sanfona-item-title:not(.qdg-themed-header),
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .boxheader,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .protocol-header {
    background-color: var(--kh-brand);
    background-image: linear-gradient(to bottom, var(--kh-brand-2) 0%, var(--kh-brand) 100%);
    color: var(--kh-brand-ink);
    font-family: var(--kh-font);
    font-size: var(--kh-header-font-size);
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding-top: 8px;
    padding-bottom: 8px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) h3.react-sanfona-item-title:not(.qdg-themed-header):hover {
    background-color: var(--kh-brand-2);
    background-image: none;
    color: var(--kh-brand-ink);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) h3.react-sanfona-item-title:not(.qdg-themed-header):before,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) h3.react-sanfona-item-title:not(.qdg-themed-header):hover:before,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-expanded > h3.react-sanfona-item-title:not(.qdg-themed-header):before {
    color: var(--kh-brand-ink);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona > .react-sanfona-item:first-child > h3.react-sanfona-item-title:not(.qdg-themed-header) {
    border-top-left-radius: calc(var(--kh-radius-card) - 1px);
    border-top-right-radius: calc(var(--kh-radius-card) - 1px);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona > .react-sanfona-item:last-child:not(.react-sanfona-item-expanded) > h3.react-sanfona-item-title:not(.qdg-themed-header) {
    border-bottom-left-radius: calc(var(--kh-radius-card) - 1px);
    border-bottom-right-radius: calc(var(--kh-radius-card) - 1px);
}

/* Highlighted / emphasized sections */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item.highlighted > h3.react-sanfona-item-title:not(.qdg-themed-header),
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item.emphasized > h3.react-sanfona-item-title:not(.qdg-themed-header) {
    background-color: var(--kh-primary);
    background-image: linear-gradient(to bottom, var(--kh-primary-2) 0%, var(--kh-primary) 100%);
}

/* Section bodies: light blue panel; wells inside become white boxes */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-body {
    background-color: var(--kh-panel);
    border-bottom-left-radius: calc(var(--kh-radius-card) - 1px);
    border-bottom-right-radius: calc(var(--kh-radius-card) - 1px);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-body-wrapper {
    border-top: 0;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-body .well {
    background-color: var(--kh-surface);
    border-color: var(--kh-line);
}

/* ---- Nested sections (sections inside a well: question groups, Patient Health History orders/problems):
   light blue sub-header, navy title. Top-level sections are never inside a well. ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona {
    background-color: var(--kh-surface);
    box-shadow: none;
    border-radius: var(--kh-radius);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona h3.react-sanfona-item-title:not(.qdg-themed-header) {
    background-color: var(--kh-subheader);
    background-image: none;
    color: var(--kh-brand);
    font-size: var(--kh-subheader-font-size);
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 1px solid var(--kh-line);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona h3.react-sanfona-item-title:not(.qdg-themed-header):hover {
    background-color: #CFDFF1;
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona h3.react-sanfona-item-title:not(.qdg-themed-header):before,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona h3.react-sanfona-item-title:not(.qdg-themed-header):hover:before,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona .react-sanfona-item-expanded > h3.react-sanfona-item-title:not(.qdg-themed-header):before {
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona > .react-sanfona-item:first-child > h3.react-sanfona-item-title:not(.qdg-themed-header) {
    border-top-left-radius: calc(var(--kh-radius) - 1px);
    border-top-right-radius: calc(var(--kh-radius) - 1px);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona .react-sanfona-item-body {
    background-color: var(--kh-surface);
}

/* Nested highlighted / emphasized sections (e.g. Problems): a deeper light blue rather than the strong blue bar */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona-item.highlighted > h3.react-sanfona-item-title:not(.qdg-themed-header),
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona-item.emphasized > h3.react-sanfona-item-title:not(.qdg-themed-header) {
    background-color: #C9DCF1;
    background-image: none;
    color: var(--kh-brand);
}

/* Patient Health History list items (mvc-style.less .health-history-list).
   Rows run edge to edge in the card: the section body padding moves onto each row so no white frame shows around them. */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .health-history-list .react-sanfona-item-body-wrapper {
    padding: 0;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .health-history-list .health-history-list-item,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .health-history-list .health-history-list-item-alternate {
    background-color: var(--kh-surface);
    border-bottom: 1px solid var(--kh-line);
    padding: 8px 10px;
}

/* The card border already closes the last section, and its rounded corners must not be covered by a square row */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .health-history-list .react-sanfona-item:last-child .react-sanfona-item-body-wrapper > div > :last-child {
    border-bottom: 0;
    border-bottom-left-radius: calc(var(--kh-radius) - 1px);
    border-bottom-right-radius: calc(var(--kh-radius) - 1px);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .health-history-list .health-history-list-item-alternate {
    background-color: var(--kh-panel);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .health-history-list p.health-history-list-item-attributes {
    color: var(--kh-muted);
    font-size: 11px;
}

/* ---- "Search for Patient" style box headers and the well below them form one card ---- */
html.kh-theme-modern-2026 #TicketApp .boxheader {
    border-top-left-radius: var(--kh-radius-card);
    border-top-right-radius: var(--kh-radius-card);
}

html.kh-theme-modern-2026 #TicketApp .boxheader + .well {
    background-color: var(--kh-panel);
    border-color: var(--kh-line);
    border-top: 0;
    border-radius: 0 0 var(--kh-radius-card) var(--kh-radius-card);
    box-shadow: var(--kh-shadow-sm);
}

/* ---- Sticky notes / patient context header ----
   Same color as the page so it blends in; it stays solid so content scrolling under it is hidden. */
html.kh-theme-modern-2026 #TicketApp .row.kh-ticket-sticky-header {
    background-color: var(--kh-page);
}

html.kh-theme-modern-2026 #TicketApp .sticky-outer-wrapper.active .row.kh-ticket-sticky-header {
    box-shadow: 0 6px 14px -8px rgba(30, 58, 95, .35);
}

/* ---- T142: Back and Submit Protocol are not flush against the bar's sides - 12px inner space on the left and right,
   in both the normal and stuck states so nothing shifts when the bar sticks ---- */
html.kh-theme-modern-2026 #TicketApp .row.kh-ticket-sticky-header {
    padding-left: 12px;
    padding-right: 12px;
}

/* ==========================================================================
   Modernization trials (2026-11-17). Numbered to match the developer's list; each block can be removed on its own.
   T1, T2, T10, T11, T12 and T28 were tried and undone; T36 (narrower Patient Alerts pop-up) was declined.
   ========================================================================== */

/* ---- T4: softer field labels - muted grey-blue, semibold, 12px.
   Only form field labels (.control-label); question text and radio/checkbox options are unchanged. ---- */
html.kh-theme-modern-2026 #TicketApp label.control-label {
    color: var(--kh-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
}

/* ---- T6: more breathing room - roomier top-level card bodies and larger gaps between cards.
   Nested sections (inside a .well) keep their spacing. ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-body-wrapper:not(.well *) {
    padding: 14px 16px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona:not(.well *),
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .boxheader + .well {
    margin-bottom: 12px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .boxheader + .well {
    padding: 12px 14px;
}

/* Cards whose content is a white inner panel (.well) already get padding from that panel: keep the original 10px
   around it and drop the panel's bottom margin so the gap is even on all sides. */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-body-wrapper:not(.well *):has(> .well, > [class*="col-"] > .well) {
    padding: 10px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-body-wrapper:not(.well *) > .well,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-body-wrapper:not(.well *) > [class*="col-"] > .well {
    margin-bottom: 0;
}

/* ---- T7: box headers (Patient Health History, Latest CareDesk Encounters) have no +/- icon;
   indent their title to line up with the other section titles ---- */
html.kh-theme-modern-2026 #TicketApp .boxheader {
    padding-left: 25px;
}

/* ---- T8: Chief Complaint protocol list - small navy A-Z letters and highlighted links on hover ---- */
html.kh-theme-modern-2026 #TicketApp .protocol-list-group-header h3 {
    color: var(--kh-brand);
    font-size: 13px;
    font-weight: 700;
    border-bottom-color: var(--kh-line);
}

html.kh-theme-modern-2026 #TicketApp .protocol-list-item > a {
    display: block;
    margin-left: -6px;
    padding: 1px 6px;
    border-radius: var(--kh-radius-sm);
}

html.kh-theme-modern-2026 #TicketApp .protocol-list-item > a:hover,
html.kh-theme-modern-2026 #TicketApp .protocol-list-item > a:focus {
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
    text-decoration: none;
}

/* ---- T9: wider page on big screens - on the Ticket page (and, T104, the CareDesk TriageNurseExpress page; T164, the
   Encounter History page; T169, Overwatch) the header, menu, content and footer grow with the window (24px side margins)
   up to 2200px instead of Bootstrap's fixed widths ---- */
@media (min-width: 1200px) {
    html.kh-theme-modern-2026 body:has(#TicketApp) .container,
    html.kh-theme-modern-2026 body:has(#TriageNurseExpress) .container,
    html.kh-theme-modern-2026 body:has(#EncounterHistory) .container,
    html.kh-theme-modern-2026 body:has(#OverwatchApp) .container {
        width: calc(100% - 48px);
        max-width: 2200px;
    }
}

/* ---- T13: chevrons instead of +/- boxes - right chevron when closed, down chevron when open.
   Fixed 20px icon box (border-box, includes the 8px gap after the icon) keeps titles where they were, so T7 still
   lines box headers up with them. ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) h3.react-sanfona-item-title:before {
    content: "\f054";
    display: inline-block;
    width: 20px;
    font-size: 10px;
    text-align: center;
    vertical-align: 1px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-expanded > h3.react-sanfona-item-title:before {
    content: "\f078";
}

/* ---- T14: quieter close X - soft white on the navy bars, red only on hover ---- */
html.kh-theme-modern-2026 #TicketApp .box-header-close-section,
html.kh-theme-modern-2026 #TicketApp .box-header-close-section .kh-section-close-icon {
    color: rgba(255, 255, 255, .7);
}

html.kh-theme-modern-2026 #TicketApp .box-header-close-section:hover,
html.kh-theme-modern-2026 #TicketApp .box-header-close-section:hover .kh-section-close-icon,
html.kh-theme-modern-2026 #TicketApp .box-header-close-section:focus .kh-section-close-icon {
    color: #FF8A80;
}

html.kh-theme-modern-2026 #TicketApp .well .box-header-close-section,
html.kh-theme-modern-2026 #TicketApp .well .box-header-close-section .kh-section-close-icon {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #TicketApp .well .box-header-close-section:hover .kh-section-close-icon {
    color: #C62828;
}

/* ---- T15: green buttons (e.g. SMS invitation Add) use the theme blue ---- */
html.kh-theme-modern-2026 #TicketApp .btn-success {
    background-color: var(--kh-primary);
    background-image: none;
    border-color: var(--kh-primary-strong);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 #TicketApp .btn-success:hover,
html.kh-theme-modern-2026 #TicketApp .btn-success:focus,
html.kh-theme-modern-2026 #TicketApp .btn-success:active {
    background-color: var(--kh-primary-strong);
    background-image: none;
    border-color: var(--kh-primary-strong);
    color: #FFFFFF;
}

/* ---- T16 (v3): Patient & Contact sub-sections (Home Address, Custom Data).
   Headings 14px bold navy. Each section starts with a full-width hairline, both headings sit about 7px above their
   content (Home Address's form-group margin was 10px; its taller Edit float already adds 4px), the Edit link lines up
   with the heading (its wrapper has an inline 4px top margin), and a hairline closes the Custom Data group before the
   form fields. Heading rows: Home Address = .row > .form-group > div > h4, Custom Data = .row > div > h4. ---- */
html.kh-theme-modern-2026 #TicketApp [id^="selected-patient_"] h4 {
    color: var(--kh-brand);
    font-size: 14px;
    font-weight: 700;
}

html.kh-theme-modern-2026 #TicketApp [id^="selected-patient_"] .row:has(> .form-group > div > h4),
html.kh-theme-modern-2026 #TicketApp [id^="selected-patient_"] .row:has(> div > h4) {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--kh-line);
}

html.kh-theme-modern-2026 #TicketApp [id^="selected-patient_"] .form-group:has(> div > h4) {
    margin-bottom: 0;
}

html.kh-theme-modern-2026 #TicketApp [id^="selected-patient_"] .row:has(> div > h4) {
    margin-bottom: 4px;
}

html.kh-theme-modern-2026 #TicketApp [id^="selected-patient_"] .form-group:has(> div > h4) a {
    position: relative;
    top: -3px;
}

html.kh-theme-modern-2026 #TicketApp [id^="selected-patient_"] .pad-bottom-10:has(> .row > div > h4) {
    margin-bottom: 10px;
    border-bottom: 1px solid var(--kh-line);
}

/* ---- T18: protocol notes / scripts (e.g. opening script) as a callout with a navy bar on the left ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .note-answer > .alert-info {
    background-color: var(--kh-panel);
    border: 0;
    border-left: 4px solid var(--kh-brand);
    border-radius: 0 var(--kh-radius) var(--kh-radius) 0;
}

/* ---- T19: empty messages (e.g. "No pharmacies found.") - plain muted italic text, no white box.
   Matches a top-level card panel whose only content is one plain-text line (:has() cannot be nested, so the
   "no child elements" check is a separate :not(:has()). ---- */
html.kh-theme-modern-2026 #TicketApp .react-sanfona-item-body-wrapper:not(.well *) > .well:has(> div:only-child):not(:has(> div > *)) {
    background-color: transparent;
    border: 0;
    box-shadow: none;
    padding: 2px 4px;
    color: var(--kh-muted);
    font-style: italic;
}

/* ---- T20 (v3): Patient Health History sections (Orders, Problems) - light blue rows with a hairline between them;
   highlighted sections (e.g. Problems) are a solid blue bar with a white title and chevron. Other nested sections keep
   their usual sub-headers. Selectors include .well so they outrank the T22 nested hover. ---- */
html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona h3.react-sanfona-item-title:not(.qdg-themed-header) {
    background-color: var(--kh-subheader);
    background-image: none;
    border-bottom: 1px solid var(--kh-line);
    box-shadow: none;
}

html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona h3.react-sanfona-item-title:not(.qdg-themed-header):hover {
    background-color: #CFDFF1;
}

html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona-item.highlighted > h3.react-sanfona-item-title:not(.qdg-themed-header),
html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona-item.emphasized > h3.react-sanfona-item-title:not(.qdg-themed-header) {
    background-color: #A9C8EC;
    background-image: none;
    color: var(--kh-brand);
    border-bottom-color: #8FB6E3;
    box-shadow: none;
}

html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona-item.highlighted > h3.react-sanfona-item-title:not(.qdg-themed-header):hover,
html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona-item.emphasized > h3.react-sanfona-item-title:not(.qdg-themed-header):hover {
    background-color: #97BCE6;
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona-item.highlighted > h3.react-sanfona-item-title:not(.qdg-themed-header):before,
html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona-item.emphasized > h3.react-sanfona-item-title:not(.qdg-themed-header):before {
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 #TicketApp .well .health-history-list .react-sanfona > .react-sanfona-item:last-child:not(.react-sanfona-item-expanded) > h3.react-sanfona-item-title:not(.qdg-themed-header) {
    border-bottom: 0;
}

/* ---- T21: search icon in the Chief Complaint / protocol search box ---- */
html.kh-theme-modern-2026 #TicketApp div:has(> input.form-control[aria-label="Filter text"]),
html.kh-theme-modern-2026 #TicketApp div:has(> input.form-control[aria-label="Complaint Filter"]) {
    position: relative;
}

html.kh-theme-modern-2026 #TicketApp div:has(> input.form-control[aria-label="Filter text"])::after,
html.kh-theme-modern-2026 #TicketApp div:has(> input.form-control[aria-label="Complaint Filter"])::after {
    content: "\f002";
    font-family: FontAwesome;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--kh-muted);
    pointer-events: none;
}

html.kh-theme-modern-2026 #TicketApp input.form-control[aria-label="Filter text"],
html.kh-theme-modern-2026 #TicketApp input.form-control[aria-label="Complaint Filter"] {
    padding-left: 28px;
}

/* ---- T22: clearer hover on section header bars - lighter navy with a short fade ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) h3.react-sanfona-item-title {
    transition: background-color .15s ease;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) h3.react-sanfona-item-title:not(.qdg-themed-header):hover {
    background-color: #3A6496;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well .react-sanfona h3.react-sanfona-item-title:not(.qdg-themed-header):hover {
    background-color: #CFDFF1;
}

/* ---- T23: inline Yes/No radio groups (.radiobuttons, e.g. "Agrees to Response by Secured Email Message?") - radio
   and text centred with a 6px gap, 16px between options, a little space under the question, theme blue when checked ---- */
html.kh-theme-modern-2026 #TicketApp .radiobuttons {
    margin-top: 4px;
}

html.kh-theme-modern-2026 #TicketApp .radiobuttons > label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
    padding: 0 0 4px 0;
    cursor: pointer;
}

html.kh-theme-modern-2026 #TicketApp .radiobuttons > label > input[type="radio"] {
    margin: 0;
    accent-color: var(--kh-primary);
    cursor: pointer;
}

/* ==========================================================================
   Careflow (survey question) trials. Markup: li.question > .careflow-question-full > .question-label + ul.answers >
   li.answer > .row > .col-sm-46 > (.radio-button-answer.fancy-boxes | .iphone-switch) > label >
   (.iradio_square | .icheckbox_square, gets .checked) + span.icheck-label. Authored inline formatting (sizes, colours)
   in question/answer text is left alone.
   ========================================================================== */

/* ---- T24: clear question blocks - more space around each question, navy question text.
   Questions are li.question (top level, with a divider) or li.question-nobox (inside question groups). ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question-nobox {
    padding-top: 10px;
    padding-bottom: 8px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question .question-label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question .question-label > label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question-nobox .question-label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question-nobox .question-label > label {
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question .question-label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question-nobox .question-label {
    margin-bottom: 6px;
}

/* ---- T25 (v2): roomier answer rows - rows at least 24px tall, an even gap between box and text, and the box lined up
   with the first line of the answer (multi-line answers no longer centre the box on the whole block) ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer {
    padding: 1px 0;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer .fancy-boxes > label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer .iphone-switch > label {
    display: flex;
    align-items: flex-start;
    min-height: 24px;
    margin: 0;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer label > .iradio_square,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer label > .icheckbox_square {
    flex: none;
    margin-right: 8px;
}

/* ---- T26: whole-row hover and click - the answer label fills the row, highlights on hover, pointer cursor ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer .col-sm-46 > .fancy-boxes,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer .col-sm-46 > .iphone-switch {
    display: block;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer .fancy-boxes > label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer .iphone-switch > label {
    width: calc(100% + 6px);
    margin-left: -6px;
    padding: 2px 6px;
    border-radius: var(--kh-radius-sm);
    cursor: pointer;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer .fancy-boxes > label:hover,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer .iphone-switch > label:hover {
    background-color: var(--kh-primary-soft);
}

/* ---- T27 (v2): chosen answers stand out with a light blue background (v1 also made the text bold; removed per developer) ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer label:has(> .checked) {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer label:has(> .checked):hover {
    background-color: #DCEAF8;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.answer label:has(> .checked) > .icheck-label {
    color: var(--kh-ink);
}

/* ---- T29 (v2): every question gets a bar on the left - light grey until a choice answer is checked, then blue.
   Only items with a question label (notes have their own T35 bar). The bar is an inset shadow; on li.question it is
   combined with the divider shadow above each question. ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question-nobox {
    padding-left: 10px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question:has(> .careflow-question-full > .question-label) {
    box-shadow: 0 -1px 0 var(--kh-question-divider, #DCDCDC), inset 3px 0 0 #C9D7E6;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question-nobox:has(> .careflow-question-full > .question-label) {
    box-shadow: inset 3px 0 0 #C9D7E6;
}

/* Automation (AI) careflow questions: li.question.ai-careflow-question. Answered by automation = .careflow-question-collapsed
   (shows an answered summary); otherwise answered once a choice inside the question is checked. */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question.ai-careflow-question {
    box-shadow: 0 -1px 0 var(--kh-question-divider, #DCDCDC), inset 3px 0 0 #C9D7E6;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question.ai-careflow-question.careflow-question-collapsed,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question.ai-careflow-question:has(> .careflow-question-full .checked) {
    box-shadow: 0 -1px 0 var(--kh-question-divider, #DCDCDC), inset 3px 0 0 var(--kh-primary);
}

/* The standard question nested inside an automation question: the outer question already has the padding and bar */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question .ai-careflow-question__content > li.question {
    padding-left: 0;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question:has(> .careflow-question-full > ul.answers > li.answer > .row > div > * > label > .checked) {
    box-shadow: 0 -1px 0 var(--kh-question-divider, #DCDCDC), inset 3px 0 0 var(--kh-primary);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.question-nobox:has(> .careflow-question-full > ul.answers > li.answer > .row > div > * > label > .checked) {
    box-shadow: inset 3px 0 0 var(--kh-primary);
}

/* ---- T30: free-text answers (text, small text, date) - label styled like question text, small gap above the box ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .smalltext-answer label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .text-answer label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .date-answer label {
    color: var(--kh-brand);
    font-weight: 700;
    margin-bottom: 4px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .smalltext-answer .form-control,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .text-answer .form-control,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .date-answer .form-control {
    margin-top: 2px;
}

/* ---- T31: "Preview protocol summary" as a small outlined pill button ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) div.float-right.marg-bottom-5 > a.no-underline:has(> i.icon-zoom-in) {
    display: inline-block;
    padding: 2px 10px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-pill);
    background-color: var(--kh-surface);
    color: var(--kh-primary);
    font-size: 11px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) div.float-right.marg-bottom-5 > a.no-underline:has(> i.icon-zoom-in):hover,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) div.float-right.marg-bottom-5 > a.no-underline:has(> i.icon-zoom-in):focus {
    background-color: var(--kh-primary-soft);
    border-color: var(--kh-primary);
    color: var(--kh-primary-strong);
}

/* ---- T32: lighter dividers between careflow questions (survey.css draws a #dcdcdc 1px shadow line above each) ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) {
    --kh-question-divider: #E6EDF5;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .question {
    box-shadow: 0 -1px 0 var(--kh-question-divider);
}

/* ---- T33: careflow panels use the card's light blue instead of white. Applies to panels (.well) that contain careflow
   questions and the question-group cards inside them; borders stay. Note callouts and chosen answers go one shade
   deeper so they stay visible on the light blue. ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .react-sanfona-item-body .well:has(ul.question-set),
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) .react-sanfona,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) .react-sanfona-item-body {
    background-color: var(--kh-panel);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) .note-answer > .alert-info {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) li.answer label:has(> .checked) {
    background-color: #DCEAF8;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) li.answer label:has(> .checked):hover {
    background-color: #CFE1F5;
}

/* ---- T34: tell careflow questions apart (inside careflow panels) - a visible line and 8px of space between
   questions (so T29 answered bars are separate segments) and question text one size up (13px). The faint T32
   shadow divider is turned off here because the border replaces it. Sizes authored in the question text still win. ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) {
    --kh-question-divider: transparent;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) ul.question-set > li + li {
    margin-top: 8px;
    border-top: 1px solid #C9D7E6;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) .question-label,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) .question-label > label {
    font-size: 13px;
}

/* ---- T35: careflow notes (e.g. "Scheduling Agent", opening script) - warm amber callout with an orange bar so they
   stand out on the light blue panel; the bar sits at the question's left edge (where T29 answered bars are) and the
   note text lines up with the question text (li padding 10px = 4px bar + 6px padding) ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well:has(ul.question-set) .note-answer > .alert-info {
    margin-left: -10px;
    padding-left: 6px;
    background-color: #FFF6E6;
    border-left: 4px solid var(--kh-accent);
    border-top: 1px solid #F6E2BF;
    border-right: 1px solid #F6E2BF;
    border-bottom: 1px solid #F6E2BF;
}

/* ==========================================================================
   Patient Alerts pop-up trials (PatientAlerts.jsx). Markup: .modal-content > .modal-header + .modal-body.alertlist-body
   (optional group headings h4 > strong "Patient Note Alerts" / "EHR / PM Alerts"; each alert is .alert-item >
   .alert-title > h4 + .alert-message [+ .alert-message > small expiry]) + .modal-footer (Cancel, Continue).
   ========================================================================== */

/* T37 (slim header) moved to the site-wide T83 rules in modern-2026-base.css. */

/* ---- T38: each alert as an amber warning card with an orange bar and a warning icon before its heading ---- */
html.kh-theme-modern-2026 #TicketApp .alertlist-body .alert-item {
    background-color: #FFF6E6;
    border: 1px solid #F6E2BF;
    border-left: 4px solid var(--kh-accent);
    border-radius: 0 var(--kh-radius) var(--kh-radius) 0;
}

html.kh-theme-modern-2026 #TicketApp .alertlist-body .alert-title h4:before {
    content: "\f071";
    font-family: FontAwesome;
    color: var(--kh-accent-strong);
    margin-right: 6px;
}

/* ---- T39: quieter alert headings - small bold label inside the card instead of a large teal bar ---- */
html.kh-theme-modern-2026 #TicketApp .alertlist-body .alert-title {
    background-color: transparent;
    color: var(--kh-ink);
    padding: 0;
}

html.kh-theme-modern-2026 #TicketApp .alertlist-body .alert-title h4 {
    color: var(--kh-ink);
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 4px;
}

/* ---- T40: more readable alert text - 13px with more line spacing and card padding; expiry line small and muted ---- */
html.kh-theme-modern-2026 #TicketApp .alertlist-body .alert-item {
    padding: 10px 12px;
}

html.kh-theme-modern-2026 #TicketApp .alertlist-body .alert-message {
    padding: 0;
    color: var(--kh-ink-2);
    font-size: 13px;
    line-height: 1.55;
}

html.kh-theme-modern-2026 #TicketApp .alertlist-body .alert-message + .alert-message {
    margin-top: 4px;
    color: var(--kh-muted);
    font-size: 11px;
}

/* ---- T41: clearer grouping - "Patient Note Alerts" / "EHR / PM Alerts" as small navy section labels, 10px between cards ---- */
html.kh-theme-modern-2026 #TicketApp .alertlist-body > h4,
html.kh-theme-modern-2026 #TicketApp .alertlist-body > div > h4 {
    color: var(--kh-brand);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 4px 0 8px;
}

html.kh-theme-modern-2026 #TicketApp .alertlist-body .alert-item {
    margin-bottom: 10px;
}

html.kh-theme-modern-2026 #TicketApp .alertlist-body > div.pad-bottom-10 {
    padding-bottom: 14px;
}

/* ---- T42: Continue is the main (orange) button, Cancel a plain secondary button (size: T83 / T65 v2) ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(> .alertlist-body) > .modal-footer .btn:not([data-testid="patient_alert_continue_button"]) {
    background-color: var(--kh-surface);
    background-image: none;
    border: 1px solid var(--kh-line);
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(> .alertlist-body) > .modal-footer .btn:not([data-testid="patient_alert_continue_button"]):hover {
    background-color: var(--kh-panel);
    border-color: #C9D7E6;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(> .alertlist-body) > .modal-footer .btn[data-testid="patient_alert_continue_button"] {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border: 1px solid var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(> .alertlist-body) > .modal-footer .btn[data-testid="patient_alert_continue_button"]:hover,
html.kh-theme-modern-2026 #TicketApp .modal-content:has(> .alertlist-body) > .modal-footer .btn[data-testid="patient_alert_continue_button"]:focus {
    background-image: none;
    background-color: var(--kh-accent-strong);
}

/* T43 (slim footer) moved to the site-wide T83 rules in modern-2026-base.css. */

/* ---- T44: Patient Self Scheduling SMS Invitation - with no invitations yet the white panel only holds the Add button
   and looks like an empty text box, so drop the panel (the Add button sits on the card); it returns once invitations
   are listed in .scheduling-links ---- */
html.kh-theme-modern-2026 #TicketApp .well:has(> .patient-self-scheduling-pss-links .scheduling-links:empty) {
    background-color: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

/* ---- T46: scheduling view header row (patient summary + search filters, kh-scheduling-header-row) uses the page colour
   instead of white; it stays solid so content scrolling under it is hidden. The patient summary stays a white card. ---- */
html.kh-theme-modern-2026 #TicketApp .schedule-header-row.kh-scheduling-header-row {
    background-color: var(--kh-page);
}

/* ---- T47: scheduling patient summary labels (Patient Name, Date of Birth, Insurance, ...) muted like T4 field labels ---- */
html.kh-theme-modern-2026 #TicketApp .schedule-header-row .lbl {
    color: var(--kh-muted);
    font-weight: 600;
}

/* ==========================================================================
   Scheduling search results trials. Slots: .appointment-slot-list-card.selectable-card (.selected / .locked / .booked)
   > .body > div > .row (time) + .row (provider); mvc-style.less draws hover/selected fills with .body::after.
   Days: label.schedule-date-group-header; location: label.location-subheader. Results: .well.appointment-slots-block.
   Filters: .scheduling-filters (visit bar .schedule-visit-reason-group-header, days .day-of-the-week-selection).
   ========================================================================== */

/* ---- T48: slot cards read faster - time bold navy (13px), provider grey (12px), softer card border.
   Card shape and spacing unchanged (no rounded corners or gaps, per developer). Colours only on plain slots so selected,
   locked and booked slots keep their white text. ---- */
html.kh-theme-modern-2026 #TicketApp .appointment-slot-list-card {
    border-color: var(--kh-line);
}

html.kh-theme-modern-2026 #TicketApp .appointment-slot-list-card .body > div > .row:first-child {
    font-size: 13px;
    font-weight: 700;
}

html.kh-theme-modern-2026 #TicketApp .appointment-slot-list-card .body > div > .row:nth-child(2) {
    font-size: 12px;
}

html.kh-theme-modern-2026 #TicketApp .selectable-card:not(.selected):not(.locked):not(.booked) .body > div > .row:first-child {
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 #TicketApp .selectable-card:not(.selected):not(.locked):not(.booked) .body > div > .row:nth-child(2) {
    color: var(--kh-muted);
}

/* ---- T49: clear hover and selection - hover light blue fill with a blue border; selected solid theme blue with a darker
   border (white text from mvc-style). Recolours the existing .body::after fill. ---- */
html.kh-theme-modern-2026 #TicketApp .selectable-card:hover:not(.selected) {
    border-color: var(--kh-primary);
}

html.kh-theme-modern-2026 #TicketApp .selectable-card:hover:not(.selected) .body::after {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #TicketApp .selectable-card.selected {
    border-color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 #TicketApp .selectable-card.selected .body::after {
    background-color: var(--kh-primary);
}

/* ---- T50: clearer day groups - day heading navy semibold with a light line; location as a small grey uppercase label ---- */
html.kh-theme-modern-2026 #TicketApp label.schedule-date-group-header {
    color: var(--kh-brand);
    font-weight: 600;
    border-bottom-color: var(--kh-line);
}

html.kh-theme-modern-2026 #TicketApp label.location-subheader {
    color: var(--kh-muted);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ---- T51: light blue results area so the white slot cards stand out ---- */
html.kh-theme-modern-2026 #TicketApp .well.appointment-slots-block {
    background-color: var(--kh-panel);
}

/* ---- T52: visit bar ("New Elbow Pain (dates)") in theme navy like section headers; Overbook as an outlined button ---- */
html.kh-theme-modern-2026 #TicketApp .schedule-visit-reason-group-header {
    background-color: var(--kh-brand);
    background-image: linear-gradient(to bottom, var(--kh-brand-2) 0%, var(--kh-brand) 100%);
    color: var(--kh-brand-ink);
    border-radius: var(--kh-radius-sm);
}

html.kh-theme-modern-2026 #TicketApp .schedule-visit-reason-group-header .btn-default {
    background-color: transparent;
    background-image: none;
    border-color: rgba(255, 255, 255, .6);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 #TicketApp .schedule-visit-reason-group-header .btn-default:hover,
html.kh-theme-modern-2026 #TicketApp .schedule-visit-reason-group-header .btn-default:focus {
    background-color: rgba(255, 255, 255, .15);
    border-color: #FFFFFF;
    color: #FFFFFF;
}

/* ---- T53: days of the week - tidy aligned grid (4 per row: Mon-Thu, Fri-Sun; the filter area is too narrow for one row),
   normal text (T4 muted it), theme blue checkboxes. Each day is its own .day-of-the-week-selection column; their parent
   row becomes the grid. ---- */
html.kh-theme-modern-2026 #TicketApp .row:has(> .day-of-the-week-selection) {
    display: grid;
    grid-template-columns: repeat(4, max-content);
    gap: 2px 12px;
}

html.kh-theme-modern-2026 #TicketApp .row:has(> .day-of-the-week-selection)::before,
html.kh-theme-modern-2026 #TicketApp .row:has(> .day-of-the-week-selection)::after {
    content: none;
}

/* Sat and Sun are wrapped in their own div; let them take part in the grid as normal cells */
html.kh-theme-modern-2026 #TicketApp .row:has(> .day-of-the-week-selection) > div:not(.day-of-the-week-selection):has(> .day-of-the-week-selection) {
    display: contents;
}

html.kh-theme-modern-2026 #TicketApp .row:has(> .day-of-the-week-selection) .day-of-the-week-selection {
    float: none;
    width: auto;
}

html.kh-theme-modern-2026 #TicketApp .day-of-the-week-selection .checkbox-inline {
    padding-left: 0;
}

html.kh-theme-modern-2026 #TicketApp .day-of-the-week-selection label.control-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: var(--kh-ink-2);
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
}

html.kh-theme-modern-2026 #TicketApp .day-of-the-week-selection input[type="checkbox"] {
    position: static;
    margin: 0;
    accent-color: var(--kh-primary);
}

/* ---- T54: From / To time dropdowns (hour, minute, AM/PM) match the other filter fields ---- */
html.kh-theme-modern-2026 #TicketApp .scheduling-filters select:not(.form-control) {
    height: 30px;
    padding: 2px 4px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-ink-2);
    font-size: 12px;
}

html.kh-theme-modern-2026 #TicketApp .scheduling-filters select:not(.form-control):focus {
    border-color: var(--kh-primary);
    box-shadow: var(--kh-focus-ring);
    outline: 0;
}

/* T55 (consistent filter labels) needs no rule: the filter labels are label.control-label, already muted by T4. */

/* ==========================================================================
   Create Appointment pop-up trials. Identified by its note box (textarea#txtModalCreateAppointment...). Body: a
   .row.pad-top-20 of detail rows (.col-sm-23 > label.bold + br + span), the Visit Reason Scheduling Instructions row
   (.row.pad-top-10.pad-left-10 > label.bold + br + authored div), .round-robin-options, custom fields (.format-tables >
   .row.form-group), the Note; footer Cancel + Create Appointment(s) (.show-overlay).
   ========================================================================== */

/* ---- T56: no extra empty gap above the details (slim header: site-wide T83) ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) .modal-body {
    padding-top: 10px;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) .modal-body > .row.pad-top-20 {
    padding-top: 0;
}

/* ---- T57: detail labels (Date, Appointment Slot, Resource, Location, Slot Type, field labels) muted like T4; values ink ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) .modal-body label.bold {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) .col-sm-23 > span {
    color: var(--kh-ink);
}

/* ---- T58: Visit Reason Scheduling Instructions as an amber callout (like T35 careflow notes), aligned with the details.
   Authored formatting inside is unchanged. ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) .row.pad-top-10.pad-left-10 {
    margin: 12px 0 0;
    padding: 10px 12px 2px;
    background-color: #FFF6E6;
    border: 1px solid #F6E2BF;
    border-left: 4px solid var(--kh-accent);
    border-radius: 0 var(--kh-radius) var(--kh-radius) 0;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) .row.pad-top-10.pad-left-10 > label.bold {
    color: var(--kh-accent-strong);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ---- T59: custom fields (e.g. "Liine Id") line up with the other fields. The .format-tables wrapper has an inline
   "padding: 0 1em", so the row cancels it with an equal negative margin (no !important needed). ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) .format-tables > .row.form-group {
    margin-left: -1em;
    margin-right: -1em;
    padding-left: 0;
}

/* ---- T60: Create Appointment(s) is the main (orange) button, Cancel plain white (size and footer: T83 / T65 v2) ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) > .modal-footer .btn:not(.show-overlay) {
    background-color: var(--kh-surface);
    background-image: none;
    border: 1px solid var(--kh-line);
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) > .modal-footer .btn:not(.show-overlay):hover {
    background-color: var(--kh-panel);
    border-color: #C9D7E6;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) > .modal-footer .btn.show-overlay {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border: 1px solid var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) > .modal-footer .btn.show-overlay:hover,
html.kh-theme-modern-2026 #TicketApp .modal-content:has(textarea[id^="txtModalCreateAppointment"]) > .modal-footer .btn.show-overlay:focus {
    background-image: none;
    background-color: var(--kh-accent-strong);
}

/* ==========================================================================
   Appointment created confirmation trials. Markup: .scheduling-component > .row > (.col-sm-48 > span message) +
   (.row.pad-top-15 > input.main-action-button: Continue Editing Encounter, Submit Encounter, Save and Close).
   ========================================================================== */

/* ---- T63 (v2): confirmation card - message and buttons together on a full-width white card ---- */
html.kh-theme-modern-2026 #TicketApp .scheduling-component > .row:has(> .row.pad-top-15 > input.main-action-button) {
    margin-top: 6px;
    padding: 14px 16px;
    background-color: var(--kh-surface);
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    box-shadow: var(--kh-shadow-sm);
}

/* ---- T61: success banner - green with a check icon ---- */
html.kh-theme-modern-2026 #TicketApp .scheduling-component > .row:has(> .row.pad-top-15 > input.main-action-button) > .col-sm-48 > span {
    display: block;
    padding: 8px 12px;
    background-color: var(--kh-ok-soft);
    border: 1px solid #C8E6C9;
    border-left: 4px solid var(--kh-ok);
    border-radius: 0 var(--kh-radius) var(--kh-radius) 0;
    color: #1B5E20;
    font-weight: 600;
}

html.kh-theme-modern-2026 #TicketApp .scheduling-component > .row:has(> .row.pad-top-15 > input.main-action-button) > .col-sm-48 > span:before {
    content: "\f00c";
    font-family: FontAwesome;
    margin-right: 8px;
    color: var(--kh-ok);
}

/* ---- T62: one main action - Submit Encounter stays solid orange; Continue Editing Encounter and Save and Close are
   orange-outlined secondary buttons ---- */
html.kh-theme-modern-2026 #TicketApp .scheduling-component .row.pad-top-15 > input.main-action-button:not([value="Submit Encounter"]) {
    background-color: var(--kh-surface);
    background-image: none;
    border-color: var(--kh-accent);
    color: var(--kh-accent-strong);
}

html.kh-theme-modern-2026 #TicketApp .scheduling-component .row.pad-top-15 > input.main-action-button:not([value="Submit Encounter"]):hover,
html.kh-theme-modern-2026 #TicketApp .scheduling-component .row.pad-top-15 > input.main-action-button:not([value="Submit Encounter"]):focus {
    background-color: var(--kh-accent-soft);
    background-image: none;
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-strong);
}

/* ---- T65 (v2): header/footer/button sizing for all pop-ups is now site-wide (T83 in modern-2026-base.css). Footer
   buttons inside the Ticket page need this ID-level copy because Classic ticket.css sets "#TicketApp button.btn"
   padding (4px), which outranks the site-wide rule. ---- */
html.kh-theme-modern-2026 #TicketApp .modal-footer .btn {
    height: auto;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    border-radius: var(--kh-radius);
}

/* ==========================================================================
   Existing Encounters pop-up trials. Identified by its Select radios (input[name="radOpenEncounter"]). Body: patient
   info (.well.skinny-well > h5.title-blue + .lbl/.val pairs), h5 "Active Encounters:", table.gridviewdarkgray (header row
   of th inside tbody; data rows of td: Date, User Group, Assignment, Chief Complaint, magnifier, edit, Select), Note to
   Add, Reason for Update.
   ========================================================================== */

/* ---- T66: patient information - labels muted, values ink, "Patient Information" as a small navy label ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) .skinny-well .lbl {
    color: var(--kh-muted);
    font-weight: 600;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) .skinny-well .val {
    color: var(--kh-ink);
}

/* ---- T70: section labels - "Patient Information" and "Active Encounters:" as small navy uppercase labels (field labels
   such as "Note to Add" are already muted by T4) ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) .modal-body h5 {
    color: var(--kh-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ---- T67: row hover - light blue under the mouse ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray tr:has(> td):hover > td {
    background-color: var(--kh-primary-soft);
}

/* ---- T68: selected encounter - the row with the checked Select radio is light blue with a blue bar on the left;
   radios in theme blue ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray tr:has(input[name="radOpenEncounter"]:checked) > td {
    background-color: #DCEAF8;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray tr:has(input[name="radOpenEncounter"]:checked) > td:first-child {
    box-shadow: inset 3px 0 0 var(--kh-primary);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) input[name="radOpenEncounter"] {
    accent-color: var(--kh-primary);
    cursor: pointer;
}

/* ---- T69: action columns - magnifier and edit as consistent icon-style links with hover; the three narrow columns
   (magnifier, edit, Select) shrink to their content so Chief Complaint gets more room; edit is centred (was floated left) ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray td.text-center {
    width: 1%;
    padding-left: 12px;
    padding-right: 12px;
    white-space: nowrap;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray td.text-center > i.icon-zoom-in {
    color: var(--kh-primary);
    cursor: pointer;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray td.text-center > i.icon-zoom-in:hover {
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray td.text-center > a {
    float: none;
    display: inline-block;
    padding: 0 8px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-pill);
    background-color: var(--kh-surface);
    color: var(--kh-primary);
    font-size: 11px;
    line-height: 18px;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray td.text-center > a:hover,
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) table.gridviewdarkgray td.text-center > a:focus {
    background-color: var(--kh-primary-soft);
    border-color: var(--kh-primary);
    color: var(--kh-primary-strong);
}

/* ---- T71: Add Note (.show-overlay) is the main (orange) button, Cancel plain white (size: T83 / T65 v2) ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer .btn:not(.show-overlay) {
    background-color: var(--kh-surface);
    background-image: none;
    border: 1px solid var(--kh-line);
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer .btn:not(.show-overlay):hover {
    background-color: var(--kh-panel);
    border-color: #C9D7E6;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer .btn.show-overlay {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border: 1px solid var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer .btn.show-overlay:hover,
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer .btn.show-overlay:focus {
    background-image: none;
    background-color: var(--kh-accent-strong);
}

/* ---- T72: "Click here to continue with new encounter" as a small blue-outlined button with an arrow (text unchanged) ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer > a.float-left {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--kh-primary);
    border-radius: var(--kh-radius);
    background-color: var(--kh-surface);
    color: var(--kh-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer > a.float-left:after {
    content: "\f061";
    font-family: FontAwesome;
    margin-left: 8px;
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer > a.float-left:hover,
html.kh-theme-modern-2026 #TicketApp .modal-content:has(input[name="radOpenEncounter"]) > .modal-footer > a.float-left:focus {
    background-color: var(--kh-primary-soft);
    border-color: var(--kh-primary-strong);
    color: var(--kh-primary-strong);
}

/* T73 (slim footer) moved to the site-wide T83 rules in modern-2026-base.css. */

/* ==========================================================================
   Automation (AI) careflow question trials. Open question: li.ai-careflow-question > button.careflow-answered-summary-collapse
   + .careflow-question-full > .ai-careflow-question__content > (.ai-careflow-question__header > __title + __actions buttons)
   + nested li.question + .ai-careflow-question__result (__suggestion-note, __template-reason). Collapsed: button.careflow-
   answered-summary > chevron + __text (__question, __separator, __check, __answer) + __source "Automation".
   Base styles in Styles/components/Shared/Survey/survey.css.
   ========================================================================== */

/* ---- T74: "Automation" tag - the open question's title and the collapsed rows' source label as the same soft
   violet-blue pill with a wand icon ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question .ai-careflow-question__title,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question .careflow-answered-summary__source {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid #CFD7F7;
    border-radius: var(--kh-radius-pill);
    background-color: #EEF1FD;
    color: #3F5BD6;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question .ai-careflow-question__title:before,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question .careflow-answered-summary__source:before {
    content: "\f0d0";
    font-family: FontAwesome;
    font-size: 10px;
}

/* ---- T75: Collapse control - plain muted text with its chevron, no underline; blue on hover ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary-collapse {
    gap: 4px;
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary-collapse:hover,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary-collapse:focus {
    color: var(--kh-primary);
    text-decoration: none;
}

/* ---- T76: toolbar buttons (refresh, refresh menu, details) - matching outlined buttons with a theme-blue hover ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .ai-careflow-question__actions .btn {
    background-color: var(--kh-surface);
    background-image: none;
    border-color: var(--kh-line);
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .ai-careflow-question__actions .btn:hover,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .ai-careflow-question__actions .btn:focus {
    background-color: var(--kh-primary-soft);
    border-color: var(--kh-primary);
    color: var(--kh-primary-strong);
}

/* ---- T77 (v2): the automation's reasoning ("Suggested by automation...", "Reason: ...") as quiet small text under the
   answers - no panel box, muted violet note with a small wand icon, reason in muted italic. (v1 was a violet panel with a
   bold note; the developer found it too prominent.) ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .ai-careflow-question__result:has(> .ai-careflow-question__suggestion-note, > .ai-careflow-question__template-reason) {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background-color: transparent;
    font-size: 11px;
    line-height: 1.5;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .ai-careflow-question__suggestion-note {
    color: #7381C9;
    font-weight: 400;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .ai-careflow-question__suggestion-note:before {
    content: "\f0d0";
    font-family: FontAwesome;
    font-size: 10px;
    margin-right: 5px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .ai-careflow-question__template-reason {
    color: var(--kh-muted);
    font-style: italic;
}

/* ---- T78: collapsed automation rows - question muted, answer darker semibold, green check, light blue hover ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary {
    padding: 3px 6px;
    border-radius: var(--kh-radius-sm);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary:hover,
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary:focus {
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary__question {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary__answer {
    color: var(--kh-ink);
    font-weight: 600;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .careflow-answered-summary__check {
    color: var(--kh-ok);
}

/* ---- T79: the reasoning panel lines up with the answer rows. Answers sit in a .col-sm-46 column (46/48) of their row,
   and that row is 5px narrower than the panel's container, hence (100% - 5px) * 46 / 48. ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .ai-careflow-question__result:has(> .ai-careflow-question__suggestion-note, > .ai-careflow-question__template-reason) {
    width: calc((100% - 5px) * 46 / 48);
}

/* ---- T80: on unanswered automation questions the note is an instruction ("The automation script asks you to ask the
   patient this question."), so it shows as an amber action prompt box with a speech-bubble icon; once an answer is chosen
   it becomes the quiet T77 note ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question:not(:has(> .careflow-question-full .checked)) .ai-careflow-question__result {
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid #F6E2BF;
    border-radius: var(--kh-radius);
    background-color: #FFF6E6;
    font-size: 12px;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question:not(:has(> .careflow-question-full .checked)) .ai-careflow-question__suggestion-note {
    color: var(--kh-accent-strong);
    font-weight: 600;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question:not(:has(> .careflow-question-full .checked)) .ai-careflow-question__suggestion-note:before {
    content: "\f075";
}

/* ---- T81: "Collapse" sits on the tag line (left of the Automation tag) instead of its own line above it ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question:has(> .careflow-answered-summary-collapse) {
    position: relative;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question > .careflow-answered-summary-collapse {
    position: absolute;
    top: var(--kh-ai-collapse-top, 15px);
    left: 10px;
    margin: 0;
    z-index: 1;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) li.ai-careflow-question:has(> .careflow-answered-summary-collapse) .ai-careflow-question__header {
    padding-left: 76px;
}

/* ---- T82: selected answers in automation questions use a lighter fill so the question stays the focus (check icon
   and the T29 bar already show the answer). .well matches T33's specificity; this rule is later so it wins. ---- */
html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well li.ai-careflow-question li.answer label:has(> .checked) {
    background-color: #E4EEF9;
}

html.kh-theme-modern-2026 :is(#TicketApp, :where(#ProtocolAdminApp, .question-advanced-options-preview-column) [class*="ui-test-survey-list-"]) .well li.ai-careflow-question li.answer label:has(> .checked):hover {
    background-color: #DCEAF8;
}

/* ==========================================================================
   Appointment Cancellation (and Rescheduling) pop-up trials (ReschedulingAppointmentModal.jsx). It is a react-bootstrap
   modal mounted on body, so it is outside #TicketApp; rules are scoped by its data-testid. Header, footer, button size
   and label colours come from the site-wide T83/T84 rules in modern-2026-base.css.
   ========================================================================== */

/* ---- T85: the Cancellation Reason dropdown lines up with the note box (its form-group had pad-right-10) ---- */
html.kh-theme-modern-2026 .modal-content:has([data-testid="appointment_rescheduling_and_cancellation_modal"]) .form-group.pad-right-10 {
    padding-right: 0;
}

/* ---- T86: no empty gap above Cancellation Reason when it is the first thing in the pop-up (the gap still separates it
   from the related-appointments list when that list is shown) ---- */
html.kh-theme-modern-2026 [data-testid="appointment_rescheduling_and_cancellation_modal"] > .row:first-child > .row.pad-top-20:first-child {
    padding-top: 0;
}

/* ---- T87: Continue is the main (orange) button, like the other pop-ups ---- */
html.kh-theme-modern-2026 .modal-footer .btn[data-testid="appointment_rescheduling_and_cancellation_modal_continue_button"] {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border: 1px solid var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 .modal-footer .btn[data-testid="appointment_rescheduling_and_cancellation_modal_continue_button"]:hover,
html.kh-theme-modern-2026 .modal-footer .btn[data-testid="appointment_rescheduling_and_cancellation_modal_continue_button"]:focus {
    background-image: none;
    background-color: var(--kh-accent-strong);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

/* ==========================================================================
   Edit Invitation pop-up trials (PatientSelfSchedulingLinksEditSummary.jsx), identified by its custom message box
   (#txtModalPssLinksNote). Plain labels are muted by T88 (base); header/footer/buttons by T83/T65 v2.
   ========================================================================== */

/* ---- T89: "Pre-populate patient's demographic information" checkbox - theme blue, 6px gap, centred on its text ---- */
html.kh-theme-modern-2026 .modal-content:has(#txtModalPssLinksNote) label:has(> input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-weight: 400;
    cursor: pointer;
}

html.kh-theme-modern-2026 .modal-content:has(#txtModalPssLinksNote) label > input[type="checkbox"] {
    margin: 0;
    accent-color: var(--kh-primary);
    cursor: pointer;
}

/* ---- T90: helper text ("0/1000 - This message will be added to the SMS", "This note will be added...") small and grey
   instead of blue ---- */
html.kh-theme-modern-2026 .modal-content:has(#txtModalPssLinksNote) .modal-body .text-info {
    display: inline-block;
    margin-top: 2px;
    color: var(--kh-muted);
    font-size: 11px;
}

/* ---- T91: Save is the main (orange) button (it was green, then theme blue via T15); Cancel stays white ---- */
html.kh-theme-modern-2026 #TicketApp .modal-content:has(#txtModalPssLinksNote) .modal-footer .btn[aria-label="Save summary"] {
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    border: 1px solid var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

html.kh-theme-modern-2026 #TicketApp .modal-content:has(#txtModalPssLinksNote) .modal-footer .btn[aria-label="Save summary"]:hover,
html.kh-theme-modern-2026 #TicketApp .modal-content:has(#txtModalPssLinksNote) .modal-footer .btn[aria-label="Save summary"]:focus {
    background-image: none;
    background-color: var(--kh-accent-strong);
    border-color: var(--kh-accent-strong);
    color: var(--kh-accent-ink);
}

/* ---- T92: even spacing - 12px between field groups and a soft divider under "Send SMS to". The rows' .marg-top-5 is
   "margin-top: 5px !important" in style.css, so the extra 7px is added as padding instead of overriding it. ---- */
html.kh-theme-modern-2026 .modal-content:has(#txtModalPssLinksNote) .modal-body > .row.marg-top-5 {
    padding-top: 7px;
}

html.kh-theme-modern-2026 .modal-content:has(#txtModalPssLinksNote) .modal-body > hr {
    margin: 12px 0;
    border-top-color: var(--kh-line);
}

/* ==========================================================================
   Site theme: Modern-2026 - patient pages (patient self scheduling and the other patient portal apps that use the
   portal layout: .site-header, .progress-container, .portal-content-box, .section-footer .continue-button)
   Classic styles: Styles/patient-portal-styles.css (step bar, header, radio icons), Styles/patient-portal-scheduling.css
   (cards, Continue, page sections). Every rule is scoped to html.kh-theme-modern-2026.
   Mobile: these pages are used on phones. Tap targets are at least 44px tall and form fields use 16px text on narrow
   screens so iOS Safari does not zoom in when a field is tapped. Checked at 390px (phone) and desktop widths.
   Header links keep the site-wide theme blue (modern-2026-base.css, T183-T198). Trials P1-P17 (2026-11-18) and V1-V6 (2026-11-19), logged in AI.Workspace/site-themes-changelog.md.
   ========================================================================== */

/* ---- P1: content card - white (the theme page background showed through the Classic transparent card), light line,
   card radius and soft shadow; header band light blue with a navy title and muted subtitle; Back link theme blue ---- */
html.kh-theme-modern-2026 .portal-content-box {
    border: 1px solid var(--kh-line);
    border-radius: 12px;
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 .portal-content-box-title {
    border-bottom: 1px solid var(--kh-line);
    background-color: var(--kh-subheader);
}

html.kh-theme-modern-2026 .portal-content-box-title h1 {
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 .portal-content-box-title h5 {
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 .portal-content-box-title button.sub-header-back-button {
    color: var(--kh-primary);
    font-weight: 600;
}

html.kh-theme-modern-2026 .portal-content-box-title button.sub-header-back-button:is(:hover, :focus) {
    color: var(--kh-primary-strong);
    text-decoration: none;
}

/* ---- P2: step bar - done and current steps theme blue (circle, line, check, label), upcoming light grey ---- */
html.kh-theme-modern-2026 .progress-step:before,
html.kh-theme-modern-2026 .progress-step:after {
    border-top-color: var(--kh-line-strong);
}

html.kh-theme-modern-2026 .progress-indicator {
    border-color: var(--kh-line-strong);
}

html.kh-theme-modern-2026 .progress-step:is(.complete, .in-progress):before,
html.kh-theme-modern-2026 .progress-step:is(.complete, .in-progress):after,
html.kh-theme-modern-2026 .progress-step:is(.complete, .in-progress) .progress-indicator {
    border-color: var(--kh-primary);
}

html.kh-theme-modern-2026 .progress-step.complete .progress-indicator {
    background-color: var(--kh-primary);
}

html.kh-theme-modern-2026 .progress-step.complete .progress-indicator .indicator-text:before {
    border-color: #FFFFFF;
}

html.kh-theme-modern-2026 .indicator-text,
html.kh-theme-modern-2026 .progress-text {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 :is(.complete, .in-progress) :is(.indicator-text, .progress-text) {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 .progress-step.in-progress .progress-text {
    color: var(--kh-brand);
}

/* finished step: blue circle with only the white check (the step number is hidden behind it) */
html.kh-theme-modern-2026 .progress-step.complete .progress-indicator .indicator-text {
    color: transparent;
}

/* ---- P3: Continue - the main action on every step, orange accent, 44px tall; the survey's Continue (btn-danger btn-sm
   inside the survey) the same; full width on phones ---- */
html.kh-theme-modern-2026 .section-footer .continue-button,
html.kh-theme-modern-2026 #SchedulingApp .scheduling-survey .btn.btn-danger {
    min-height: 44px;
    padding: 10px 28px;
    border: 1px solid var(--kh-accent-strong);
    border-radius: var(--kh-radius);
    background-color: var(--kh-accent);
    background-image: linear-gradient(to bottom, var(--kh-accent-2) 0%, var(--kh-accent) 100%);
    color: var(--kh-accent-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
}

html.kh-theme-modern-2026 .section-footer .continue-button:not(:disabled):is(:hover, :focus),
html.kh-theme-modern-2026 #SchedulingApp .scheduling-survey .btn.btn-danger:not(:disabled):is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background-color: var(--kh-accent-strong);
    background-image: none;
    color: var(--kh-accent-ink);
    filter: none;
}

html.kh-theme-modern-2026 .section-footer .continue-button:disabled,
html.kh-theme-modern-2026 #SchedulingApp .scheduling-survey .btn.btn-danger:disabled {
    opacity: .45;
}

@media screen and (max-width: 813px) {
    html.kh-theme-modern-2026 .section-footer .continue-button,
    html.kh-theme-modern-2026 #SchedulingApp .scheduling-survey .btn.btn-danger {
        display: block;
        width: 100%;
    }
}

/* ---- P4: form fields - labels ink semibold, required star theme red; inputs 44px tall with the theme border and a
   blue focus ring; not floated (Classic float-left kept the field group from wrapping its input, so the spacing below
   fields did not apply); 16px text on narrow screens (iOS Safari zooms into fields with smaller text) ---- */
html.kh-theme-modern-2026 #SchedulingApp :is(label.control-label, legend.control-label) {
    color: var(--kh-ink);
    font-weight: 600;
}

html.kh-theme-modern-2026 #SchedulingApp .required-field {
    color: var(--kh-alert);
}

html.kh-theme-modern-2026 #SchedulingApp input.form-control {
    float: none;
    height: 44px;
    border-color: var(--kh-control-border);
    border-radius: var(--kh-radius);
    font-size: 15px;
}

html.kh-theme-modern-2026 #SchedulingApp input.form-control:focus {
    border-color: var(--kh-primary);
    box-shadow: var(--kh-focus-ring);
}

@media (max-width: 813px) {
    html.kh-theme-modern-2026 #SchedulingApp :is(input.form-control, select.form-control, textarea.form-control) {
        font-size: 16px;
    }

    /* stacked fields: space between a field and the next label */
    html.kh-theme-modern-2026 #SchedulingApp .form-group {
        margin-bottom: 16px;
    }
}

/* ---- P5: choices - the round choice icons (Sex, Existing Patient: label > i.radio-icon + hidden radio) muted, theme
   blue when picked; each choice row at least 44px tall to tap. Survey answers keep the iCheck blue sprites; no row
   highlight when picked (removed per developer) ---- */
html.kh-theme-modern-2026 #SchedulingApp .custom-radio-input label {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 0;
    color: var(--kh-ink);
}

html.kh-theme-modern-2026 #SchedulingApp .radio-icon {
    top: 50%;
    color: var(--kh-line-strong);
    transform: translateY(-50%);
}

html.kh-theme-modern-2026 #SchedulingApp .radio-icon.checked {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 #SchedulingApp li.answer label {
    display: flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 0;
    cursor: pointer;
}

/* P5b: answer rows stay compact on desktop; taller tap rows only on phone screens */
@media screen and (max-width: 813px) {
    html.kh-theme-modern-2026 #SchedulingApp li.answer label {
        min-height: 40px;
    }
}

/* ---- P6: visit reason list - each reason a tappable row card (light line, rounded, 48px), light blue on hover and when
   picked (icon-ok-circle; group rows show a chevron and are not "picked"); its circle icon theme blue ---- */
html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item {
    margin-bottom: 8px;
    padding: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text-selectable {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--kh-line);
    border-radius: var(--kh-radius-card);
    background-color: var(--kh-surface);
    color: var(--kh-ink);
    font-size: 15px;
    cursor: pointer;
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text-selectable:hover {
    border-color: var(--kh-info-line);
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text-selectable:has(> .reason-for-visit-list-icon > i.icon-ok-circle) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text:not(.is-disabled) .reason-for-visit-list-icon > i {
    color: var(--kh-primary);
    font-size: 18px;
}

/* P6: nested (child) reasons keep Classic's 1em indent; unavailable reasons (DisplayDisabledVisitReasonOptions: parent
   span .is-disabled) stay muted with no hand cursor or hover fill */
html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item .visit-reason-list-item {
    padding-left: 1em;
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text.is-disabled > .visit-reason-list-item-text-selectable,
html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text.is-disabled > .visit-reason-list-item-text-selectable:hover {
    border-color: var(--kh-line);
    background-color: var(--kh-panel);
    color: var(--kh-muted);
    cursor: default;
}

/* ---- P8: survey notes (e.g. next steps) - same warm amber callout with an orange left bar as CareDesk notes
   (T35 in modern-2026-ticket.css) ---- */
html.kh-theme-modern-2026 #SchedulingApp .note-answer > .alert-info {
    padding-left: 12px;
    background-color: #FFF6E6;
    border: 1px solid #F6E2BF;
    border-left: 4px solid var(--kh-accent);
    border-radius: 0 var(--kh-radius) var(--kh-radius) 0;
}

/* ---- P9: Choose a Location - Classic removes this step's card border / radius / shadow and its side padding
   (.main-content.location-selection, padding 2em 0), so with the P1 white card the text ("No locations to display")
   and the location cards sat against the card edge. Same card and inner padding as the other steps.
   P10: Find a Provider and Select an Appointment have the same Classic reset and get the same card. ---- */
html.kh-theme-modern-2026 .main-content:is(.location-selection, .provider-selection, .find-appointment) .portal-content-box {
    border: 1px solid var(--kh-line);
    border-radius: 12px;
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 .main-content:is(.location-selection, .provider-selection, .find-appointment) .portal-content-box-content {
    padding-right: 24px;
    padding-left: 24px;
}

@media screen and (max-width: 500px) {
    html.kh-theme-modern-2026 .main-content:is(.location-selection, .provider-selection, .find-appointment) .portal-content-box-content {
        padding-right: 16px;
        padding-left: 16px;
    }

    /* Classic list columns are at least 300px; with the side padding that is wider than a 320px phone, so the column
       may shrink to the space available */
    html.kh-theme-modern-2026 .main-content.location-selection .location-list-container,
    html.kh-theme-modern-2026 .main-content.provider-selection .provider-list-container {
        grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    }
}

/* ---- P11: links on the light blue title band - Classic colours them near-white (#DCF1FF, made for a dark band):
   "Find a Location" / "Search Appointments for All Providers" (Find a Provider) and CHANGE (Select an Appointment) ---- */
html.kh-theme-modern-2026 #SchedulingApp .portal-content-box-title .change-button {
    color: var(--kh-primary);
    font-weight: 600;
}

html.kh-theme-modern-2026 #SchedulingApp .portal-content-box-title .change-button:is(:hover, :focus) {
    color: var(--kh-primary-strong);
}

/* ---- P12: Find a Provider title fields - the location select as tall as the Provider Name field (44px) with an 8px
   gap: beside it from 768px (both are col-sm-24 halves, so the select is 8px narrower), above it when stacked ---- */
html.kh-theme-modern-2026 .main-content.provider-selection .portal-content-box-title select.form-control {
    height: 44px;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    html.kh-theme-modern-2026 .main-content.provider-selection .portal-content-box-title select.form-control.col-sm-24 {
        width: calc(50% - 8px);
        margin-right: 8px;
        margin-bottom: 0;
    }
}

/* ---- P13: provider and location cards - light line, 8px radius, soft shadow (like the visit reason rows); provider
   title readable muted grey; location name and phone icons theme blue instead of teal; provider location plain ink,
   not italic; picked provider card blue ---- */
html.kh-theme-modern-2026 #SchedulingApp :is(.provider-card, .location-card) {
    border-color: var(--kh-line);
    border-radius: 8px;
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 #SchedulingApp .location-card {
    overflow: hidden;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-card.provider-card-selected {
    border-color: var(--kh-primary);
    box-shadow: 0 0 0 1px var(--kh-primary);
}

html.kh-theme-modern-2026 #SchedulingApp .provider-card .provider-title {
    color: var(--kh-muted);
    font-weight: 400;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-card .provider-location {
    color: var(--kh-ink-2);
    font-style: normal;
    font-weight: 600;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-card .profile-link {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 #SchedulingApp .location-card :is(.location-name-icon, .location-phone-icon) {
    color: var(--kh-primary);
}

/* ---- P14: SELECT PROVIDER / SEARCH ALL / SELECT LOCATION (Classic teal .btn-follow) - theme blue; orange stays for
   Continue only, so a page of cards does not show many orange buttons ---- */
html.kh-theme-modern-2026 #SchedulingApp .btn-follow {
    border-radius: 6px;
    background: var(--kh-primary);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 #SchedulingApp .btn-follow:is(:hover, :focus, :active) {
    background: var(--kh-primary-strong);
    color: #FFFFFF;
}

/* ---- P15: Select an Appointment title - the chosen location / provider field and its CHANGE box joined into one
   field (no inner corners or line between them) ---- */
html.kh-theme-modern-2026 .main-content.find-appointment .portal-content-box-title .header-buttons .fake-selection {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

html.kh-theme-modern-2026 .main-content.find-appointment .portal-content-box-title .header-buttons .input-group-addon {
    padding: 0 10px;
    border-left: 0;
    border-color: var(--kh-line-strong);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ---- P16: Select an Appointment list - less empty space above the filters; date headings navy with a light line;
   Visit Reason bars light blue; time boxes light line, 6px radius, light blue on hover (sizes unchanged: the list
   uses fixed row heights) ---- */
html.kh-theme-modern-2026 .main-content.find-appointment .portal-content-box-content {
    padding-top: 16px;
}

html.kh-theme-modern-2026 .main-content.find-appointment .schedule-date-group-header {
    border-bottom-color: var(--kh-line);
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header .visit-reason-subheader {
    border-radius: 6px;
    background: var(--kh-subheader);
    color: var(--kh-brand);
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card {
    border-color: var(--kh-line);
    border-radius: 6px;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card.selectable-card:hover:not(.selected, .locked, .booked):not(.select-busy *) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 .main-content.find-appointment .card-select-checkbox {
    border-color: var(--kh-line-strong);
    border-radius: 4px;
}

/* ---- P17: finishing the booking path - the Continue bar after picking a time (Classic green btn-success) is the main
   action, so orange like P3; the picked time box uses the theme blue like CareDesk (T49; Classic #3278B5 overlay,
   clipped to the 6px corners); Review page "edit" / "Select Another Appointment Time" links theme blue and the
   appointment date navy ---- */
html.kh-theme-modern-2026 .main-content.find-appointment .create-appointment-simple .create-appointment {
    min-height: 44px;
    border-color: var(--kh-accent);
    background: var(--kh-accent);
    color: #FFFFFF;
    font-weight: 600;
}

html.kh-theme-modern-2026 .main-content.find-appointment .create-appointment-simple .create-appointment:is(:hover, :focus) {
    border-color: var(--kh-accent-strong);
    background: var(--kh-accent-strong);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .main-content.find-appointment .create-appointment-simple .cancel {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card.selectable-card.selected {
    overflow: hidden;
    border-color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card.selectable-card.selected .body::after {
    background-color: var(--kh-primary);
}

html.kh-theme-modern-2026 .main-content.scheduling-review .change-button {
    color: var(--kh-primary);
}

html.kh-theme-modern-2026 .main-content.scheduling-review .change-button:is(:hover, :focus) {
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-date {
    color: var(--kh-brand);
}

/* ==========================================================================
   Second pass (V1-V6, 2026-11-19)
   ========================================================================== */

/* ---- V1: readable text - patient text 14px on every width (Classic 12px). Field labels, choice labels, card subtitle,
   survey questions / answers / notes, location cards, filters, the Review page; step labels 13px. Not the appointment
   time boxes (fixed-height rows in a virtualized list) ---- */
html.kh-theme-modern-2026 #SchedulingApp .control-label:not(.appointment-slots-block *),
html.kh-theme-modern-2026 #SchedulingApp .custom-radio-input label,
html.kh-theme-modern-2026 #SchedulingApp .portal-content-box-title h5,
html.kh-theme-modern-2026 #SchedulingApp .scheduling-survey :is(.question-label, .question-label > label, li.answer label, .note-answer),
html.kh-theme-modern-2026 #SchedulingApp .location-card,
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-review .portal-content-box-content {
    font-size: 14px;
}

html.kh-theme-modern-2026 #SchedulingApp .progress-text {
    font-size: 13px;
}

/* ---- V2: short pages - the light page area fills the window so the footer sits at the bottom at its own height
   (html / body are the dark footer colour; #body-wrapper and .footer are siblings in body) ---- */
html.kh-theme-modern-2026 body:has(#SchedulingApp) {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) > #body-wrapper {
    flex: 1 0 auto;
}

/* Classic sticky footer: 300px tall, pulled up 150px over the page's bottom padding; here it is as tall as its content */
html.kh-theme-modern-2026 body:has(#SchedulingApp) > .footer {
    height: auto;
    margin-top: 0;
    padding: 20px 0;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content:not(.find-appointment) {
    padding-bottom: 40px;
}

/* ---- V4: Review page - the appointment (date, provider, location) as a light blue summary box; patient details as a
   left-aligned list (label, value, edit at the row end) with a hairline between rows; label above value on phones ---- */
html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-date-container {
    margin-bottom: 20px;
    padding: 16px 20px;
    border: 1px solid var(--kh-line);
    border-radius: 10px;
    background-color: var(--kh-primary-soft);
    text-align: left;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-date {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-patient-information {
    margin: 0 0 20px;
    text-align: left;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .info-row {
    display: grid;
    grid-template-columns: 10em minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: baseline;
    margin: 0;
    padding: 8px 0;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-patient-information .info-row + .info-row {
    border-top: 1px solid var(--kh-line);
}

html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .label {
    padding: 0;
    color: var(--kh-muted);
    font-size: inherit;
    font-weight: 400;
    text-align: left;
    white-space: normal;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .change-button {
    justify-self: end;
    margin-left: 0;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-location-address {
    margin-left: calc(10em + 12px);
    color: var(--kh-ink-2);
}

@media screen and (max-width: 500px) {
    html.kh-theme-modern-2026 .main-content.scheduling-review .info-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .label {
        grid-column: 1 / -1;
    }

    html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-location-address {
        margin-left: 0;
    }
}

/* ---- V5: SELECT LOCATION / SELECT PROVIDER / SEARCH ALL easier to tap (36px, 44px on phones); location address
   darker grey (Classic #979797) ---- */
html.kh-theme-modern-2026 #SchedulingApp .btn-follow {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 12px;
}

@media screen and (max-width: 813px) {
    html.kh-theme-modern-2026 #SchedulingApp .btn-follow {
        min-height: 44px;
    }
}

html.kh-theme-modern-2026 #SchedulingApp .location-card .location-address {
    color: var(--kh-ink-2);
}

/* ---- V6: Patient Information choices (Sex, Existing Patient) as bordered option boxes like the visit reason rows,
   light blue with a blue border when picked. From 768px each pair gets half the row (Classic: a quarter, which made
   the boxes about 90px wide); Existing Patient keeps lining up with the right-hand fields. Only on Patient Information (the Review
   checkboxes and the symptom-checker prompt reuse .custom-radio-input with long labels) ---- */
@media (min-width: 768px) {
    /* when Sex is hidden, Existing Patient still starts at the right-hand column */
    html.kh-theme-modern-2026 #SchedulingApp .demographics fieldset.col-sm-offset-12:has(> .custom-radio-input) {
        margin-left: 50%;
    }

    html.kh-theme-modern-2026 #SchedulingApp .demographics fieldset.col-sm-12:has(> .custom-radio-input) {
        width: 50%;
    }

    html.kh-theme-modern-2026 #SchedulingApp .demographics fieldset.col-sm-12:has(> .custom-radio-input) ~ fieldset.col-sm-offset-12 {
        margin-left: 0;
    }
}

html.kh-theme-modern-2026 #SchedulingApp .demographics .custom-radio-input.col-xs-24 {
    padding-right: 8px;
}

html.kh-theme-modern-2026 #SchedulingApp .demographics .custom-radio-input label {
    position: relative;
    width: 100%;
    padding: 0 12px 0 42px;
    border: 1px solid var(--kh-line);
    border-radius: 8px;
    background-color: var(--kh-surface);
    line-height: 1.3;
}

html.kh-theme-modern-2026 #SchedulingApp .demographics .custom-radio-input .radio-icon {
    left: 12px;
    font-size: 22px;
}

html.kh-theme-modern-2026 #SchedulingApp .demographics .custom-radio-input label:not(:has(> input:disabled)):hover {
    border-color: var(--kh-primary);
}

html.kh-theme-modern-2026 #SchedulingApp .demographics .custom-radio-input label:has(> .radio-icon.checked) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 #SchedulingApp .demographics .custom-radio-input label:has(> input:disabled) {
    cursor: default;
    opacity: .65;
}

/* V4: Email / Note use the full width so they line up with the details list (Classic max-width 50%, centred) */
html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-additional-information {
    max-width: none;
}

/* ---- V3: survey - no grey corner marks (the Classic #F5F5F5 accordion body showed around the rounded white box), no
   line above the first question, lines between questions in the theme line colour ---- */
html.kh-theme-modern-2026 #SchedulingApp .scheduling-survey .react-sanfona-item-body {
    background-color: transparent;
}

html.kh-theme-modern-2026 #SchedulingApp .scheduling-survey ul.question-set > li.question {
    border-top-color: var(--kh-line);
}

html.kh-theme-modern-2026 #SchedulingApp .scheduling-survey ul.question-set > li.question:first-child {
    border-top: 0;
}

/* ---- H1-H3: Find a Provider / Choose a Location header ---- */
/* H1: title-band fields - same 12px inner spacing and 15px text in the select and the search boxes; the location select
   shows its empty "Select a Location" prompt in the placeholder grey (options stay dark); 16px on phones (iOS no-zoom) */
html.kh-theme-modern-2026 #SchedulingApp .portal-content-box-title :is(select, input).form-control {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 15px;
}

html.kh-theme-modern-2026 #SchedulingApp .portal-content-box-title select.form-control:has(> option[value=""]:checked) {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 #SchedulingApp .portal-content-box-title select.form-control option {
    color: var(--kh-ink);
}

@media screen and (max-width: 813px) {
    html.kh-theme-modern-2026 #SchedulingApp .portal-content-box-title :is(select, input).form-control {
        font-size: 16px;
    }
}

/* H2: "Find a Location or Search Appointments for All Providers" - quieter links (no underline until hover), muted
   "or", a little space below the fields */
html.kh-theme-modern-2026 .main-content.provider-selection .provider-header-links {
    margin-top: 6px;
}

html.kh-theme-modern-2026 .main-content.provider-selection .provider-header-links .change-button {
    font-weight: 500;
    text-decoration: none;
}

html.kh-theme-modern-2026 .main-content.provider-selection .provider-header-links .change-button:is(:hover, :focus) {
    text-decoration: underline;
}

html.kh-theme-modern-2026 .main-content.provider-selection .provider-header-links .link-separator {
    margin: 0 4px;
    color: var(--kh-muted);
    font-size: 13px;
}

/* H3: the light blue title band follows the card's rounded top corners */
html.kh-theme-modern-2026 .portal-content-box-title {
    border-radius: 11px 11px 0 0;
}

/* H2: on phones the two links wrap; centred under the full-width fields they read as one line of options */
@media screen and (max-width: 767px) {
    html.kh-theme-modern-2026 .main-content.provider-selection .provider-header-links {
        text-align: center;
    }
}

/* ---- H4: Find a Provider header links as small outlined pill buttons (white, light line, theme blue text, light blue
   on hover), 10px below the fields (they sat 1px under them) and a 36px tap height. #SchedulingApp in the selector so it
   wins over P11 ---- */
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links .change-button {
    min-height: 34px;
    margin-top: 10px;
    padding: 6px 14px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 999px;
    background-color: var(--kh-surface);
    color: var(--kh-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links .change-button:not(:disabled):is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
    text-decoration: none;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links .change-button:disabled {
    opacity: .5;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .portal-content-box-title {
    padding-bottom: 14px;
}

/* H4 layout: links and "or" in one flex row (right-aligned, centred vertically); on phones stacked full-width pills with
   "or" centred between them. The wrapper span around "or" + the second link is display: contents */
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 8px;
    margin: 10px 0 0;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links > span {
    display: contents;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links .change-button {
    margin-top: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links .link-separator {
    margin: 0;
}

@media screen and (max-width: 767px) {
    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links {
        flex-direction: column;
        align-items: stretch;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links .change-button {
        min-height: 44px;
        border-radius: 22px;
        white-space: normal;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links .link-separator {
        text-align: center;
    }
}

/* H4 layout: the links row sits beside the floated title / field columns, and Bootstrap's .row ::before / ::after
   clearfix boxes would become flex items; start it on its own line and drop those boxes */
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links {
    clear: both;
    width: 100%;
    margin-top: 0;
    padding-top: 10px;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links::before,
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-links::after {
    content: none;
}

/* ---- H7: wider screens - title on its own line, then one row with the location select, Provider Name and the H4
   outlined pills ("Find a Location" or "Search Appointments for All Providers"), vertically centred; the row wraps the
   pills under the fields on narrower screens. Phones keep the stacked layout ---- */
@media screen and (min-width: 768px) {
    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 16px;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions::before,
    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions::after {
        content: none;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions > div {
        flex: 0 0 100%;
        width: auto;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions > .text-right:has(> .row > #ProviderNameSearch) {
        flex: 1 1 360px;
        max-width: 600px;
        min-width: 0;
        margin-top: 10px;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions > .provider-header-links {
        flex: 0 0 auto;
        justify-content: flex-start;
        padding-top: 10px;
    }
}

/* ---- H8: 992px and up - the page title joins the same row (title, location select, Provider Name, pills); when
   there is not enough room the pills wrap to the next line. 768-991px keeps H7 (title on its own line) ---- */
@media screen and (min-width: 992px) {
    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions > div:has(> h1) {
        flex: 0 0 auto;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions > div:has(> h1) > h1 {
        margin: 0;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions > .text-right:has(> .row > #ProviderNameSearch) {
        flex-basis: 300px;
        margin-top: 0;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions {
        row-gap: 10px;
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-header-actions > .provider-header-links {
        padding-top: 0;
    }
}

/* ==========================================================================
   Provider cards C1-C6 (2026-11-19). Markup (provider-selection-provider-list-item.jsx): .provider-card >
   .provider-info.row > [.provider-image-container > img] + .provider-profile > h3.provider-name, span.provider-title,
   [span.provider-location], [button.profile-link], [.next-time-container], .select-provider-button-container > button.
   The profile is display: contents so its parts sit in the card grid: optional round photo on the left, text on the
   right, the Select button full width in the last row. Optional parts that are not rendered leave empty auto rows
   (no row gap, spacing is item margins); row 6 (1fr) takes any spare height so buttons line up across a row.
   ========================================================================== */

/* C5: even columns (3 on desktop, 2 on tablets, 1 on phones), equal-height cards */
html.kh-theme-modern-2026 .main-content.provider-selection .provider-list-container {
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 16px;
    justify-content: normal;
    align-items: stretch;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card {
    height: auto;
    margin: 0;
    background-color: var(--kh-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

/* C1 / C4: card grid */
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-info {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto 1fr auto;
    align-items: start;
    gap: 0 14px;
    min-height: 0;
    margin: 0;
    padding: 16px;
    overflow: visible;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-info:has(> .provider-image-container) {
    grid-template-columns: 72px minmax(0, 1fr);
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-profile {
    display: contents;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-info:has(> .provider-image-container) > .provider-profile > * {
    grid-column: 2;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-image-container {
    grid-row: 1 / span 4;
    grid-column: 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: var(--kh-primary-soft);
    overflow: hidden;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-info > .provider-profile > .select-provider-button-container {
    grid-row: 7;
    grid-column: 1 / -1;
    margin-top: 14px;
    display: flex;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-select {
    width: 100%;
    margin: 0;
}

/* C2: text */
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-name {
    display: -webkit-box;
    height: auto;
    margin: 2px 0 2px;
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-title {
    height: auto;
    font-size: 13px;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-title:not(:empty) {
    margin-bottom: 4px;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-location {
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 400;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-location::before {
    content: "\f041";
    margin-right: 6px;
    color: var(--kh-primary);
    font-family: FontAwesome;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .profile-link {
    justify-self: start;
    font-size: 13px;
    text-decoration: none;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .profile-link:is(:hover, :focus) {
    text-decoration: underline;
}

/* C3: next available time as a light blue tag */
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .next-time-container {
    justify-self: start;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
    font-size: 13px;
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .next-time-icon {
    color: var(--kh-primary);
}

/* C6: hover and picked */
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card:hover {
    border-color: var(--kh-primary);
    box-shadow: var(--kh-shadow);
}

html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card.provider-card-selected {
    background-color: var(--kh-primary-soft);
}

@media screen and (max-width: 767px) {
    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-info:has(> .provider-image-container) {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-image-container {
        width: 56px;
        height: 56px;
    }
}

/* C1-C6: Bootstrap .row clearfix pseudo-boxes would become extra grid rows (space under the button) */
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-info::before,
html.kh-theme-modern-2026 #SchedulingApp .provider-selection .provider-card .provider-info::after {
    content: none;
}

/* ==========================================================================
   Choose a Location L1-L7 (2026-11-19). Markup (location-selection-location-list-item.jsx): .location-card >
   .location-info.row > [.location-image-container > img] + .location-details > h3.location-name (i dot, name,
   [span.location-distance]), .touch-friendly-tooltip-container > .location-address, .row > [a.location-phone-number-
   container], [a.location-map-link-container], [.business-hours-container], [.wait-time-container],
   [.next-time-container], .location-select-button-container > button. Columns are Bootstrap floats; here the card is
   a flex column and the Select button is pushed to the bottom.
   ========================================================================== */

/* L1: title row - Facility Name box right after the title from 768px */
@media screen and (min-width: 768px) {
    html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-header-block > .row {
        display: flex;
        align-items: center;
        column-gap: 16px;
        margin: 0;
    }

    html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-header-block > .row::before,
    html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-header-block > .row::after {
        content: none;
    }

    html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-header-block .location-header {
        flex: 0 0 auto;
        width: auto;
        padding: 0;
    }

    html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-header-block .location-header > h1 {
        margin: 0;
    }

    html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-header-block .location-header-actions {
        flex: 0 1 360px;
        width: auto;
        min-width: 0;
        padding: 0;
    }

    html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-header-block .location-header-actions > input.form-control {
        float: none;
        width: 100%;
    }
}

/* L5: even columns, equal-height cards */
html.kh-theme-modern-2026 .main-content.location-selection .location-list-container {
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 16px;
    align-items: stretch;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card {
    display: flex;
    flex-direction: column;
    width: auto;
    margin: 0;
    padding: 0;
    float: none;
    background-color: var(--kh-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}

/* L4 / L6: card layout - optional photo banner on top, details fill the card, Select button at the bottom */
html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    margin: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card :is(.location-info, .location-details > .row)::before,
html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card :is(.location-info, .location-details > .row)::after {
    content: none;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-image-container {
    width: 100%;
    height: 140px;
    padding: 0;
    float: none;
    background-color: var(--kh-primary-soft);
    overflow: hidden;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-details {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    padding: 16px;
    float: none;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-details > .row {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-details > .row > * {
    width: auto;
    padding: 0;
    float: none;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-details > .row > .location-select-button-container {
    display: flex;
    align-self: stretch;
    margin-top: auto;
    padding-top: 14px;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .select-location {
    width: 100%;
    margin: 0;
}

/* L2: name, distance, address, contact rows */
html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-name {
    margin: 0 0 6px;
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-name-icon {
    display: none;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-distance {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    float: none;
    border-radius: 999px;
    background-color: var(--kh-panel);
    color: var(--kh-muted);
    font-size: 12px;
    font-weight: 400;
    vertical-align: 2px;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .touch-friendly-tooltip-container {
    padding-left: 22px;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .touch-friendly-tooltip-container::before {
    content: "\f041";
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    text-align: center;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-size: 14px;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-address {
    min-height: 0;
    margin-bottom: 4px;
    font-size: 13px;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card :is(.location-phone-number-container, .location-map-link-container, .business-hours-container, .wait-time-container) {
    margin: 4px 0 0;
    color: var(--kh-ink-2);
    font-size: 13px;
    font-weight: 400;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-map-link-container {
    color: var(--kh-primary);
    font-weight: 600;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card :is(.location-phone-number-container, .location-map-link-container, .business-hours-container, .wait-time-container) > i {
    display: inline-block;
    width: 18px;
    color: var(--kh-primary);
    text-align: center;
}

/* L3: next available time as a light blue tag */
html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .location-details > .row > .next-time-container {
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background-color: var(--kh-primary-soft);
    color: var(--kh-brand);
    font-size: 13px;
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card .next-time-icon {
    color: var(--kh-primary);
}

/* L7: hover and picked */
html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card:hover {
    border-color: var(--kh-primary);
    box-shadow: var(--kh-shadow);
}

html.kh-theme-modern-2026 #SchedulingApp .location-selection .location-card.is-selected {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
}

/* ---- T1-T3: appointment time boxes. Heights unchanged (the list uses fixed row heights): 46px box, 4px top / bottom
   padding, two 18px lines ---- */
/* T1: more room inside and between boxes (6px gap; widths reduced by the gap so 4 / 2 still fit per row) */
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card {
    margin-right: 6px;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card.col-xs-24 {
    width: calc(50% - 6px);
}

@media (min-width: 768px) {
    html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card.col-sm-12 {
        width: calc(25% - 6px);
    }
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card > .body {
    padding: 4px 10px;
}

/* T2: time navy 14px 600; resource name muted 11px */
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card .card-first-line {
    color: var(--kh-brand);
    font-size: 14px;
    font-weight: 600;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card .card-resource-name {
    color: var(--kh-muted);
    font-size: 11px;
}

/* T3: the square check box becomes a round check like the other choices; white text on the picked (blue) box */
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card .card-select-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    line-height: 16px;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card.selected :is(.card-first-line, .card-resource-name) {
    color: #FFFFFF;
}

/* T4: Classic paints hover / picked / error colour with a square .body::after layer inside the 6px-rounded box; round
   the layer (5px = box radius minus its 1px border) so the corners stay rounded */
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card > .body,
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card > .body::after {
    border-radius: 5px;
}

/* ---- F1-F3: Select an Appointment filters (Starting Date, Days of Week) ---- */
/* F1: both labels small muted 600 caps-free headings, same size */
html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .sticky-filters .schedule-filter > .control-label {
    margin-bottom: 6px;
    padding-left: 0;
    color: var(--kh-ink-2);
    font-size: 13px;
    font-weight: 600;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter > br {
    display: none;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .sticky-filters .schedule-filter > .control-label {
    display: block;
}

/* F2: days as toggle chips in one wrapping row (checkbox kept for keyboard / screen readers, drawn invisible); picked
   day blue with white text */
html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week-selection {
    width: 100%;
    padding: 0;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week-selection > .row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week-selection > .row::before,
html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week-selection > .row::after {
    content: none;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week .schedule-filter-days-of-the-week-selection .day-of-the-week-selection {
    display: block;
    width: auto;
    padding: 0;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week .schedule-filter-days-of-the-week-selection .day-of-the-week-selection .checkbox-inline {
    margin: 0;
    padding: 0;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .day-of-the-week-selection label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 36px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 999px;
    background-color: var(--kh-surface);
    color: var(--kh-ink);
    cursor: pointer;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week .schedule-filter-days-of-the-week-selection .day-of-the-week-selection .checkbox-inline input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    transform: none;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week .schedule-filter-days-of-the-week-selection .day-of-the-week-selection .checkbox-inline span {
    font-size: 14px;
    font-weight: 600;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .day-of-the-week-selection label:hover {
    border-color: var(--kh-primary);
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .sticky-filters .day-of-the-week-selection label:has(> input:checked) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary);
    color: #FFFFFF;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .day-of-the-week-selection label:has(> input:focus-visible) {
    outline: 2px solid var(--kh-primary);
    outline-offset: 2px;
}

@media screen and (max-width: 813px) {
    html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .day-of-the-week-selection label {
        height: 44px;
    }
}

/* F3: date field 44px like the other fields, room for the clear button; filter box padding even */
html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .datepicker__input {
    height: 44px;
    padding-right: 36px;
    font-size: 15px;
}

html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters.well {
    padding: 12px 14px;
}

/* F2: Sat / Sun sit in an extra wrapper div; let them join the same chip row */
html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week-selection > .row > div:not(.day-of-the-week-selection) {
    display: contents;
}

@media screen and (max-width: 813px) {
    html.kh-theme-modern-2026 .main-content.find-appointment .sticky-filters .schedule-filter-days-of-the-week {
        margin-top: 12px;
    }
}

/* ---- S1: Select an Appointment - chosen location / provider. Each becomes one rounded white field (no seam between
   the value and CHANGE): a blue icon (map pin for location, doctor for provider), the chosen name in normal ink
   (Classic shows it as a greyed-out disabled field), and CHANGE as a small outlined pill like the Find a Provider
   buttons ---- */
html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .input-group {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 6px 0 12px;
    border: 1px solid var(--kh-control-border);
    border-radius: 8px;
    background-color: var(--kh-surface);
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .input-group::before {
    flex: 0 0 auto;
    width: 18px;
    margin-right: 8px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-size: 15px;
    text-align: center;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .location-selection-button::before {
    content: "\f041";
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .provider-selection-button::before {
    content: "\f0f0";
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .input-group::after {
    content: none;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .fake-selection {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    color: var(--kh-ink);
    font-size: 15px;
    font-weight: 600;
    opacity: 1;
    cursor: default;
    -webkit-text-fill-color: var(--kh-ink);
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .input-group-addon {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .input-group-text {
    padding: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .change-button {
    min-height: 30px;
    padding: 4px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 999px;
    background-color: var(--kh-surface);
    color: var(--kh-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .change-button:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

@media screen and (max-width: 767px) {
    html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .form-inline > .col-xs-2 {
        display: none;
    }

    html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .input-group + .col-xs-2 + .input-group,
    html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .portal-content-box-title .header-buttons .input-group ~ .input-group {
        margin-top: 8px;
    }
}

/* T5: the app groups times into fixed rows (4 per row on computers, decided once when the page opens); let a row
   wrap so a narrowed desktop window shows 2 per line instead of running off the side */
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slots-container .row-eq-height {
    flex-wrap: wrap;
}

/* ---- B1: bar shown after picking a time (.create-appointment-simple: Classic floats 1em above the bottom with a
   heavy black shadow, Continue centred, Cancel an underlined link pinned right). Now a bar along the bottom edge with
   a light top line and soft shadow (iPhone home-bar safe area respected); Cancel (outlined) and Continue (orange) side
   by side in the middle, same 44px height; on phones Continue takes the remaining width ---- */
html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .create-appointment-simple {
    bottom: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--kh-line);
    background-color: var(--kh-surface);
    box-shadow: 0 -4px 16px rgba(30, 58, 95, .12);
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .create-appointment-simple .simple-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .create-appointment-simple .create-appointment {
    flex: 0 1 240px;
    margin: 0;
    border-radius: 6px;
    font-size: 15px;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .create-appointment-simple .cancel {
    position: static;
    order: -1;
    min-height: 44px;
    margin: 0;
    padding: 0 20px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 6px;
    background-color: var(--kh-surface);
    color: var(--kh-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .create-appointment-simple .cancel:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

@media screen and (max-width: 500px) {
    html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .create-appointment-simple .create-appointment {
        flex: 1 1 auto;
    }
}

/* ---- G1: day headings in the appointment list - date navy 16px with a blue calendar icon; Visit Reason and Location
   as one quiet line of details under it (blue icons, muted labels) instead of a grey/blue bar plus a separate bold
   line. Heights are re-measured by the list, so the shorter header is safe ---- */
html.kh-theme-modern-2026 .main-content.find-appointment .portal-content-box-content .schedule-date-group-header {
    display: block;
    margin: 12px 0 6px;
    padding: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

html.kh-theme-modern-2026 .main-content.find-appointment .portal-content-box-content .schedule-date-group-header::before {
    content: "\f073";
    margin-right: 8px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-size: 15px;
    font-weight: 400;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 18px;
    margin: 0 0 8px;
    padding: 0;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header::before,
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header::after {
    content: none;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header .visit-reason-subheader {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--kh-ink);
    font-size: 13px;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header .location-subheader {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header :is(.visit-reason-subheader-label, .location-name-label) {
    color: var(--kh-muted);
    font-weight: 400;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header .visit-reason-subheader::before,
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header .location-subheader::before {
    display: inline-block;
    width: 16px;
    margin-right: 4px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    text-align: center;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header .visit-reason-subheader::before {
    content: "\f0f1";
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header .location-subheader::before {
    content: "\f041";
}

/* G1: wrapped Visit Reason / Location text lines up after the icon (icon positioned in the left padding) */
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header :is(.visit-reason-subheader, .location-subheader) {
    position: relative;
    padding-left: 20px;
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-location-group-header :is(.visit-reason-subheader, .location-subheader)::before {
    position: absolute;
    top: 0;
    left: 0;
}

/* ---- A1: "Can't find a matching time slot?" - a light blue help panel; the three options are outlined secondary
   buttons (Classic orange btn-warning competed with Continue, the main action) with an icon, equal width in a wrapping
   row on wider screens and stacked full width (44px) on phones ---- */
html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .search-again-button {
    float: none;
    margin-top: 16px;
    padding: 18px 16px;
    border: 1px solid var(--kh-line);
    border-radius: 10px;
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .search-again-button {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .search-again-description {
    flex: 0 0 100%;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .search-again-description > p {
    margin: 0 0 4px;
    color: var(--kh-brand);
    font-size: 15px;
    font-weight: 600;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .search-again-description > p::before {
    content: "\f002";
    margin-right: 8px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-weight: 400;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .search-again-action {
    flex: 1 1 220px;
    max-width: 320px;
    min-height: 44px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 8px;
    background: var(--kh-surface);
    box-shadow: none;
    color: var(--kh-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: none;
    white-space: normal;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .search-again-action:is(:hover, :focus) {
    border-color: var(--kh-primary);
    background: var(--kh-surface);
    box-shadow: 0 0 0 1px var(--kh-primary);
    color: var(--kh-primary-strong);
}

@media screen and (max-width: 767px) {
    html.kh-theme-modern-2026 #SchedulingApp .main-content.find-appointment .search-again-action {
        flex-basis: 100%;
        max-width: none;
    }
}

/* ---- D1: Starting Date calendar pop-up (react-datepicker, attached to body via tether, so scoped with
   body:has(#SchedulingApp) to keep staff pages unchanged). White rounded card with a soft shadow; month title navy;
   round day cells (36px, 40px on phones); today ringed blue, picked day solid blue, hover light blue; unavailable
   days light grey, other-month days muted ---- */
html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__tether-element {
    z-index: 1050;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker {
    padding: 8px;
    border: 1px solid var(--kh-line);
    border-radius: 12px;
    background-color: var(--kh-surface);
    box-shadow: var(--kh-shadow);
    font-family: inherit;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__triangle {
    display: none;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__header {
    padding: 6px 0 4px;
    border-bottom: 1px solid var(--kh-line);
    border-radius: 0;
    background-color: transparent;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__current-month {
    margin-bottom: 6px;
    color: var(--kh-brand);
    font-size: 15px;
    font-weight: 600;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__navigation {
    top: 14px;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__navigation--previous {
    border-right-color: var(--kh-primary);
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__navigation--next {
    border-left-color: var(--kh-primary);
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__header .datepicker__day {
    color: var(--kh-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: default;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__day {
    width: 36px;
    height: 36px;
    margin: 1px;
    border-radius: 50%;
    color: var(--kh-ink);
    font-size: 14px;
    line-height: 36px;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__month .datepicker__day:not(.datepicker__day--disabled, .datepicker__day--selected):hover {
    border-radius: 50%;
    background-color: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__day--outside-month {
    color: var(--kh-muted);
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__day--disabled {
    color: var(--kh-line-strong);
    cursor: default;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__day--today {
    box-shadow: inset 0 0 0 1px var(--kh-primary);
    color: var(--kh-primary);
    font-weight: 600;
}

html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__day--selected,
html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__day--selected:hover {
    border-radius: 50%;
    background-color: var(--kh-primary);
    box-shadow: none;
    color: #FFFFFF;
    font-weight: 600;
}

@media screen and (max-width: 500px) {
    html.kh-theme-modern-2026 body:has(#SchedulingApp) .datepicker__day {
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
}

/* ---- R1: Review page - labels lighter (set in the V4 label rule: muted, normal weight) and values darker so the details are what
   stands out; edit / Select Another Appointment Time without the dotted underline (underline on hover); Email / Note
   labels like the other field labels; "or" muted ---- */
html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .label + span {
    color: var(--kh-ink);
    font-weight: 500;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .change-button {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .change-button:is(:hover, :focus) {
    text-decoration: underline;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-review .appointment-additional-information .control-label {
    color: var(--kh-ink-2);
    font-size: 13px;
    font-weight: 600;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .go-back-container {
    margin-top: 10px;
    color: var(--kh-muted);
}

/* ---- R2: Review page text - easier reading: values 15px, labels 14px, both 1.4 line height (labels were 14px
   tall lines); rows 10px apart; date with a blue calendar icon and Provider / Location with blue icons like the
   appointment list; address muted 13px; edit 14px; Email / Note labels 14px ink; Book button 16px, wider; step
   labels 600 instead of bold ---- */
html.kh-theme-modern-2026 .main-content.scheduling-review .info-row {
    padding: 10px 0;
    line-height: 1.4;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .label {
    font-size: 14px;
    line-height: 1.4;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .label + span {
    font-size: 15px;
    line-height: 1.4;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-date::before {
    content: "\f073";
    margin-right: 10px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    font-size: 17px;
    font-weight: 400;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-block :is(.provider-label, .location-label)::before {
    display: inline-block;
    width: 16px;
    margin-right: 6px;
    color: var(--kh-primary);
    font-family: FontAwesome;
    text-align: center;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-block .provider-label::before {
    content: "\f0f0";
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-block .location-label::before {
    content: "\f041";
}

html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-location-address {
    color: var(--kh-muted);
    font-size: 13px;
    line-height: 1.4;
}

html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .change-button {
    font-size: 14px;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-review .appointment-additional-information .control-label {
    margin-bottom: 6px;
    color: var(--kh-ink);
    font-size: 14px;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-review .appointment-additional-information .required-field {
    margin-right: 2px;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-review .appointment-additional-information textarea.form-control {
    padding: 10px 12px;
    border-color: var(--kh-control-border);
    border-radius: var(--kh-radius);
    font-size: 15px;
    line-height: 1.4;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-review .section-footer .continue-button {
    min-width: 280px;
    font-size: 16px;
    letter-spacing: .02em;
}

html.kh-theme-modern-2026 .progress-text {
    font-weight: 600;
}

@media screen and (max-width: 500px) {
    html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-review .section-footer .continue-button {
        min-width: 0;
    }

    html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-review .appointment-additional-information textarea.form-control {
        font-size: 16px;
    }
}

/* R2: the address is 13px now, so line it up with the values (10em of the 14px row + 12px gap) in px */
html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-location-address {
    margin-left: 152px;
}

@media screen and (max-width: 500px) {
    html.kh-theme-modern-2026 .main-content.scheduling-review .appointment-location-address {
        margin-left: 0;
    }
}

/* ---- R3: label / value balance - labels one step darker (ink-2) and values regular weight, so the two read as a pair
   rather than faint labels next to heavy values ---- */
html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .label {
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 .main-content.scheduling-review .info-row > .label + span {
    font-weight: 400;
}

/* ---- Q1: careflow questions on the patient survey - question navy 16px 600 with 1.4 line height and 10px space
   before the answers; answers 15px with 1.4 line height and 10px between the circle and the text; 18px between
   questions. Sizes authored inside the question text (inline styles) still win ---- */
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set .question-label,
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set .question-label > label {
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set .question-label {
    margin-bottom: 4px;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer label,
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set .icheck-label {
    color: var(--kh-ink);
    font-size: 15px;
    line-height: 1.4;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set .icheck-label {
    margin-left: 10px;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set > li.question + li.question {
    margin-top: 8px;
    padding-top: 18px;
}

/* ---- Q2: survey vertical rhythm. Every question block gets the same 6px above and below with the divider line in
   the middle (was 6px under a question, then    8px + 18px over the next); spacing only between
      questions, so nothing is added above the first or below the last. Text questions: label styled like the other questions, the <br> gap and the form-group
   margin removed so the box sits 4px under its label; "(required)" a small muted note instead of a red error ---- */
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set > li.question {
    margin-top: 0;
    padding: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set > li.question + li.question {
    margin-top: 6px;
    padding: 6px 0 0;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer .form-group {
    margin-bottom: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set .smalltext-answer > br {
    display: none;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set .smalltext-answer > label {
    display: block;
    margin-bottom: 4px;
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set .smalltext-answer > label > .error {
    display: inline;
    margin-left: 4px;
    color: var(--kh-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: inherit;
}

/* Q2: title band - Back sits at the left on the title's line from 768px instead of a line of its own under it */
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey .portal-content-box-title {
    position: relative;
    padding: 16px 18px;
}

@media screen and (min-width: 768px) {
    html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey .portal-content-box-title > div:has(> .sub-header-back-button) {
        position: absolute;
        top: 50%;
        left: 18px;
        width: auto;
        padding: 0;
        transform: translateY(-50%);
    }
}

/* ---- Q3: survey answers closer together on desktop - row padding 1px (Classic 2.4px), label min 22px: answers about
   24px apart (was 29). Phones keep the 40px tap rows (P5b) ---- */
@media screen and (min-width: 814px) {
    html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer {
        padding-top: 1px;
        padding-bottom: 1px;
    }

    html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer label {
        min-height: 22px;
    }
}

/* ---- Q4: survey text consistency. Typed-answer questions ("Name of medication...") lost their question style to the
   answer-label rule (15px black); same navy 16px 600 as the other questions now. Answer text one shade softer
   (ink-2) so questions lead; the typed-answer box spans the full question width (Classic col-sm-46) ---- */
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer .smalltext-answer > label,
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer .smalltext-answer > label > span:not(.error) {
    color: var(--kh-brand);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer .smalltext-answer > label > .error {
    font-size: 13px;
    font-weight: 400;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer :is(.icheck-label, label:not(.smalltext-answer > label)) {
    color: var(--kh-ink-2);
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer > .row > .col-sm-46:has(.smalltext-answer) {
    width: 100%;
}

/* ==========================================================================
   Survey question text X4 (2026-11-19; X1-X3 and X5 tried and removed)
   ========================================================================== */
/* X4: "(required)" on typed / date answers becomes a red asterisk after the question (those labels only ever say
   "(required)"; the question-level note can also read "at least one selection is required", so it keeps its text) */
html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer :is(.smalltext-answer, .text-answer, .date-answer) > label > .error {
    margin-left: 2px;
    font-size: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .main-content.scheduling-survey ul.question-set li.answer :is(.smalltext-answer, .text-answer, .date-answer) > label > .error::after {
    content: "*";
    color: #C62828;
    font-size: 16px;
    font-weight: 600;
}

/* ==========================================================================
   Visit reason list V7-V9 (2026-11-19). Markup (visit-reason-list-item.jsx): .visit-reason-list-item >
   .visit-reason-list-item-text(.has-children)(.is-disabled) > .visit-reason-list-item-text-selectable >
   .reason-for-visit-list-icon (chevron for groups, circle for reasons) + name; an open group adds
   .visit-reason-list-item-options with its child .visit-reason-list-item rows.
   ========================================================================== */

/* V7: shorter rows - 44px (was 48), 6px apart (was 8) */
html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item {
    margin-top: 0;
    margin-bottom: 6px;
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text-selectable {
    min-height: 44px;
    padding: 8px 14px;
}

/* V8: group rows look like section headers (light blue fill, semi-bold navy, arrow on the right) */
html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text.has-children > .visit-reason-list-item-text-selectable {
    border-color: var(--kh-info-line);
    background-color: var(--kh-subheader);
    color: var(--kh-brand);
    font-weight: 600;
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text.has-children > .visit-reason-list-item-text-selectable:hover {
    border-color: var(--kh-primary);
    background-color: var(--kh-primary-soft);
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text.has-children > .visit-reason-list-item-text-selectable > .reason-for-visit-list-icon {
    order: 2;
    margin-left: auto;
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text.has-children .reason-for-visit-list-icon > i {
    font-size: 14px;
}

/* V8: an open group's reasons sit in a soft panel joined to the group row, with a blue guide line on the left */
html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text.has-children:has(+ .visit-reason-list-item-options) > .visit-reason-list-item-text-selectable {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-options {
    padding: 8px 8px 2px 12px;
    border: 1px solid var(--kh-info-line);
    border-top: 0;
    border-left: 3px solid var(--kh-primary);
    border-radius: 0 0 var(--kh-radius-card) var(--kh-radius-card);
    background-color: var(--kh-panel);
}

html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item .visit-reason-list-item {
    padding-left: 0;
}

/* V9: an open group's reasons in two columns when there is room (desktop) */
@media screen and (min-width: 992px) {
    html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-options {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        column-gap: 6px;
    }

    html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-options > .visit-reason-list-item {
        width: auto;
        float: none;
    }
}

/* V7: the 18px reason icon's tall line box made rows 48px; keep it to the icon height */
html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text-selectable > .reason-for-visit-list-icon,
html.kh-theme-modern-2026 #SchedulingApp .visit-reason-list-item-text-selectable > .reason-for-visit-list-icon > i {
    line-height: 1;
}

/* ---- T6: time boxes get the same soft shadow as the provider / location cards (shadow does not change the box size,
   so the fixed-height list is unaffected); a slightly stronger one on hover ---- */
html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card {
    box-shadow: var(--kh-shadow-sm);
}

html.kh-theme-modern-2026 .main-content.find-appointment .appointment-slot-list-card.selectable-card:hover:not(.selected, .locked, .booked):not(.select-busy *) {
    box-shadow: 0 2px 6px rgba(30, 58, 95, .14);
}

