/* The portal's base styles: every page of base.html (moved out of the page 2026-11-13, so a browser keeps them). */
:root {
    --primary-color: #0E7490;
    --primary-dark: #155E75;
    --primary-light: #22D3EE;
    --secondary-color: #0D9488;
    --success-color: #059669;
    --danger-color: #DC2626;
    --warning-color: #D97706;
    --sidebar-bg: #134E4A;
    --sidebar-hover: #0F766E;
    --accent-color: #14B8A6;
    /* the brand's green (the logo's "healthcare"): counts on the menu */
    --brand-green: #8BC34A;
    --brand-green-ink: #1F3A0F;
    --brand-green-dark: #4F8A1C;
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Prevent flash of unstyled content */
html {
    visibility: visible;
    opacity: 1;
}

body {
    background-color: #f8fafc;
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.15s ease-in-out;
}

/* Smooth page transitions */
.main-content {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* The side menu (2026-11-07): light, as on the public site and the Claude Console (templates/_portal_side.html,
   static/elabs-shell.css). Its sections' own lists, and their counts. */
.sx-portal .sx-i > .badge { flex: none; margin-left: auto; }
.sx-portal .sx-has .sx-sec-badge + .sx-car { margin-left: 6px; }
.sx-side[data-panel="orders"] .sx-panel[data-panel="orders"], .sx-side[data-panel="results"] .sx-panel[data-panel="results"],
.sx-side[data-panel="patients"] .sx-panel[data-panel="patients"], .sx-side[data-panel="insights"] .sx-panel[data-panel="insights"],
.sx-side[data-panel="billing"] .sx-panel[data-panel="billing"], .sx-side[data-panel="setup"] .sx-panel[data-panel="setup"],
.sx-side[data-panel="platform"] .sx-panel[data-panel="platform"], .sx-side[data-panel="settings"] .sx-panel[data-panel="settings"],
.sx-side[data-panel="settings-orders"] .sx-panel[data-panel="settings-orders"], .sx-side[data-panel="settings-results"] .sx-panel[data-panel="settings-results"],
.sx-side[data-panel="settings-interfaces"] .sx-panel[data-panel="settings-interfaces"],   /* Settings › Interfaces (2026-11-21) */
.sx-side[data-panel="orders-new"] .sx-panel[data-panel="orders-new"],
.sx-side[data-panel="collection"] .sx-panel[data-panel="collection"],   /* Collection (2026-11-17) */
.sx-side[data-panel="setup-labdata"] .sx-panel[data-panel="setup-labdata"] {   /* Lab Setup › Lab Data (2026-11-17) */
    visibility: visible; opacity: 1; transform: none; transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s, visibility 0s; }
/* The account: who, then the unread contact messages, My Account and Sign out */
.sx-acct { cursor: default; gap: 8px; padding: 8px; min-width: 0; }
.sx-acct:hover { border-color: var(--sx-line); }
.sx-acct-who { flex: 1 1 auto; min-width: 0; }
.sx-acct-who b, .sx-acct-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-acct-act { position: relative; flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
               color: var(--sx-muted); text-decoration: none; font-size: 0.95rem; }
.sx-acct-act:hover, .sx-acct-act.on { background: var(--sx-blue-50); color: var(--sx-blue-d); }
.sx-acct-out:hover { background: #fef2f2; color: #b91c1c; }
.sx-acct-mail { color: var(--brand-green-dark, #4f8a1c); }
.sx-acct-count { position: absolute; top: -4px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
                 background: var(--brand-green, #8BC34A); color: var(--brand-green-ink, #1F3A0F); font-size: 0.6rem; font-weight: 800;
                 line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.sx-burger { position: relative; }
/* One screen: the list that scrolls inside its card (script at the end of the page) */
.sx-fit { overflow-y: auto !important; overscroll-behavior: contain; }
.sx-fit thead th { position: sticky; top: 0; z-index: 2; }

.nav-item {
    margin: 1px 0.65rem;
}

.nav-link {
    color: rgba(255,255,255,0.6) !important;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    font-size: 0.88rem;
    font-weight: 400;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9) !important;
    border-left-color: rgba(255,255,255,0.2);
}

.nav-link.active {
    background-color: var(--sidebar-hover);
    color: white !important;
    font-weight: 500;
    border-left-color: var(--accent-color);
}

.nav-link i {
    margin-right: 0.7rem;
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-link:hover i,
.nav-link.active i {
    opacity: 1;
}

/* A count on a menu entry (new contact messages, the WhatsApp queue): the brand's green, which
   stands out on the teal sidebar without the alarm of red; dark green figures on it */
.nav-new-badge { background: var(--brand-green) !important; color: var(--brand-green-ink); font-size: 0.66rem; font-weight: 800;
                 min-width: 1.35rem; padding: 0.25em 0.5em; letter-spacing: 0.01em; }
.menu-new-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-green-dark);
                box-shadow: 0 0 0 2px #fff; }
/* Main Content */
.main-content {
    margin-left: 0;   /* beside the side menu: body.sx makes the room (static/elabs-shell.css) */
    padding: 0;
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar { display: none !important; }   /* 2026-11-07: the side menu has it all */
.top-navbar {
    background: white;
    padding: 0.55rem 1.25rem;
    min-height: 52px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.06);
    border-bottom: 1px solid #e2e8f0;
    display: none;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
}
body:has(.content-area .admin-hero) .page-title {
    display: none;
}
body.has-admin-hero .page-title {
    display: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
}

.user-role {
    font-size: 0.75rem;
    color: #64748b;
}

/* Content Area */
.content-area {
    padding: clamp(18px, 2.6vh, 30px) clamp(16px, 2.2vw, 32px);
}

/* Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .icon.primary {
    background: rgba(8, 145, 178, 0.1);
    color: var(--primary-color);
}

.stat-card .icon.success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
}

.stat-card .icon.warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
}

.stat-card .icon.info {
    background: rgba(6, 182, 212, 0.1);
    color: #0891B2;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
}

/* ── Canonical KPI stat tile — ONE system for every page-top stat row.
   Markup:
     <div class="stat-tile accent-success">
         <div class="st-icon"><i class="bi bi-cash-stack"></i></div>
         <div class="st-body">
             <div class="st-val">$1,234.00</div>
             <div class="st-label">Billing captured</div>
             <div class="st-sub">40 billable orders</div>
         </div>
     </div>
   Accents: primary (teal) · success · warning · danger · violet · neutral(default). ── */
/* 2026-10-27: compact, as the dashboard's: the number, then the label and its detail on one line */
.stat-tile {
    background: #fff;
    border-radius: 12px;
    padding: 0.4rem 0.75rem;   /* (2026-11-18: a little lower, the page's list starts higher) */
    height: 100%;
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
    border: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-left: 3px solid #cbd5e1;
    transition: transform .15s, box-shadow .15s;
}
.stat-tile[role="button"]:hover, a.stat-tile:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(15,23,42,.08); }
.stat-tile .st-icon {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; background: #f1f5f9; color: #475569;
}
/* Two lines: the number with its detail beside it ("today · 9 all time"), then the label */
/* the number, its detail beside it (or under it when there is no room), then the label */
.stat-tile .st-body { min-width: 0; flex: 1; display: flex; flex-wrap: wrap; column-gap: 0.4rem; align-items: baseline; }
.stat-tile .st-val { flex: none; font-size: 1.15rem; font-weight: 800; color: #1e293b; line-height: 1.15; white-space: nowrap; letter-spacing: -0.3px; }
/* 2026-11-09: the detail and the label wrap instead of being cut off ("sent, sample n…") */
.stat-tile .st-sub { flex: 1 1 5.5rem; min-width: 5.5rem; font-size: 0.68rem; color: #94a3b8; line-height: 1.2; }
.stat-tile .st-label { flex: 1 0 100%; font-size: 0.72rem; font-weight: 600; color: #475569; margin-top: 1px; line-height: 1.25; }
.stat-tile.accent-primary { border-left-color: #0891b2; }
.stat-tile.accent-primary .st-icon { background: rgba(8,145,178,.1); color: #0891b2; }
.stat-tile.accent-success { border-left-color: #059669; }
.stat-tile.accent-success .st-icon { background: rgba(5,150,105,.1); color: #059669; }
.stat-tile.accent-warning { border-left-color: #d97706; }
.stat-tile.accent-warning .st-icon { background: rgba(217,119,6,.1); color: #d97706; }
.stat-tile.accent-danger { border-left-color: #dc2626; }
.stat-tile.accent-danger .st-icon { background: rgba(220,38,38,.1); color: #dc2626; }
.stat-tile.accent-violet { border-left-color: #0e7490; }
.stat-tile.accent-violet .st-icon { background: #ecfeff; color: #0e7490; }
/* Channel-page stat row: equal-width tiles on one line; a tile too narrow for its icon
   drops the icon instead of wrapping the row (container query on the tile). */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.6rem; }
.stat-grid .stat-tile { container-type: inline-size; }
@container (max-width: 139px) { .stat-tile .st-icon { display: none; } }  /* content box: tile ≈ 175px */
.stat-tile[role="button"] { cursor: pointer; }
/* A tile that is a link (2026-11-26: in one place; Test Catalog, Patients and Analytics each had their own copy): no
   underline; the tile whose filter is on is outlined */
a.stat-tile { text-decoration: none; color: inherit; }
a.stat-tile.is-on { box-shadow: 0 0 0 2px #0891b2; }
/* Tiles that filter a list (Test Catalog, Result Set-up): one size each, the number and its note on one line, the label
   on one line under them */
.stat-grid.tile-filters { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: stretch; }
.tile-filters .stat-tile { padding: 0.5rem 0.7rem; min-height: 64px; }
.tile-filters .stat-tile .st-icon { width: 30px; height: 30px; font-size: 0.9rem; }
.tile-filters .stat-tile .st-body { flex-wrap: nowrap; flex-direction: column; align-items: flex-start; }
.tile-filters .stat-tile .st-val { display: flex; align-items: baseline; gap: 0.4rem; max-width: 100%; min-width: 0; }
.tile-filters .stat-tile .st-val .st-sub { font-size: 0.68rem; font-weight: 500; letter-spacing: 0; }
.tile-filters .stat-tile .st-sub, .tile-filters .stat-tile .st-label { min-width: 0; max-width: 100%; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ── One filter bar for every list and report page (2026-10-27): Analytics, the Insights
   pages, Order History, the results list. A page sets only its fields' widths. ── */
.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.45rem;
    background: #fff; border: 1px solid #e9eef4; border-radius: 12px;
    padding: 0.4rem 0.5rem; margin: 0 0 0.6rem; font-size: 0.76rem;   /* (2026-11-18: as Order History's bar) */
}
:is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar) label { margin: 0; font-size: 0.72rem; font-weight: 600; color: #64748b; }
:is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar) .form-control, :is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar) .form-select { font-size: 0.78rem; height: 30px; padding-top: 0.2rem; padding-bottom: 0.2rem; width: auto; }
:is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar) input[type=date], :is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar) .flatpickr-alt-input { width: 104px !important; flex: 0 0 auto; }
:is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar) .btn-sm { font-size: 0.76rem; padding: 0.22rem 0.65rem; font-weight: 600; }
:is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar) .bar-dash { color: #94a3b8; }
:is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar) .bar-end { margin-left: auto; display: flex; gap: 0.4rem; align-items: center; }
/* (2026-11-18) A filter's text box is as wide as what is typed in it, not the whole row: a search box up to 20rem,
   a second box (a facility, a user) up to 13rem; the rest of the row stays free. A phone keeps full-width boxes. */
@media (min-width: 768px) {
    :is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar, .pp-bar, .ops-filter) :is(input[type=text], input[type=search], input:not([type])) { max-width: 20rem; }
    .list-bar input.lb-grow, .ri-bar input.ri-fac { max-width: 13rem; }   /* (as specific as the rule above, so it wins) */
    .list-bar .lb-grow2, .ri-bar .ri-search { max-width: 20rem; }
    .bf-box { max-width: 30rem; }
    .lis-bar form.lis-find { max-width: 28rem !important; }
}
/* The Billing pages' filter: one box on the bar's row, its filters as chips, suggestions below */
.bf-go { width: 30px; height: 30px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
.bf-box { position: relative; flex: 1 1 280px; min-width: 220px; display: flex; align-items: center; flex-wrap: nowrap; gap: 0.25rem;
          min-height: 30px; padding: 0.12rem 0.4rem; border: 1px solid #dee2e6; border-radius: 0.375rem; background: #fff; cursor: text; }
.bf-box:focus-within { border-color: #0891b2; box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12); }
.bf-box.bf-active { border-color: #67e8f9; background: #f8feff; }
.bf-box .bf-icon { color: #94a3b8; font-size: 0.8rem; }
.bf-box .bf-q { flex: 1 1 90px; min-width: 56px; border: 0; outline: 0; background: transparent; font-size: 0.78rem; height: 24px; padding: 0 0.15rem; }
.bf-token { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.72rem; color: #0e7490; background: #ecfeff;
            border: 1px solid #a5f3fc; border-radius: 6px; padding: 0 0.15rem 0 0.4rem; height: 22px; white-space: nowrap; max-width: 170px; min-width: 0; flex: 0 1 auto; }
.bf-token b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.bf-x { border: 0; background: none; color: #0891b2; font-size: 0.95rem; line-height: 1; padding: 0 0.2rem; cursor: pointer; }
.bf-x:hover { color: #dc2626; }
.bf-count { font-size: 0.7rem; font-weight: 600; color: #64748b; white-space: nowrap; margin-left: auto; }
.bf-clear { font-size: 0.7rem; font-weight: 600; color: #64748b; text-decoration: none; white-space: nowrap; }
.bf-clear:hover { color: #dc2626; }
.bf-menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 1060; min-width: 300px; max-width: 460px; max-height: 320px;
           overflow-y: auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14); padding: 0.25rem; }
.bf-menu.open { display: block; }
.bf-opt { font-size: 0.78rem; color: #334155; padding: 0.32rem 0.55rem; border-radius: 7px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-opt.on, .bf-opt:hover { background: #ecfeff; color: #0e7490; }
.bf-opt .bf-k { display: inline-block; min-width: 58px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; }
.bf-opt .bf-more { color: #94a3b8; font-size: 0.72rem; }
.bf-none { font-size: 0.76rem; color: #94a3b8; padding: 0.35rem 0.55rem; }
/* Quick ranges (7d · 30d · This month …) as small linked chips in the bar */
.bar-quick { display: inline-flex; gap: 0.2rem; }
.bar-quick a { font-size: 0.72rem; font-weight: 600; padding: 0.22rem 0.55rem; border-radius: 7px; border: 1px solid #e2e8f0;
               color: #64748b; text-decoration: none; background: #fff; }
.bar-quick a:hover { border-color: #0891b2; color: #0891b2; }
.bar-quick a.active { background: #0891b2; border-color: #0891b2; color: #fff; }
/* A one-line notice under the bar (a setup step, a warning), with its action at the end */
.bar-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.6rem; font-size: 0.78rem; color: #92400e;
              background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 0.4rem 0.75rem; margin: 0 0 0.75rem; }
.bar-notice > i { color: #d97706; }
.bar-notice > span { flex: 1 1 260px; min-width: 0; }
.bar-notice.info { color: #0e7490; background: #ecfeff; border-color: #a5f3fc; }
.bar-notice.info > i { color: #0891b2; }
.bar-notice .bar-notice-act { margin-left: auto; font-weight: 600; white-space: nowrap; color: inherit; }
/* Every card's title, as on Analytics and the source pages */
.hist-card { border-radius: 12px !important; border-color: #e9eef4 !important; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important; }
.hist-card-title { font-size: 0.85rem !important; font-weight: 700 !important; color: #0f172a !important; }
.hist-card-title i { color: #0e7490 !important; }


/* Custom Card */
.custom-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.custom-card .card-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.custom-card .card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ===== Unified Brand Buttons (uniform across all pages) ===== */
.btn-brand {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.18s ease;
}
.btn-brand:hover, .btn-brand:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    box-shadow: 0 3px 10px rgba(8,145,178,0.25);
}
.btn-brand-outline {
    background: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.18s ease;
}
.btn-brand-outline:hover, .btn-brand-outline:focus {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 3px 10px rgba(8,145,178,0.25);
}

/* Bootstrap form controls — unified brand focus ring */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(8,145,178,0.18);
}
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Override Bootstrap btn-outline-primary to brand teal (was default blue) */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary.active,
.btn-outline-primary:not(:disabled):not(.disabled):active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 3px 10px rgba(8,145,178,0.25);
}
.btn-check:checked + .btn-outline-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Info note: help text on a page or tab. Quiet by design: it explains, it does not alert.
   Warnings and errors use .warn / .danger; an icon, when present, sits in the left gutter. */
.info-note {
    position: relative;
    margin: 0 0 0.85rem;
    padding: 0.45rem 0.7rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #64748b;
    background: #f8fafc;
    border-left: 2px solid #cbd5e1;
    border-radius: 0 6px 6px 0;
}
.info-note:has(> .bi:first-child) { padding-left: 1.75rem; }
.info-note > .bi:first-child {
    position: absolute; left: 0.62rem; top: 0.52rem;
    margin: 0; font-size: 0.78rem; color: #94a3b8;
}
.info-note a { color: var(--primary-dark, #0E7490); font-weight: 600; text-decoration: none; }
/* An in-text link to another page (e.g. "the orders are in History"): the brand colour, everywhere */
.brand-link { color: var(--primary-dark, #0E7490); font-weight: 600; text-decoration: none; }
.brand-link:hover, .brand-link:focus-visible { color: var(--primary-color, #0891B2); text-decoration: underline; }
.info-note a:hover { text-decoration: underline; }
.info-note strong { color: #475569; font-weight: 600; }
.info-note ul, .info-note ol { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.info-note.warn { background: #fffbeb; border-left-color: #f59e0b; color: #92400e; }
.info-note.warn > .bi:first-child { color: #d97706; }
.info-note.warn strong { color: #78350f; }
.info-note.danger { background: #fef2f2; border-left-color: #ef4444; color: #991b1b; }
.info-note.danger > .bi:first-child { color: #dc2626; }
.info-note.danger strong { color: #7f1d1d; }

/* Upload Area */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(8, 145, 178, 0.05);
}

.upload-area i.bi-cloud-arrow-up {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.upload-area h5 {
    font-size: 1rem;
}

/* HL7 Output */
.hl7-output {
    font-family: 'Consolas', 'Monaco', monospace;
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Responsive */
.sidebar-toggle {
    display: none;
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.25rem;
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .top-navbar {
        display: flex;
        padding: 0.5rem 0.8rem;
    }

    .content-area {
        padding: 0.85rem;
    }

    .page-title {
        font-size: 0.95rem;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 576px) {
    .content-area {
        padding: 0.75rem;
    }

    .custom-card .card-body {
        padding: 1rem;
    }

    .custom-card .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* ── Shared Pill Pagination ── */
.pag-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; border-top: 1px solid #f1f5f9;
}
.pag-info { font-size: 13px; color: #64748b; }
.pag-pills { display: flex; gap: 4px; }
.pag-pill {
    width: 32px; height: 32px; border-radius: 8px; display: flex;
    align-items: center; justify-content: center; font-size: 13px;
    font-weight: 600; text-decoration: none; color: #475569;
    border: 1px solid #e2e8f0; transition: all .15s;
}
.pag-pill:hover { background: #ecfeff; border-color: #0891b2; color: #0891b2; }
.pag-pill.active { background: #0891b2; color: white; border-color: #0891b2; }
.pag-pill.disabled { opacity: .4; pointer-events: none; }
.pag-arrow { font-size: 14px; }

/* ─────────────────────────────────────────────────────────────────
   Unified Admin Page Hero
   Used at the top of every admin page (Users, Labs, Statistics,
   Billing, Fax, Online Orders, WhatsApp, Blogs, Emails, Dashboard,
   Settings, Logs, Patients, History, Convert) for visual symmetry.
   Slots:
     .admin-hero            — outer banner
     .admin-hero-icon       — left icon
     .admin-hero-title      — h4 title
     .admin-hero-sub        — subtitle <p>
     .admin-hero-pill       — small inline meta pill (filters, period…)
     .admin-hero-status     — large right-side status pill (active/idle)
     .admin-hero-actions    — right-side button group / stat block
   ────────────────────────────────────────────────────────────── */
/* Page headers (2026-11-07): plain, as on the Claude Console: the title and one line on the left, the page's own
   actions on the right, a line under it; no banner. The same classes as before (.admin-hero ...), so every page
   changes at once; its white buttons become the brand's (a primary and a plain one). A long line shows one row,
   the whole of it on hover or a click (script below). */
.admin-hero {
    background: transparent; color: #0c1a2a; border-radius: 0;
    padding: 0 0 0.85rem; margin-bottom: 1rem; box-shadow: none;
    border-bottom: 1px solid #e4eaf1; position: relative; overflow: visible;
}
.admin-hero::before { content: none; }
.admin-hero-row { display: flex; align-items: center; gap: 0.6rem 1.25rem; position: relative; flex-wrap: wrap; }
.admin-hero-icon { display: none; }
.admin-hero-body { flex: 1 1 20rem; min-width: 0; }
.admin-hero-title { margin: 0 0 0.2rem; font-weight: 800; font-size: 1.35rem; line-height: 1.2; color: #0c1a2a; letter-spacing: -0.02em; }
.admin-hero-sub { margin: 0; font-size: 0.86rem; line-height: 1.45; color: #637387;
                  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; max-width: 110ch; }
.admin-hero-sub:not(:has(.admin-hero-pill)) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.admin-hero-sub.clamped { cursor: pointer; }
.admin-hero-sub.open { -webkit-line-clamp: unset; }
.admin-hero-sub code { background: #f1f5f9; color: #155e75; }
.admin-hero-sub a:not(.admin-hero-pill) { color: #155e75; }
.admin-hero-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.2rem 0.55rem; border-radius: 999px;
    background: #f1f5f9; color: #334155;
    font-size: 0.72rem; font-weight: 600; line-height: 1.1;
    border: 1px solid #e2e8f0; text-decoration: none;
}
a.admin-hero-pill:hover { border-color: #b6dde7; color: #155e75; }
.admin-hero-status {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.26rem 0.68rem; border-radius: 999px;
    font-size: 0.74rem; font-weight: 700;
}
.admin-hero-status-active   { background: #ecfdf5; color: #047857; }
.admin-hero-status-inactive { background: #f1f5f9; color: #64748b; }
.admin-hero-actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
/* A list page's status tabs on the row of its name, in the middle; its filters right under (2026-11-18, as Order
   History). The tabs are put there by the page (.hero-tabs-slot) or, from the row of tabs under the name, by
   elabs-base.js. On a narrow screen they go on a line of their own under the name. */
.admin-hero.hero-tabs .admin-hero-body { flex: 0 0 auto !important; }
.admin-hero.hero-tabs .hero-tabs-slot { flex: 1 1 100%; min-width: 0; display: flex; align-items: center; justify-content: center;
                                        gap: 0.5rem 0.75rem; flex-wrap: wrap; }
.admin-hero.hero-tabs .hero-tabs-slot .ms-auto { margin-left: 0 !important; }
.admin-hero.hero-tabs .hero-tabs-slot > nav, .admin-hero.hero-tabs .hero-tabs-slot > div { margin: 0 !important; }
.admin-hero.hero-tabs .hero-tabs-slot .hist-tabs { margin: 0 !important; justify-content: center; flex-wrap: wrap; }
.admin-hero.hero-tabs .hero-tabs-slot .hist-tab { padding: 0.28rem 0.65rem; }
@media (min-width: 992px) {
    /* name | tabs, centred in the room between | the page's own buttons (however many a page has) */
    .admin-hero.hero-tabs .admin-hero-row { flex-wrap: nowrap !important; }
    .admin-hero.hero-tabs .admin-hero-icon { display: none; }
    .admin-hero.hero-tabs .hero-tabs-slot { flex: 1 1 auto; }
    .admin-hero.hero-tabs .admin-hero-row > :not(.admin-hero-body):not(.hero-tabs-slot):not(.admin-hero-icon) { flex: none; }
}
.list-top:empty, .ri-top:empty { display: none; }
/* A page's filters in the middle of its name's row (elabs-base.js elabsFiltersUp): no card of their own there, left
   after the name, wrapping to a second line when they must; the page's buttons stay on the right. */
.admin-hero.hero-filters .admin-hero-row { flex-wrap: nowrap !important; align-items: center; }
.admin-hero.hero-filters .admin-hero-body { flex: 0 0 auto !important; }
.admin-hero.hero-filters .admin-hero-icon { display: none; }
.admin-hero.hero-filters .hero-filters-slot { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.admin-hero.hero-filters .admin-hero-row > :not(.admin-hero-body):not(.hero-filters-slot):not(.admin-hero-icon) { flex: none; }
.hero-filters-slot > .in-hero { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
                                margin: 0 !important; flex-wrap: wrap; justify-content: center; }
.hero-filters-slot > .in-hero .bar-end { margin-left: 0 !important; }
/* up there, one line: the boxes give way (narrower) before anything wraps */
.hero-filters-slot > .in-hero, .hero-filters-slot > .in-hero > .usr-toolbar-inner { flex-wrap: nowrap !important; min-width: 0; }
.hero-filters-slot > .in-hero :is(.bf-box) { flex: 1 1 14rem; min-width: 8rem; }
.hero-filters-slot > .in-hero :is(input[type=text], input[type=search], .lb-grow2, .lb-grow, .ri-search, .ri-fac, .usr-search) { min-width: 7rem !important; flex-shrink: 1; }
.hero-filters-slot > .in-hero .bar-quick, .hero-filters-slot > .in-hero .btn { flex: none; }
.hero-filters-slot > .usr-toolbar { width: auto; }
.hero-filters-slot .usr-toolbar-inner { padding: 0 !important; gap: 0.35rem !important; }
.hero-filters-slot :is(input:not([type=checkbox]):not([type=radio]), select, .usr-filter-select, .usr-search, .bf-box) { height: 30px !important; min-height: 0 !important; }
.hero-filters-slot .usr-search input { height: 28px !important; }
.hero-filters-slot :is(.btn, .usr-clear-btn, .usr-view-btn) { height: 30px; padding-top: 0 !important; padding-bottom: 0 !important; display: inline-flex; align-items: center; }
/* the dates up there a little narrower, so a billing page's bar fits beside its name */
.hero-filters-slot :is(input[type=date], .flatpickr-alt-input) { width: 94px !important; padding-left: 0.3rem !important; padding-right: 0.2rem !important; }
.hero-filters-slot .bar-quick a { padding: 0.2rem 0.45rem; }
/* A filter row that stays under the name: its filters in the middle too (2026-11-18, the same on every page) */
:is(.filter-bar, .an-bar, .ins-bar, .list-bar, .ri-bar, .pp-bar, .hs-bar):not(.in-hero) { justify-content: center; }
/* How a page works, in an (i) beside its name (its tooltip) instead of a paragraph under it (2026-11-18) */
.hero-info { font-size: 0.8rem; color: #94a3b8; margin-left: 0.35rem; cursor: help; vertical-align: 1px; font-weight: 400; }
.hero-info:hover, .hero-info:focus { color: #0e7490; outline: none; }
/* "Show 20 a page" on every list's header (static/elabs-pager.js; Order History's own) */
.hist-per { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; font-size: 0.75rem; color: #64748b; white-space: nowrap; }
.hist-per .form-select { width: auto; height: 28px; padding: 0 1.8rem 0 0.55rem; font-size: 0.78rem; border-radius: 7px; }
/* Filters only as wide as they need (2026-11-18): no box grows to fill the row */
.list-bar .lb-grow2 { flex: 0 1 17rem; }
.list-bar .lb-grow { flex: 0 1 11rem; }
.ri-bar .ri-search { flex: 0 1 16rem !important; }
.ri-bar .ri-fac { flex: 0 1 11rem !important; }
.bf-box { flex: 0 1 24rem; }
/* A page's Bootstrap tabs moved up beside its name (elabs-base.js): chips like the status tabs. (.nav-link is styled
   for the side menu with !important colours, so these say theirs with !important too.) */
.admin-hero .hero-nav.nav { border: 0 !important; margin: 0 !important; gap: 0.3rem; flex-wrap: wrap; justify-content: center; }
.admin-hero .hero-nav .nav-item { margin: 0 !important; }
.admin-hero .hero-nav .nav-link { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; margin: 0 !important;
    padding: 0.28rem 0.7rem !important; font-size: 0.78rem !important; font-weight: 600 !important; line-height: 1.4;
    border: 1px solid #e2e8f0 !important; border-radius: 8px !important; background: #fff !important; color: #475569 !important; }
.admin-hero .hero-nav .nav-link:hover { border-color: #94a3b8 !important; color: #0f172a !important; }
.admin-hero .hero-nav .nav-link.active { background: #0891b2 !important; border-color: #0891b2 !important; color: #fff !important; }
.admin-hero .hero-nav .nav-link.active .badge, .admin-hero .hero-nav .nav-link.active [class*="count"] { background: rgba(255,255,255,0.25) !important; color: #fff !important; }
.admin-hero .hero-nav .nav-link::after, .admin-hero .hero-nav .nav-link::before { display: none !important; }
.admin-hero-stat-num {
    font-size: 1.2rem; font-weight: 800; line-height: 1; color: #0c1a2a;
    font-variant-numeric: tabular-nums;
}
.admin-hero-stat-lbl {
    font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.8px;
    font-weight: 700; color: #637387; margin-top: 0.15rem;
}
.admin-hero .btn-light {
    background: #0E7490; border-color: #0E7490; color: #fff;
    font-size: 0.8rem; font-weight: 600; border-radius: 8px; padding: 0.34rem 0.8rem;
}
.admin-hero .btn-light:hover, .admin-hero .btn-light:focus-visible { background: #155E75; border-color: #155E75; color: #fff; }
.admin-hero .btn-outline-light {
    background: #fff; border-color: #cbd5e1; color: #334155;
    font-size: 0.8rem; font-weight: 600; border-radius: 8px; padding: 0.34rem 0.8rem;
}
.admin-hero .btn-outline-light:hover, .admin-hero .btn-outline-light:focus-visible { background: #f8fafc; border-color: #94a3b8; color: #0c1a2a; }
.admin-hero .text-white, .admin-hero .text-white-50, .admin-hero .text-light { color: #637387 !important; }
/* Configuration's pages are in the side menu (2026-11-07): its row of top tabs is not needed; each group's own row stays */
.cfg-pills { display: none !important; }

/* ===== One brand on every page (2026-11-03): Bootstrap's own colours and controls follow it,
   so a page never shows its default blue. Teal is the brand; green, amber and red say how
   something went. ===== */
:root {
    --bs-primary: #0E7490; --bs-primary-rgb: 14, 116, 144;
    --bs-secondary: #64748B; --bs-secondary-rgb: 100, 116, 139;
    --bs-success: #059669; --bs-success-rgb: 5, 150, 105;
    --bs-info: #0891B2; --bs-info-rgb: 8, 145, 178;
    --bs-warning: #F59E0B; --bs-warning-rgb: 245, 158, 11;
    --bs-danger: #DC2626; --bs-danger-rgb: 220, 38, 38;
    --bs-link-color: #0E7490; --bs-link-color-rgb: 14, 116, 144; --bs-code-color: #155E75;
    --bs-link-hover-color: #155E75; --bs-link-hover-color-rgb: 21, 94, 117;
    --bs-focus-ring-color: rgba(8, 145, 178, 0.25);
    --bs-border-radius: 0.5rem; --bs-border-radius-sm: 0.4rem; --bs-border-radius-lg: 0.75rem;
}
.btn { --bs-btn-font-weight: 600; --bs-btn-border-radius: 0.5rem; }
.btn-sm { --bs-btn-border-radius: 0.45rem; }
.btn-primary, .btn-info {
    --bs-btn-color: #fff; --bs-btn-bg: #0E7490; --bs-btn-border-color: #0E7490;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #155E75; --bs-btn-hover-border-color: #155E75;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #155E75; --bs-btn-active-border-color: #155E75;
    --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #0E7490; --bs-btn-disabled-border-color: #0E7490;
    --bs-btn-focus-shadow-rgb: 8, 145, 178;
}
.btn-outline-primary, .btn-outline-info {
    --bs-btn-color: #0E7490; --bs-btn-border-color: #0E7490;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0E7490; --bs-btn-hover-border-color: #0E7490;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #155E75; --bs-btn-active-border-color: #155E75;
    --bs-btn-disabled-color: #0E7490; --bs-btn-disabled-border-color: #0E7490;
    --bs-btn-focus-shadow-rgb: 8, 145, 178;
}
.btn-outline-secondary {
    --bs-btn-color: #475569; --bs-btn-border-color: #CBD5E1;
    --bs-btn-hover-color: #0F172A; --bs-btn-hover-bg: #F1F5F9; --bs-btn-hover-border-color: #94A3B8;
    --bs-btn-active-color: #0F172A; --bs-btn-active-bg: #E2E8F0; --bs-btn-active-border-color: #94A3B8;
    --bs-btn-disabled-color: #94A3B8; --bs-btn-disabled-border-color: #E2E8F0;
    --bs-btn-focus-shadow-rgb: 100, 116, 139;
}
.btn-secondary {
    --bs-btn-bg: #64748B; --bs-btn-border-color: #64748B; --bs-btn-hover-bg: #475569; --bs-btn-hover-border-color: #475569;
    --bs-btn-active-bg: #475569; --bs-btn-active-border-color: #475569; --bs-btn-disabled-bg: #94A3B8; --bs-btn-disabled-border-color: #94A3B8;
}
.btn-light {
    --bs-btn-color: #334155; --bs-btn-bg: #F1F5F9; --bs-btn-border-color: #E2E8F0;
    --bs-btn-hover-color: #0F172A; --bs-btn-hover-bg: #E2E8F0; --bs-btn-hover-border-color: #CBD5E1;
    --bs-btn-active-color: #0F172A; --bs-btn-active-bg: #E2E8F0; --bs-btn-active-border-color: #CBD5E1;
}
.btn-success {
    --bs-btn-bg: #059669; --bs-btn-border-color: #059669; --bs-btn-hover-bg: #047857; --bs-btn-hover-border-color: #047857;
    --bs-btn-active-bg: #047857; --bs-btn-active-border-color: #047857; --bs-btn-disabled-bg: #059669; --bs-btn-disabled-border-color: #059669;
}
.btn-outline-success {
    --bs-btn-color: #047857; --bs-btn-border-color: #059669; --bs-btn-hover-bg: #059669; --bs-btn-hover-border-color: #059669;
    --bs-btn-active-bg: #047857; --bs-btn-active-border-color: #047857;
}
.btn-danger {
    --bs-btn-bg: #DC2626; --bs-btn-border-color: #DC2626; --bs-btn-hover-bg: #B91C1C; --bs-btn-hover-border-color: #B91C1C;
    --bs-btn-active-bg: #B91C1C; --bs-btn-active-border-color: #B91C1C; --bs-btn-disabled-bg: #DC2626; --bs-btn-disabled-border-color: #DC2626;
}
.btn-outline-danger {
    --bs-btn-color: #B91C1C; --bs-btn-border-color: #FCA5A5; --bs-btn-hover-bg: #DC2626; --bs-btn-hover-border-color: #DC2626;
    --bs-btn-active-bg: #B91C1C; --bs-btn-active-border-color: #B91C1C;
}
.btn-warning {
    --bs-btn-color: #1F2937; --bs-btn-bg: #F59E0B; --bs-btn-border-color: #F59E0B;
    --bs-btn-hover-color: #1F2937; --bs-btn-hover-bg: #D97706; --bs-btn-hover-border-color: #D97706;
    --bs-btn-active-color: #1F2937; --bs-btn-active-bg: #D97706; --bs-btn-active-border-color: #D97706;
}
.btn-outline-warning {
    --bs-btn-color: #B45309; --bs-btn-border-color: #F59E0B; --bs-btn-hover-color: #1F2937; --bs-btn-hover-bg: #F59E0B; --bs-btn-hover-border-color: #F59E0B;
}
.btn-link { --bs-btn-color: #0E7490; --bs-btn-hover-color: #155E75; --bs-btn-active-color: #155E75; }
.form-check-input:checked { background-color: #0E7490; border-color: #0E7490; }
.form-check-input:focus, .form-control:focus, .form-select:focus {
    border-color: #0891B2; box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.18);
}
.dropdown-menu { --bs-dropdown-link-active-bg: #0E7490; --bs-dropdown-border-radius: 0.6rem; }
.pagination {
    --bs-pagination-color: #0E7490; --bs-pagination-hover-color: #155E75; --bs-pagination-focus-color: #155E75;
    --bs-pagination-active-bg: #0E7490; --bs-pagination-active-border-color: #0E7490;
    --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.18);
}
.nav-pills { --bs-nav-pills-link-active-bg: #0E7490; }
.progress { --bs-progress-bar-bg: #0E7490; }
.list-group { --bs-list-group-active-bg: #0E7490; --bs-list-group-active-border-color: #0E7490; }
.accordion {
    --bs-accordion-active-color: #155E75; --bs-accordion-active-bg: #ECFEFF;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.18);
}
.card { --bs-card-border-radius: 0.75rem; --bs-card-inner-border-radius: 0.7rem; }

/* One dropdown style for the whole app (2026-11-14): elabs-select.css, loaded by every layout (the portal and
   the patients' pages), so there is one place for it. */

/* The channel pages' row of links to their other pages, "Go to: …" (2026-11-26: in one place; each of the 7 pages had
   the same <style> of its own) */
.ops-jump { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font-size: .8rem; color: #475569; margin: 0 0 .75rem; }
.ops-jump a { font-weight: 600; color: var(--primary-dark, #0E7490); text-decoration: none; }
.ops-jump a:hover { text-decoration: underline; }
.ops-jump i { color: #64748b; }

/* ---------- Dialogs with a form or a list (2026-11-29) ----------
   Questions and messages are the smaller <dialog> of elabs-dialog.css. Here: in the middle of the screen, never taller
   than it (the middle scrolls; the title and the buttons stay), words and buttons whole, nothing under 460px wide. */
.modal { --bs-modal-margin: 1rem; }
.modal-backdrop { --bs-backdrop-bg: #0f172a; --bs-backdrop-opacity: 0.55; }
.modal-dialog.modal-sm { max-width: 460px; }
.modal-dialog:not(.modal-fullscreen) { display: flex; align-items: center; min-height: calc(100% - 2 * var(--bs-modal-margin)); }
.modal-dialog:not(.modal-fullscreen) > .modal-content { max-height: calc(100vh - 2 * var(--bs-modal-margin)); max-height: calc(100dvh - 2 * var(--bs-modal-margin));
    border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28); }
.modal-content > form:not([hidden]):not(.d-none) { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin: 0; }
.modal-header { flex: none; align-items: flex-start; gap: 12px; padding: 18px 22px 10px; border-bottom: 0; }
.modal-header.py-2 { padding-top: 18px !important; }
.modal-title { min-width: 0; color: #0f172a; font-size: 1.05rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.modal-header .btn-close { flex: none; margin: -2px -6px 0 auto; padding: 8px; background-size: 0.8rem; }
.modal-body { min-height: 0; padding: 12px 22px 16px; overflow-y: auto; overflow-wrap: break-word; overscroll-behavior: contain; }
.modal-body .alert, .modal-body p, .modal-body strong { overflow-wrap: anywhere; }
.modal-footer { flex: none; flex-wrap: wrap; gap: 8px; padding: 12px 22px 18px; border-top: 1px solid #eef2f6; }
.modal-footer.border-0 { border-top: 1px solid #eef2f6 !important; }
.modal-footer.pt-0 { padding-top: 12px !important; }
.modal-footer > * { margin: 0; }
.modal-footer .btn:not([hidden]):not(.d-none) { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 38px; padding-inline: 16px; font-size: 0.86rem; white-space: nowrap; }
.modal-footer .btn > .me-1, .modal-footer .btn > .me-2 { margin-right: 0 !important; }
.modal-footer .btn[style*="visibility: hidden"] { display: none !important; }   /* Remove, while adding */
.modal .form-text { font-size: 0.78rem; line-height: 1.4; }
.modal input::placeholder { text-overflow: ellipsis; }
/* a picture, the question and why (New Order's duplicate and requirements, as the smaller dialogs) */
.dlg-head { display: flex; flex: none; align-items: flex-start; gap: 16px; padding: 24px 24px 6px; }
.dlg-ic { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #ecfeff; color: #0e7490; font-size: 1.25rem; }
.dlg-ic.warn { background: #fffbeb; color: #b45309; }
.dlg-ic.bad { background: #fef2f2; color: #dc2626; }
.dlg-head h5 { margin: 2px 0 6px; color: #0f172a; font-size: 1.08rem; font-weight: 700; line-height: 1.35; text-wrap: balance; }
.dlg-head p { margin: 0; color: #475569; font-size: 0.9rem; line-height: 1.5; text-wrap: pretty; }
.dlg-list { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.dlg-list li { padding: 9px 12px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #7f1d1d; font-size: 0.88rem; font-weight: 600; }
.oc-actions .btn { min-height: 38px; }
@media (max-width: 575.98px) {
    .modal { --bs-modal-margin: 0.5rem; }
    .modal-header { padding: 16px 16px 8px; }
    .modal-body { padding: 10px 16px 14px; }
    .modal-footer { padding: 12px 16px 14px; }
    .modal-footer > .d-flex, .modal-footer > form { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 8px; }
    .modal-footer .btn:not([hidden]):not(.d-none), .oc-actions .btn { flex: 1 1 auto; min-height: 44px; }
    .dlg-head { gap: 12px; padding: 18px 16px 4px; }
    .el-recipient { flex-wrap: wrap; }
    .el-recipient input[type="email"] { flex: 1 1 100%; }
}
