/* FiberVu compact layout: one 46px top bar, chips instead of big cards, tight tables, split view (list + details).
   The sidebar is not touched. A page opts in by rendering <div class="fv-page"> (see components/fv/top.blade.php); the pages that do not are left as they were. */

:root {
    --fv-bg: var(--dk-bg-f5f6f8, #F5F6F8); --fv-card: var(--dk-bg-ffffff, #fff); --fv-line: var(--dk-bd-e7e9ed, #E7E9ED); --fv-line2: var(--dk-bd-f1f2f4, #F1F2F4); --fv-ink: var(--dk-fg-1f2937, #1F2937); --fv-head: var(--dk-fg-111827, #111827); --fv-mute: var(--dk-fg-6b7280, #6B7280); --fv-faint: var(--dk-fg-9ca3af, #9CA3AF);
    --fv-acc: #E8611A; --fv-accbg: var(--dk-bg-fff1e6, #FFF1E6);
    --fv-red: var(--dk-fg-b42318, #B42318); --fv-redbg: var(--dk-bg-fef3f2, #FEF3F2); --fv-amb: var(--dk-fg-9a5b00, #9A5B00); --fv-ambbg: var(--dk-bg-fffaeb, #FFFAEB); --fv-blu: var(--dk-fg-1d4ed8, #1D4ED8); --fv-blubg: var(--dk-bg-eff4ff, #EFF4FF); --fv-grn: var(--dk-fg-067647, #067647); --fv-grnbg: var(--dk-bg-ecfdf3, #ECFDF3);
    --fv-gry: var(--dk-fg-4b5563, #4B5563); --fv-grybg: var(--dk-bg-f3f4f6, #F3F4F6); --fv-dred: var(--dk-fg-7a271a, #7A271A); --fv-dredbg: var(--dk-bg-fbeae6, #FBEAE6);
    --fv-row: 36px;
}
html[data-density="comfortable"] { --fv-row: 44px; }   /* imat-layout.css ties this to --imat-row */

/* ---------- pills (the same on every page) ---------- */
.fv-pill, .pc-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-weight: 700; font-size: 11px; padding: 2px 8px; letter-spacing: .02em; line-height: 1.5; border: 0; white-space: nowrap; }
.k-g, .pc-pill-normal { background: var(--fv-grnbg); color: var(--fv-grn); }
.k-a, .pc-pill-busy { background: var(--fv-ambbg); color: var(--fv-amb); }
.k-r, .pc-pill-congested { background: var(--fv-redbg); color: var(--fv-red); }
.k-b, .pc-pill-strong { background: var(--fv-blubg); color: var(--fv-blu); }
.k-x, .pc-pill-nodata { background: var(--fv-grybg); color: var(--fv-gry); }
.k-d, .pc-pill-over { background: var(--fv-dredbg); color: var(--fv-dred); border: 0; }

/* ---------- the shell: only for pages that opt in (they contain .fv-page) ---------- */
@media (min-width: 1024px) {
    body:has(:is(.fv-page, .fv-settings)) { overflow: hidden; }
    /* Filament's own top bar shrinks to a floating corner with the bell and the user menu; the page draws the 46px bar itself */
    body:has(:is(.fv-page, .fv-settings)) .fi-topbar-ctn { position: fixed; top: 0; right: 0; left: auto; width: auto; height: 46px; background: transparent !important; border: 0 !important; z-index: 60; }
    body:has(:is(.fv-page, .fv-settings)) .fi-topbar { height: 46px; min-height: 0; padding: 0 14px 0 0; background: transparent !important; border: 0 !important; width: auto; box-shadow: none !important; }
    body:has(:is(.fv-page, .fv-settings)) .fi-topbar-start, body:has(:is(.fv-page, .fv-settings)) .fi-topbar .fi-topbar-open-sidebar-btn, body:has(:is(.fv-page, .fv-settings)) .fi-topbar .fi-topbar-close-sidebar-btn { display: none !important; }
    body:has(:is(.fv-page, .fv-settings)) .fi-main-ctn { height: 100vh; overflow: hidden; }
    body:has(:is(.fv-page, .fv-settings)) .fi-main { padding: 0 !important; height: 100%; overflow: hidden; max-width: none; }
    body:has(:is(.fv-page, .fv-settings)) .fi-page { height: 100%; display: flex; flex-direction: column; padding: 0; position: relative; row-gap: 0; }
    body:has(:is(.fv-page, .fv-settings)) .fi-page-header-main-ctn { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 !important; row-gap: 0; }
    body:has(.fv-page) .fi-header { display: none; }                                  /* the title lives in the top bar now */
    body:has(:is(.fv-page, .fv-settings)) .fi-page-main, body:has(:is(.fv-page, .fv-settings)) .fi-page-content { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; margin: 0; }
    body:has(:is(.fv-page, .fv-settings)) .fi-page-content > .fv-page { flex: 1; min-height: 0; }
    body:has(:is(.fv-page, .fv-settings)) .fi-page > *, body:has(:is(.fv-page, .fv-settings)) .fi-page-content > *, body:has(:is(.fv-page, .fv-settings)) .fi-page-header-main-ctn > * { animation: none; }
    /* the province switch sits in the top bar, left of the bell */
    body:has(:is(.fv-page, .fv-settings)) .prov-bar { position: absolute; top: 8px; right: 110px; margin: 0; z-index: 65; }
    body:has(:is(.fv-page, .fv-settings)) .prov-lbl { display: none; }
    body:has(:is(.fv-page, .fv-settings)) .prov-seg a { padding: 4px 11px; font-size: 12.5px; }
    body:has(:is(.fv-page, .fv-settings)) .prov-seg { border-radius: 9px; border-color: var(--fv-line); }
}
.fv-page { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--fv-bg); font-size: 12.5px; color: var(--fv-ink); }

/* ---------- top bar ---------- */
.fv-top { height: 46px; flex: 0 0 46px; background: var(--dk-bg-ffffff, #fff); border-bottom: 1px solid var(--fv-line); display: flex; align-items: center; gap: 8px; padding: 0 362px 0 14px; white-space: nowrap; overflow-x: clip; overflow-y: visible; }   /* y visible: the Export menus hang below the bar */
.fv-top .fv-title { font-size: 15px; font-weight: 700; color: var(--fv-head); margin-right: 2px; display: inline-flex; align-items: center; gap: 6px; }
.fv-i { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--fv-faint); color: var(--fv-mute); font: 600 10px/13px system-ui, sans-serif; text-align: center; font-style: normal; cursor: help; display: inline-block; }
.fv-chip { border: 1px solid var(--fv-line); border-radius: 999px; padding: 3px 9px; font-size: 12.5px; color: var(--fv-mute); background: var(--dk-bg-ffffff, #fff); cursor: default; }
button.fv-chip { cursor: pointer; font-family: inherit; } button.fv-chip:hover, button.fv-chip.is-on { border-color: var(--fv-ink); }
.fv-chip b { color: var(--fv-head); font-weight: 700; }
.fv-chip b.r { color: var(--fv-red); } .fv-chip b.a { color: var(--fv-amb); } .fv-chip b.b { color: var(--fv-blu); } .fv-chip b.g { color: var(--fv-grn); } .fv-chip b.d { color: var(--fv-dred); }
.fv-sp { margin-left: auto; }
.fv-top .fv-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fv-btn { border: 1px solid var(--dk-bd-e5e7eb, #E5E7EB); background: var(--dk-bg-ffffff, #fff); border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; color: var(--fv-ink); white-space: nowrap; text-decoration: none; line-height: 1.4; }
.fv-btn:hover { background: var(--dk-bg-f9fafb, #F9FAFB); } .fv-btn.dk { background: var(--dk-bg-1f2937, #1F2937); color: #fff; border-color: var(--dk-bd-1f2937, #1F2937); } .fv-btn.dk:hover { background: var(--dk-bg-111827, #111827); } .fv-btn[disabled] { opacity: .6; cursor: progress; }
.fv-pop { position: relative; display: inline-block; }
.fv-pop-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; background: var(--dk-bg-ffffff, #fff); border: 1px solid var(--fv-line); border-radius: 14px; box-shadow: 0 10px 28px rgba(16, 24, 40, .16); padding: 12px; min-width: 260px; white-space: normal; }
.fv-pop-box label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--fv-mute); font-weight: 600; margin-bottom: 8px; }
.fv-pop-box input[type=number], .fv-pop-box select { height: 32px; border: 1px solid var(--dk-bd-e5e7eb, #E5E7EB); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; color: var(--fv-ink); background: var(--dk-bg-ffffff, #fff); width: 100%; }
.fv-pop-box .fv-note { font-size: 11.5px; color: var(--fv-mute); line-height: 1.45; }

/* ---------- toolbar ---------- */
.fv-bar2 { padding: 8px 14px; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; white-space: nowrap; overflow-x: auto; }
.fv-tab { border: 1px solid var(--fv-line); background: var(--dk-bg-ffffff, #fff); border-radius: 9px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit; color: var(--fv-ink); }
.fv-tab.is-on { border-color: var(--dk-bd-1f2937, #1F2937); box-shadow: 0 0 0 1px var(--dk-bd-1f2937, #1F2937) inset; font-weight: 700; }
.fv-tab i { font-style: normal; background: var(--fv-grybg); border-radius: 999px; padding: 0 7px; font-size: 11.5px; margin-left: 4px; }
.fv-inp { height: 30px; border: 1px solid var(--dk-bd-e5e7eb, #E5E7EB); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 12.5px; width: 200px; background: var(--dk-bg-ffffff, #fff); color: var(--fv-ink); }
.fv-seg { display: inline-flex; border: 1px solid var(--fv-line); border-radius: 9px; overflow: hidden; background: var(--dk-bg-ffffff, #fff); }
.fv-seg button { padding: 4px 11px; font: inherit; font-size: 12.5px; border: 0; border-right: 1px solid var(--fv-line); background: var(--dk-bg-ffffff, #fff); cursor: pointer; color: var(--fv-ink); }
.fv-seg button:last-child { border-right: 0; } .fv-seg .is-on { background: var(--fv-grybg); font-weight: 600; }

/* ---------- panels, split view ---------- */
.fv-body { flex: 1; min-height: 0; padding: 10px 14px 14px; display: flex; gap: 10px; }
.fv-bar2 + .fv-body { padding-top: 0; }
.fv-card { background: var(--dk-bg-ffffff, #fff); border: 1px solid var(--fv-line); border-radius: 10px; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.fv-scroll { overflow: auto; flex: 1; min-height: 0; }
.fv-ph { padding: 9px 12px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--fv-line); flex: 0 0 auto; }
.fv-ph small { font-weight: 400; color: var(--fv-mute); } .fv-ph a { margin-left: auto; font-weight: 600; font-size: 12px; color: var(--fv-ink); text-decoration: none; }
.fv-list { flex: 1.55; } .fv-detail { flex: 1; }
.fv-dh { padding: 11px 13px; border-bottom: 1px solid var(--fv-line); flex: 0 0 auto; }
.fv-dh .fv-dt { display: flex; align-items: center; gap: 8px; } .fv-dh .fv-dt b { font-size: 15px; color: var(--fv-head); }
.fv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 9px; }
.fv-stats div { background: var(--dk-bg-fafafb, #FAFAFB); border: 1px solid var(--fv-line); border-radius: 8px; padding: 5px 8px; font-size: 11.5px; color: var(--fv-mute); }
.fv-stats b { display: block; font-size: 14px; color: var(--fv-head); } .fv-stats b.r { color: var(--fv-red); }
.fv-dbtns { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; } .fv-dbtns .dk { margin-left: auto; }
.fv-empty { padding: 2rem 1rem; text-align: center; color: var(--fv-mute); }
.fv-close { display: none; margin-left: auto; background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--fv-mute); }

/* narrower than 1440px: the details open as a slide-over panel from the right */
@media (max-width: 1439px) {
    .fv-detail { position: fixed; top: 46px; right: 0; bottom: 0; width: min(560px, 94vw); z-index: 65; border-radius: 10px 0 0 10px; box-shadow: -10px 0 28px rgba(16, 24, 40, .18); transform: translateX(105%); transition: transform .2s ease-out; flex: none; }
    .fv-split.is-open .fv-detail { transform: none; }
    /* F2: the closed sheet is hidden, not only moved off-screen, so its links and buttons leave the Tab order (visibility waits for the slide) */
    .fv-detail { visibility: hidden; transition: transform .2s ease-out, visibility 0s linear .2s; }
    .fv-split.is-open .fv-detail { visibility: visible; transition: transform .2s ease-out, visibility 0s; }
    .fv-list { flex: 1; }
    .fv-close { display: inline-block; }
}

/* ---------- tables ---------- */
.fv-tbl { border-collapse: separate; border-spacing: 0; width: 100%; }
.fv-tbl th { text-align: left; color: var(--fv-mute); font-weight: 600; white-space: nowrap; background: var(--dk-bg-fafafb, #FAFAFB); position: sticky; top: 0; border-bottom: 1px solid var(--fv-line); z-index: 1; user-select: none; }
.fv-tbl th.s { cursor: pointer; } .fv-tbl th.s:hover { color: var(--fv-head); } .fv-tbl th .ar { font-size: 9px; margin-left: 3px; color: var(--dk-fgv-fv-acc, var(--fv-acc)); }
.fv-tbl td { white-space: nowrap; border-bottom: 1px solid var(--fv-line2); height: var(--fv-row); }   /* padding + text size: imat-layout.css */
.fv-tbl tbody tr:hover td { background: var(--dk-bg-fafafb, #FAFAFB); }
.fv-tbl tr.sel td { background: var(--dk-bg-fff7f0, #FFF7F0) !important; }
.fv-tbl tr.click { cursor: pointer; }
.fv-tbl .mono { font-family: Consolas, monospace; font-size: 12px; }
.fv-tbl a { color: var(--fv-ink); }
.fv-mb { height: 6px; border-radius: 999px; background: var(--fv-line2); overflow: hidden; width: 44px; display: inline-block; vertical-align: middle; margin-left: 5px; }
.fv-mb span { display: block; height: 100%; border-radius: 999px; }
.fv-red { color: var(--fv-red); font-weight: 700; } .fv-amb { color: var(--fv-amb); font-weight: 700; } .fv-dim { color: var(--fv-mute); font-weight: 400; }
.fv-more { padding: 8px; text-align: center; border-top: 1px solid var(--fv-line2); }

/* ---------- legends as a quiet footnote inside the panel, details as tooltips ---------- */
.fv-foot { padding: 6px 12px; font-size: 11.5px; color: var(--fv-mute); border-top: 1px solid var(--fv-line2); flex: 0 0 auto; }

/* a page body that is not a split view but scrolls inside (details, charts) */
.fv-body.fv-flow { display: block; overflow: auto; }
.fv-flow .m-card { padding: 10px 14px; margin-bottom: 10px; border-radius: 10px; }
.fv-flow .ln-g2 { margin-bottom: 10px; }

/* dashboard: 2 x 2 panels */
.fv-body.fv-grid2 { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 1100px) { .fv-body.fv-grid2 { grid-template-columns: 1fr; grid-template-rows: none; overflow: auto; } .fv-body.fv-grid2 .fv-card { min-height: 280px; } }

/* map page */
.fv-map .fv-top { overflow-x: clip; overflow-y: visible; }
.fv-map .fv-mapcard { padding: 0; }
.fv-map .map-canvas { height: 100%; min-height: 0; border-radius: 10px; flex: 1; }
.fv-map .map-search { max-width: none; margin: 0; }
.fv-map .map-search input { padding-right: 2rem; }
.fv-map .fv-chip input { accent-color: var(--dk-fg-1f2937, #1F2937); margin: 0 2px 0 0; vertical-align: -2px; }
.fv-map .fv-chip small { font-size: 11px; }

/* report list / settings list on the left */
.fv-listitem { padding: 10px 12px; border-bottom: 1px solid var(--fv-line2); cursor: pointer; font-size: 13px; }
.fv-listitem:hover { background: var(--dk-bg-fafafb, #FAFAFB); } .fv-listitem.is-on { background: var(--dk-bg-fff7f0, #FFF7F0); font-weight: 700; }

/* Settings pages: the same shell; the content scrolls inside, the page actions (New, Send test email ...) sit in the top bar */
@media (min-width: 1024px) {
    body:has(.fv-settings) .fi-breadcrumbs, body:has(.fv-settings) .fi-header-subheading { display: none; }
    /* the page h1 stays for screen readers (visually hidden): the Settings bar shows its text as .fv-title */
    body:has(.fv-settings) .fi-header-heading { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    body:has(.fv-settings) .fi-header { position: static; padding: 0; margin: 0 0 10px; min-height: 0; width: auto; overflow: visible; }
    body:has(.fv-settings) .fi-header .fi-header-actions-ctn, body:has(.fv-settings) .fi-header .fi-ac { flex-wrap: wrap; row-gap: 6px; }
    body:has(.fv-settings) .fi-page-header-main-ctn { overflow: auto; padding: 10px 14px 14px !important; }
    .fv-settings { padding-right: 362px; }
}
body:has(.fv-settings) .fi-section, body:has(.fv-settings) .fi-ta-ctn { border-radius: 10px; }
body:has(.fv-settings) .fi-section-content-ctn, body:has(.fv-settings) .fi-section-header { padding-block: 10px; }
body:has(.fv-settings) .fi-fo-field-label-col, body:has(.fv-settings) .fi-fo-field-wrp-label { font-size: 12px; }
body:has(.fv-settings) .fi-input, body:has(.fv-settings) .fi-select-input { font-size: 13px; padding-block: 5px; }
@media (min-width: 1024px) {
    body:has(.fv-settings) .fi-page-main { flex-direction: row; gap: 14px; align-items: flex-start; }
    body:has(.fv-settings) .fi-page-sub-navigation-sidebar-ctn { flex: 0 0 210px; width: 210px; background: var(--dk-bg-ffffff, #fff); border: 1px solid var(--fv-line); border-radius: 10px; padding: 6px; position: sticky; top: 0; }
    body:has(.fv-settings) .fi-page-sub-navigation-sidebar-ctn .fi-sidebar-item-btn, body:has(.fv-settings) .fi-page-sub-navigation-sidebar-ctn a { padding-block: 7px; font-size: 13px; }
    body:has(.fv-settings) .fi-page-content { flex: 1; min-width: 0; }
}

/* row spacing switch in the top bar */
.fv-dens { display: inline-flex; border: 1px solid var(--fv-line); border-radius: 9px; overflow: hidden; background: var(--dk-bg-ffffff, #fff); margin-left: 2px; }
.fv-dens button { padding: 5px 8px; border: 0; background: var(--dk-bg-ffffff, #fff); cursor: pointer; color: var(--fv-mute); display: inline-flex; align-items: center; }
.fv-dens button + button { border-left: 1px solid var(--fv-line); } .fv-dens button.is-on { background: var(--fv-grybg); color: var(--fv-head); }
@media (max-width: 1023px) {
    .fv-top { padding-right: 14px; overflow-x: auto; flex-wrap: nowrap; }
    .fv-body { flex-direction: column; overflow: auto; } .fv-body .fv-card { flex: none !important; min-height: 240px; }
}

/* the chips take the space that is left and scroll sideways when there are too many; the actions never move under the province switch */
.fv-top .fv-chips { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.fv-top .fv-chips::-webkit-scrollbar { display: none; }
.fv-top .fv-chips > * { flex: none; }
.fv-top .fv-actions { flex: none; margin-left: 8px; }

/* ---------- notification bell: a small dropdown instead of a full-height slide-over ---------- */
.fi-modal.fi-no-database.fi-modal-slide-over .fi-modal-close-overlay { background: transparent !important; backdrop-filter: none !important; }
.fi-modal.fi-no-database.fi-modal-slide-over .fi-modal-window-ctn { align-items: flex-start; justify-content: flex-end; padding: 6px 14px 0 0; pointer-events: none; }
.fi-modal.fi-no-database.fi-modal-slide-over .fi-modal-window {
    pointer-events: auto; width: 380px; max-width: calc(100vw - 20px); height: auto; max-height: min(70vh, 640px);
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 0 0 1px var(--fv-line, var(--dk-bd-e5e7eb, #E5E7EB)); margin: 0;
}
.fi-modal.fi-no-database .fi-modal-header { padding: 8px 12px; min-height: 0; }
.fi-modal.fi-no-database .fi-modal-heading { font-size: 13px; font-weight: 700; }
.fi-modal.fi-no-database .fi-modal-content { padding: 8px; row-gap: 0; }
.fi-modal.fi-no-database .fi-no-notifications { display: flex; flex-direction: column; gap: 6px; }
.fi-modal.fi-no-database .fi-no-notification { padding: 7px 10px; border-radius: 8px; box-shadow: none; border: 1px solid var(--fv-line, var(--dk-bd-e5e7eb, #E5E7EB)); cursor: pointer; }
.fi-modal.fi-no-database .fi-no-notification-title { font-size: 12.5px; line-height: 1.3; }
.fi-modal.fi-no-database .fi-no-notification-date { font-size: 11px; }
.fi-modal.fi-no-database .fi-no-notification-body { font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
/* collapsed (default): title and time only; click a card to open it */
.fi-modal.fi-no-database .fi-no-notification:not(.fv-open) .fi-no-notification-body,
.fi-modal.fi-no-database .fi-no-notification:not(.fv-open) .fi-ac { display: none; }
.fv-no-min { margin-left: auto; border: 1px solid var(--fv-line, var(--dk-bd-e5e7eb, #E5E7EB)); background: var(--dk-bg-ffffff, #fff); border-radius: 6px; font: 600 11px system-ui, sans-serif; padding: 2px 8px; cursor: pointer; color: var(--dk-fg-374151, #374151); }
.fv-no-min:hover { background: var(--dk-bg-f9fafb, #F9FAFB); }
.fi-modal.fi-no-database.fi-modal-slide-over .fi-modal-window-ctn { align-items: flex-start !important; }
.fi-modal.fi-no-database .fi-modal-header .fi-ac { align-items: center; }
.fi-modal.fi-no-database .fi-modal-header > div:not(.fi-modal-close-btn) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: 1; min-width: 0; }
.fi-modal.fi-no-database .fi-modal-header .fi-ac { margin-left: auto; flex-wrap: nowrap; gap: 8px; }
.fi-modal.fi-no-database .fi-modal-header { align-items: center; }
.fi-modal.fi-no-database .fi-modal-header { padding-right: 40px; }

/* ---------- Offline monitoring: reasons, incidents, flags ---------- */
.rs-fiber { background: var(--dk-bg-fef3f2, #FEF3F2); color: var(--dk-fg-b42318, #B42318); } .rs-power { background: var(--dk-bg-fffaeb, #FFFAEB); color: var(--dk-fg-9a5b00, #9A5B00); } .rs-other { background: var(--dk-bg-f3f4f6, #F3F4F6); color: var(--dk-fg-4b5563, #4B5563); }
.rs-unknown { background: var(--dk-bg-f3eeff, #F3EEFF); color: var(--dk-fg-5b21b6, #5B21B6); } .rs-online { background: var(--dk-bg-ecfdf3, #ECFDF3); color: var(--dk-fg-067647, #067647); }
.fv-pill[class*="rs-"] { font-weight: 600; letter-spacing: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.fv-chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.dot.rs-fiber { background: #B42318; } .dot.rs-power { background: #F79009; } .dot.rs-other { background: #6B7280; } .dot.rs-unknown { background: #7C3AED; }
.fv-incs { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 0; flex: 0 0 auto; max-height: 130px; overflow-y: auto; }
.fv-inc { background: var(--dk-bg-ffffff, #fff); border: 1px solid var(--fv-line); border-left: 4px solid #B42318; border-radius: 10px; padding: 6px 12px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.fv-inc.power { border-left-color: #F79009; } .fv-inc b.t { font-size: 11px; letter-spacing: .04em; color: var(--dk-fg-b42318, #B42318); } .fv-inc.power b.t { color: var(--dk-fg-9a5b00, #9A5B00); }
.fv-inc .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbar { display: inline-flex; width: 70px; height: 7px; border-radius: 4px; overflow: hidden; background: var(--dk-bg-eef0f3, #EEF0F3); vertical-align: middle; }
.rbar i { display: block; height: 100%; } .rbar i.f { background: #D92D20; } .rbar i.p { background: #F79009; } .rbar i.o { background: #9CA3AF; } .rbar i.u { background: #7C3AED; }
.fv-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .03em; border-radius: 5px; padding: 0 5px; margin-left: 5px; line-height: 16px; vertical-align: 1px; }
.fv-tag.t3 { background: var(--dk-bg-fef3f2, #FEF3F2); color: var(--dk-fg-b42318, #B42318); } .fv-tag.wk { background: var(--dk-bg-fffaeb, #FFFAEB); color: var(--dk-fg-9a5b00, #9A5B00); }
.bang { display: inline-block; width: 15px; height: 15px; line-height: 15px; text-align: center; border-radius: 50%; background: var(--dk-bg-fffaeb, #FFFAEB); color: var(--dk-fg-9a5b00, #9A5B00); font-size: 10px; font-weight: 800; margin-left: 5px; cursor: help; }
.fv-expl { margin: 8px 0 0; padding: 7px 10px; border-radius: 8px; background: var(--dk-bg-fef3f2, #FEF3F2); color: var(--dk-fg-7a271a, #7A271A); font-size: 12px; line-height: 1.4; }
.fv-expl.power { background: var(--dk-bg-fffaeb, #FFFAEB); color: var(--dk-fg-6f4200, #6F4200); }
.fv-evh { padding: 8px 13px 4px; font-weight: 700; font-size: 12px; color: var(--fv-head); border-top: 1px solid var(--fv-line); background: var(--dk-bg-fafafb, #FAFAFB); }
.fv-stale { color: var(--dk-fg-9a5b00, #9A5B00); font-size: 11.5px; }
tr.click.cur-c td { background: var(--dk-bg-fff7ed, #FFF7ED); }

.fv-evbox { flex: 0 0 auto; max-height: 36%; overflow-y: auto; border-top: 1px solid var(--fv-line); }
.fv-evbox .fv-evh { border-top: 0; position: sticky; top: 0; z-index: 1; }
tr.click.cur-c td { background: var(--dk-bg-fff7ed, #FFF7ED) !important; }

/* ---------- the shared customer status (every module) ---------- */
.rs-deact { background: var(--dk-bg-e5e7eb, #E5E7EB); color: var(--dk-fg-374151, #374151); text-decoration: line-through; }
.dot.rs-online { background: #12B76A; } .dot.rs-deact { background: #6B7280; }
.sg { font-size: 12px; white-space: nowrap; } .sg-normal { color: var(--dk-fg-067647, #067647); } .sg-warning { color: var(--dk-fg-9a5b00, #9A5B00); font-weight: 600; } .sg-critical { color: var(--dk-fg-b42318, #B42318); font-weight: 600; } .sg-strong { color: var(--dk-fg-1d4ed8, #1D4ED8); font-weight: 600; }
.sg-off { color: var(--dk-fg-9ca3af, #9CA3AF); font-size: 11px; }
/* the customer panel: opens from the right, the same from every module */
.cp-back { position: fixed; inset: 0; background: rgba(16,24,40,.25); z-index: 90; }
.cp { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; background: var(--dk-bg-ffffff, #fff); z-index: 91; box-shadow: -8px 0 30px rgba(16,24,40,.18); display: flex; flex-direction: column; font-size: 12.5px; color: var(--dk-fg-344054, #344054); }
.cp-h { padding: 12px 16px; border-bottom: 1px solid var(--dk-bd-eaecf0, #EAECF0); display: flex; align-items: flex-start; gap: 10px; }
.cp-h b.n { font-size: 15px; color: var(--dk-fg-101828, #101828); display: block; } .cp-h small { color: var(--dk-fg-667085, #667085); }
.cp-x { margin-left: auto; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--dk-fg-667085, #667085); }
.cp-b { flex: 1; overflow-y: auto; padding: 12px 16px 16px; }
.cp-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.cp-inc { border: 1px solid var(--dk-bd-fecdca, #FECDCA); border-left: 4px solid #B42318; background: var(--dk-bg-fef3f2, #FEF3F2); border-radius: 8px; padding: 7px 10px; margin: 8px 0; font-size: 12px; color: var(--dk-fg-7a271a, #7A271A); } .cp-inc.power { border-color: #FEDF89; border-left-color: #F79009; background: var(--dk-bg-fffaeb, #FFFAEB); color: var(--dk-fg-6f4200, #6F4200); }
.cp dl { display: grid; grid-template-columns: 110px 1fr; gap: 5px 10px; margin: 10px 0; } .cp dt { color: var(--dk-fg-667085, #667085); } .cp dd { margin: 0; color: var(--dk-fg-101828, #101828); word-break: break-word; }
.cp h4 { margin: 12px 0 5px; font-size: 12px; color: var(--dk-fg-101828, #101828); }
.cp table { width: 100%; border-collapse: collapse; } .cp td, .cp th { border-bottom: 1px solid var(--dk-bd-f2f4f7, #F2F4F7); text-align: left; } .cp th { color: var(--dk-fg-667085, #667085); font-weight: 600; }
.cp-f { padding: 10px 16px; border-top: 1px solid var(--dk-bd-eaecf0, #EAECF0); display: flex; gap: 8px; flex-wrap: wrap; }
.fv-chips-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 10px 0; flex: 0 0 auto; } .fv-chips-row:empty { display: none; padding: 0; }
.rbar i.d { background: #374151; }

/* Unregistered ONUs: PON port load and the warning notes (status colors: green OK, yellow NEAR, red FULL, dark red OVER) */
.pl-line { display: flex; align-items: center; gap: 6px; } .pl-n { min-width: 44px; } .pl-n.near { color: var(--fv-amb); } .pl-n.full { color: var(--fv-red); } .pl-n.over { color: var(--fv-dred); }
.pl-sub { font-size: 11px; line-height: 1.3; white-space: normal; } .pl-stale { color: var(--fv-amb); cursor: help; }
.fv-tbl td.pl-note { white-space: normal; min-width: 150px; max-width: 380px; padding-top: 5px; padding-bottom: 5px; }
.pl-msg { font-size: 11.5px; line-height: 1.35; font-weight: 600; } .pl-msg.near { color: var(--fv-amb); } .pl-msg.full, .pl-msg.over { color: var(--fv-red); }
.pl-free { font-size: 11.5px; line-height: 1.35; color: var(--fv-grn); margin-top: 2px; } .pl-free a { color: var(--blue, var(--dk-fg-1d4ed8, #1D4ED8)); font-weight: 700; }
.fv-tbl tr.pl-row-full td { background: var(--dk-bg-fffbfa, #FFFBFA); }
