/* NMS design system - see docs/05-ui-design-system.md */
:root {
  --nms-navy: #0b1f3a;
  --nms-navy-2: #12305a;
  --nms-accent: #1d6fe0;
  --nms-up: #1a9c5b;
  --nms-down: #d93a3a;
  --nms-warn: #e39a0c;
  --nms-disabled: #7c8796;
  --nms-bg: #f3f5f9;
  --nms-surface: #ffffff;
  --nms-border: #dfe4ec;
  --nms-sidebar-w: 256px;
  --bs-primary: #1d6fe0;
  --bs-primary-rgb: 29, 111, 224;
  --bs-link-color-rgb: 29, 111, 224;
  --bs-body-font-size: .9rem;
}
[data-bs-theme="dark"] {
  --nms-bg: #0d1420;
  --nms-surface: #151e2d;
  --nms-border: #263246;
  --bs-body-bg: #0d1420;
}
body { background: var(--nms-bg); font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }
.btn-primary { --bs-btn-bg: var(--nms-accent); --bs-btn-border-color: var(--nms-accent); --bs-btn-hover-bg: #165bbb; --bs-btn-hover-border-color: #165bbb; --bs-btn-active-bg: #124c9c; }
.btn-outline-primary { --bs-btn-color: var(--nms-accent); --bs-btn-border-color: var(--nms-accent); --bs-btn-hover-bg: var(--nms-accent); --bs-btn-hover-border-color: var(--nms-accent); }

/* ---- Shell ---- */
.nms-sidebar { width: var(--nms-sidebar-w); background: var(--nms-navy); color: #c9d6ea; position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex; flex-direction: column; overflow-y: auto; }
.nms-brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .02em; border-bottom: 1px solid rgba(255,255,255,.08); }
.nms-brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--nms-accent); display: grid; place-items: center; font-size: 1rem; color: #fff; }
.nms-nav { padding: .5rem 0 1rem; flex: 1; }
.nms-nav-heading { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #7f93b3; padding: .9rem 1.1rem .3rem; }
.nms-nav a { display: flex; align-items: center; gap: .65rem; padding: .42rem 1.1rem; color: #c9d6ea; text-decoration: none; border-left: 3px solid transparent; font-size: .875rem; }
.nms-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nms-nav a.active { background: var(--nms-navy-2); color: #fff; border-left-color: var(--nms-accent); }
.nms-nav a i { width: 1.1rem; text-align: center; opacity: .85; }
.nms-sidebar-foot { padding: .8rem 1.1rem; font-size: .72rem; color: #7f93b3; border-top: 1px solid rgba(255,255,255,.08); }
.nms-main { margin-left: var(--nms-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.nms-header { background: var(--nms-surface); border-bottom: 1px solid var(--nms-border); padding: .55rem 1.25rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1020; }
.nms-search { max-width: 420px; flex: 1; }
.nms-content { padding: 1.25rem; flex: 1; }
.nms-page-title { font-size: 1.25rem; font-weight: 600; margin: 0; }
.nms-backdrop { display: none; }
@media (max-width: 991.98px) {
  .nms-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.nms-nav-open .nms-sidebar { transform: none; }
  body.nms-nav-open .nms-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1035; }
  .nms-main { margin-left: 0; }
  .nms-content { padding: 1rem; }
}

/* ---- Surfaces ---- */
.card { border: 1px solid var(--nms-border); border-radius: 10px; background: var(--nms-surface); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: transparent; border-bottom: 1px solid var(--nms-border); font-weight: 600; padding: .75rem 1rem; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); font-weight: 600; white-space: nowrap; border-bottom-width: 1px; }
.table td { vertical-align: middle; }
.table-responsive { border-radius: 0 0 10px 10px; }
.form-label { font-weight: 500; font-size: .82rem; margin-bottom: .25rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }

/* ---- Stat cards ---- */
.stat { padding: 1rem; display: flex; align-items: center; gap: .9rem; height: 100%; }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.stat-value { font-size: 1.55rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .78rem; color: var(--bs-secondary-color); }
.tone-blue { background: rgba(29,111,224,.12); color: var(--nms-accent); }
.tone-up { background: rgba(26,156,91,.13); color: var(--nms-up); }
.tone-down { background: rgba(217,58,58,.12); color: var(--nms-down); }
.tone-warn { background: rgba(227,154,12,.15); color: #b97a00; }
.tone-muted { background: rgba(124,135,150,.16); color: var(--nms-disabled); }

/* ---- Status badges: colour + icon + text, never colour alone ---- */
.st { display: inline-flex; align-items: center; gap: .35rem; padding: .16rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.st::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.st-online, .st-ok, .st-passed, .st-success { background: rgba(26,156,91,.13); color: var(--nms-up); }
.st-offline, .st-failed, .st-failure, .st-denied { background: rgba(217,58,58,.12); color: var(--nms-down); }
.st-unreachable, .st-warning, .st-skipped, .st-queued, .st-running { background: rgba(227,154,12,.16); color: #a86f00; }
.st-unknown, .st-inactive, .st-maintenance, .st-not_configured { background: rgba(124,135,150,.16); color: var(--nms-disabled); }
[data-bs-theme="dark"] .st-unreachable, [data-bs-theme="dark"] .st-warning, [data-bs-theme="dark"] .st-skipped, [data-bs-theme="dark"] .st-queued, [data-bs-theme="dark"] .st-running, [data-bs-theme="dark"] .tone-warn { color: #f0b94a; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--bs-secondary-color); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }
.health-dot { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; }
.chart-box { position: relative; height: 240px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .25rem 1rem; }
.scroll-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--nms-border); border-radius: 8px; padding: .5rem .75rem; }

/* ---- Auth pages ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--nms-navy) 0%, #143a70 100%); padding: 1rem; }
.auth-card { width: 100%; max-width: 400px; }

/* Tables sitting flush inside a card keep the card's side padding. */
.card .table > :not(caption) > * > *:first-child { padding-left: 1rem; }
.card .table > :not(caption) > * > *:last-child { padding-right: 1rem; }
.card.stat { flex-direction: row; }

/* ---- Graphical port panel ---- */
.port-panel { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: minmax(46px, 58px); gap: 6px; overflow-x: auto; padding: 14px; background: #1b2636; border-radius: 10px; border: 1px solid #0f1723; }
.port { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 44px; border-radius: 5px; font-size: .68rem; font-weight: 600; text-decoration: none; color: #fff; border: 2px solid transparent; line-height: 1.15; font-variant-numeric: tabular-nums; }
.port small { font-size: .58rem; font-weight: 500; opacity: .9; }
.port:hover, .port:focus-visible { border-color: var(--nms-accent); color: #fff; outline: none; box-shadow: 0 0 0 2px rgba(29,111,224,.45); }
.port-up { background: var(--nms-up); }
.port-down { background: var(--nms-down); }
.port-warning { background: var(--nms-warn); color: #1b1300; }
.port-warning:hover { color: #1b1300; }
.port-disabled { background: #5d6877; }
.port-idle { background: #2c3a4f; color: #9fb0c8; border: 2px dashed #46566e; }
.port-unknown { background: #3a4558; color: #c9d6ea; }
.port-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .78rem; }
.port-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.port-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.st-up { background: rgba(26,156,91,.13); color: var(--nms-up); }
.st-down { background: rgba(217,58,58,.12); color: var(--nms-down); }
.st-disabled, .st-idle { background: rgba(124,135,150,.16); color: var(--nms-disabled); }
.chart-box-lg { position: relative; height: 300px; }
.util-bar { height: 6px; border-radius: 3px; background: var(--nms-border); overflow: hidden; min-width: 60px; }
.util-bar > div { height: 100%; background: var(--nms-accent); }

/* ---- Alarms, clickable rows, live panel ---- */
.sev { display: inline-block; padding: .14rem .55rem; border-radius: 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.sev-critical { background: var(--nms-down); color: #fff; }
.sev-major { background: #e8590c; color: #fff; }
.sev-minor { background: var(--nms-warn); color: #1b1300; }
.sev-warning { background: #f6e3a1; color: #5c4400; }
.sev-cleared { background: rgba(124,135,150,.2); color: var(--nms-disabled); }
tr[data-href] { cursor: pointer; }
a.stat-link { text-decoration: none; color: inherit; transition: border-color .12s, box-shadow .12s; }
a.stat-link:hover, a.stat-link:focus-visible { border-color: var(--nms-accent); box-shadow: 0 0 0 2px rgba(29,111,224,.18); outline: none; }
.live-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--nms-up); display: inline-block; animation: nms-pulse 2s infinite; }
.live-stale .live-dot { background: var(--nms-warn); animation: none; }
@keyframes nms-pulse { 0% { box-shadow: 0 0 0 0 rgba(26,156,91,.5); } 70% { box-shadow: 0 0 0 7px rgba(26,156,91,0); } 100% { box-shadow: 0 0 0 0 rgba(26,156,91,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---- Configuration text ---- */
pre.cfg { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; background: #0f1723; color: #d6e0ee; padding: .75rem 1rem; border-radius: 8px; overflow: auto; max-height: 420px; white-space: pre; line-height: 1.45; }
pre.cfg.cfg-full { max-height: 72vh; }
pre.cfg > span { display: inline; }
pre.cfg > span.cfg-add, pre.cfg > span.cfg-del { display: inline-block; min-width: 100%; }
.cfg-add { background: rgba(26,156,91,.28); color: #b9f3d3; }
.cfg-del { background: rgba(217,58,58,.28); color: #ffc9c9; }
.cfg-comment { color: #7f93b3; }
.cfg-section { color: #8ec5ff; font-weight: 600; }
.cfg-n { display: inline-block; width: 3.2em; margin-right: 1em; text-align: right; color: #5d6f8a; user-select: none; }

/* Report outage timeline */
.tl-row { display: flex; align-items: center; gap: .5rem; margin-bottom: 3px; }
.tl-label { width: 11rem; flex: none; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; flex: 1; height: 14px; background: rgba(26,156,91,.18); border-radius: 3px; overflow: hidden; }
.tl-bar { position: absolute; top: 0; bottom: 0; min-width: 2px; }
.tl-outage { background: #d93a3a; }
.tl-planned { background: #1d6fe0; }
.tl-excluded { background: #7c8796; }
.tl-key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; }

/* Pagination bar: range, rows per page, first/prev/numbers/next/last, go to page */
.nms-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; width: 100%; font-size: .85rem; }
.nms-pager-info { margin-right: auto; }
.nms-pager form { display: flex; align-items: center; gap: .35rem; margin: 0; }
.nms-pager label { margin: 0; white-space: nowrap; color: var(--bs-secondary-color); }
.nms-pager-size select { width: auto; }
.nms-pager-jump input { width: 4.5rem; }
.nms-pager .page-link { white-space: nowrap; }

/* ================= Enterprise style: flat surfaces, no decoration ================= */
:root { --nms-radius: 6px; }
.nms-sidebar { background: #0f2136; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.nms-brand { position: sticky; top: 0; z-index: 2; background: #0f2136; }
.nms-brand-mark { border-radius: 6px; }
.nms-brand-logo { height: 32px; max-width: 96px; object-fit: contain; }
.nms-nav-heading { font-weight: 700; }
.nms-nav a.active { background: #1a3352; border-left-color: var(--nms-accent); }
.nms-header { box-shadow: none; }
.nms-page-title { font-size: 1.2rem; font-weight: 600; }
.card { border-radius: var(--nms-radius); box-shadow: none; border-color: var(--nms-border); }
.card-footer { background: transparent; border-top: 1px solid var(--nms-border); }
.table-responsive { border-radius: 0 0 var(--nms-radius) var(--nms-radius); }
.table thead th { background: color-mix(in srgb, var(--bs-secondary-color) 6%, transparent); }
.btn, .form-control, .form-select { border-radius: 4px; }
.alert { border-radius: var(--nms-radius); }
.nav-pills .nav-link { border-radius: 4px; padding: .35rem .9rem; }

/* KPI tiles: label, figure, one line of context; a thin bar carries the status colour */
.kpi { display: block; height: 100%; padding: .7rem .9rem .75rem; border: 1px solid var(--nms-border); border-left: 3px solid var(--kpi, var(--nms-disabled)); border-radius: var(--nms-radius); background: var(--nms-surface); color: inherit; text-decoration: none; }
a.kpi:hover, a.kpi:focus-visible { border-color: var(--nms-accent); border-left-color: var(--kpi, var(--nms-accent)); outline: none; background: color-mix(in srgb, var(--nms-accent) 4%, var(--nms-surface)); }
.kpi-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 1.6rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kpi-hint { font-size: .75rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-blue { --kpi: var(--nms-accent); } .kpi-up { --kpi: var(--nms-up); } .kpi-down { --kpi: var(--nms-down); } .kpi-warn { --kpi: var(--nms-warn); } .kpi-muted { --kpi: var(--nms-disabled); }
.kpi-alert .kpi-value { color: var(--kpi); }
.dash-section { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-secondary-color); margin: 1rem 0 .5rem; }

/* Login page: plain dark background, one panel */
.auth-wrap { background: #0f2136; }
.auth-card { max-width: 400px; }
.auth-logo { max-width: 100%; object-fit: contain; }
.auth-mark { width: 52px; height: 52px; border-radius: 8px; font-size: 1.5rem; }
.auth-panel { border-radius: var(--nms-radius); }
.auth-preview { background: #0f2136; padding: 2rem 1rem; }

/* Dashboard: KPI icon, health figure, graph boards */
.kpi { position: relative; }
.kpi-icon { position: absolute; right: .7rem; top: .6rem; font-size: 1.15rem; color: var(--kpi, var(--nms-disabled)); opacity: .55; }
.health-figure { font-size: 2.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.graph-panel .card-header { font-size: .9rem; padding: .55rem .9rem; }
.graph-legend td, .graph-legend th { font-size: .78rem; padding-top: .25rem; padding-bottom: .25rem; }

.mrtg-key { display: inline-block; width: 12px; height: 12px; margin-right: .4rem; vertical-align: -1px; }

/* Link map */
.map-scroll { overflow: auto; max-height: 78vh; }
.netmap { display: block; min-width: 100%; }
.map-band { fill: color-mix(in srgb, var(--bs-secondary-color) 5%, transparent); }
.map-tier { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; fill: var(--bs-secondary-color); }
.map-node { fill: var(--nms-surface); stroke-width: 2; }
.map-node-path { stroke-width: 4; }
.netmap a:hover .map-node, .netmap a:focus .map-node { fill: color-mix(in srgb, var(--nms-accent) 12%, var(--nms-surface)); }
.netmap a:hover path:last-child { stroke-width: 6; }
.map-name { font-size: 11px; font-weight: 600; fill: var(--bs-body-color); }
.map-sub { font-size: 9.5px; fill: var(--bs-secondary-color); }
.map-key { display: inline-block; width: 18px; height: 4px; margin-right: .3rem; vertical-align: middle; }
.netmap a { text-decoration: none; }

/* Sidebar groups (built by nms.js from the headings) and the hide / show switch */
.nms-group { margin: 2px .5rem; }
.nms-group-toggle { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 6px; background: transparent; color: #dbe5f3; font-size: .86rem; font-weight: 600; text-align: left; }
.nms-group-toggle:hover, .nms-group-toggle:focus-visible { background: rgba(255,255,255,.07); color: #fff; outline: none; }
.nms-group-toggle > i:first-child { width: 1.1rem; text-align: center; opacity: .9; }
.nms-group-toggle > span { flex: 1; }
.nms-group-caret { font-size: .7rem; opacity: .7; transition: transform .15s; }
.nms-group.open > .nms-group-toggle { color: #fff; background: rgba(255,255,255,.05); }
.nms-group.open .nms-group-caret { transform: rotate(180deg); }
.nms-group-items { margin: 2px 0 6px .95rem; padding-left: .45rem; border-left: 1px solid rgba(255,255,255,.12); }
.nms-nav-grouped .nms-group-items a { padding: .34rem .6rem; margin: 1px 0; border-left: 0; border-radius: 5px; font-size: .84rem; }
.nms-nav-grouped .nms-group-items a.active { background: var(--nms-accent); color: #fff; }
.nms-nav-grouped > a { margin: 2px .5rem; padding: .5rem .6rem; border-left: 0; border-radius: 6px; font-weight: 600; }
.nms-nav-grouped > a.active { background: var(--nms-accent); }
@media (min-width: 992px) {
  .nms-sidebar { transition: transform .18s ease; }
  .nms-main { transition: margin-left .18s ease; }
  body.nms-sidebar-hidden .nms-sidebar { transform: translateX(-100%); }
  body.nms-sidebar-hidden .nms-main { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .nms-sidebar, .nms-main, .nms-group-caret { transition: none; } }

/* ---- Down Detector ---- */
.dd-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.dd-card { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border: 1px solid var(--nms-border, #dfe3ea); border-left-width: 5px; border-radius: 14px; background: var(--nms-surface, #fff); color: inherit; text-decoration: none; transition: box-shadow .15s; }
a.dd-card:hover { box-shadow: 0 6px 18px rgba(16, 32, 64, .12); color: inherit; }
.dd-card.dd-up { border-left-color: #1a9c5b; } .dd-card.dd-down { border-left-color: #d93a3a; } .dd-card.dd-degraded { border-left-color: #e39a0c; } .dd-card.dd-unknown, .dd-card.dd-paused { border-left-color: #8a94a3; }
.dd-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--nms-border, #dfe3ea); flex: none; display: grid; place-items: center; font-size: 1.4rem; color: #1d6fe0; }
.dd-name { font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.dd-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .03em; color: #fff; }
.dd-pill.dd-up { background: #1a9c5b; } .dd-pill.dd-down { background: #d93a3a; } .dd-pill.dd-degraded { background: #b87a00; } .dd-pill.dd-unknown, .dd-pill.dd-paused { background: #6c7684; }
.dd-bars { display: flex; gap: 2px; height: 18px; align-items: stretch; }
.dd-bars span { flex: 1; min-width: 2px; border-radius: 2px; background: #c9cfd8; }
.dd-bars .b-up { background: #1a9c5b; } .dd-bars .b-down { background: #d93a3a; } .dd-bars .b-degraded { background: #e39a0c; }
.dd-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .75rem; font-size: .8rem; }
.dd-meta dt { font-weight: 400; color: var(--bs-secondary-color, #6c757d); } .dd-meta dd { margin: 0; font-weight: 600; }
.dd-public { min-height: 100vh; background: #eef1f6; color: #1c2536; padding: 1.5rem; }
.dd-public .dd-card { box-shadow: 0 1px 3px rgba(16, 32, 64, .08); }
.dd-topbar { background: #fff; border: 1px solid #dfe3ea; border-radius: 14px; padding: .75rem 1.1rem; box-shadow: 0 1px 3px rgba(16, 32, 64, .06); }
/* Wall board tiles: logo on top, name, a small history chart, status at the bottom */
.dd-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .55rem; padding: 1.4rem 1rem 0; background: #fff; border: 1px solid #dfe3ea; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(16, 32, 64, .07); }
.dd-tile .dd-logo { width: 84px; height: 84px; border-radius: 18px; font-size: 2.4rem; border: 0; background: #f3f6fb; }
.dd-tile img.dd-logo { background: #fff; }
.dd-tile .dd-name { font-size: 1.15rem; }
.dd-tile { padding-bottom: 1.2rem; }
.dd-tile .dd-pill { font-size: 1rem; padding: .25rem .9rem; }
.dd-latency { font-size: 1.05rem; font-weight: 600; color: #3a4658; }
.dd-board { display: grid; gap: 1rem; }
.dd-board .dd-name { font-size: 1.15rem; } .dd-board .dd-pill { font-size: .95rem; }
@media (max-width: 700px) { .dd-board { grid-template-columns: 1fr !important; } }
.dd-hero { max-width: 760px; margin: 0 auto; }
.dd-hero .dd-pill { font-size: 1.6rem; padding: .4rem 1.4rem; }

.nms-nav-sub { padding: .55rem 1rem .2rem 1.1rem; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .55; }

/* Infrastructure tree */
.nms-tree, .nms-tree-children { list-style: none; margin: 0; padding: 0; }
.nms-tree-children { margin-left: 1.05rem; padding-left: .75rem; border-left: 1px solid var(--bs-border-color); }
.nms-tree-row { display: flex; align-items: center; gap: .5rem; padding: .28rem .35rem; border-radius: .3rem; flex-wrap: wrap; }
.nms-tree-row:hover { background: rgba(128,128,128,.12); }
.nms-tree-toggle { width: 1.5rem; height: 1.5rem; flex: 0 0 1.5rem; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: inherit; border-radius: .25rem; padding: 0; }
button.nms-tree-toggle:hover { background: rgba(128,128,128,.25); }
.nms-tree-toggle i { transition: transform .12s; }
.nms-tree-toggle[aria-expanded="true"] i { transform: rotate(90deg); }
.nms-tree-node[data-level="city"] > .nms-tree-row { font-weight: 600; }

/* Ticket support system */
.text-bg-orange { background: #f97316 !important; color: #fff !important; }
.tkt-kpi { border-left: 4px solid var(--tkt-tone, #1677f9); }
.tkt-kpi .tkt-ico { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; color: var(--tkt-tone, #1677f9); background: color-mix(in srgb, var(--tkt-tone, #1677f9) 14%, transparent); }
.tkt-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: .8rem .4rem; border-radius: .5rem; color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; min-height: 5rem; text-align: center; }
.tkt-tile:hover { color: #fff; filter: brightness(1.08); }
.tkt-tile i { font-size: 1.3rem; }
.tkt-timeline { list-style: none; margin: 0; padding: 0; }
.tkt-timeline li { display: flex; gap: .65rem; padding: .45rem 0; border-bottom: 1px solid var(--bs-border-color); }
.tkt-timeline li:last-child { border-bottom: 0; }
.tkt-avatar { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #1677f9; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; flex: 0 0 1.9rem; }
.tkt-table td, .tkt-table th { white-space: nowrap; }
.tkt-table td.tkt-wrap { white-space: normal; min-width: 14rem; }
/* Screen-reader-only labels inside a scrolling table are absolutely positioned; without this they widen the whole page */
.table-responsive { position: relative; }
/* A chart or table inside a column must not push the column wider than its share of the row */
.nms-content .row > [class*="col"] { min-width: 0; }
/* Support group chat */
.tkt-chat { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; }
.tkt-msg { max-width: 80%; }
.tkt-msg-mine { align-self: flex-end; text-align: right; }
.tkt-bubble { display: inline-block; text-align: left; white-space: pre-wrap; padding: .45rem .7rem; border-radius: .6rem; background: var(--bs-tertiary-bg, #eef2f7); border: 1px solid var(--bs-border-color); }
.tkt-msg-mine .tkt-bubble { background: #1677f9; color: #fff; border-color: #1677f9; }

/* OLT Management: cards, utilisation bars, small charts */
.olt-card { display: block; height: 100%; border: 1px solid var(--nms-border); border-radius: var(--nms-radius); background: var(--nms-surface); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.olt-card:hover, a.olt-card:focus-visible { border-color: var(--nms-accent); box-shadow: 0 2px 10px rgba(16, 24, 40, .08); outline: none; }
.olt-card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem .9rem .4rem; }
.olt-card-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.olt-card-body { padding: 0 .9rem .8rem; }
.olt-metric { font-size: .72rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .04em; }
.olt-metric-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.util { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--nms-border) 70%, transparent); overflow: hidden; min-width: 60px; }
.util > span { display: block; height: 100%; border-radius: 3px; background: var(--nms-accent); }
.util > span.util-warn { background: var(--nms-warn); }
.util > span.util-high { background: var(--nms-down); }
.donut-box { position: relative; height: 128px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; line-height: 1.1; }
.donut-center strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.donut-center span { font-size: .68rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .05em; }
.spark-box { position: relative; height: 38px; }
.spark-cell { position: relative; height: 28px; width: 120px; }
.chart-box-md { position: relative; height: 260px; }
.stat-strip { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; font-size: .8rem; }
.stat-strip .dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.range-tabs .btn { min-width: 3.2rem; }

/* Real-time graph controls */
.rt-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; margin-right: .35rem; vertical-align: middle; }
.rt-dot.rt-on { background: #fff; animation: rt-pulse 1.2s ease-in-out infinite; }
@keyframes rt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rt-dot.rt-on { animation: none; } }
.rt-status { min-height: 1.2rem; }
.range-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.range-bar .range-custom { display: flex; align-items: center; gap: .35rem; }
.range-bar .range-custom input { width: 11.5rem; }
.rt-bar { display: flex; justify-content: flex-end; margin: -.25rem 0 .35rem; }
.rt-bar .btn { --bs-btn-padding-y: .1rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem; }
.st-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.st-dot-up { background: #1a9c5b; } .st-dot-down { background: #d93a3a; }
@media (max-width: 575.98px) {
    .range-bar, .range-bar .range-custom { flex-wrap: wrap; max-width: 100%; }
    .range-bar .range-custom input { width: auto; flex: 1 1 9rem; min-width: 0; }
}

/* OLT / ONU tiles with the built-in drawings */
.olt-tile { display: block; height: 100%; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); color: inherit; text-decoration: none; transition: box-shadow .15s, border-color .15s; }
.olt-tile:hover { border-color: var(--bs-primary); box-shadow: 0 4px 16px rgba(15, 23, 42, .08); color: inherit; }
.olt-tile-off { opacity: .65; }
.olt-tile-name { font-weight: 600; font-size: 1.05rem; }
.olt-tile-pic { background: linear-gradient(180deg, rgba(148, 163, 184, .12), rgba(148, 163, 184, .04)); border-radius: .5rem; padding: .5rem; overflow-x: auto; }
.olt-tile-pic svg { max-width: 100%; height: auto; display: block; }
.olt-tile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem .75rem; margin-top: .75rem; }
.olt-tile-stats span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--bs-secondary-color); }
.olt-tile-stats strong { font-size: .9rem; }
.onu-pic { display: flex; align-items: center; justify-content: center; padding: 1rem; border-radius: .75rem; background: linear-gradient(180deg, rgba(148, 163, 184, .14), rgba(148, 163, 184, .04)); }
.onu-mini svg { display: block; }
.bw-bar { position: relative; height: 6px; border-radius: 3px; background: rgba(148, 163, 184, .25); min-width: 70px; overflow: hidden; }
.bw-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.min-w-0 { min-width: 0; }
a.kpi { display: block; color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--bs-primary); }
.kpi-active { outline: 2px solid var(--bs-primary); outline-offset: -2px; }

/* Switch port detail (customers) */
.port-detail { border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .85rem 1rem; background: var(--bs-body-bg); }
.port-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem .75rem; }
.port-detail-grid span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--bs-secondary-color); }
.port-detail-grid strong { font-size: .88rem; font-weight: 600; word-break: break-word; }
.port-note { border-left: 3px solid var(--bs-warning); background: var(--bs-warning-bg-subtle); padding: .4rem .6rem; border-radius: .35rem; }
@media (max-width: 767.98px) { .port-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* CRM: avatars, people cards, profile */
.avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 50%; color: #fff; font-weight: 600; letter-spacing: .02em;
    background: linear-gradient(135deg, var(--av), color-mix(in srgb, var(--av) 70%, #000)); box-shadow: 0 0 0 2px var(--bs-body-bg), 0 2px 6px rgba(15, 23, 42, .15); }
.avatar-dot { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 2px var(--bs-body-bg); }
.avatar-dot.on { background: #22c55e; }
.person-card { display: flex; flex-direction: column; height: 100%; padding: 1.1rem; border: 1px solid var(--bs-border-color); border-radius: .85rem; background: var(--bs-body-bg); transition: box-shadow .15s, border-color .15s, transform .15s; }
.person-card:hover { border-color: var(--bs-primary); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.person-card.is-off { opacity: .7; }
.person-name { font-weight: 600; font-size: 1rem; color: inherit; text-decoration: none; }
.person-name:hover { color: var(--bs-primary); }
.person-meta { font-size: .8rem; color: var(--bs-secondary-color); }
.person-meta i { width: 1.1rem; display: inline-block; }
.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: rgba(29, 111, 224, .1); color: #1d4fa8; border: 1px solid rgba(29, 111, 224, .18); }
.chip-muted { background: rgba(148, 163, 184, .15); color: var(--bs-secondary-color); border-color: rgba(148, 163, 184, .25); }
.chip-ok { background: rgba(34, 197, 94, .12); color: #15803d; border-color: rgba(34, 197, 94, .25); }
.chip-warn { background: rgba(227, 154, 12, .14); color: #a16207; border-color: rgba(227, 154, 12, .28); }
.chip-danger { background: rgba(217, 58, 58, .12); color: #b91c1c; border-color: rgba(217, 58, 58, .25); }
[data-bs-theme="dark"] .chip { color: #93c5fd; } [data-bs-theme="dark"] .chip-ok { color: #86efac; } [data-bs-theme="dark"] .chip-warn { color: #fcd34d; } [data-bs-theme="dark"] .chip-danger { color: #fca5a5; }
.person-foot { margin-top: auto; padding-top: .75rem; border-top: 1px dashed var(--bs-border-color); display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .78rem; color: var(--bs-secondary-color); }
.profile-hero { position: relative; border-radius: 1rem; overflow: hidden; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }
.profile-hero-band { height: 92px; background: linear-gradient(120deg, #1d6fe0 0%, #4f46e5 55%, #8b5cf6 100%); }
.profile-hero-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 1.25rem; padding: 0 1.5rem 1.25rem; margin-top: -48px; }
.profile-hero-body > :not(.avatar) { padding-top: 56px; }
@media (max-width: 575.98px) { .profile-hero-body > :not(.avatar) { padding-top: 0; } .profile-hero-body > .flex-grow-1 { flex-basis: 100%; } }
.profile-hero-body .avatar { box-shadow: 0 0 0 4px var(--bs-body-bg), 0 6px 16px rgba(15, 23, 42, .2); }
.stat-mini { padding: .75rem 1rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); height: 100%; }
.stat-mini span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.stat-mini strong { font-size: 1.35rem; }
.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list li { position: relative; padding: 0 0 .9rem 1.4rem; }
.timeline-list li::before { content: ''; position: absolute; left: .32rem; top: .45rem; bottom: -.1rem; width: 2px; background: var(--bs-border-color); }
.timeline-list li:last-child::before { display: none; }
.timeline-list li > i { position: absolute; left: 0; top: .3rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--bs-primary); box-shadow: 0 0 0 3px var(--bs-body-bg); }
.timeline-list li > i.bad { background: #d93a3a; } .timeline-list li > i.ok { background: #22c55e; }
.role-pick { display: block; height: 100%; padding: .75rem .9rem; border: 1px solid var(--bs-border-color); border-radius: .7rem; cursor: pointer; transition: border-color .15s, background .15s; }
.role-pick:hover { border-color: var(--bs-primary); }
.role-pick:has(input:checked) { border-color: var(--bs-primary); background: rgba(29, 111, 224, .06); box-shadow: inset 0 0 0 1px var(--bs-primary); }
.form-section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); font-weight: 600; margin-bottom: .75rem; }
.landing-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; color: #fff; background: linear-gradient(135deg, #1d6fe0, #4f46e5); box-shadow: 0 4px 12px rgba(29, 111, 224, .3); }

/* ---- Dashboard (NOC overview) ---- */
.noc-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; padding: 1.25rem 1.5rem; border-radius: 1rem; color: #e6eefb;
  background: radial-gradient(circle at 100% 0, rgba(79, 70, 229, .45), transparent 55%), linear-gradient(120deg, #0b1f3a 0%, #12305a 60%, #1d4fa8 100%); box-shadow: 0 6px 24px rgba(11, 31, 58, .18); }
.noc-ring { --pct: 0; --ring: #7c8796; width: 116px; height: 116px; flex: 0 0 116px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), rgba(255, 255, 255, .14) 0); }
.noc-ring-inner { width: 92px; height: 92px; border-radius: 50%; background: #0f2747; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.noc-ring-inner strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; color: #fff; line-height: 1.1; }
.noc-ring-inner span { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #9fb3d1; }
.noc-hero-main { flex: 1 1 280px; min-width: 0; }
.noc-title { font-size: 1.35rem; font-weight: 600; color: #fff; margin: .35rem 0 .2rem; }
.noc-sub { font-size: .8rem; color: #9fb3d1; }
.noc-state { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.noc-state-up { background: rgba(26, 156, 91, .22); color: #6ee7a8; } .noc-state-warn { background: rgba(227, 154, 12, .22); color: #fcd34d; }
.noc-state-down { background: rgba(217, 58, 58, .25); color: #fca5a5; } .noc-state-muted { background: rgba(255, 255, 255, .12); color: #cbd5e1; }
.noc-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; flex: 1 1 440px; }
.noc-hero-stats a { display: block; padding: .6rem .8rem; border-radius: .7rem; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: inherit; text-decoration: none; min-width: 0; }
.noc-hero-stats a:hover { background: rgba(255, 255, 255, .13); }
.noc-hero-stats span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #9fb3d1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.noc-hero-stats strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; color: #fff; }
.noc-hero-stats small { font-size: .8rem; color: #9fb3d1; font-weight: 500; }
.noc-hero-stats a.is-bad { border-color: rgba(252, 165, 165, .5); background: rgba(217, 58, 58, .18); }
.kpi-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.kpi-group .kpi { padding: .55rem .75rem; } .kpi-group .kpi-value { font-size: 1.35rem; }
.alarm-feed, .talkers { list-style: none; margin: 0; padding: 0; }
.alarm-feed li { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; border-bottom: 1px solid var(--nms-border); border-left: 3px solid transparent; cursor: pointer; }
.alarm-feed li:last-child { border-bottom: 0; } .alarm-feed li:hover, .talkers li:hover { background: rgba(29, 111, 224, .05); }
.alarm-feed .sev-critical { border-left-color: var(--nms-down); } .alarm-feed .sev-major { border-left-color: #e8590c; } .alarm-feed .sev-minor { border-left-color: var(--nms-warn); } .alarm-feed .sev-warning { border-left-color: #d4b106; }
.talkers li { padding: .55rem 1rem; border-bottom: 1px solid var(--nms-border); cursor: pointer; } .talkers li:last-child { border-bottom: 0; }
.talker-bar { height: 5px; border-radius: 3px; background: rgba(124, 135, 150, .18); margin-top: .35rem; overflow: hidden; }
.talker-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #1d6fe0, #4f46e5); }
.talker-bar span.warm { background: linear-gradient(90deg, #e39a0c, #f59e0b); } .talker-bar span.hot { background: linear-gradient(90deg, #e8590c, #d93a3a); }
.pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.pop-tile { display: block; padding: .75rem .9rem; border: 1px solid var(--nms-border); border-top: 3px solid var(--nms-disabled); border-radius: .7rem; background: var(--nms-surface); color: inherit; text-decoration: none; }
.pop-tile:hover { box-shadow: 0 4px 14px rgba(11, 31, 58, .08); }
.pop-ok { border-top-color: var(--nms-up); } .pop-bad { border-top-color: var(--nms-down); background: linear-gradient(180deg, rgba(217, 58, 58, .05), transparent 60%), var(--nms-surface); }
.pop-pct { font-weight: 700; font-variant-numeric: tabular-nums; } .pop-ok .pop-pct { color: var(--nms-up); } .pop-bad .pop-pct { color: var(--nms-down); }
.pop-bar { display: flex; gap: 2px; height: 7px; border-radius: 4px; overflow: hidden; margin-top: .55rem; background: rgba(124, 135, 150, .15); }
.pb-up { background: var(--nms-up); } .pb-warn { background: var(--nms-warn); } .pb-down { background: var(--nms-down); } .pb-maint { background: #8b5cf6; } .pb-idle { background: var(--nms-disabled); }
@media (max-width: 767.98px) {
  .noc-hero { padding: 1rem; } .noc-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); flex-basis: 100%; }
  .noc-ring { width: 96px; height: 96px; flex-basis: 96px; } .noc-ring-inner { width: 76px; height: 76px; } .noc-ring-inner strong { font-size: 1.1rem; }
}
.kpi-group .kpi-label { white-space: normal; line-height: 1.2; min-height: 1.7em; }

/* ---- Monitoring pages: counters strip, filter bar, data tables (build 4.84) ---- */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: .55rem; }
.kstat { --k: var(--nms-accent); --kbg: rgba(29, 111, 224, .1); display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border: 1px solid var(--nms-border); border-radius: .75rem;
  background: var(--nms-surface); color: inherit; text-decoration: none; position: relative; transition: box-shadow .15s, border-color .15s; min-width: 0; }
a.kstat:hover { border-color: var(--k); box-shadow: 0 3px 12px rgba(11, 31, 58, .08); }
.kstat.is-active { border-color: var(--k); box-shadow: inset 0 0 0 1px var(--k); }
.kstat-ico { flex: 0 0 34px; width: 34px; height: 34px; border-radius: .65rem; display: grid; place-items: center; background: var(--kbg); color: var(--k); font-size: 1.05rem; }
.kstat-body { display: flex; flex-direction: column; min-width: 0; }
.kstat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kstat.is-alert .kstat-value { color: var(--k); }
.kstat-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--bs-secondary-color); line-height: 1.2; }
.kstat-hint { font-size: .72rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kstat-up { --k: var(--nms-up); --kbg: rgba(26, 156, 91, .12); } .kstat-down { --k: var(--nms-down); --kbg: rgba(217, 58, 58, .12); }
.kstat-warn { --k: #d48806; --kbg: rgba(227, 154, 12, .14); } .kstat-muted { --k: var(--nms-disabled); --kbg: rgba(124, 135, 150, .14); }
.kstat-violet { --k: #7c3aed; --kbg: rgba(124, 58, 237, .12); } .kstat-cyan { --k: #0e94a8; --kbg: rgba(14, 148, 168, .12); }
.filter-bar { background: var(--nms-surface); border: 1px solid var(--nms-border); border-radius: .75rem; padding: .75rem .9rem; margin-bottom: .75rem; }
.filter-bar .form-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); margin-bottom: .2rem; }
.data-card > .card-header { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.data-card > .card-header .count { font-weight: 500; font-size: .8rem; color: var(--bs-secondary-color); }
.data-card .table-responsive { max-height: calc(100vh - 230px); }
.data-card thead th { position: sticky; top: 0; z-index: 2; background: var(--nms-surface); box-shadow: inset 0 -1px 0 var(--nms-border); }
.data-card tbody tr:hover > * { background: rgba(29, 111, 224, .035); }
.data-card .card-footer { background: transparent; border-top: 1px solid var(--nms-border); }
.seg { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .2rem; border-radius: .6rem; background: rgba(124, 135, 150, .12); }
.seg a { padding: .25rem .7rem; border-radius: .45rem; font-size: .8rem; font-weight: 600; color: var(--bs-secondary-color); text-decoration: none; white-space: nowrap; }
.seg a.active { background: var(--nms-surface); color: var(--nms-accent); box-shadow: 0 1px 3px rgba(11, 31, 58, .12); }
.seg a .n { font-weight: 500; opacity: .75; margin-left: .25rem; }
.ubar { display: flex; align-items: center; gap: .45rem; min-width: 110px; }
.ubar-track { flex: 1 1 auto; height: 6px; border-radius: 3px; background: rgba(124, 135, 150, .2); overflow: hidden; min-width: 50px; }
.ubar-track span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #1d6fe0, #4f46e5); }
.ubar-warm .ubar-track span { background: linear-gradient(90deg, #e39a0c, #f59e0b); } .ubar-hot .ubar-track span { background: linear-gradient(90deg, #e8590c, #d93a3a); }
.ubar-num { font-size: .75rem; font-variant-numeric: tabular-nums; min-width: 2.9rem; text-align: right; }
.meter { display: grid; grid-template-columns: 2.3rem 1fr 2.1rem; align-items: center; gap: .3rem; font-size: .7rem; min-width: 112px; }
.meter-label { color: var(--bs-secondary-color); font-weight: 600; text-transform: uppercase; }
.meter-track { height: 5px; border-radius: 3px; background: rgba(124, 135, 150, .2); overflow: hidden; }
.meter-track span { display: block; height: 100%; background: var(--nms-up); }
.meter-warm .meter-track span { background: var(--nms-warn); } .meter-hot .meter-track span { background: var(--nms-down); }
.meter-num { text-align: right; font-variant-numeric: tabular-nums; }
.dev-cell { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.dev-ico { flex: 0 0 34px; width: 34px; height: 34px; border-radius: .55rem; display: grid; place-items: center; font-size: 1rem; color: #fff; background: #64748b; }
.dev-ico.r-core { background: linear-gradient(135deg, #7c3aed, #4f46e5); } .dev-ico.r-distribution { background: linear-gradient(135deg, #1d6fe0, #0ea5e9); }
.dev-ico.r-aggregation { background: linear-gradient(135deg, #0e94a8, #14b8a6); } .dev-ico.r-access { background: linear-gradient(135deg, #1a9c5b, #22c55e); }
.dev-ico.r-olt { background: linear-gradient(135deg, #e8590c, #f59e0b); }
.dev-ico .dot { position: absolute; }
.sdot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--nms-disabled); flex: 0 0 auto; }
.sdot-up, .sdot-online, .sdot-ok, .sdot-established { background: var(--nms-up); box-shadow: 0 0 0 3px rgba(26, 156, 91, .18); }
.sdot-down, .sdot-offline, .sdot-critical { background: var(--nms-down); box-shadow: 0 0 0 3px rgba(217, 58, 58, .18); }
.sdot-unreachable, .sdot-warning, .sdot-warn { background: var(--nms-warn); box-shadow: 0 0 0 3px rgba(227, 154, 12, .2); }
.sdot-maintenance { background: #8b5cf6; }
.port-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .45rem; border-radius: .4rem; background: rgba(29, 111, 224, .08); font-family: var(--bs-font-monospace); font-size: .78rem; white-space: nowrap; }
.vlan-chip { display: inline-block; padding: .02rem .4rem; margin: .08rem .1rem .08rem 0; border-radius: .35rem; font-size: .72rem; font-family: var(--bs-font-monospace); background: rgba(124, 58, 237, .1); color: #6d28d9; }
[data-bs-theme="dark"] .vlan-chip { color: #c4b5fd; }
.dbm { font-variant-numeric: tabular-nums; font-weight: 600; }
.dbm-scale { position: relative; height: 6px; border-radius: 3px; min-width: 110px; background: linear-gradient(90deg, #d93a3a 0%, #e39a0c 18%, #1a9c5b 35%, #1a9c5b 85%, #e39a0c 93%, #d93a3a 100%); opacity: .85; }
.dbm-scale i { position: absolute; top: -3px; width: 3px; height: 12px; border-radius: 2px; background: var(--bs-body-color); transform: translateX(-1px); }
.peer-card { border: 1px solid var(--nms-border); border-radius: .75rem; padding: .8rem .9rem; background: var(--nms-surface); height: 100%; border-top: 3px solid var(--nms-disabled); }
.peer-card.is-up { border-top-color: var(--nms-up); } .peer-card.is-down { border-top-color: var(--nms-down); }
@media (max-width: 575.98px) { .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kstat-ico { display: none; } .data-card .table-responsive { max-height: none; } }
.kstat-value { white-space: nowrap; } .kstat-value.sm { font-size: 1.05rem; }
.uplink-card { display: flex; flex-direction: column; }
.uplink-traffic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.uplink-traffic > div { display: flex; flex-direction: column; } .uplink-traffic strong { font-variant-numeric: tabular-nums; font-size: 1rem; }
.uplink-meta { display: grid; gap: .2rem; border-top: 1px dashed var(--nms-border); padding-top: .5rem; }
/* Link map */
.map-band { fill: color-mix(in srgb, var(--nms-accent) 4%, transparent); stroke: var(--nms-border); stroke-width: 1; }
.map-node { fill: var(--nms-surface); stroke-width: 1.3; filter: drop-shadow(0 1px 2px rgba(11, 31, 58, .12)); }
.map-node-path { stroke-width: 3.5; }
.map-link { stroke-linecap: round; opacity: .85; }
.map-card .map-scroll { max-height: 74vh; background: radial-gradient(circle, rgba(124, 135, 150, .14) 1px, transparent 1px) 0 0 / 18px 18px; }
.path-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .6rem .8rem; border: 1px solid var(--nms-border); border-left: 4px solid var(--nms-accent); border-radius: .75rem; background: var(--nms-surface); }
.path-hop { padding: .15rem .55rem; border-radius: 999px; background: rgba(29, 111, 224, .1); font-weight: 600; font-size: .8rem; text-decoration: none; }
.path-hop.is-core { background: rgba(26, 156, 91, .14); color: #15803d; } .path-hop.is-start { background: rgba(124, 58, 237, .12); color: #6d28d9; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li a { display: flex; align-items: center; gap: .3rem; padding: .5rem .9rem; border-bottom: 1px solid var(--nms-border); color: inherit; text-decoration: none; }
.link-list li:last-child a { border-bottom: 0; } .link-list li a:hover { background: rgba(29, 111, 224, .05); }
.card-footer .pagination, .pagination { flex-wrap: wrap; row-gap: .25rem; }
/* Device inventory list */
.dev-table { font-size: .84rem; }
.dev-table th { white-space: nowrap; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); font-weight: 600; }
.dev-table td { white-space: nowrap; padding-top: .42rem; padding-bottom: .42rem; }
.dev-table .col-num { width: 2.6rem; text-align: right; font-variant-numeric: tabular-nums; font-size: .75rem; }
.dev-table tbody tr.dev-row > td:first-child { box-shadow: inset 3px 0 0 var(--row-edge, transparent); }
.ds-row-online { --row-edge: var(--nms-up); } .ds-row-offline, .ds-row-unreachable { --row-edge: var(--nms-down); }
.ds-row-maintenance { --row-edge: #8b5cf6; } .ds-row-unknown { --row-edge: var(--nms-disabled); }
.dev-table tr.is-inactive td { opacity: .6; }
.dev-table .grp-row td { background: color-mix(in srgb, var(--nms-accent) 6%, var(--nms-surface)); border-top: 2px solid var(--nms-border); font-size: .8rem; }
.dev-ico.sm { flex: 0 0 26px; width: 26px; height: 26px; font-size: .8rem; border-radius: .45rem; }
.dev-state { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: rgba(124, 135, 150, .14); color: var(--nms-disabled); white-space: nowrap; }
.dev-state::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.ds-online { background: rgba(26, 156, 91, .13); color: #15803d; } .ds-offline, .ds-unreachable { background: rgba(217, 58, 58, .12); color: #b91c1c; }
.ds-maintenance { background: rgba(139, 92, 246, .14); color: #6d28d9; }
[data-bs-theme="dark"] .ds-online { color: #4ade80; } [data-bs-theme="dark"] .ds-offline, [data-bs-theme="dark"] .ds-unreachable { color: #f87171; }
.num-pill { display: inline-block; min-width: 2.7rem; padding: .05rem .35rem; border-radius: .35rem; font-size: .74rem; font-weight: 600; font-variant-numeric: tabular-nums; background: rgba(124, 135, 150, .1); color: var(--bs-secondary-color); }
.tn-ok { color: #15803d; background: rgba(26, 156, 91, .1); } .tn-warm { color: #a16207; background: rgba(227, 154, 12, .15); } .tn-hot { color: #b91c1c; background: rgba(217, 58, 58, .13); }
[data-bs-theme="dark"] .tn-ok { color: #4ade80; } [data-bs-theme="dark"] .tn-warm { color: #fbbf24; } [data-bs-theme="dark"] .tn-hot { color: #f87171; }
.dev-portbar { display: block; height: 6px; border-radius: 3px; background: rgba(217, 58, 58, .18); overflow: hidden; margin-top: .55rem; }
.dev-portbar.sm { width: 64px; margin-top: 0; flex: 0 0 64px; }
.dev-portbar span { display: block; height: 100%; background: var(--nms-up); border-radius: 3px; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: .45rem; color: var(--bs-secondary-color); text-decoration: none; border: 1px solid transparent; }
.icon-btn:hover { background: rgba(29, 111, 224, .08); color: var(--nms-accent); border-color: rgba(29, 111, 224, .2); }
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.dev-card { border: 1px solid var(--nms-border); border-top: 3px solid var(--nms-disabled); border-radius: .75rem; padding: .75rem .85rem; background: var(--nms-surface); }
.dev-card:hover { box-shadow: 0 4px 14px rgba(11, 31, 58, .08); }
.dev-card.st-edge-online { border-top-color: var(--nms-up); } .dev-card.st-edge-offline, .dev-card.st-edge-unreachable { border-top-color: var(--nms-down); } .dev-card.st-edge-maintenance { border-top-color: #8b5cf6; }
.dev-card.is-inactive { opacity: .65; }
.dev-card-meta { font-size: .78rem; color: var(--bs-secondary-color); margin-top: .5rem; display: grid; gap: .1rem; } .dev-card-meta i { margin-right: .35rem; }
.dev-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-top: .55rem; text-align: center; }
.dev-card-stats span { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.dev-card-stats strong { display: block; font-size: .85rem; border-radius: .35rem; font-variant-numeric: tabular-nums; }
.dev-table .num-pill { min-width: 2.3rem; padding: .05rem .25rem; }
.dev-table .dev-portbar.sm { width: 48px; flex-basis: 48px; } .dev-table .icon-btn { width: 26px; height: 26px; }
.dev-table .dev-ip { font-size: .76rem; }
/* Device form */
.form-step { border-radius: .9rem; }
.form-step-head { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--nms-border); }
.form-step-head h2 { font-size: 1.02rem; font-weight: 650; margin: .1rem 0 .1rem; }
.form-step-head p { margin: 0; font-size: .8rem; color: var(--bs-secondary-color); }
.form-step-num { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(135deg, #1d6fe0, #4f46e5); }
.form-subhead { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); margin-bottom: .5rem; }
.role-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .5rem; }
.role-tile { display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border: 1px solid var(--nms-border); border-radius: .7rem; cursor: pointer; background: var(--nms-surface); line-height: 1.2; }
.role-tile input { position: absolute; opacity: 0; pointer-events: none; }
.role-tile:hover { border-color: rgba(29, 111, 224, .45); }
.role-tile.is-checked { border-color: var(--nms-accent); box-shadow: 0 0 0 3px rgba(29, 111, 224, .15); background: color-mix(in srgb, var(--nms-accent) 5%, var(--nms-surface)); }
.role-tile:focus-within { outline: 2px solid var(--nms-accent); outline-offset: 1px; }
.device-summary { position: sticky; top: 76px; overflow: hidden; border-radius: .9rem; }
.device-summary-band { height: 6px; background: linear-gradient(90deg, #1d6fe0, #4f46e5, #8b5cf6); }
.device-summary-list { display: grid; grid-template-columns: 5.2rem 1fr; gap: .35rem .5rem; margin: 0; font-size: .85rem; }
.device-summary-list dt { color: var(--bs-secondary-color); font-weight: 500; } .device-summary-list dd { margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-steps { background: rgba(29, 111, 224, .06); border-radius: .6rem; padding: .7rem .8rem; } .next-steps ol { padding-left: 1.1rem; }
.db-bar { background: rgba(124,135,150,.18); } .db-bar span { background: linear-gradient(90deg, #1d6fe0, #4f46e5); }
/* Login (split screen) */
.auth-body { background: var(--nms-surface); }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-brand { position: relative; overflow: hidden; color: #e6eefb; background: radial-gradient(circle at 15% 15%, rgba(79, 70, 229, .55), transparent 45%), radial-gradient(circle at 90% 85%, rgba(14, 165, 233, .35), transparent 45%), linear-gradient(135deg, #071a33 0%, #0b2a52 55%, #12366b 100%); }
.auth-net { position: absolute; right: -60px; bottom: -40px; width: 620px; max-width: 90%; color: #7fb3ff; opacity: .35; }
.auth-brand-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: 2.5rem 3rem; }
.auth-logo-box { min-height: 60px; display: flex; align-items: center; }
.auth-logo { display: block; width: auto; height: auto; max-width: 357px; max-height: 60px; object-fit: contain; }
.auth-hero { margin: auto 0; max-width: 520px; }
.auth-hero h1 { font-size: 2.3rem; font-weight: 700; color: #fff; letter-spacing: -.01em; margin-bottom: .6rem; }
.auth-hero .lead { color: #b8cbe8; font-size: 1.1rem; margin-bottom: 2rem; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.auth-points li { display: flex; gap: .8rem; align-items: flex-start; color: #b8cbe8; font-size: .92rem; }
.auth-points li strong { display: block; color: #fff; font-weight: 600; }
.auth-points i { flex: 0 0 40px; width: 40px; height: 40px; border-radius: .7rem; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.1rem; border: 1px solid rgba(255, 255, 255, .15); }
.auth-foot { color: #8aa3c7; }
.auth-form-side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem 1.5rem; background: var(--nms-surface); }
.auth-form { width: 100%; max-width: 410px; }
.auth-title { font-size: 1.7rem; font-weight: 700; margin-bottom: .25rem; }
.auth-input .input-group-text { background: transparent; color: var(--bs-secondary-color); }
.auth-input .form-control { font-size: 1rem; }
.auth-submit { font-weight: 600; box-shadow: 0 8px 22px rgba(29, 111, 224, .28); }
.auth-legal { color: var(--bs-secondary-color); margin-top: 2.5rem; }
.auth-mobile-logo { display: none; margin-bottom: 1.5rem; }
.auth-mark { width: 52px; height: 52px; border-radius: 12px; font-size: 1.5rem; }
@media (max-width: 991.98px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: flex; align-items: center; justify-content: center; padding: .9rem 1rem; border-radius: .9rem; background: linear-gradient(135deg, #071a33, #12366b); }
  .auth-mobile-logo .auth-logo { max-width: min(357px, 100%); }
  .auth-form-side { justify-content: flex-start; padding-top: 3rem; }
}
.nms-brand-logo { height: auto; max-height: 34px; max-width: 200px; }
/* Network topology */
.topo-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem; } .topo-path .bi-chevron-right { font-size: .65rem; opacity: .6; }
.topo-find { width: 220px; }
.topo-tree .topo-row { padding: .38rem .45rem; border-radius: .55rem; flex-wrap: nowrap; }
.topo-tree .nms-tree-children { margin-left: 1.3rem; border-left: 2px dashed var(--nms-border); }
.topo-ico { flex: 0 0 28px; width: 28px; height: 28px; border-radius: .5rem; display: grid; place-items: center; font-size: .85rem; color: #fff; }
.topo-ico.lv-city { background: linear-gradient(135deg, #7c3aed, #4f46e5); } .topo-ico.lv-area { background: linear-gradient(135deg, #0e94a8, #14b8a6); }
.topo-ico.lv-pop { background: linear-gradient(135deg, #1d6fe0, #0ea5e9); } .topo-ico.lv-device { background: linear-gradient(135deg, #1a9c5b, #22c55e); }
.topo-ico.lv-port { background: linear-gradient(135deg, #64748b, #94a3b8); } .topo-ico.lv-customer { background: linear-gradient(135deg, #e8590c, #f59e0b); }
.topo-name { font-weight: 600; white-space: nowrap; } .topo-tree [data-level="city"] > .topo-row .topo-name { font-size: 1rem; }
.topo-detail { max-width: 22rem; } .topo-meta { flex: 0 0 auto; }
.health-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(124, 135, 150, .25); }
.health-bar.sm { width: 90px; height: 6px; }
.health-bar .hb-up { background: var(--nms-up); } .health-bar .hb-down { background: var(--nms-down); }
@media (max-width: 767.98px) { .topo-path { display: none; } .topo-find { width: 100%; } .topo-tree .topo-row { flex-wrap: wrap; } .topo-detail { max-width: 100%; } }
.nms-brand-logo.is-wide { max-width: 210px; max-height: 36px; }
/* WhatsApp inbox */
.wa-inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 290px; gap: .75rem; height: calc(100vh - 150px); min-height: 520px; }
.wa-inbox:not(:has(.wa-side)) { grid-template-columns: 340px minmax(0, 1fr); }
.wa-list, .wa-chat, .wa-side { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.wa-list-head { padding: .75rem; border-bottom: 1px solid var(--nms-border); }
.wa-boxes { display: flex; flex-wrap: wrap; gap: .25rem; }
.wa-boxes a { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .5rem; border-radius: 999px; font-size: .75rem; color: var(--bs-secondary-color); text-decoration: none; border: 1px solid transparent; }
.wa-boxes a.active { background: rgba(29, 111, 224, .1); color: var(--nms-accent); border-color: rgba(29, 111, 224, .25); font-weight: 600; }
.wa-boxes .n { background: var(--nms-accent); color: #fff; border-radius: 999px; padding: 0 .4rem; font-size: .65rem; }
.wa-list-body { overflow-y: auto; flex: 1 1 auto; }
.wa-list-foot { padding: .4rem .6rem; border-top: 1px solid var(--nms-border); font-size: .75rem; }
.wa-conv { display: flex; gap: .6rem; padding: .65rem .75rem; border-bottom: 1px solid var(--nms-border); color: inherit; text-decoration: none; border-left: 3px solid transparent; }
.wa-conv:hover { background: rgba(29, 111, 224, .04); }
.wa-conv.active { background: rgba(29, 111, 224, .08); border-left-color: var(--nms-accent); }
.wa-conv.unread .fw-semibold { color: var(--bs-body-color); } .wa-conv.unread .small.text-truncate { color: var(--bs-body-color) !important; font-weight: 600; }
.wa-unread { background: #25d366; color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700; padding: 0 .45rem; height: 1.15rem; display: inline-grid; place-items: center; }
.wa-chat-head { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-bottom: 1px solid var(--nms-border); }
.wa-thread { flex: 1 1 auto; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .35rem;
  background: radial-gradient(circle, rgba(124, 135, 150, .12) 1px, transparent 1px) 0 0 / 16px 16px, #efeae2; }
[data-bs-theme="dark"] .wa-thread { background: radial-gradient(circle, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 16px 16px, #0b141a; }
.wa-day { align-self: center; margin: .5rem 0; } .wa-day span { background: rgba(255, 255, 255, .85); color: #54656f; font-size: .72rem; padding: .15rem .6rem; border-radius: .45rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
[data-bs-theme="dark"] .wa-day span { background: #1f2c34; color: #8696a0; }
.wa-msg { max-width: min(560px, 78%); padding: .4rem .6rem .3rem; border-radius: .6rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); font-size: .9rem; position: relative; }
.wa-in { align-self: flex-start; background: #fff; border-top-left-radius: .15rem; }
.wa-out, .wa-echo { align-self: flex-end; background: #d9fdd3; border-top-right-radius: .15rem; }
.wa-echo { background: #e7f6ff; }
.wa-note { align-self: center; background: #fff7d6; border: 1px dashed #e3b008; max-width: 86%; }
[data-bs-theme="dark"] .wa-in { background: #202c33; } [data-bs-theme="dark"] .wa-out { background: #005c4b; } [data-bs-theme="dark"] .wa-echo { background: #103d57; } [data-bs-theme="dark"] .wa-note { background: #3a3218; }
.wa-text { white-space: pre-wrap; word-break: break-word; }
.wa-meta { font-size: .68rem; color: #667781; text-align: right; margin-top: .1rem; } [data-bs-theme="dark"] .wa-meta { color: #8696a0; }
.wa-media { display: inline-flex; align-items: center; padding: .3rem .5rem; border-radius: .4rem; background: rgba(0, 0, 0, .05); font-size: .82rem; margin-bottom: .2rem; text-decoration: none; }
.wa-compose { border-top: 1px solid var(--nms-border); padding: .6rem .75rem .75rem; }
.wa-tabs { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 0 0 .5rem; } .wa-tabs .nav-link { padding: .2rem .6rem; font-size: .78rem; border-radius: 999px; }
.wa-compose-row { display: flex; gap: .4rem; align-items: flex-end; } .wa-compose-row textarea { resize: none; }
.wa-empty { margin: auto; text-align: center; color: var(--bs-secondary-color); } .wa-empty > i { font-size: 3rem; opacity: .4; }
.wa-side { overflow-y: auto; }
.wa-bubble { background: #d9fdd3; border-radius: .6rem; padding: .5rem .7rem; white-space: pre-wrap; font-size: .85rem; color: #111b21; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.tpl-card { border: 1px solid var(--nms-border); border-radius: .8rem; padding: .8rem .9rem; background: var(--nms-surface); }
.setup-hero { border-radius: 1rem; padding: 1.1rem 1.3rem; color: #e6f7ee; background: linear-gradient(120deg, #075e54 0%, #128c7e 60%, #25d366 140%); }
.setup-hero-ico { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: rgba(255, 255, 255, .15); }
.setup-hero-ico.bad { background: rgba(217, 58, 58, .45); }
.setup-progress { width: 160px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; display: inline-block; } .setup-progress span { display: block; height: 100%; background: #fff; }
.setup-hero-err { background: rgba(0, 0, 0, .2); border-radius: .5rem; padding: .4rem .6rem; }
.setup-help { background: rgba(29, 111, 224, .05); border-radius: .6rem; padding: .7rem .8rem; }
.setup-step { padding-top: .35rem; padding-bottom: .35rem; border-bottom: 1px dashed var(--nms-border); } .setup-step:last-of-type { border-bottom: 0; }
@media (max-width: 1599.98px) { .wa-inbox { grid-template-columns: 290px minmax(0, 1fr) 255px; } }
@media (max-width: 1199.98px) { .wa-inbox { grid-template-columns: 290px minmax(0, 1fr); height: auto; } .wa-list, .wa-chat { height: calc(100vh - 150px); } .wa-side { grid-column: 1 / -1; } }
@media (max-width: 991.98px) { .wa-inbox { grid-template-columns: 1fr; height: auto; } .wa-list { max-height: 45vh; } .wa-chat { min-height: 70vh; } }
.wa-dash-hero { border-radius: 1rem; padding: 1rem 1.2rem; color: #e6f7ee; background: linear-gradient(120deg, #075e54 0%, #128c7e 65%, #1fa855 130%); }
.wa-dash-hero .st { background: rgba(255,255,255,.18); color: #fff; }
.wa-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.wa-hero-stats > div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); border-radius: .7rem; padding: .45rem .7rem; min-width: 130px; }
.wa-hero-stats span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; opacity: .8; } .wa-hero-stats strong { display: block; font-size: .95rem; } .wa-hero-stats small { display: block; font-size: .7rem; opacity: .8; }
.wa-hero-stats .is-bad { background: rgba(217, 58, 58, .35); }
@media (max-width: 767.98px) { .wa-hero-stats { grid-template-columns: 1fr 1fr; width: 100%; } }
.card-header .form-step-num { display: inline-grid; width: 24px; height: 24px; font-size: .75rem; vertical-align: middle; }

/* Service Desk app (Android WebView): the app draws its own menu and title bar */
body.app-mode .nms-sidebar, body.app-mode .nms-header, body.app-mode .nms-backdrop, body.app-mode .nms-sidebar-foot { display: none !important; }
body.app-mode .nms-main { margin-left: 0 !important; }
body.app-mode .nms-content { padding-top: .75rem; }
/* WhatsApp settings */
.wa-prov-head { display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; margin-bottom: 1rem; border: 1px solid var(--nms-border); border-radius: .75rem; background: color-mix(in srgb, var(--nms-accent) 4%, var(--nms-surface)); }
.wa-prov-ico { flex: 0 0 38px; width: 38px; height: 38px; border-radius: .65rem; display: grid; place-items: center; font-size: 1.1rem; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.wa-prov-ico.sm { flex-basis: 28px; width: 28px; height: 28px; font-size: .85rem; border-radius: .5rem; }
.wa-prov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
.wa-prov-stats > div { border: 1px solid var(--nms-border); border-radius: .6rem; padding: .45rem .6rem; }
.wa-prov-stats span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.wa-prov-stats strong { font-size: .95rem; }
.wa-side { position: relative; overflow: hidden; } .wa-side::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #25d366, #1d6fe0); }
.wa-side-list { display: grid; grid-template-columns: 6.2rem 1fr; gap: .45rem .5rem; margin: 0; font-size: .86rem; }
.wa-side-list dt { color: var(--bs-secondary-color); font-weight: 500; } .wa-side-list dd { margin: 0; }
.wa-prov-list li { display: flex; align-items: center; gap: .55rem; padding: .45rem .4rem; border-radius: .5rem; font-size: .86rem; }
.wa-prov-list li.is-active { background: rgba(29, 111, 224, .07); }
.wa-links li a { padding: .5rem .2rem; font-size: .88rem; }
@media (min-width: 992px) { .wa-save-bar { position: sticky; bottom: .75rem; z-index: 5; box-shadow: 0 6px 20px rgba(15, 33, 54, .12); } }
a.peer-card:hover { border-color: rgba(29, 111, 224, .45); box-shadow: 0 2px 10px rgba(15, 33, 54, .08); }
.peer-card.is-active { box-shadow: 0 0 0 3px rgba(29, 111, 224, .25); border-color: var(--nms-accent); }
.cfg-wrap { white-space: pre-wrap; word-break: break-all; overflow-x: auto; }
.kpi-strip > .kstat { min-width: 0; } .kstat > :not(.kstat-ico) { min-width: 0; } .kstat-value { overflow: hidden; text-overflow: ellipsis; }
.wa-web-status { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem .85rem; border: 1px dashed var(--nms-border); border-radius: .75rem; }
.wa-web-status > .bi { font-size: 1.5rem; line-height: 1; margin-top: .1rem; }
.wa-web-status .btn { white-space: nowrap; align-self: center; }

/* Login page: form as a card on a soft background */
.auth-form-side { background: radial-gradient(circle at 85% 10%, rgba(29, 111, 224, .07), transparent 40%), radial-gradient(circle at 10% 90%, rgba(124, 58, 237, .06), transparent 40%), var(--nms-surface); }
.auth-card-pro { background: var(--bs-body-bg); border: 1px solid var(--nms-border); border-radius: 1.25rem; padding: 2.25rem 2rem; box-shadow: 0 24px 60px rgba(7, 26, 51, .10), 0 2px 6px rgba(7, 26, 51, .05); }
.auth-badge { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 600; color: #0e9f6e; background: rgba(14, 159, 110, .1); border-radius: 99px; padding: .25rem .7rem; margin-bottom: 1.1rem; }
.auth-hero h1 { font-size: 2.5rem; line-height: 1.15; }
@media (max-width: 575.98px) { .auth-card-pro { padding: 1.5rem 1.1rem; border-radius: 1rem; } }

/* Reseller form settings: header preview */
.rf-preview { border: 1px solid var(--nms-border); background: #fff; color: #111; padding: 14px; border-radius: 6px; }
.rf-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 3px double #1f3a5f; padding-bottom: 8px; }
.rf-preview-h1 { font-size: 1.15rem; font-weight: 700; color: #1f3a5f; }
.rf-preview-h2 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #444; }
.rf-preview-no { border: 1px solid #1f3a5f; font-size: .75rem; padding: 4px 8px; text-align: right; }
.rf-preview-no span { display: block; color: #555; }
.rf-preview-band { margin-top: 10px; background: #1f3a5f; color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; }

/* Segmented radio choice (voucher type) */
.seg label { padding: .3rem .8rem; border-radius: .45rem; font-size: .82rem; font-weight: 600; color: var(--bs-secondary-color); cursor: pointer; white-space: nowrap; margin: 0; }
.seg label.active { background: var(--nms-surface); color: var(--nms-accent); box-shadow: 0 1px 3px rgba(11, 31, 58, .12); }
.seg label:focus-within { outline: 2px solid var(--nms-accent); outline-offset: 1px; }

/* Finance: voucher type cards */
.fin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.fin-card { display: block; border: 1px solid var(--nms-border); border-radius: .75rem; background: var(--nms-surface); padding: .9rem 1rem; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.fin-card:hover { border-color: var(--nms-accent); box-shadow: 0 4px 14px rgba(11, 31, 58, .08); }
.fin-card .ico { width: 2.2rem; height: 2.2rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; margin-bottom: .5rem; }
.fin-card .t { font-size: .78rem; font-weight: 600; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .04em; }
.fin-card .v { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.fin-card .s { font-size: .78rem; color: var(--bs-secondary-color); }
.tone-blue .ico { background: rgba(29, 111, 224, .12); color: #1d6fe0; }
.tone-green .ico { background: rgba(26, 156, 91, .13); color: #1a9c5b; }
.tone-amber .ico { background: rgba(227, 154, 12, .15); color: #c27f00; }
.tone-violet .ico { background: rgba(139, 92, 246, .14); color: #7c4ddb; }
.tone-cyan .ico { background: rgba(14, 165, 183, .14); color: #0b8fa0; }
.tone-red .ico { background: rgba(217, 58, 58, .12); color: #d93a3a; }
.fin-amount { font-variant-numeric: tabular-nums; }

/* Reseller dashboard (CRM style) */
.crm-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; }
.crm-filter .form-select, .crm-filter .form-control { width: auto; }
.crm-sales { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; }
.crm-sale { border-radius: .9rem; padding: 1rem 1.15rem; color: #fff; position: relative; overflow: hidden; box-shadow: 0 6px 18px rgba(11, 31, 58, .12); }
.crm-sale::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.crm-sale-today { background: linear-gradient(135deg, #1d6fe0, #3b8cf0); }
.crm-sale-month { background: linear-gradient(135deg, #12805a, #1fae73); }
.crm-sale-quarter { background: linear-gradient(135deg, #5b3fc4, #8b5cf6); }
.crm-sale-t { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .9; font-weight: 600; }
.crm-sale-v { font-size: 1.65rem; font-weight: 700; line-height: 1.25; }
.crm-sale-ico { width: 2.4rem; height: 2.4rem; border-radius: .7rem; background: rgba(255, 255, 255, .18); display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; position: relative; z-index: 1; }
.crm-sale-s { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .78rem; margin-top: .35rem; }
.crm-sale-s .text-secondary { color: rgba(255, 255, 255, .78) !important; }
.crm-trend { display: inline-flex; align-items: center; gap: .15rem; padding: .05rem .45rem; border-radius: 1rem; background: rgba(255, 255, 255, .2); font-weight: 700; }
.crm-trend.down { background: rgba(0, 0, 0, .18); }
.crm-funnel { margin-bottom: .8rem; }
.crm-funnel-bar { height: .5rem; border-radius: 1rem; background: rgba(124, 135, 150, .15); overflow: hidden; }
.crm-funnel-bar span { display: block; height: 100%; border-radius: 1rem; background: linear-gradient(90deg, #1d6fe0, #1fae73); }
.crm-rank { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: rgba(29, 111, 224, .12); color: #1d6fe0; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .75rem; }

/* Sign-in page themes (Login Pages): colours come from --auth-* variables set per page */
.auth-body .auth-brand { color: #e6eefb; background:
    radial-gradient(circle at 15% 15%, var(--auth-g1, rgba(79,70,229,.55)), transparent 45%),
    radial-gradient(circle at 90% 85%, var(--auth-g2, rgba(14,165,233,.35)), transparent 45%),
    linear-gradient(135deg, var(--auth-c1, #071a33) 0%, var(--auth-c2, #0b2a52) 55%, var(--auth-c3, #12366b) 100%); }
.auth-has-bg .auth-brand { background: linear-gradient(135deg, color-mix(in srgb, var(--auth-c1) 88%, transparent), color-mix(in srgb, var(--auth-c3) 70%, transparent)), var(--auth-bg) center / cover no-repeat; }
.auth-body .auth-net { color: color-mix(in srgb, var(--auth-accent, #1d6fe0) 55%, #ffffff); }
.auth-net-wide { right: 0; bottom: 0; width: 100%; height: 100%; max-width: none; }
.auth-body .auth-submit { background: var(--auth-accent, #1d6fe0); border-color: var(--auth-accent, #1d6fe0); box-shadow: 0 8px 22px color-mix(in srgb, var(--auth-accent, #1d6fe0) 35%, transparent); }
.auth-body .auth-submit:hover { filter: brightness(1.08); }
.auth-body .auth-points i { background: color-mix(in srgb, var(--auth-accent, #1d6fe0) 30%, rgba(255,255,255,.08)); }
.auth-body .auth-badge { color: var(--auth-accent, #0e9f6e); background: color-mix(in srgb, var(--auth-accent, #0e9f6e) 12%, transparent); }
.auth-body .auth-form-side { background: radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--auth-accent, #1d6fe0) 9%, transparent), transparent 40%), radial-gradient(circle at 10% 90%, color-mix(in srgb, var(--auth-c3, #12366b) 8%, transparent), transparent 40%), var(--nms-surface); }
.auth-body .form-control:focus { border-color: var(--auth-accent); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--auth-accent) 22%, transparent); }
.auth-company { margin-left: .75rem; font-size: 1.25rem; font-weight: 600; color: #fff; }
.auth-mobile-logo { background: linear-gradient(135deg, var(--auth-c1, #071a33), var(--auth-c3, #12366b)); }
.auth-layout-right .auth-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-layout-right .auth-brand { order: 2; }
.auth-layout-center .auth-split { grid-template-columns: 1fr; position: relative; }
.auth-layout-center .auth-brand { position: fixed; inset: 0; }
.auth-layout-center .auth-brand-inner { padding: 2rem 2.5rem; }
.auth-layout-center .auth-hero { display: none; }
.auth-layout-center .auth-form-side { position: relative; z-index: 1; background: transparent; min-height: 100vh; }
.auth-layout-center .auth-legal { color: rgba(255, 255, 255, .75); }
.auth-layout-center .auth-card-pro { box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
@media (max-width: 991.98px) { .auth-layout-center .auth-brand { display: block; } .auth-layout-center .auth-brand-inner { display: none; } }
/* Login Pages editor: theme swatches and preview */
.lt-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.lt-swatch { position: relative; border: 2px solid var(--nms-border); border-radius: .7rem; overflow: hidden; cursor: pointer; margin: 0; }
.lt-swatch input { position: absolute; opacity: 0; }
.lt-swatch .sw { display: block; height: 54px; }
.lt-swatch .nm { display: block; font-size: .78rem; font-weight: 600; padding: .3rem .5rem; }
.lt-swatch:has(input:checked) { border-color: var(--nms-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nms-accent) 25%, transparent); }
.lt-preview { border-radius: .8rem; overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; min-height: 210px; border: 1px solid var(--nms-border); }
.lt-preview .b { position: relative; color: #fff; padding: 1rem; overflow: hidden; }
.lt-preview .b .auth-net { width: 240px; right: -30px; bottom: -30px; }
.lt-preview .b .auth-net-wide { width: 100%; right: 0; bottom: 0; }
.lt-preview .b h4 { position: relative; font-size: 1rem; font-weight: 700; margin: 2.2rem 0 .3rem; }
.lt-preview .f { background: var(--nms-surface); display: flex; flex-direction: column; justify-content: center; padding: 1rem; gap: .4rem; }
.lt-preview .f span { display: block; height: .55rem; border-radius: 99px; background: rgba(124,135,150,.2); }
.lt-preview .f b { display: block; height: 1.4rem; border-radius: .4rem; }
.lt-thumb { width: 64px; height: 40px; border-radius: .5rem; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 20% 20%, var(--auth-g1), transparent 55%), linear-gradient(135deg, var(--auth-c1), var(--auth-c2) 55%, var(--auth-c3)); }
.lt-thumb img { max-width: 52px; max-height: 26px; object-fit: contain; }

/* Accounts & Billing: professional finance look */
.crm-sale-red { background: linear-gradient(135deg, #b42323, #e0533f); }
.crm-spark { height: 46px; margin: .35rem -.25rem 0; position: relative; z-index: 1; }
.fin-kpi { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border: 1px solid var(--nms-border); border-radius: .9rem; background: var(--nms-surface); box-shadow: 0 2px 10px rgba(11, 31, 58, .04); height: 100%; }
.fin-kpi-ico { width: 3rem; height: 3rem; border-radius: .8rem; display: grid; place-items: center; font-size: 1.35rem; flex: 0 0 3rem; }
.fin-kpi-ico.tone-violet { background: rgba(139, 92, 246, .14); color: #7c4ddb; }
.fin-kpi-ico.tone-amber { background: rgba(227, 154, 12, .15); color: #c27f00; }
.fin-kpi-t { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--bs-secondary-color); }
.fin-kpi-v { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.fin-kpi-s { font-size: .78rem; color: var(--bs-secondary-color); }
.fin-kpi-spark { width: 38%; max-width: 220px; height: 54px; }
.fin-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--nms-border); border-radius: .9rem; background: var(--nms-surface); overflow: hidden; }
.fin-strip-i { display: flex; align-items: center; gap: .65rem; padding: .75rem 1rem; color: inherit; text-decoration: none; border-right: 1px solid var(--nms-border); }
.fin-strip-i:last-child { border-right: 0; }
.fin-strip-i:hover { background: rgba(29, 111, 224, .05); }
.fin-pill { width: 2.2rem; height: 2.2rem; border-radius: .6rem; display: grid; place-items: center; flex: 0 0 2.2rem; }
.vt-receipt { background: rgba(26, 156, 91, .13); color: #128150; }
.vt-payment { background: rgba(217, 58, 58, .12); color: #c22f2f; }
.vt-journal { background: rgba(139, 92, 246, .14); color: #6d3fd1; }
.vt-security { background: rgba(227, 154, 12, .16); color: #a86d00; }
.vt-bank { background: rgba(29, 111, 224, .12); color: #1a5fc2; }
.fin-tag { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; padding: .18rem .55rem; border-radius: 99px; white-space: nowrap; }
.fin-panel { border-radius: .9rem; box-shadow: 0 2px 10px rgba(11, 31, 58, .04); }
.fin-panel > .card-header { font-weight: 600; background: transparent; }
.fin-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .25rem; }
.fin-pos-h { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); margin: .6rem 0 .3rem; }
.fin-pos { margin-bottom: .45rem; }
.fin-bar { height: .35rem; border-radius: 99px; background: rgba(124, 135, 150, .14); overflow: hidden; margin-top: .2rem; }
.fin-bar span { display: block; height: 100%; border-radius: 99px; }
.fin-pos-tot { display: flex; justify-content: space-between; border-top: 1px dashed var(--nms-border); padding-top: .45rem; margin-top: .45rem; font-size: .88rem; }
.fin-table { --bs-table-bg: transparent; }
.fin-table > thead th { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--bs-secondary-color); background: rgba(29, 111, 224, .045); border-bottom: 1px solid var(--nms-border); padding: .65rem .75rem; white-space: nowrap; }
.fin-table > tbody td { padding: .6rem .75rem; vertical-align: middle; border-color: rgba(124, 135, 150, .14); }
.fin-table > tbody tr:hover > td { background: rgba(29, 111, 224, .035); }
.fin-table > tfoot td, .fin-table > tfoot th { background: rgba(29, 111, 224, .045); font-weight: 700; padding: .65rem .75rem; }
.fin-date { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; font-size: .68rem; text-transform: uppercase; color: var(--bs-secondary-color); border: 1px solid var(--nms-border); border-radius: .5rem; padding: .3rem .45rem; min-width: 2.6rem; }
.fin-date b { font-size: 1rem; color: var(--bs-body-color); margin-bottom: .1rem; }
.fin-drcr { display: inline-block; font-size: .64rem; font-weight: 700; padding: .05rem .3rem; border-radius: .25rem; margin-right: .2rem; }
.fin-drcr.dr { background: rgba(29, 111, 224, .12); color: #1a5fc2; }
.fin-drcr.cr { background: rgba(227, 154, 12, .16); color: #a86d00; }
.fin-amount-pos { color: #128150; }
.fin-amount-neg { color: #c22f2f; }
.fin-type { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 99px; background: rgba(124, 135, 150, .14); }
.fin-type.c-asset { background: rgba(29, 111, 224, .12); color: #1a5fc2; }
.fin-type.c-liability { background: rgba(227, 154, 12, .16); color: #a86d00; }
.fin-type.c-equity { background: rgba(139, 92, 246, .14); color: #6d3fd1; }
.fin-type.c-income { background: rgba(26, 156, 91, .13); color: #128150; }
.fin-type.c-expense { background: rgba(217, 58, 58, .12); color: #c22f2f; }
.fin-code { font-family: var(--bs-font-monospace); font-size: .8rem; background: rgba(124, 135, 150, .12); border-radius: .35rem; padding: .1rem .4rem; }
.rd-head { display: flex; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; border-radius: .9rem; border: 1px solid var(--nms-border); background: linear-gradient(135deg, rgba(29, 111, 224, .07), transparent 60%), var(--nms-surface); }
.rd-no { font-size: .8rem; color: var(--nms-accent); font-weight: 600; }
.rd-group { display: flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--bs-secondary-color); margin: 1.2rem 0 .6rem; }
.rd-group::after { content: ""; flex: 1; height: 1px; background: var(--nms-border); }
.rd-group .n { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--nms-accent); color: #fff; font-size: .72rem; }
.auth-body .auth-mark { background: var(--auth-accent, #1d6fe0); }
.auth-layout-center .auth-foot { margin-top: auto; }
.cust-grand { border: 1px solid color-mix(in srgb, var(--nms-accent) 35%, var(--nms-border)); background: linear-gradient(135deg, rgba(29, 111, 224, .06), transparent 60%), var(--nms-surface); }
.cust-grand-v { font-size: 1.8rem; font-weight: 800; color: var(--nms-accent); line-height: 1.1; }

/* ---- MRTG / Cacti style traffic graphs (graph users) ---- */
.mrtg { position: relative; background: #f6f6f6; border: 1px solid #c9c9c9; padding: 6px 8px 4px; color: #222; font-family: "DejaVu Sans", Verdana, Arial, sans-serif; }
[data-bs-theme="dark"] .mrtg { background: #1f2630; border-color: #3a4554; color: #dfe6ee; }
.mrtg-top { position: relative; text-align: center; min-height: 22px; }
.mrtg-title { font-size: 13px; line-height: 20px; padding: 0 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrtg-sub { display: none; }
.mrtg-tools { position: absolute; top: 0; right: 0; display: flex; align-items: center; gap: 4px; }
.mrtg-tools .btn-group { margin: 0; }
.mrtg-tools .btn-group .btn { padding: 0 4px; font-size: 11px; line-height: 16px; }
.mrtg-tools .d-flex > span { display: none; }
.mrtg-ico { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 18px; border: 1px solid #bbb; border-radius: 2px; background: #fff; color: #2a5db0; font-size: 11px; text-decoration: none; }
.mrtg-ico:hover { background: #e8f0ff; }
.mrtg-tools [data-zoom-bar] .btn-group { display: none; }
.mrtg:hover .mrtg-tools [data-zoom-bar] .btn-group { display: inline-flex; }
.mrtg-plot { position: relative; height: 175px; background: #fff; margin-top: 2px; }
[data-bs-theme="dark"] .mrtg-plot { background: #151b23; }
.mrtg-empty { height: 175px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #888; font-size: 12px; gap: .2rem; margin-top: 2px; }
[data-bs-theme="dark"] .mrtg-empty { background: #151b23; }
.mrtg-empty .bi { font-size: 1.6rem; opacity: .5; }
.mrtg-range { text-align: center; font: 11px/1.6 "DejaVu Sans Mono", ui-monospace, Menlo, Consolas, monospace; color: #444; margin-top: 2px; }
[data-bs-theme="dark"] .mrtg-range { color: #b8c2cd; }
.mrtg-legend { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; column-gap: 6px; font: 10.5px/1.55 "DejaVu Sans Mono", ui-monospace, Menlo, Consolas, monospace; padding: 3px 2px 2px; white-space: nowrap; overflow: hidden; }
.mrtg-legend b { font-weight: normal; }
.mrtg-legend .nm { display: flex; align-items: center; gap: 5px; }
.mrtg-sw { display: inline-block; width: 10px; height: 10px; border: 1px solid #555; }
.mrtg-sw.in { background: rgb(102, 230, 102); border-color: #00a000; }
.mrtg-sw.out { background: #5b78b8; border-color: #002a97; }
@media (max-width: 767px) { .mrtg-legend { grid-template-columns: repeat(3, auto); } .mrtg-title { padding: 0 54px 0 0; text-align: left; } }

/* An enlarged MRTG graph: over the page, nearly full screen. */
.mrtg-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 1060; }
.mrtg.mrtg-big { position: fixed; z-index: 1061; top: 3vh; left: 3vw; right: 3vw; bottom: 3vh; display: flex; flex-direction: column; padding: 10px 14px 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.mrtg.mrtg-big .mrtg-title { font-size: 16px; line-height: 26px; }
.mrtg.mrtg-big .mrtg-plot { flex: 1 1 auto; height: auto; min-height: 0; }
.mrtg.mrtg-big .mrtg-range, .mrtg.mrtg-big .mrtg-legend { font-size: 13px; }
.mrtg.mrtg-big .mrtg-legend { justify-content: center; column-gap: 34px; }
.mrtg.mrtg-big .mrtg-tools [data-zoom-bar] .btn-group { display: inline-flex; }
.mrtg.mrtg-big .mrtg-tools .btn-group .btn { padding: 2px 8px; font-size: 14px; line-height: 20px; }
body.mrtg-open { overflow: hidden; }

/* Payment methods picker on invoices */
.pm-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.pm-opt { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--nms-border, #dde2e8); border-radius: 8px; padding: .5rem .65rem; cursor: pointer; margin: 0; background: var(--nms-surface, #fff); }
.pm-opt:hover { border-color: #9ec2ff; }
.pm-opt:has(input:checked) { border-color: var(--bs-primary, #1d6fe0); background: rgba(29, 111, 224, .06); }
.pm-opt .form-check-input { margin: 0; flex: none; }
.pm-opt > .bi { font-size: 1.15rem; color: var(--bs-secondary-color, #667); }
.sig-thumb { max-height: 44px; max-width: 130px; background: #fff; border: 1px solid var(--nms-border, #dde2e8); border-radius: 4px; padding: 2px; }
