/* Client view (#2338): minimal, mobile first, no external dependencies (CSP style-src 'self'). */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
.cv-body { margin: 0; overflow-x: hidden; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; color: #00304c; background: #dbebf7; line-height: 1.45; }
.cv-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; background: #00304c; color: #fff; }
.cv-brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.cv-brand { display: inline-flex; align-items: center; line-height: 0; }
.cv-brand-logo { display: block; width: 40px; height: 40px; border-radius: 4px; }
.cv-client { flex: 1 1 auto; opacity: .85; }
.cv-signout { margin: 0; }
.cv-link-button { background: none; border: 0; color: #fff; text-decoration: underline; font: inherit; padding: 8px 0; cursor: pointer; }
.cv-main { max-width: 1040px; margin: 0 auto; padding: 16px; }
/* Case lists carry up to 10 columns: give them room so Flags / Completion note are not cut off (the table still scrolls inside .cv-table-wrap if needed). */
.cv-main:has(.cv-cases) { max-width: 1360px; }
.cv-table-wrap { -webkit-overflow-scrolling: touch; }
.cv-readonly { border: 0; margin: 0; padding: 0; min-width: 0; }
.cv-h1 { font-size: 1.4rem; margin: 8px 0 12px; }
.cv-muted { color: #3d5a6e; }
.cv-tiles { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .cv-tiles { grid-template-columns: 1fr 1fr; } }
.cv-tile { display: block; padding: 16px; background: #fff; border: 1px solid #c9dcea; border-radius: 8px; text-decoration: none; color: inherit; min-height: 44px; }
.cv-tile:hover, .cv-tile:focus { border-color: #00304c; }
.cv-tile-title { display: block; font-weight: 600; }
.cv-tile-desc { display: block; color: #3d5a6e; font-size: .9rem; margin-top: 4px; }
.cv-back { color: #00304c; }
/* Footer lines up with .cv-main (same max-width and padding, wide on the case lists too). */
.cv-footer { max-width: 1040px; margin: 0 auto; padding: 16px; color: #3d5a6e; font-size: .85rem; }
.cv-body:has(.cv-cases) .cv-footer { max-width: 1360px; }
.cv-preview-banner { position: sticky; top: 0; z-index: 10; background: #fff3cd; color: #664d03; border-bottom: 2px solid #ffc107; padding: 6px 16px; font-weight: 600; font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 14px; }
.cv-preview-status > summary { cursor: pointer; font-weight: 400; text-decoration: underline; min-height: 24px; }
.cv-preview-status > summary:focus { outline: 3px solid #1f6feb; outline-offset: 2px; }
.cv-preview-status p { margin: 6px 0 4px; font-weight: 400; text-align: left; max-width: 760px; }

/* Account overview + case lists (#2351). No inline style anywhere: colours and sizes live here. */
.cv-h2 { font-size: 1.15rem; margin: 0 0 6px; }
.cv-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.cv-subnav-link { padding: 8px 14px; border: 1px solid #c9dcea; border-radius: 999px; background: #fff; color: #00304c; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.cv-subnav-active { background: #00304c; color: #fff; border-color: #00304c; }
.cv-card { background: #fff; border: 1px solid #c9dcea; border-radius: 8px; padding: 16px; margin: 0 0 16px; }
.cv-empty { color: #3d5a6e; font-style: italic; }
.cv-notice { background: #fff3cd; color: #664d03; border: 1px solid #ffecb5; border-radius: 6px; padding: 8px 12px; }
.cv-stats { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 8px 0 12px; }
.cv-stat { margin: 0; }
.cv-stat dt { font-size: .8rem; color: #3d5a6e; }
.cv-stat dd { margin: 0; font-size: 1.3rem; font-weight: 600; }
.cv-chart { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; margin: 8px 0; }
.cv-chart-unit { font-size: .8rem; color: #3d5a6e; margin: 0 0 2px; }
.cv-svg { width: 100%; height: auto; display: block; }
.cv-grid { stroke: #e6eff6; stroke-width: 1; }
.cv-axis { font-size: 11px; fill: #3d5a6e; }
.cv-line { stroke-width: 2.5; }
.cv-s0 { fill: #1f6feb; stroke: #1f6feb; }
.cv-s1 { fill: #e08a00; stroke: #e08a00; }
.cv-s2 { fill: #2da44e; stroke: #2da44e; }
.cv-s3 { fill: #8250df; stroke: #8250df; }
.cv-s4 { fill: #cf222e; stroke: #cf222e; }
.cv-s5 { fill: #6e7781; stroke: #6e7781; }
.cv-line.cv-s0, .cv-line.cv-s1, .cv-line.cv-s2, .cv-line.cv-s3, .cv-line.cv-s4, .cv-line.cv-s5 { fill: none; }
.cv-bar { stroke: none; }
.cv-line.cv-dash { stroke-dasharray: 7 4; }
.cv-dot { stroke-width: 1.5; }
.cv-dot.cv-s0, .cv-dot.cv-s1, .cv-dot.cv-s2, .cv-dot.cv-s3, .cv-dot.cv-s4, .cv-dot.cv-s5 { stroke: #fff; }
.cv-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 4px 0 0; font-size: .85rem; }
.cv-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; }
.cv-sw0 { background: #1f6feb; } .cv-sw1 { background: #e08a00; } .cv-sw2 { background: #2da44e; }
.cv-sw3 { background: #8250df; } .cv-sw4 { background: #cf222e; } .cv-sw5 { background: #6e7781; }
.cv-details { margin: 8px 0 0; }
.cv-details > summary { cursor: pointer; color: #00304c; min-height: 32px; }
.cv-table-wrap { overflow-x: auto; }
.cv-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.cv-table th, .cv-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e6eff6; vertical-align: top; }
.cv-table th { color: #3d5a6e; font-weight: 600; white-space: nowrap; }
.cv-cases .cv-note { min-width: 220px; max-width: 420px; }
.cv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cv-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; background: #fff; border: 1px solid #c9dcea; border-radius: 8px; padding: 12px; margin: 0 0 12px; }
.cv-field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: #3d5a6e; }
.cv-field input, .cv-field select { font: inherit; padding: 8px; min-height: 40px; border: 1px solid #8fb0c6; border-radius: 6px; background: #fff; color: #00304c; }
.cv-field-actions { flex-direction: row; align-items: center; gap: 12px; }
.cv-button { font: inherit; background: #00304c; color: #fff; border: 0; border-radius: 6px; padding: 10px 18px; min-height: 40px; cursor: pointer; }
.cv-pager { display: flex; gap: 16px; align-items: center; margin: 12px 0; }
.cv-icons { white-space: nowrap; }
.cv-icon { display: inline-block; width: 16px; height: 16px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.cv-icon-proposal { background: #6e7781; }
.cv-icon-awaiting_signature { background: #e08a00; }
.cv-icon-signed { background: #2da44e; }
.cv-icon-sent { background: #1f6feb; }
.cv-icon-authorised { background: #8250df; border-radius: 50%; }
@media (max-width: 640px) { .cv-main { padding: 12px; } .cv-card { padding: 12px; } }
.cv-icon { width: 20px; height: 20px; line-height: 20px; text-align: center; color: #fff; font-size: 12px; font-style: normal; }
.cv-icon-proposal::before { content: "\1F5CE"; }
.cv-icon-authorised::before { content: "\2605"; }

/* Case lists: short columns stay on one line, the subject takes the slack. */
.cv-cases { table-layout: auto; }
.cv-cases td.cv-nowrap { white-space: nowrap; }
.cv-cases td.cv-subject { min-width: 220px; width: 100%; overflow-wrap: anywhere; }
.cv-key { font-size: .85rem; color: #3d5a6e; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
/* Completion notes: three lines, "Show more" opens the rest (details/summary, no script). */
.cv-more > summary { list-style: none; cursor: pointer; }
.cv-more > summary::-webkit-details-marker { display: none; }
.cv-more:not([open]) .cv-clamp { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cv-toggle { display: block; color: #00304c; text-decoration: underline; font-size: .85rem; margin-top: 2px; }
.cv-more:not([open]) .cv-toggle::after { content: "Show more"; }
.cv-more[open] .cv-toggle::after { content: "Show less"; }
/* Phones: each case becomes a card (labels come from data-label). */
@media (max-width: 640px) {
    .cv-cases thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .cv-cases, .cv-cases tbody, .cv-cases tr, .cv-cases td { display: block; width: 100%; }
    .cv-cases tr { border: 1px solid #c9dcea; border-radius: 8px; padding: 6px 10px; margin: 0 0 10px; background: #fff; }
    .cv-cases td { border: 0; padding: 3px 0; white-space: normal !important; min-width: 0 !important; max-width: none !important; display: flex; gap: 10px; }
    .cv-cases td::before { content: attr(data-label); flex: 0 0 104px; color: #3d5a6e; font-weight: 600; }
    .cv-cases td.cv-note { display: block; }
    .cv-cases td.cv-note::before { display: block; margin-bottom: 2px; }
}

/* Request forms and My requests (#2342/#2343/#2345). Mobile first; works at 360px. */
.cv-form { max-width: 640px; }
.cv-fld { margin: 0 0 16px; }
.cv-fld[hidden], .cv-notice[hidden] { display: none; }
.cv-label, .cv-group legend { display: block; font-weight: 600; margin: 0 0 4px; }
.cv-input { display: block; width: 100%; max-width: 100%; box-sizing: border-box; font: inherit; padding: 10px; min-height: 44px; border: 1px solid #6f8fa6; border-radius: 6px; background: #fff; color: #00304c; }
textarea.cv-input { min-height: 96px; }
.cv-input:focus, .cv-button:focus, .cv-details > summary:focus, .cv-error-summary:focus { outline: 3px solid #1f6feb; outline-offset: 2px; }
.cv-group { border: 1px solid #c9dcea; border-radius: 6px; padding: 8px 12px; margin: 0; min-width: 0; }
.cv-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 6px 0; }
.cv-check input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; }
.cv-help { margin: 4px 0 0; color: #3d5a6e; font-size: .9rem; }
.cv-field-error { margin: 4px 0 0; color: #b42318; font-weight: 600; }
.cv-fld-error .cv-input { border-color: #b42318; border-width: 2px; }
.cv-error-summary { border: 3px solid #b42318; border-radius: 6px; background: #fff; padding: 12px 16px; margin: 0 0 16px; max-width: 640px; }
.cv-error-title { font-size: 1.1rem; margin: 0 0 6px; color: #b42318; }
.cv-error-summary ul { margin: 0; padding-left: 20px; }
.cv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 20px 0; }
.cv-button-link { display: inline-block; text-decoration: none; line-height: 20px; }
.cv-button-danger { background: #b42318; }
.cv-requests-link { margin: 0 0 16px; }
.cv-row-actions .cv-details { margin: 0 0 6px; }
.cv-row-actions form { margin: 8px 0; min-width: 200px; }
.cv-row-actions .cv-input { margin: 4px 0 8px; }
.cv-requests td, .cv-requests th { min-width: 0; }
@media (max-width: 600px) {
    .cv-requests { font-size: .85rem; }
    .cv-requests td.cv-row-actions { min-width: 150px; }
}

/* Systems and connectivity (#2413). */
.cv-systems td.cv-att-stale, .cv-systems td.cv-att-none, p.cv-att-stale, p.cv-att-none { color: #9a3412; }
.cv-systems td.cv-att-current, p.cv-att-current { color: #166534; }
.cv-systems .cv-row-actions form { margin: 4px 0; }
.cv-systems .cv-row-actions { min-width: 150px; }
.cv-systems .cv-link-button { color: #00304c; text-align: left; padding: 4px 0; }

/* ===== Style and UX pass (#2338) ===== */
.cv-preview-status[open] { flex-basis: 100%; }
.cv-h3 { font-size: 1rem; margin: 18px 0 4px; }
.cv-section-gap { margin-top: 28px; }

/* Header navigation: a second row in the header, wraps on phones. */
.cv-nav { flex: 1 1 100%; order: 10; }
.cv-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.cv-nav-link { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 12px; border-radius: 999px; color: #fff; text-decoration: none; border: 1px solid transparent; }
.cv-nav-link:hover { border-color: rgba(255, 255, 255, .5); }
.cv-nav-link:focus { outline: 3px solid #fff; outline-offset: 2px; }
.cv-nav-current { background: #fff; color: #00304c; font-weight: 600; }

/* Home tiles: grouped, with an icon. */
.cv-tile-group { margin: 20px 0 8px; }
.cv-tile-group .cv-h2 { margin: 0; }
.cv-tile-group .cv-tiles { margin: 8px 0 0; }
.cv-tile { display: flex; gap: 12px; align-items: flex-start; }
.cv-tile-icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: #dbebf7; color: #00304c; }
.cv-tile-text { display: block; min-width: 0; }

/* Request forms: sections, hardware grid, staff callout. */
.cv-section { border: 1px solid #c9dcea; border-radius: 8px; background: #fff; padding: 12px 16px 4px; margin: 0 0 16px; min-width: 0; }
.cv-section-title { font-size: 1.05rem; font-weight: 700; padding: 0 6px; color: #00304c; }
.cv-checks { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 560px) { .cv-checks { grid-template-columns: 1fr 1fr; } }
.cv-staff-callout { border: 2px dashed #b7791f; background: #fffaf0; color: #5f370e; border-radius: 8px; padding: 12px 16px 4px; margin: 0 0 20px; }
.cv-staff-label { display: inline-block; margin: 0 0 8px; padding: 2px 10px; background: #b7791f; color: #fff; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cv-staff-callout .cv-help { color: #5f370e; }

/* Buttons. */
.cv-button-secondary { background: #fff; color: #00304c; border: 1px solid #00304c; display: inline-block; }
summary.cv-button { list-style: none; }
summary.cv-button::-webkit-details-marker { display: none; }
.cv-button-link { color: #fff; }
.cv-button-secondary.cv-button-link { color: #00304c; }
.cv-link-button:focus, .cv-nav-link:focus, .cv-chip-link:focus, .cv-tile:focus { outline: 3px solid #1f6feb; outline-offset: 2px; }
.cv-empty-state .cv-actions { margin: 12px 0 0; }

/* Systems: summary bar, filter chips, MFA status chip, stacked table. */
.cv-summary-bar { background: #fff; border: 1px solid #c9dcea; border-radius: 8px; padding: 12px 16px; margin: 0 0 12px; }
.cv-summary-text { margin: 0 0 8px; font-size: 1.05rem; }
.cv-summary-confirm { margin: 0; }
.cv-summary-confirm form { margin: 10px 0 0; max-width: 640px; }
.cv-list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-chip-link { padding: 6px 12px; border: 1px solid #8fb0c6; border-radius: 999px; background: #fff; color: #00304c; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; font-size: .9rem; }
.cv-chip-link-active { background: #00304c; color: #fff; border-color: #00304c; }
.cv-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid transparent; }
.cv-chip-needs { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.cv-chip-unconfirmed { background: #fef9c3; color: #713f12; border-color: #fde047; }
.cv-chip-confirmed { background: #dcfce7; color: #166534; border-color: #86efac; }
.cv-chip-stale { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.cv-chip-dpo { background: #e0ecff; color: #00304c; border-color: #93b4e8; font-size: .75rem; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.cv-sub { display: block; color: #3d5a6e; font-size: .85rem; }
.cv-sys-name a { font-weight: 600; }
.cv-systems td, .cv-circuits td { vertical-align: middle; }
.cv-hold-card .cv-stats { margin-bottom: 4px; }
.cv-danger-zone { margin: 24px 0 8px; border-top: 1px solid #e6eff6; padding-top: 12px; }
.cv-danger-zone > summary { color: #b42318; }
.cv-att { margin: 4px 0 8px; }
@media (max-width: 640px) {
    .cv-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .cv-stack, .cv-stack tbody, .cv-stack tr, .cv-stack td { display: block; width: 100%; }
    .cv-stack tr { border: 1px solid #c9dcea; border-radius: 8px; padding: 6px 10px; margin: 0 0 10px; background: #fff; }
    .cv-stack td { border: 0; padding: 3px 0; display: flex; gap: 10px; align-items: baseline; white-space: normal; }
    .cv-stack td::before { content: attr(data-label); flex: 0 0 104px; color: #3d5a6e; font-weight: 600; }
    .cv-stack td.cv-sys-name { display: block; font-size: 1rem; }
    .cv-stack td.cv-sys-name::before { display: none; }
    .cv-list-tools .cv-button-link { width: 100%; text-align: center; }
}

/* #2416 subscriptions timeline, #2418 contacts, #2417 security, #2419 apps panel (additive). */
.cv-cal-strip { list-style: none; margin: 8px 0 16px; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cv-cal-cell { overflow: hidden; border: 1px solid #c9dcea; border-radius: 6px; background: #f5f9fc; color: #3d5a6e; min-height: 40px; display: flex; align-items: stretch; }
.cv-cal-cell > * { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 4px; font-size: .9rem; white-space: nowrap; }
.cv-cal-busy { background: #fff; border-color: #00304c; color: #00304c; font-weight: 600; }
.cv-cal-busy a { color: inherit; text-decoration: none; }
.cv-cal-busy a:hover, .cv-cal-busy a:focus { background: #eef5fb; border-radius: 5px; }
.cv-cal-count { background: #00304c; color: #fff; border-radius: 999px; min-width: 1.4em; padding: 0 6px; font-size: .8rem; text-align: center; }
.cv-cal-month { margin: 0 0 16px; scroll-margin-top: 12px; }
.cv-cal-day { margin: 0 0 8px; }
.cv-cal-date { font-weight: 600; color: #00304c; }
.cv-tag { display: inline-block; margin-left: 6px; padding: 0 8px; border: 1px solid #c9dcea; border-radius: 999px; background: #f5f9fc; color: #3d5a6e; font-size: .8rem; }
@media (min-width: 480px) { .cv-cal-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cv-cal-strip { grid-template-columns: repeat(12, minmax(0, 1fr)); } .cv-cal-cell > * { font-size: .8rem; padding: 6px 2px; gap: 3px; } }
.cv-timeline-items { list-style: none; margin: 0 0 4px; padding: 0; }
.cv-timeline-items li { padding: 4px 0; }
.cv-na { color: #3d5a6e; font-style: italic; }
.cv-apps-panel { margin-top: 28px; }
.cv-apps-actions { width: 165px; }
.cv-apps-actions form { display: block; margin: 4px 0 0; }
.cv-apps-actions .cv-button { display: block; width: 100%; box-sizing: border-box; padding: 4px 10px; min-height: 0; line-height: 18px; white-space: nowrap; text-align: center; font-size: 0.8em; }
.cv-apps td { vertical-align: top; }
.cv-trend-up { color: #1b6b3a; font-weight: 600; }
.cv-trend-down { color: #9b2c2c; font-weight: 600; }
.cv-plain-list { margin: 0; padding-left: 18px; }
.cv-chip-good { background: #dcfce7; color: #166534; border-color: #86efac; }
.cv-chip-fair { background: #fef9c3; color: #713f12; border-color: #fde047; }
.cv-chip-low { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.cv-sec-grid { display: grid; gap: 12px; align-items: start; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cv-sec-card .cv-h3 { margin-top: 0; }
.cv-sec-value { font-size: 1.8rem; font-weight: 700; margin: 4px 0; }

.cv-staff-note { margin: 4px 0; padding: 6px 12px; font-size: .85rem; }
.cv-staff-note .cv-staff-label { margin: 0 8px 0 0; }

/* Generated initials avatars (bb_avatar_svg_csp, same initials/colour as the staff UI). */
.cv-person { display: inline-flex; align-items: center; gap: 8px; }
.cv-avatar { flex: 0 0 auto; display: block; }
.cv-icon-priority { background: #cf222e; border-radius: 50%; }
.cv-icon-priority::before { content: "!"; font-weight: 700; }
/* Devices (#2338) */
.cv-chip-none { background: #e5e7eb; color: #374151; border-color: #cbd5e1; }
.cv-filter-group { margin: 0 0 10px; }
.cv-filter-label { margin: 0 0 4px; font-weight: 600; font-size: .9rem; color: #3d5a6e; }
.cv-devices .cv-chip-stale { margin-left: 6px; }

/* Device list: room for 7 columns; chips and short cells don't wrap (Adam, 10 Nov 2026). */
.cv-main:has(.cv-devices) { max-width: 1360px; }
.cv-devices .cv-chip { white-space: nowrap; }
.cv-devices td.cv-nowrap { white-space: nowrap; }
.cv-chip-sm { font-size: .75rem; padding: 1px 8px; margin-left: 6px; }
@media (max-width: 640px) { .cv-devices td.cv-nowrap { white-space: normal; } }

/* Overseas working (#2350): a long checkbox list with a filter box. */
.cv-check[hidden], .cv-filter-box[hidden] { display: none; }
.cv-filterable { margin: 0 0 8px; }
.cv-filter-box { margin: 0 0 8px; }
.cv-checks-scroll { max-height: 260px; overflow-y: auto; padding-right: 4px; }

/* Renewal calendar restyle (Adam, 10 Nov 2026): card, readable contrast, date column. */
.cv-cal .cv-cal-strip { margin-top: 4px; }
.cv-cal-cell { background: #fff; border-color: #c9dcea; color: #3d5a6e; }
.cv-cal-quiet { background: #f5f9fc; }
.cv-cal-busy { background: #eef5fb; border-color: #00304c; color: #00304c; }
.cv-cal-busy a:hover, .cv-cal-busy a:focus { background: #c9dcea; }
.cv-cal-month { border-top: 1px solid #e6eff6; padding-top: 12px; margin: 12px 0 0; }
.cv-cal-month-h { font-size: 1.05rem; margin: 0 0 8px; color: #00304c; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cv-cal-month-n { font-size: .85rem; font-weight: 600; color: #fff; background: #00304c; border-radius: 999px; padding: 1px 8px; }
.cv-cal-day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-bottom: 1px dashed #e6eff6; }
.cv-cal-day:last-child { border-bottom: 0; }
.cv-cal-date { font-weight: 600; color: #3d5a6e; font-variant-numeric: tabular-nums; padding-top: 4px; }
.cv-cal .cv-timeline-items { margin: 0; }
.cv-cal .cv-timeline-items li { padding: 4px 0; color: #00304c; }
.cv-cal-product { font-weight: 600; }
.cv-cal-qty { color: #3d5a6e; font-variant-numeric: tabular-nums; margin-left: 2px; }
@media (max-width: 480px) { .cv-cal-day { grid-template-columns: 1fr; gap: 2px; } .cv-cal-date { padding-top: 0; } }

/* Licensed accounts list (#2631): compact "Request leaver" button in table rows; filtered-out rows / groups hide. */
.cv-button-small { padding: 4px 10px; min-height: 30px; font-size: .85rem; white-space: nowrap; }
.cv-la-row[hidden], .cv-la-group[hidden], #cv-la-none[hidden] { display: none; }

/* Filter band (Devices list, Users): keyword box + dropdowns across the top of the report, like the DevOps / Azure filter bar. */
.cv-band { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: #fff; border: 1px solid #c9dcea; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 48, 76, .08); padding: 8px 12px; margin: 0 0 14px; }
.cv-band-search { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 180px; }
.cv-band-icon { color: #3d5a6e; font-size: 1.1rem; line-height: 1; }
.cv-band-q { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid transparent; padding: 8px 4px; font: inherit; color: #00304c; background: transparent; min-height: 36px; }
.cv-band-q:focus { outline: 3px solid #1f6feb; outline-offset: 2px; border-radius: 4px; }
.cv-band-dds { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cv-dd { position: relative; }
.cv-dd > summary { list-style: none; }
.cv-dd > summary::-webkit-details-marker { display: none; }
.cv-dd-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; border-radius: 6px; cursor: pointer;
    color: #3d5a6e; font-size: .9rem; white-space: nowrap; max-width: 260px; }
.cv-dd-text { overflow: hidden; text-overflow: ellipsis; }
.cv-dd-btn:hover, .cv-dd[open] > .cv-dd-btn { background: #eef5fb; }
.cv-dd-btn:focus { outline: 3px solid #1f6feb; outline-offset: 2px; }
.cv-dd-on { color: #00304c; font-weight: 600; }
.cv-dd-caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: 0 0 auto; }
.cv-dd-panel { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 240px; max-width: 360px; max-height: 340px; overflow-y: auto;
    margin: 0; padding: 6px; border: 1px solid #c9dcea; border-radius: 8px; background: #fff; box-shadow: 0 6px 18px rgba(0, 48, 76, .16); }
.cv-dd-opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border-radius: 4px; cursor: pointer; color: #00304c; font-size: .9rem; }
.cv-dd-opt:hover { background: #eef5fb; }
.cv-dd-opt input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.cv-dd-label { flex: 1; }
.cv-dd-count { color: #3d5a6e; font-size: .85rem; font-variant-numeric: tabular-nums; }
.cv-band-actions { display: flex; align-items: center; gap: 6px; }
.cv-band-apply { font: inherit; font-size: .9rem; min-height: 36px; padding: 6px 14px; border: 1px solid #00304c; border-radius: 6px; background: #00304c; color: #fff; cursor: pointer; }
.cv-band-js .cv-band-apply { display: none; }
.cv-band-clear { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 6px 10px; border-radius: 6px; color: #3d5a6e; text-decoration: none; font-size: .9rem; }
.cv-band-clear:hover { background: #eef5fb; }
.cv-band-clear:focus, .cv-band-apply:focus { outline: 3px solid #1f6feb; outline-offset: 2px; }
.cv-band-clear span[aria-hidden] { font-size: 1.2rem; line-height: 1; }
@media (max-width: 640px) {
    .cv-band-dds { width: 100%; }
    .cv-dd { position: static; }
    .cv-dd-panel { left: 12px; right: 12px; max-width: none; }
    .cv-band { position: relative; }
}

/* ===== Bennett Brooks brand re-skin (#2833) =====
   Colours from the BB design system: accent #00304c (text, headings, main buttons), background blue #dbebf7 (page),
   bb blue #0093c9 (accents only, never text), muted #3d5a6e. White cards with 12px corners and no border, 44px buttons,
   borderless status chips. Matches the look of the accountancy client portal mock-up so the two portals line up. */
.cv-body { color: #00304c; background: #dbebf7; }
.cv-body a:not([class]) { color: #00304c; }
.cv-body a:not([class]):hover { color: #00476f; }

/* Header: white bar, accent text (the sidebar layout follows in phase 2). */
.cv-header { background: #fff; color: #00304c; border-bottom: 1px solid #c9dcea; padding: 12px 24px; }
.cv-brand-logo { width: auto; height: 44px; border-radius: 0; }
.cv-client { opacity: 1; font-weight: 700; }
.cv-link-button { color: #00304c; }
.cv-nav-link { color: #00304c; border-radius: 8px; min-height: 44px; }
.cv-nav-link:hover { border-color: transparent; background: #eef5fb; }
.cv-nav-link:focus { outline: 3px solid #1f6feb; }
.cv-nav-current, .cv-nav-current:hover { background: #dbebf7; color: #00304c; font-weight: 700; }
@media (max-width: 640px) { .cv-header { padding: 12px 16px; } }

/* Headings. */
.cv-h1 { font-size: 1.75rem; font-weight: 700; margin: 12px 0 14px; }
.cv-h2 { font-size: 1.25rem; font-weight: 700; }
.cv-h3 { font-weight: 700; }

/* Cards and panels: white, 12px corners, no border. */
.cv-card, .cv-tile, .cv-section, .cv-summary-bar, .cv-filters, .cv-band { border-color: transparent; border-radius: 12px; }
.cv-card { padding: 24px; }
.cv-tile { padding: 18px; }
.cv-tile:hover, .cv-tile:focus { border-color: #00304c; }
.cv-tile-title { font-weight: 700; }
.cv-band { box-shadow: none; }
.cv-dd-panel { border-radius: 10px; }
@media (max-width: 640px) {
    .cv-card { padding: 16px; }
    .cv-cases tr, .cv-stack tr { border-color: transparent; border-radius: 12px; padding: 10px 14px; }
}

/* Buttons: 44px, 8px corners, bold. Primary filled accent; secondary white with an accent outline. */
.cv-button { min-height: 44px; border-radius: 8px; font-weight: 700; padding: 10px 18px; }
.cv-button:hover { background: #00476f; }
.cv-button-secondary { border: 0; box-shadow: inset 0 0 0 1.5px #00304c; background: #fff; color: #00304c; }
.cv-button-secondary:hover { background: #eef5fb; }
.cv-button-danger:hover { background: #912018; }
.cv-button-small { min-height: 32px; padding: 4px 12px; }
.cv-band-apply { border-radius: 8px; font-weight: 700; }
.cv-band-apply:hover { background: #00476f; }

/* Inputs. */
.cv-input, .cv-field input, .cv-field select { border-radius: 8px; border-color: #6f8fa6; }
.cv-group { border-radius: 10px; }

/* Status chips: borderless, bold. ok = green, warn = amber, due = red, info = blue, none = grey. */
.cv-chip { border: 0; padding: 3px 10px; font-size: .78rem; font-weight: 700; }
.cv-chip-confirmed, .cv-chip-good { background: #e3f4e8; color: #1b5e33; }
.cv-chip-needs, .cv-chip-fair { background: #fdf0d9; color: #7a4a00; }
.cv-chip-stale, .cv-chip-low { background: #fde8e6; color: #a3201a; }
.cv-chip-unconfirmed, .cv-chip-dpo { background: #dbebf7; color: #00304c; }
.cv-chip-none { background: #eef2f5; color: #3d5a6e; }
.cv-chip-link { min-height: 40px; }
.cv-chip-link-active { background: #00304c; border-color: #00304c; color: #fff; }

/* Notices. */
.cv-notice { background: #fdf0d9; color: #7a4a00; border: 0; border-radius: 10px; padding: 12px 16px; }

/* Tables that sit straight on the page get a white panel (inside a card they stay plain). On phones the stacked
   tables turn each row into its own white card, so the panel drops away; rows inside a card keep a light outline. */
.cv-table-wrap { background: #fff; border-radius: 12px; padding: 8px 16px; margin: 0 0 16px; }
.cv-card .cv-table-wrap { background: none; border-radius: 0; padding: 0; margin: 0; }
.cv-table th { color: #3d5a6e; }
@media (max-width: 640px) {
    .cv-table-wrap:has(.cv-stack), .cv-table-wrap:has(.cv-cases) { background: none; padding: 0; }
    .cv-card .cv-stack tr { border-color: #c9dcea; }
}
