/*
 * Ozoned Connect theme on Bootstrap 5.3 (RI-style shell: 127px rail, top bar, light/dark).
 * Workspace themes (developer guide §19): Insurer teal, Distributor purple, Ozoned provider
 * console in the Ozoned Connect logo's colours (user, 2026-11-17, plan U61). Every colour comes
 * from the --cx-* tokens; red is used only for errors/refusals.
 */

@font-face { font-family: "Futura PT"; src: url("../fonts/FuturaPTBook.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Futura PT"; src: url("../fonts/FuturaPTMedium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Futura PT"; src: url("../fonts/FuturaPTDemi.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Futura PT"; src: url("../fonts/FuturaPTHeavy.otf") format("opentype"); font-weight: 800; font-display: swap; }

:root {
    --cx-brand: #14655e;
    --cx-brand-hover: #0f4f4a;
    --cx-brand-fill: #14655e;
    --cx-brand-fill-hover: #0f4f4a;
    --cx-rail-from: #14655e;
    --cx-rail-to: #0e4a45;
    --cx-tint: #e8f2f1;
    --cx-canvas: #f6f8f8;
    --cx-surface: #fff;
    --cx-surface-hover: #f9fbfb;
    --cx-readonly: #f3f5f6;
    --cx-heading: #2f3542;
    --cx-text: #3d424c;
    --cx-muted: #6b7280;
    --cx-border: #dfe7e6;
    --cx-focus: rgba(20, 101, 94, .22);
    --cx-success: #1d7a52;
    --cx-success-bg: #e7f4ec;
    --cx-warning: #8f5c14;
    --cx-warning-bg: #fdf3e1;
    --cx-danger: #b42318;
    --cx-danger-bg: #fdecea;
    --cx-info: #3a6ea5;
    --cx-info-bg: #e9f0f8;
    --cx-rail-width: 127px;
}

/* Distributor workspace: purple-led. */
.cx-distributor {
    --cx-brand: #5b3f8c;
    --cx-brand-hover: #47306f;
    --cx-brand-fill: #5b3f8c;
    --cx-brand-fill-hover: #47306f;
    --cx-rail-from: #5b3f8c;
    --cx-rail-to: #3a2a5c;
    --cx-tint: #f0ebf7;
    --cx-focus: rgba(91, 63, 140, .22);
}

/*
 * Ozoned provider console: the Ozoned Connect logo's colours (user 2026-11-17, plan U61) —
 * navy #11385f (brand, rail, buttons, headings), sky #02a6f7 (hover, focus, tints), teal #0495a0
 * (rail gradient, success), orange #fc6e15 (active tile marker, counts). Sky, teal and
 * orange are under 4.5:1 on white, so small text uses the darker steps below (all AA).
 * Insurer and Distributor keep their own colours.
 */
.cx-platform {
    --cx-accent: #fc6e15;
    --cx-accent-ink: #0b2744;          /* text on the orange accent, 5.3:1 */
    --cx-brand: #11385f;               /* 12:1 on white */
    --cx-brand-hover: #0270a8;         /* deep sky, 5.4:1 on white */
    --cx-brand-fill: #11385f;
    --cx-brand-fill-hover: #0b2744;
    --cx-rail-from: #11385f;           /* navy … */
    --cx-rail-to: #0a4a5c;             /* … into deep teal, white text 9.8:1 */
    --cx-rail-active: rgba(2, 166, 247, .24);
    --cx-tint: #e7f5fd;
    --cx-focus: rgba(2, 166, 247, .25);
    --cx-canvas: #f4f7fb;
    --cx-surface-hover: #f6f9fc;
    --cx-readonly: #f2f5f9;
    --cx-heading: #11385f;
    --cx-muted: #5d6a7a;
    --cx-border: #dce4ee;
    --cx-success: #04727a;             /* logo teal for text, 5.0:1 on its bg */
    --cx-success-bg: #e3f4f5;
    --cx-info: #0369a1;                /* logo sky for text, 5.3:1 on its bg */
    --cx-info-bg: #e7f5fd;
    --bs-primary: #11385f;
    --bs-primary-rgb: 17, 56, 95;
    --bs-link-color: #11385f;
    --bs-link-color-rgb: 17, 56, 95;
    --bs-link-hover-color: #0270a8;
    --bs-link-hover-color-rgb: 2, 112, 168;
    --bs-focus-ring-color: rgba(2, 166, 247, .25);
}

:root[data-bs-theme="dark"] {
    --cx-canvas: #0f141a;
    --cx-surface: #171d24;
    --cx-surface-hover: #1d252e;
    --cx-readonly: #1e252d;
    --cx-heading: #e8edf2;
    --cx-text: #c9d1d9;
    --cx-muted: #93a0ad;
    --cx-border: #2b3540;
    --cx-success: #4cc38a;
    --cx-success-bg: rgba(76, 195, 138, .14);
    --cx-warning: #e3a83f;
    --cx-warning-bg: rgba(227, 168, 63, .14);
    --cx-danger: #f2786d;
    --cx-danger-bg: rgba(242, 120, 109, .14);
    --cx-info: #79b0e6;
    --cx-info-bg: rgba(121, 176, 230, .14);
    --bs-body-bg: var(--cx-surface);
    --bs-body-color: var(--cx-text);
    --bs-border-color: var(--cx-border);
    --bs-secondary-color: var(--cx-muted);
    --bs-tertiary-bg: var(--cx-readonly);
}
:root[data-bs-theme="dark"] .cx-insurer { --cx-brand: #5ec2b5; --cx-brand-hover: #86d4ca; --cx-brand-fill: #1d7d72; --cx-rail-from: #0f4d48; --cx-rail-to: #0b3532; --cx-tint: #1a2a29; }
:root[data-bs-theme="dark"] .cx-distributor { --cx-brand: #b9a2e6; --cx-brand-hover: #cdbdf0; --cx-brand-fill: #6b4ea3; --cx-rail-from: #3a2a5c; --cx-rail-to: #281d40; --cx-tint: #231d30; }
:root[data-bs-theme="dark"] .cx-platform {
    --cx-brand: #5ec3f7;               /* 8.5:1 on the dark surface */
    --cx-brand-hover: #8fd4fa;
    --cx-brand-fill: #1b6aa8;          /* white text 5.7:1 */
    --cx-brand-fill-hover: #17578a;
    --cx-rail-from: #0f2f50;
    --cx-rail-to: #0b3a47;
    --cx-rail-active: rgba(94, 195, 247, .2);
    --cx-tint: #143049;
    --cx-focus: rgba(94, 195, 247, .3);
    --cx-canvas: #0b1421;
    --cx-surface: #121e2c;
    --cx-surface-hover: #172636;
    --cx-readonly: #1a2939;
    --cx-heading: #e6eef7;
    --cx-text: #c5d1dd;
    --cx-muted: #8d9fb2;
    --cx-border: #26384b;
    --cx-success: #3fc4cc;
    --cx-success-bg: rgba(4, 149, 160, .2);
    --cx-info: #7cc9f2;
    --cx-info-bg: rgba(2, 166, 247, .14);
    --bs-body-bg: var(--cx-surface);
    --bs-body-color: var(--cx-text);
    --bs-border-color: var(--cx-border);
    --bs-secondary-color: var(--cx-muted);
    --bs-tertiary-bg: var(--cx-readonly);
    --bs-primary: #5ec3f7;
    --bs-primary-rgb: 94, 195, 247;
    --bs-link-color: #5ec3f7;
    --bs-link-color-rgb: 94, 195, 247;
    --bs-link-hover-color: #8fd4fa;
    --bs-link-hover-color-rgb: 143, 212, 250;
    --bs-focus-ring-color: rgba(94, 195, 247, .3);
}

html, body { height: 100%; }
body.cx {
    margin: 0;
    background: var(--cx-canvas);
    color: var(--cx-text);
    font-family: "Futura PT", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    overflow-wrap: break-word; /* long refs / JSON values break instead of running off the card */
}
.cx h1, .cx h2, .cx h3, .cx h4 { color: var(--cx-heading); font-weight: 600; }
.cx h1 { font-size: 1.6rem; margin: 0; }
.cx h2 { font-size: 1.2rem; }
.cx h3 { font-size: 1.05rem; }
:where(.cx) a { color: var(--cx-brand); }
:where(.cx) a:hover { color: var(--cx-brand-hover); }
.cx :focus-visible { outline: 2px solid var(--cx-brand); outline-offset: 2px; }
.cx .form-control:focus, .cx .form-select:focus, .cx .form-check-input:focus { border-color: var(--cx-brand); box-shadow: 0 0 0 .2rem var(--cx-focus); }
.cx .form-check-input:checked { background-color: var(--cx-brand); border-color: var(--cx-brand); }
.cx .form-label { font-weight: 500; color: var(--cx-heading); margin-bottom: .25rem; }
.cx .form-text { color: var(--cx-muted); }
/* Required-field mark, added by connect-forms.js next to the label of every required control. */
.cx-req { color: var(--cx-danger); font-weight: 600; margin: 0 .25em 0 .15em; }
/* Bootstrap floats <legend> at 100% width and clears only its next sibling; when that sibling is a
   hidden input the options sat in a zero-width strip beside the float and ran off the card. */
.cx fieldset > legend ~ * { clear: left; }
/* Auto-width controls (long option text) never grow past their container on narrow screens. */
.cx .form-select.w-auto, .cx .form-control.w-auto { max-width: 100%; }

/* ---------- Shell ---------- */
.cx-shell { display: flex; min-height: 100vh; }

.cx-sidebar {
    width: var(--cx-rail-width);
    flex: 0 0 var(--cx-rail-width);
    align-self: flex-start;
    min-height: 60vh;
    background: linear-gradient(180deg, var(--cx-rail-from), var(--cx-rail-to));
    color: #fff;
    position: relative;
    z-index: 1030;
    border-bottom-right-radius: 65px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    padding-bottom: 40px;
}
.cx-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 8px 14px; text-align: center; }
.cx-brand-mark { width: 44px; height: 44px; padding: 4px; border-radius: 12px; background: #fff; display: grid; place-items: center; }
.cx-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
/* Distributor logo (user 2026-11-17): the picture is already a white rounded tile, so no second plate. */
.cx-brand-mark.is-distributor { width: 52px; height: 52px; padding: 0; background: none; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }
/* Insurer company logo tile (App\View\BrandLogo): landscape, the Jubilee logo's 900:510 shape. */
.cx-brand-logo { box-sizing: border-box; width: 104px; height: 59px; flex: none; margin-bottom: 6px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .22), 0 0 0 1px rgba(255, 255, 255, .22); }
.cx-brand-logo img { width: 100%; height: 100%; display: block; }
.cx-brand-logo.is-company { padding: 6px 8px; }
/* An uploaded logo of any shape fits inside the padding, whole and centred (never cropped). */
.cx-brand-logo.is-company img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.cx-brand-logo.is-fallback { background: #a51632; }   /* the logo's own crimson */
.cx-brand-logo.is-fallback img { object-fit: cover; }
/* Ozoned Connect logo (dark text): on a white plate in dark mode so it stays readable. */
.cx-logo { display: block; width: 220px; max-width: 100%; height: auto; margin-bottom: 14px; }
.cx-logo-lg { width: 320px; margin-bottom: 0; }
:root[data-bs-theme="dark"] .cx-logo { background: #fff; border-radius: 10px; padding: 6px 10px; }
.cx-brand-name { font-weight: 600; font-size: .9rem; line-height: 1.15; }
.cx-brand-kind { font-size: .72rem; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.cx-menu-toggle { display: none; }

.cx-rail ul { list-style: none; margin: 0; padding: 0; }
.cx-rail > ul > li { position: relative; }
.cx-tile {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 6px; color: #fff; text-decoration: none; text-align: center;
    font-size: .8rem; line-height: 1.15; cursor: pointer; border-left: 3px solid transparent;
    list-style: none;
}
.cx-tile::-webkit-details-marker { display: none; }
.cx-tile:hover, .cx-rail details[open] > .cx-tile { background: rgba(255, 255, 255, .12); color: #fff; }
.cx-tile.active { background: rgba(255, 255, 255, .2); border-left-color: #fff; }
/* Provider console (U61): sky-tinted active tile with the logo's orange marker. */
.cx-platform .cx-tile.active { background: var(--cx-rail-active); border-left-color: var(--cx-accent); }
.cx-tile svg { width: 24px; height: 24px; }
.cx-tile { position: relative; }
/* Pending approvals count on the rail tile. */
.cx-tile-count { position: absolute; top: 6px; right: 22px; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--cx-brand-fill); font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; }
.cx-platform .cx-tile-count { background: var(--cx-accent); color: var(--cx-accent-ink); }
/* An item opened from a link (Pending approvals → #REF) is outlined and clear of the sticky top bar. */
.cx [id]:target { scroll-margin-top: 90px; outline: 2px solid var(--cx-brand); outline-offset: 3px; border-radius: 10px; }
.cx-flyout {
    position: absolute; left: 100%; top: 0; min-width: 230px;
    background: var(--cx-surface); color: var(--cx-text);
    border: 1px solid var(--cx-border); border-radius: 0 10px 10px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 8px 0;
}
.cx-flyout-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cx-muted); padding: 4px 16px 6px; }
.cx-flyout a { display: block; padding: 7px 16px; color: var(--cx-text); text-decoration: none; }
.cx-flyout a:hover, .cx-flyout a.active { background: var(--cx-tint); color: var(--cx-brand); }

.cx-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cx-topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--cx-surface); border-bottom: 1px solid var(--cx-border); padding: 10px 24px;
}
.cx-topbar-left, .cx-topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cx-back { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--cx-tint); color: var(--cx-brand); text-decoration: none; font-weight: 500; }
.cx-entity { display: flex; flex-direction: column; line-height: 1.1; }
.cx-entity small { color: var(--cx-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.cx-entity strong { color: var(--cx-heading); display: inline-flex; align-items: center; gap: 8px; }
.cx-country-flag { flex: none; width: 24px; height: 18px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px var(--cx-border); }
.cx-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--cx-brand-fill); color: #fff; font-size: .78rem; font-weight: 500; }
.cx-linkbtn { background: none; border: 0; padding: 0; color: var(--cx-brand); cursor: pointer; }
.cx-linkbtn:hover { text-decoration: underline; }
.cx-theme { border: 1px solid var(--cx-border); background: var(--cx-surface); color: var(--cx-text); border-radius: 999px; padding: 3px 10px; font-size: .8rem; }

.cx-switch { position: relative; }
.cx-switch > summary { list-style: none; cursor: pointer; }
.cx-switch > summary::-webkit-details-marker { display: none; }
.cx-switch-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 280px; background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 8px; z-index: 1040; }
.cx-switch-menu button, .cx-switch-menu .is-current { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--cx-text); }
.cx-switch-menu button:hover { background: var(--cx-tint); }
.cx-switch-menu .is-current { color: var(--cx-brand); font-weight: 600; }
.cx-switch-menu p { margin: 6px 10px 4px; font-size: .75rem; color: var(--cx-muted); }

.cx-titlebar { padding: 20px 24px 4px; }
.cx-eyebrow { color: var(--cx-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.cx-content { padding: 16px 24px 48px; }

/* ---------- Content ---------- */
.cx-card { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.cx-card > h2:first-child, .cx-card > h3:first-child { margin-top: 0; }
.cx-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cx-card-head h2, .cx-card-head h3 { margin: 0; }
.cx-muted { color: var(--cx-muted); }
.cx-key { color: var(--cx-muted); font-size: .85rem; }
.cx-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cx-metric { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: 12px; padding: 16px 18px; }
.cx-metric b { display: block; font-size: 1.8rem; color: var(--cx-heading); line-height: 1.1; }
.cx-metric span { color: var(--cx-muted); }
.cx-empty { border: 1px dashed var(--cx-border); border-radius: 10px; padding: 18px; color: var(--cx-muted); text-align: center; background: var(--cx-surface); }
.cx-notice { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid transparent; }
.cx-notice.info { background: var(--cx-info-bg); color: var(--cx-info); }
.cx-notice.warn { background: var(--cx-warning-bg); color: var(--cx-warning); }
.cx-notice.good { background: var(--cx-success-bg); color: var(--cx-success); }
.cx-notice.bad { background: var(--cx-danger-bg); color: var(--cx-danger); }
.cx-notice.sim { background: var(--cx-warning-bg); color: var(--cx-warning); border-color: var(--cx-warning); font-weight: 500; }

.cx-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 500; white-space: nowrap; background: var(--cx-readonly); color: var(--cx-muted); border: 1px solid var(--cx-border); }
.cx-badge.good { background: var(--cx-success-bg); color: var(--cx-success); border-color: transparent; }
.cx-badge.bad { background: var(--cx-danger-bg); color: var(--cx-danger); border-color: transparent; }
.cx-badge.wait { background: var(--cx-warning-bg); color: var(--cx-warning); border-color: transparent; }

.cx-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cx-table th { text-align: left; font-weight: 600; color: var(--cx-heading); border-bottom: 2px solid var(--cx-border); padding: 8px 10px; white-space: nowrap; }
.cx-table td { border-bottom: 1px solid var(--cx-border); padding: 8px 10px; vertical-align: top; }
.cx-table tr:last-child td { border-bottom: 0; }
.cx-table-wrap { overflow-x: auto; }
.cx-table td form { display: inline; }

/* Section tabs (server-side ?tab=; inactive sections are `hidden`) */
.cx-tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; border-bottom: 1px solid var(--cx-border); margin-bottom: 18px; }
.cx-tabs a { padding: 8px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--cx-muted); font-weight: 500; text-decoration: none; }
.cx-tabs a:hover { color: var(--cx-text); }
.cx-tabs a[aria-current="page"] { color: var(--cx-brand); border-bottom-color: var(--cx-brand); }
.cx-count { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 4px; border-radius: 999px; background: var(--cx-readonly); color: var(--cx-muted); font-size: .76rem; text-align: center; }
.cx-tabs a[aria-current="page"] .cx-count { background: var(--cx-tint); color: var(--cx-brand); }

.cx-form-grid { display: grid; gap: 12px 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cx-form-grid .cx-span { grid-column: 1 / -1; }
.cx-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.cx .btn-primary { --bs-btn-bg: var(--cx-brand-fill); --bs-btn-border-color: var(--cx-brand-fill); --bs-btn-hover-bg: var(--cx-brand-fill-hover); --bs-btn-hover-border-color: var(--cx-brand-fill-hover); --bs-btn-active-bg: var(--cx-brand-fill-hover); --bs-btn-disabled-bg: var(--cx-brand-fill); }
.cx .btn-outline-primary { --bs-btn-color: var(--cx-brand); --bs-btn-border-color: var(--cx-brand); --bs-btn-hover-bg: var(--cx-brand-fill); --bs-btn-hover-border-color: var(--cx-brand-fill); }
.cx details.cx-detail > summary { cursor: pointer; color: var(--cx-brand); }
.cx dl.cx-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.cx dl.cx-dl dt { color: var(--cx-muted); font-weight: 400; }
.cx dl.cx-dl dd { margin: 0; }
.cx-timeline { list-style: none; padding: 0; margin: 0; }
.cx-timeline li { padding: 6px 0 6px 14px; border-left: 2px solid var(--cx-border); }
.cx-flow { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; counter-reset: cx-flow; }
.cx-flow li { counter-increment: cx-flow; padding: 4px 12px; border-radius: 999px; font-size: .82rem; border: 1px solid var(--cx-border); color: var(--cx-muted); background: var(--cx-surface); }
.cx-flow li::before { content: counter(cx-flow) ". "; }
.cx-flow li.done { background: var(--cx-success-bg); color: var(--cx-success); border-color: transparent; }
.cx-flow li.current { background: var(--cx-brand-fill); color: #fff; border-color: transparent; font-weight: 600; }
/* ---------- Customer web journey (plan U7) ---------- */
.cx-customer { min-height: 100vh; padding: 24px 16px; background: linear-gradient(160deg, var(--cx-rail-from), var(--cx-rail-to)); }
.cx-phone { max-width: 420px; margin: 0 auto; background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: 24px; padding: 18px 18px 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, .18); }
.cx-phone-brand { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--cx-border); color: var(--cx-heading); }
.cx-offer, .cx-policy { border: 1px solid var(--cx-border); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.cx-policy { background: var(--cx-success-bg); border-color: transparent; }

/* ---------- Sign-in pages ---------- */
.cx-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--cx-rail-from), var(--cx-rail-to)); }
.cx-auth-card { width: 100%; max-width: 460px; background: var(--cx-surface); border-radius: 16px; padding: 28px 30px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); }
.cx-auth-card.wide { max-width: 820px; }
.cx-auth-card .cx-brand-mark { background: var(--cx-brand-fill); color: #fff; margin-bottom: 10px; }
.cx-landing { max-width: 1080px; margin: 0 auto; padding: 40px 24px; }
.cx-entry { border-top: 6px solid var(--cx-brand); display: flex; flex-direction: column; }
.cx-entry > .btn { align-self: flex-start; margin-top: auto; }   /* sign-in buttons line up at the foot of the cards */
/* Entry card logos (user 2026-11-17): Jubilee Insurance on Insurers, the distributor logo on
   Distributors, Ozoned Connect on Provider administration — one 56px row, so the headings line up. */
.cx-entry-logo { height: 56px; margin-bottom: 16px; display: flex; align-items: center; }
.cx-entry-logo img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.cx-entry-logo.is-tile img { border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.cx-entry-logo.is-wordmark img { height: 44px; }
:root[data-bs-theme="dark"] .cx-entry-logo.is-wordmark img { height: 52px; padding: 5px 10px; border-radius: 8px; background: #fff; }
@media (max-width: 900px) {
    .cx-shell { flex-direction: column; }
    .cx-sidebar { width: 100%; flex-basis: auto; min-height: 0; border-bottom-right-radius: 0; padding-bottom: 0; }
    .cx-brand { flex-direction: row; justify-content: space-between; padding: 10px 16px; }
    .cx-brand-logo { width: 72px; height: 41px; margin-bottom: 0; border-radius: 8px; }
    .cx-brand-logo.is-company { padding: 4px 6px; }
    .cx-menu-toggle { display: inline-block; background: rgba(255, 255, 255, .16); border: 0; color: #fff; border-radius: 8px; padding: 4px 12px; }
    .cx-rail { display: none; }
    .cx-rail.is-open { display: block; }
    .cx-tile { flex-direction: row; justify-content: flex-start; padding: 10px 16px; font-size: .9rem; }
    .cx-tile-count { position: static; margin-left: auto; }
    .cx-flyout { position: static; border-radius: 0; box-shadow: none; border: 0; background: rgba(255, 255, 255, .08); }
    .cx-flyout a { color: #fff; }
    .cx-flyout-title { display: none; }
    .cx-topbar, .cx-titlebar, .cx-content { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Controller stages, guided walkthrough, guides ---------- */
.cx-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; counter-reset: cx-stage; }
.cx-stages li { counter-increment: cx-stage; border: 1px solid var(--cx-border); border-radius: 10px; padding: 8px 10px; background: var(--cx-surface); }
.cx-stages li::before { content: counter(cx-stage) " · "; color: var(--cx-muted); }
.cx-stages li.done { background: var(--cx-success-bg); border-color: transparent; }
.cx-coach > summary { cursor: pointer; }
.cx-tour { padding-left: 1.2rem; margin: 0; }
.cx-tour li { padding: 6px 0; border-bottom: 1px solid var(--cx-border); }
.cx-tour li.done { color: var(--cx-muted); }
.cx-tour li.current { font-weight: 500; }
.cx-guide { overflow-x: auto; }
.cx-guide table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .9rem; }
.cx-guide th, .cx-guide td { border: 1px solid var(--cx-border); padding: 6px 8px; vertical-align: top; }
.cx-guide pre { background: var(--cx-readonly); padding: 10px; border-radius: 8px; overflow-x: auto; }

/* ---------- Visual journey planner ---------- */
.cx-planner { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; list-style: none; padding: 0; margin: 8px 0; }
.cx-planner li { position: relative; min-width: 128px; flex: 1 1 128px; border: 1px solid var(--cx-border); border-radius: 10px; padding: 6px 8px 6px; background: var(--cx-surface); font-size: .82rem; }
.cx-planner li .cat { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--cx-muted); }
.cx-planner li.review { border-style: dashed; border-color: var(--cx-brand); }
.cx-planner li.mandatory .lock { color: var(--cx-muted); font-size: .7rem; }


/* Multi-select dropdown with tick boxes (connect-admin.js, select[multiple][data-cx-multiselect]). */
.cx-ms { position: relative; }
.cx-ms .cx-ms-native { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.cx .cx-ms-toggle { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: calc(1.5em + .75rem + 2px); text-align: left; cursor: pointer; }
.cx .cx-ms-toggle.is-invalid { border-color: var(--cx-danger); }
.cx-ms-placeholder { color: var(--cx-muted); }
.cx-ms-chip { display: inline-block; max-width: 100%; padding: 1px 10px; border-radius: 999px; background: var(--cx-tint); color: var(--cx-brand); border: 1px solid var(--cx-brand); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-ms-panel { position: absolute; z-index: 1050; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; padding: 6px 0; background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.cx-ms-group { padding: 6px 14px 2px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--cx-muted); }
.cx-ms-option { display: flex; gap: 10px; align-items: center; margin: 0; padding: 7px 14px; cursor: pointer; color: var(--cx-text); }
.cx-ms-option:hover { background: var(--cx-surface-hover); }
.cx-ms-option .form-check-input { margin: 0; flex: none; }
.cx-ms-note { padding: 8px 14px; color: var(--cx-muted); font-size: .9rem; }

/* Listing pager (every listing screen of the three portals): count, rows per page, page buttons in the portal colour. */
.cx-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--cx-border); }
.cx-pager-info { color: var(--cx-muted); font-size: .9rem; }
.cx-pager-info strong { color: var(--cx-heading); font-weight: 600; }
.cx-pager-size { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .88rem; color: var(--cx-muted); }
.cx-pager-size .form-select { width: auto; min-width: 72px; }
.cx-pager .pagination { --bs-pagination-color: var(--cx-brand); --bs-pagination-hover-color: var(--cx-brand-hover); --bs-pagination-focus-color: var(--cx-brand);
    --bs-pagination-active-bg: var(--cx-brand-fill); --bs-pagination-active-border-color: var(--cx-brand-fill); --bs-pagination-bg: var(--cx-surface);
    --bs-pagination-border-color: var(--cx-border); --bs-pagination-hover-bg: var(--cx-tint); --bs-pagination-hover-border-color: var(--cx-border);
    --bs-pagination-disabled-bg: var(--cx-surface); --bs-pagination-disabled-color: var(--cx-muted); --bs-pagination-focus-box-shadow: 0 0 0 .2rem var(--cx-focus); }
@media (max-width: 640px) { .cx-pager { flex-direction: column; align-items: flex-start; } }
