/* ==========================================================================
   MedEzee brand — component rules  ·  BRAND-01(c)
   --------------------------------------------------------------------------
   Load position: LAST. After Skote's app.min.css and after custom/css/medezee.css.
   Tokens live in medezee-brand-tokens.css, which loads FIRST. Do not merge.

   NOT in this file (deliberately, they belong to later tickets):
     · sidebar / app shell  → BRAND-04
     · auth card surfaces   → BRAND-06
     · shift + role chips   → BRAND-09
   ========================================================================== */

/* ==========================================================================
   1a. Bootstrap 5 / Skote :root bridge
   --------------------------------------------------------------------------
   CORRECTION TO BRAND-01: the ticket puts this block in medezee-brand-tokens.css
   (loaded first). That does not work. Skote's assets/css/bootstrap.min.css
   declares --bs-primary:#556ee6 on :root and loads AFTER the tokens file; two
   :root declarations tie on specificity, so Skote wins and the bridge is dead.
   Verified in the browser 07-Aug-2026 — getComputedStyle reported #556ee6.

   The bridge therefore lives here, in the sheet that loads last.

   What this block actually buys: only the components that read var(--bs-primary)
   directly — the colour UTILITIES (.text-primary, .bg-primary, .border-primary,
   .link-primary) plus body colour/bg and border-color. Everything else needs
   section 1b below.
   ========================================================================== */

:root {
    --bs-primary:            #4F46E5;
    --bs-primary-rgb:        79, 70, 229;
    --bs-secondary:          #047857;
    --bs-secondary-rgb:      4, 120, 87;
    --bs-success:            #047857;
    --bs-success-rgb:        4, 120, 87;
    --bs-warning:            #D97706;
    --bs-warning-rgb:        217, 119, 6;
    --bs-danger:             #DC2626;
    --bs-danger-rgb:         220, 38, 38;
    --bs-info:               #4F46E5;
    --bs-info-rgb:           79, 70, 229;
    --bs-body-color:         #334155;
    --bs-body-color-rgb:     51, 65, 85;
    --bs-body-bg:            #F8FAFC;
    --bs-body-bg-rgb:        248, 250, 252;
    --bs-border-color:       #E2E8F0;
    --bs-link-color:         #4F46E5;
    --bs-link-color-rgb:     79, 70, 229;
    --bs-link-hover-color:   #4338CA;
    --bs-body-font-family:   var(--font-family-main);
    --bs-body-font-size:     .875rem;
    --bs-border-radius:      .5rem;
}

/* ==========================================================================
   1b. Bootstrap COMPONENT bridge
   --------------------------------------------------------------------------
   Bootstrap 5.3.2 compiles every component variant with LITERAL HEX in a
   component-scoped variable, e.g.
       .btn-primary  { --bs-btn-bg:#556ee6 }
       .nav-pills    { --bs-nav-pills-link-active-bg:#556ee6 }
       .pagination   { --bs-pagination-active-bg:#556ee6 }
   Those ignore --bs-primary entirely. Because the declaration sits on the
   component selector, even a correctly-ordered :root override can never win —
   it has to be redeclared at the same selector, from a file that loads after
   Skote. That is what this section does. It is still one place, not N rulesets.
   ========================================================================== */

.btn-primary {
    --bs-btn-bg: var(--me-primary);
    --bs-btn-border-color: var(--me-primary);
    --bs-btn-hover-bg: var(--me-primary-hover);
    --bs-btn-hover-border-color: var(--me-primary-hover);
    --bs-btn-active-bg: var(--me-primary-deep);
    --bs-btn-active-border-color: var(--me-primary-deep);
    --bs-btn-disabled-bg: var(--me-primary);
    --bs-btn-disabled-border-color: var(--me-primary);
    --bs-btn-focus-shadow-rgb: 79, 70, 229;
}

.btn-outline-primary {
    --bs-btn-color: var(--me-primary);
    --bs-btn-border-color: var(--me-primary);
    --bs-btn-hover-bg: var(--me-primary);
    --bs-btn-hover-border-color: var(--me-primary);
    --bs-btn-active-bg: var(--me-primary-deep);
    --bs-btn-active-border-color: var(--me-primary-deep);
    --bs-btn-disabled-color: var(--me-primary);
    --bs-btn-disabled-border-color: var(--me-primary);
    --bs-btn-focus-shadow-rgb: 79, 70, 229;
}

.btn-success {
    --bs-btn-bg: var(--me-success);
    --bs-btn-border-color: var(--me-success);
    --bs-btn-hover-bg: var(--me-success-text);
    --bs-btn-hover-border-color: var(--me-success-text);
    --bs-btn-active-bg: var(--me-success-text);
    --bs-btn-active-border-color: var(--me-success-text);
    --bs-btn-disabled-bg: var(--me-success);
    --bs-btn-disabled-border-color: var(--me-success);
}

/* UI-POLISH-01: Skote's literal hexes for these variants all failed AA on
   white — #34c38f outline-success 2.25:1, #50a5f1 info 2.63:1, #74788d
   outline-secondary 4.36:1 (4.17:1 on --me-bg). */
.btn-outline-success {
    --bs-btn-color: var(--me-success);
    --bs-btn-border-color: var(--me-success);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--me-success);
    --bs-btn-hover-border-color: var(--me-success);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--me-success-text);
    --bs-btn-active-border-color: var(--me-success-text);
    --bs-btn-disabled-color: var(--me-success);
    --bs-btn-disabled-border-color: var(--me-success);
}

.btn-info {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--me-info);
    --bs-btn-border-color: var(--me-info);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--me-info-text);
    --bs-btn-hover-border-color: var(--me-info-text);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--me-primary-deep);
    --bs-btn-active-border-color: var(--me-primary-deep);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--me-info);
    --bs-btn-disabled-border-color: var(--me-info);
}

.btn-outline-info {
    --bs-btn-color: var(--me-info);
    --bs-btn-border-color: var(--me-info);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--me-info);
    --bs-btn-hover-border-color: var(--me-info);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--me-info-text);
    --bs-btn-active-border-color: var(--me-info-text);
    --bs-btn-disabled-color: var(--me-info);
    --bs-btn-disabled-border-color: var(--me-info);
}

.btn-outline-secondary {
    --bs-btn-color: #475569;
    --bs-btn-border-color: #94A3B8;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #475569;
    --bs-btn-hover-border-color: #475569;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #475569;
    --bs-btn-active-border-color: #475569;
    --bs-btn-disabled-color: #475569;
    --bs-btn-disabled-border-color: #94A3B8;
}

/* Skote literals still carrying #556EE6 (4.41:1 on white) after the bridge above. */
.nav-tabs-custom .nav-item .nav-link.active { color: var(--me-primary); }
.btn-soft-primary { color: var(--me-primary); background-color: rgba(79, 70, 229, .1); border-color: transparent; }
.btn-soft-primary:hover,
.btn-soft-primary:focus,
.btn-soft-primary:active { color: #fff; background-color: var(--me-primary); }
[data-bs-theme="dark"] .btn-soft-primary { color: #A5B4FC; }
[data-bs-theme="dark"] .nav-tabs-custom .nav-item .nav-link.active { color: #A5B4FC; }

.text-info { color: var(--me-info) !important; }
a.text-info:hover { color: var(--me-info-text) !important; }

.btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--me-warning);
    --bs-btn-border-color: var(--me-warning);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--me-warning-text);
    --bs-btn-hover-border-color: var(--me-warning-text);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--me-warning-text);
    --bs-btn-active-border-color: var(--me-warning-text);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--me-warning);
    --bs-btn-disabled-border-color: var(--me-warning);
}

.btn-danger {
    --bs-btn-bg: var(--me-danger);
    --bs-btn-border-color: var(--me-danger);
    --bs-btn-hover-bg: var(--me-danger-text);
    --bs-btn-hover-border-color: var(--me-danger-text);
    --bs-btn-active-bg: var(--me-danger-text);
    --bs-btn-active-border-color: var(--me-danger-text);
    --bs-btn-disabled-bg: var(--me-danger);
    --bs-btn-disabled-border-color: var(--me-danger);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--me-primary);
}

.pagination {
    --bs-pagination-color: var(--me-primary);
    --bs-pagination-hover-color: var(--me-primary-hover);
    --bs-pagination-active-bg: var(--me-primary);
    --bs-pagination-active-border-color: var(--me-primary);
    --bs-pagination-focus-color: var(--me-primary-hover);
}

.list-group {
    --bs-list-group-active-bg: var(--me-primary);
    --bs-list-group-active-border-color: var(--me-primary);
    --bs-list-group-action-active-bg: var(--me-bg);
}

.dropdown-menu {
    --bs-dropdown-link-active-bg: var(--me-primary);
    --bs-dropdown-link-active-color: #fff;
}

.progress {
    --bs-progress-bar-bg: var(--me-primary);
}

/* Form controls compile the checked/focus colour as literal hex too. */
.form-check-input:checked {
    background-color: var(--me-primary);
    border-color: var(--me-primary);
}

.form-check-input:focus {
    border-color: var(--me-primary);
    box-shadow: var(--me-focus-ring);
}

.form-switch .form-check-input:focus {
    border-color: var(--me-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--me-primary);
    box-shadow: var(--me-focus-ring);
}

/* ==========================================================================
   2. Base typography
   ========================================================================== */

body {
    font-family: var(--font-family-main);
    color: var(--me-body);
    background-color: var(--me-bg);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-family-main);
    font-weight: 600;
    color: var(--me-ink);
}

a {
    color: var(--me-primary);
}

a:hover,
a:focus {
    color: var(--me-primary-hover);
}

.text-muted {
    color: var(--me-muted) !important;
}

/* Figures must align in every amount column — Billing, IPD, Payments, reports.
   Apply .num to any cell or span holding a quantity or currency value. */
.num,
.text-num,
td.num,
th.num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    text-align: right;
}

/* ==========================================================================
   3. Brand lockup
   --------------------------------------------------------------------------
   .brand-ezee is the ON-LIGHT emerald. On the dark shell it must switch to
   --me-sidebar-ezee (#34D399) — #059669 does not reach AA on #0F172A.
   That override ships with BRAND-04.
   ========================================================================== */

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .2px;
    line-height: 1;
}

.brand-logo:hover,
.brand-logo:focus {
    text-decoration: none;
}

.brand-logo img {
    display: block;
    height: 32px;
    width: auto;
}

.brand-med {
    color: var(--me-primary);
}

.brand-ezee {
    color: var(--me-secondary);
}

/* ==========================================================================
   4. Brand buttons
   --------------------------------------------------------------------------
   One primary CTA per screen. .btn-ezee-secondary is a SECONDARY action —
   never use it as the only call to action on a page, and never on auth.
   ========================================================================== */

.btn-med-primary {
    color: #fff;
    background-color: var(--me-primary);
    border: 1px solid var(--me-primary);
    border-radius: var(--me-radius);
    font-weight: 600;
}

.btn-med-primary:hover,
.btn-med-primary:focus {
    color: #fff;
    background-color: var(--me-primary-hover);
    border-color: var(--me-primary-hover);
}

.btn-med-primary:active {
    color: #fff;
    background-color: var(--me-primary-deep);
    border-color: var(--me-primary-deep);
}

.btn-med-primary:disabled,
.btn-med-primary.disabled {
    background-color: var(--me-primary);
    border-color: var(--me-primary);
    opacity: .55;
}

.btn-ezee-secondary {
    color: #fff;
    background-color: var(--me-secondary);
    border: 1px solid var(--me-secondary);
    border-radius: var(--me-radius);
    font-weight: 600;
}

.btn-ezee-secondary:hover,
.btn-ezee-secondary:focus {
    color: #fff;
    background-color: var(--me-success-text);
    border-color: var(--me-success-text);
}

.btn-med-outline {
    color: var(--me-primary);
    background-color: transparent;
    border: 1px solid var(--me-primary);
    border-radius: var(--me-radius);
    font-weight: 600;
}

.btn-med-outline:hover,
.btn-med-outline:focus {
    color: #fff;
    background-color: var(--me-primary);
    border-color: var(--me-primary);
}

/* ==========================================================================
   5. Focus
   --------------------------------------------------------------------------
   :focus-visible only — a visible ring on every mouse click is noise. Keyboard
   traversal must always show focus (BRAND-16 acceptance).
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--me-primary);
    outline-offset: 2px;
    box-shadow: none;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid var(--me-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   6. Surfaces
   ========================================================================== */

.card {
    background-color: var(--me-surface);
    border: 1px solid var(--me-line);
    border-radius: var(--me-radius-lg);
    box-shadow: var(--me-shadow-sm);
}

.card-header {
    background-color: var(--me-surface);
    border-bottom: 1px solid var(--me-line);
    font-weight: 600;
    color: var(--me-ink);
}

.table {
    --bs-table-border-color: var(--me-line);
}

/* ==========================================================================
   7. Status badges  ·  groundwork for BRAND-08
   --------------------------------------------------------------------------
   Tint background + dark text + 1px border. The text colour is always the
   *-text token, never the base token — badge captions are small text and the
   base tokens fail AA below 24px.

   EVERY badge must carry a text label. Colour alone is not a status.
   ========================================================================== */

.me-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .5rem;
    border-radius: var(--me-radius-sm);
    border: 1px solid transparent;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.me-badge-success {
    color: var(--me-success-text);
    background-color: #ECFDF5;
    border-color: #A7F3D0;
}

.me-badge-warning {
    color: var(--me-warning-text);
    background-color: #FFFBEB;
    border-color: #FDE68A;
}

.me-badge-danger {
    color: var(--me-danger-text);
    background-color: #FEF2F2;
    border-color: #FECACA;
}

.me-badge-info {
    color: var(--me-info-text);
    background-color: #EEF2FF;
    border-color: #C7D2FE;
}

.me-badge-approval {
    color: #6D28D9;
    background-color: #F5F3FF;
    border-color: #DDD6FE;
}

.me-badge-neutral {
    color: #475569;
    background-color: #F1F5F9;
    border-color: var(--me-line);
}

.me-badge-frozen {
    color: #3730A3;
    background-color: #EEF2FF;
    border-color: #C7D2FE;
}

/* ==========================================================================
   8. Callouts
   ========================================================================== */

.ainote {
    background-color: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-left: 4px solid var(--me-primary);
    border-radius: var(--me-radius);
    padding: .65rem .9rem;
    font-size: .85rem;
    color: var(--me-body);
}

.note-warn {
    background-color: #FFFBEB;
    border: 1px solid #FDE68A;
    border-left: 4px solid var(--me-warning);
    border-radius: var(--me-radius);
    padding: .65rem .9rem;
    font-size: .85rem;
    color: var(--me-body);
}

/* ==========================================================================
   9. Print
   --------------------------------------------------------------------------
   Scope note: this is the app's generic print stylesheet — internal reports,
   list screens, roster/muster packs. It must NOT be relied on to style the
   patient bill/invoice, QR bill landing pages or their PDFs. Those stay on
   TENANT branding per BR-3 and are handled in BRAND-13.
   ========================================================================== */

@media print {
    body {
        background: #fff;
        color: #000;
    }

    .card {
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
    }

    .me-badge {
        border: 1px solid #999;
        color: #000;
        background: transparent;
    }

    a[href]::after {
        content: "";
    }

    .no-print,
    .btn,
    .vertical-menu,
    #page-topbar,
    .right-bar {
        display: none !important;
    }
}

/* ==========================================================================
   10. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Keep wide hospital logos within the 250px navigation brand box. */
.navbar-brand-box img { max-width: 160px; object-fit: contain; }

/* The collapsed 70px box retains 24px padding on each side. */
.navbar-brand-box .logo-sm img { max-width: 22px; }

/* ==========================================================================
   11. Button content (UI-POLISH-01)
   --------------------------------------------------------------------------
   Icon + label sit on ONE line, vertically centred. Bootstrap's .btn is
   inline-block with normal white-space, so a button in a narrow column broke
   after its icon and stacked the label underneath (Appointments filter,
   Enquiries row Edit). Fixed here once rather than per view. A button that
   genuinely needs to wrap opts out with Bootstrap's .text-wrap.
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn > i,
.btn > .bx,
.btn > .mdi,
.btn > .fa,
.btn > .fas,
.btn > .far {
    line-height: 1;
    flex-shrink: 0;
}

/* Dark theme: the darkened light-theme text colours above would sink into a
   dark surface, so the outline variants switch to light tints there. */
[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #CBD5E1;
    --bs-btn-border-color: #64748B;
    --bs-btn-disabled-color: #CBD5E1;
}

[data-bs-theme="dark"] .btn-outline-success {
    --bs-btn-color: #6EE7B7;
    --bs-btn-border-color: #34D399;
    --bs-btn-disabled-color: #6EE7B7;
}

[data-bs-theme="dark"] .btn-outline-info,
[data-bs-theme="dark"] .text-info {
    --bs-btn-color: #A5B4FC;
    --bs-btn-border-color: #818CF8;
    --bs-btn-disabled-color: #A5B4FC;
}

[data-bs-theme="dark"] .text-info { color: #A5B4FC !important; }

/* UI-POLISH-01: the dark sidebar is position:fixed, so it fills the viewport on screen but a
   full-page capture (screenshots, print-to-PDF of the dashboard) showed it ending after the first
   screen. Painting the same colour into the page's left gutter keeps it full height in both. */
@media (min-width: 992px) {
    body[data-sidebar="dark"]:not(.vertical-collpsed) {
        background: linear-gradient(90deg, var(--me-sidebar-bg) 250px, var(--bs-body-bg) 250px);
    }
    body[data-sidebar="dark"].vertical-collpsed {
        background: linear-gradient(90deg, var(--me-sidebar-bg) 70px, var(--bs-body-bg) 70px);
    }
}

/* ==========================================================================
   12. Narrow-screen toolbars (UI-POLISH-02)
   --------------------------------------------------------------------------
   §11 made every .btn nowrap, so a row of three or four buttons can no longer
   shrink by wrapping its labels. On a phone (360–390px) such a row must wrap
   as whole buttons instead, sharing the width, and never widen the page.
   Mark the container: .filter-toolbar for a search/filter button row,
   .table-actions for a row's action cell.
   ========================================================================== */

.filter-toolbar,
.table-actions {
    flex-wrap: wrap;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .filter-toolbar {
        display: flex;
        width: 100%;
        gap: .5rem;
    }

    .filter-toolbar > .btn,
    .filter-toolbar > a.btn {
        flex: 1 1 calc(50% - .25rem);
        margin-left: 0 !important;   /* .ms-auto on the last button pushes it off a wrapped line */
    }

    .table-actions {
        white-space: normal;
    }

    .table-actions > .btn {
        margin-bottom: .25rem;
    }

    .page-title-box .page-title-right { max-width: 100%; overflow-wrap: anywhere; }
}

/* §11's inline-flex let the topbar's menu toggle shrink below its icon on a phone (the audit reported it
   clipped at 390px). It is a fixed-size control: never shrink it. */
#vertical-menu-btn { flex-shrink: 0; min-width: 44px; }

/* ==========================================================================
   13. Soft icon tiles + missing glyph (UI-POLISH-02)
   --------------------------------------------------------------------------
   Views use .bg-soft-{primary,secondary,success,warning,danger} 18 times, but
   no stylesheet in the tree defines them. An .avatar-title tile therefore kept
   Skote's SOLID #556ee6 fill with a .text-primary (indigo) icon on top — the
   Action Board's "OP visits" plus was indigo on indigo. Define the tints here:
   a pale fill with the full-strength hue as the icon colour.
   ========================================================================== */

.bg-soft-primary   { background-color: rgba(79, 70, 229, .12) !important; }
.bg-soft-secondary { background-color: rgba(100, 116, 139, .14) !important; }
.bg-soft-success   { background-color: rgba(4, 120, 87, .12) !important; }
.bg-soft-warning   { background-color: rgba(217, 119, 6, .14) !important; }
.bg-soft-danger    { background-color: rgba(220, 38, 38, .12) !important; }
.bg-soft-info      { background-color: rgba(79, 70, 229, .12) !important; }

.avatar-title.bg-soft-primary,
.avatar-title.bg-soft-info      { color: var(--me-primary); }
.avatar-title.bg-soft-secondary { color: #475569; }
.avatar-title.bg-soft-success   { color: var(--me-success); }
.avatar-title.bg-soft-warning   { color: var(--me-warning-text); }
.avatar-title.bg-soft-danger    { color: var(--me-danger); }

[data-bs-theme="dark"] .avatar-title.bg-soft-primary,
[data-bs-theme="dark"] .avatar-title.bg-soft-info { color: #A5B4FC; }
[data-bs-theme="dark"] .bg-soft-primary,
[data-bs-theme="dark"] .bg-soft-info { background-color: rgba(129, 140, 248, .18) !important; }

/* bx-capsule is not in the vendored boxicons build, so every Pharmacy icon (menus seeded in the DB,
   the Action Board, IP Consumables) rendered as nothing. Point it at the band-aid glyph. */
.bx-capsule:before { content: "\e989"; }

/* SOL-613: at phone width the header's right-hand group (search, tenant badge, help, alerts, theme, user menu)
   needed ~320px of the 283px left after the logo, so the user menu sat ~37px off-screen and the avatar was
   clipped. Cap the tenant badge with an ellipsis (its title keeps the full code) and tighten its margins. */
@media (max-width: 575.98px) {
    [data-testid="current-tenant-badge"] { margin-left: .25rem !important; margin-right: .25rem !important; }
    [data-testid="current-tenant-badge"] .badge {
        display: inline-block; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
    }
}

/* Doctor UX D4: the consultation action bar stays in reach at the bottom of a long form. */
.me-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: .75rem 1rem;
    background: var(--me-surface, #fff);
    border: 1px solid var(--me-line, #E2E8F0);
    border-radius: var(--me-radius, .5rem);
    box-shadow: var(--me-shadow, 0 2px 6px rgba(15, 23, 42, .08));
}
[data-bs-theme="dark"] .me-action-bar { background: var(--bs-body-bg); border-color: var(--bs-border-color); }
/* The theme's .main-content is overflow:hidden, which makes it the sticky container and the bar never pins
   (found in the PR 698 GUI check). clip keeps the same clipping without creating a scroll container. */
.main-content:has(.me-action-bar) { overflow: clip; }

/* Doctor UX D5: teleconsult stepper. Done = success tick, current = primary ring, later = muted. */
.me-stepper { display: grid; gap: .75rem; }
.me-step { display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; padding: .9rem 1rem;
    background: var(--me-surface, #fff); border: 1px solid var(--me-line, #E2E8F0); border-radius: var(--me-radius, .5rem); }
.me-step__marker { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 600;
    border: 2px solid var(--me-line, #E2E8F0); color: var(--me-muted, #64748B); }
.me-step__title { font-size: 1rem; margin: .25rem 0 .5rem; }
.me-step--current { border-color: var(--me-primary, #4F46E5); box-shadow: var(--me-focus-ring, 0 0 0 .2rem rgba(79,70,229,.35)); }
.me-step--current .me-step__marker { border-color: var(--me-primary, #4F46E5); background: var(--me-primary, #4F46E5); color: #fff; }
.me-step--done .me-step__marker { border-color: var(--me-success, #047857); background: var(--me-success, #047857); color: #fff; }
.me-step--later { opacity: .75; }
[data-bs-theme="dark"] .me-step { background: var(--bs-body-bg); border-color: var(--bs-border-color); }
