/* SolarWinds ping monitoring pages (sw-*.php). Loaded only on those pages. */

.sw-root {
    --sw-surface: #fcfcfb;
    --sw-ink: #0b0b0b;
    --sw-ink-2: #52514e;
    --sw-muted: #898781;
    --sw-grid: #e1e0d9;
    --sw-axis: #c3c2b7;
    --sw-line: rgba(11, 11, 11, .10);
    --sw-series-1: #2a78d6;
    --sw-series-2: #eb6834;
    --sw-up: #0ca30c;
    --sw-warning: #fab219;
    --sw-critical: #ec835a;
    --sw-down: #d03b3b;
    --sw-unknown: #898781;
    --sw-unmanaged: #b7bcc4;
    --sw-accent: #f47b20;
}

/* ---------------------------------------------------------------- sub navigation */
.sw-subnav {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
    margin: -8px 0 12px; padding: 5px; border-radius: 8px;
    background: linear-gradient(90deg, #0d1d31, #13304f); box-shadow: 0 1px 2px rgba(16, 24, 40, .15);
}
.sw-subnav a { display: inline-flex; align-items: center; gap: 7px; color: #c9d4e2; padding: 6px 12px; border-radius: 5px; font-weight: 500; font-size: 13px; }
.sw-subnav a .ic { opacity: .8; }
.sw-subnav a:hover, .sw-subnav a:focus { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.sw-subnav a.active { background: var(--sw-accent); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.sw-subnav a.active .ic { opacity: 1; }
a.sw-subnav__brand { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .01em; padding: 2px 14px 2px 8px; margin-right: 6px; border-right: 1px solid rgba(255, 255, 255, .15); border-radius: 0; line-height: 1.15; }
a.sw-subnav__brand:hover { background: none; }
.sw-subnav__brand .ic { width: 22px; height: 22px; color: var(--sw-accent); opacity: 1; }
.sw-subnav__brand small { display: block; font-weight: 500; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #8fa6bf; }
.sw-subnav__clock { margin-left: auto; padding: 0 10px; color: #8fa6bf; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- filters */
.sw-filters {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
    background: #fff; border: 1px solid var(--sw-line); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
}
.sw-filters .form-group { margin: 0; }
.sw-filters label { display: block; font-size: 11px; color: var(--sw-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.sw-filters .sw-filters__spacer { flex: 1 1 auto; }
.sw-range { display: inline-flex; border: 1px solid #ccc; border-radius: 4px; overflow: hidden; }
.sw-range button { border: 0; background: #fff; padding: 5px 10px; font-size: 12px; color: var(--sw-ink-2); border-right: 1px solid #e4e4e4; }
.sw-range button:last-child { border-right: 0; }
.sw-range button.active { background: #10233a; color: #fff; font-weight: 600; }
.sw-custom { display: none; gap: 4px; align-items: center; }
.sw-custom.is-on { display: inline-flex; }
.sw-custom input { width: 140px; }
.sw-meta { font-size: 12px; color: var(--sw-muted); white-space: nowrap; }

/* ---------------------------------------------------------------- KPI tiles */
.sw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sw-kpi {
    position: relative; background: #fff; border: 1px solid var(--sw-line); border-radius: 8px;
    padding: 12px 14px 10px; overflow: hidden;
}
.sw-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kpi, var(--sw-series-1)); }
.sw-kpi__label { font-size: 11px; font-weight: 600; color: var(--sw-muted); text-transform: uppercase; letter-spacing: .05em; }
.sw-kpi__value { font-size: 26px; font-weight: 600; color: var(--sw-ink); line-height: 1.2; margin-top: 2px; }
.sw-kpi__value small { font-size: 13px; font-weight: 500; color: var(--sw-ink-2); margin-left: 2px; }
.sw-kpi__sub { font-size: 12px; color: var(--sw-ink-2); }
a.sw-kpi:hover { text-decoration: none; border-color: #b9c3cf; }

/* ---------------------------------------------------------------- cards & grid */
.sw-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.sw-col-4 { grid-column: span 4; }
.sw-col-5 { grid-column: span 5; }
.sw-col-6 { grid-column: span 6; }
.sw-col-7 { grid-column: span 7; }
.sw-col-8 { grid-column: span 8; }
.sw-col-12 { grid-column: span 12; }
@media (max-width: 1199px) { .sw-col-4, .sw-col-5, .sw-col-7 { grid-column: span 6; } .sw-col-8 { grid-column: span 12; } }
@media (max-width: 767px) { .sw-grid > * { grid-column: span 12 !important; } }

.sw-card { background: var(--sw-surface); border: 1px solid var(--sw-line); border-radius: 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); min-width: 0; }
.sw-card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 14px; border-bottom: 1px solid var(--sw-grid);
}
.sw-card__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--sw-ink); }
.sw-card__hint { font-size: 12px; color: var(--sw-muted); }
.sw-card__body { padding: 12px 14px; }
.sw-card__body--flush { padding: 0; }
.sw-chart { position: relative; height: 260px; }
.sw-chart--sm { height: 200px; }
.sw-empty { padding: 30px 10px; text-align: center; color: var(--sw-muted); font-size: 13px; }

/* donut + legend */
.sw-donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sw-donut { position: relative; width: 190px; height: 190px; flex: 0 0 auto; margin: 0 auto; }
.sw-donut__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.sw-donut__center b { font-size: 30px; font-weight: 600; color: var(--sw-ink); line-height: 1; }
.sw-donut__center span { font-size: 11px; color: var(--sw-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.sw-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 140px; }
.sw-legend li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--sw-grid); font-size: 13px; color: var(--sw-ink-2); }
.sw-legend li:last-child { border-bottom: 0; }
.sw-legend b { margin-left: auto; color: var(--sw-ink); font-variant-numeric: tabular-nums; }
.sw-legend i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

/* ---------------------------------------------------------------- status pill */
.sw-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--sw-ink-2); }
.sw-status i { width: 10px; height: 10px; border-radius: 50%; background: var(--sw-unknown); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0, 0, 0, .08); }
.sw-status--up i { background: var(--sw-up); }
.sw-status--warning i { background: var(--sw-warning); }
.sw-status--critical i { background: var(--sw-critical); }
.sw-status--down i { background: var(--sw-down); animation: sw-pulse 1.6s infinite; }
.sw-status--down { color: #a32020; }
.sw-status--unmanaged i { background: var(--sw-unmanaged); }
.sw-status--unmanaged { color: var(--sw-muted); font-weight: 500; }
@keyframes sw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------------------------------------------------------------- tables */
.sw-table { width: 100%; margin: 0; font-size: 13px; }
.sw-table > thead > tr > th {
    padding: 8px 10px; font-size: 11px; font-weight: 600; color: var(--sw-muted); text-transform: uppercase; letter-spacing: .05em;
    border-bottom: 1px solid var(--sw-grid); white-space: nowrap; background: #f6f7f8; text-align: left;
}
.sw-table > tbody > tr > td { padding: 8px 10px; border-top: 1px solid var(--sw-grid); vertical-align: middle; }
.sw-table > tbody > tr:hover > td { background: #f3f6f9; }
.sw-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-table th.num { text-align: right; }
.sw-table .sw-name { font-weight: 600; color: var(--sw-ink); }
.sw-table .sw-sub { display: block; font-size: 11px; color: var(--sw-muted); font-weight: 400; }
.sw-table tr.is-link { cursor: pointer; }
.sw-table .sw-actions { white-space: nowrap; text-align: right; }
.sw-table .sw-actions .btn { margin-left: 2px; }
.sw-bar { position: relative; height: 6px; border-radius: 3px; background: #eceae4; min-width: 70px; overflow: hidden; }
.sw-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--sw-series-1); }
.sw-bar--avail span { background: var(--sw-up); }
.sw-bar--avail.is-bad span { background: var(--sw-down); }
.sw-bar--avail.is-warn span { background: var(--sw-warning); }
.sw-tag { display: inline-block; padding: 1px 7px; border-radius: 10px; background: #eef2f6; color: #3d4f63; font-size: 11px; white-space: nowrap; }
.sw-tag--copied { background: #fff3e8; color: #9a4a0b; }

/* ---------------------------------------------------------------- node detail */
.sw-node-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between;
    background: #fff; border: 1px solid var(--sw-line); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px;
}
.sw-node-head h2 { margin: 0; font-size: 20px; color: var(--sw-ink); }
.sw-node-head .sw-sub { color: var(--sw-ink-2); font-size: 13px; }
.sw-node-head .sw-status { font-size: 14px; }
.sw-timeline { display: flex; gap: 1px; height: 26px; border-radius: 4px; overflow: hidden; background: #eceae4; }
.sw-timeline span { flex: 1 1 0; min-width: 1px; background: #eceae4; }
.sw-timeline span[data-s="UP"] { background: var(--sw-up); }
.sw-timeline span[data-s="WARNING"] { background: var(--sw-warning); }
.sw-timeline span[data-s="CRITICAL"] { background: var(--sw-critical); }
.sw-timeline span[data-s="DOWN"] { background: var(--sw-down); }
.sw-timeline-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--sw-muted); margin-top: 4px; }
.sw-legend-inline { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--sw-ink-2); margin-top: 8px; }
.sw-legend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* ---------------------------------------------------------------- modals / forms */
.sw-import-list { max-height: 380px; overflow-y: auto; border: 1px solid var(--sw-grid); border-radius: 6px; }
.sw-import-list label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 10px; border-bottom: 1px solid #f0f0ec; font-weight: 400; cursor: pointer; }
.sw-import-list label:hover { background: #f6f8fa; }
.sw-import-list label.is-done { opacity: .5; cursor: default; }
.sw-import-list .sw-sub { margin-left: auto; font-size: 11px; color: var(--sw-muted); text-align: right; }
.sw-ping-out { background: #0f1b2a; color: #cfe3ff; font-family: Consolas, monospace; font-size: 12px; border-radius: 6px; padding: 10px; white-space: pre-wrap; max-height: 220px; overflow: auto; margin: 10px 0 0; }
.sw-ping-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sw-ping-summary > div { background: #f6f7f8; border-radius: 6px; padding: 8px; text-align: center; }
.sw-ping-summary small { display: block; font-size: 11px; color: var(--sw-muted); }
.sw-ping-summary b { font-size: 16px; }
.sw-chipbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sw-chipbar button { border: 1px solid var(--sw-line); background: #fff; border-radius: 16px; padding: 4px 12px; font-size: 12px; color: var(--sw-ink-2); }
.sw-chipbar button b { color: var(--sw-ink); margin-left: 4px; }
.sw-chipbar button.active { border-color: #10233a; background: #10233a; color: #fff; }
.sw-chipbar button.active b { color: #fff; }
.sw-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--sw-grid); font-size: 12px; color: var(--sw-muted); }

@media (max-width: 767px) {
    a.sw-subnav__brand { display: none; }
    .sw-subnav__clock { display: none; }
    .sw-subnav a { flex: 1 1 auto; justify-content: center; padding: 7px 6px; gap: 5px; font-size: 12px; }
    .sw-kpi__value { font-size: 22px; }
    .sw-filters > .form-group { flex: 1 1 140px; }
    .sw-range { display: flex; width: 100%; }
    .sw-range button { flex: 1; padding: 6px 4px; }
    .sw-table .hide-sm { display: none; }
    .sw-ping-summary { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------- SNMP */
.sw-meter { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: #eceae4; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.sw-meter span { display: block; height: 100%; background: var(--sw-up); border-radius: 3px; }
.sw-meter.is-warn span { background: var(--sw-warning); }
.sw-meter.is-bad span { background: var(--sw-down); }
.sw-meter__v { font-weight: 600; font-variant-numeric: tabular-nums; }
.sw-secs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sw-sec { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 10px; font-size: 11px; background: #e8f5e9; color: #1b5e20; cursor: default; }
.sw-sec::before { content: "\2713"; font-weight: 700; }
.sw-sec.is-na { background: #eef0f2; color: #5f6b78; }
.sw-sec.is-na::before { content: "\2013"; }
.sw-sec.is-fail { background: #fdecea; color: #a32020; }
.sw-sec.is-fail::before { content: "!"; }
.sw-reason { font-size: 12px; color: var(--sw-ink-2); max-width: 520px; line-height: 1.4; }
.sw-reason--bad { color: #8a2a12; }
.sw-why { margin: 0; padding: 0; list-style: none; }
.sw-why li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--sw-grid); font-size: 13px; }
.sw-why li:last-child { border-bottom: 0; }
.sw-why b { flex: 0 0 96px; color: var(--sw-ink); }
.sw-why span { color: var(--sw-ink-2); }
.sw-kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.sw-kv dt { color: var(--sw-muted); font-weight: 500; }
.sw-kv dd { margin: 0; color: var(--sw-ink); word-break: break-word; }
.sw-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--sw-grid); padding: 0 10px; }
.sw-tabs button { border: 0; background: none; padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--sw-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sw-tabs button.active { color: var(--sw-ink); border-bottom-color: var(--sw-accent); }
.sw-tabs button b { font-weight: 500; color: var(--sw-muted); margin-left: 3px; }
.sw-tabpane { display: none; }
.sw-tabpane.active { display: block; }
.sw-dbm { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-dbm.is-warn { color: #8a6100; font-weight: 600; }
.sw-dbm.is-bad { color: #b42318; font-weight: 600; }
.sw-section-title { margin: 22px 0 10px; font-size: 16px; font-weight: 700; color: var(--sw-ink); display: flex; align-items: center; gap: 10px; }
.sw-section-title small { font-weight: 400; color: var(--sw-muted); font-size: 12px; }
.sw-mono { font-family: Consolas, monospace; font-size: 12px; }
.sw-table tr.is-muted td { color: var(--sw-muted); }

/* ================================================================ NetWatch: compact monitoring views */
.sw-root {
    --nw-up-bg: #f2faf2;
    --nw-warning-bg: #fff6dc;
    --nw-critical-bg: #fdebe2;
    --nw-down-bg: #fde8e8;
    --nw-paused-bg: #f2f3f5;
    --nw-navy: #10233a;
}

.sw-root [hidden] { display: none !important; }

/* one-row toolbar: search, selects, status summary, view switch, actions */
.nw-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--sw-line); border-radius: 8px; padding: 7px 8px; margin-bottom: 10px;
}
.nw-toolbar .form-control { height: 30px; padding: 4px 8px; font-size: 13px; border-radius: 6px; box-shadow: none; }
.nw-toolbar select.form-control { width: auto; max-width: 150px; padding-right: 4px; }
.nw-toolbar__spacer { flex: 1 1 auto; }
.nw-search { position: relative; flex: 0 1 230px; min-width: 160px; }
.nw-search .ic { position: absolute; left: 9px; top: 7px; color: var(--sw-muted); pointer-events: none; }
.nw-search .form-control { width: 100%; padding-left: 30px; }
.nw-search kbd { position: absolute; right: 7px; top: 6px; padding: 0 5px; font-size: 10px; color: var(--sw-muted); background: #f3f4f6; border: 1px solid #e2e4e8; box-shadow: none; border-radius: 3px; }

/* time range buttons inside the toolbar */
.nw-toolbar .sw-range-filter { display: flex; align-items: center; gap: 6px; margin: 0; }
.nw-toolbar .sw-range-filter > label { display: none; }
.nw-toolbar .sw-range { border-color: #d9dde3; border-radius: 6px; }
.nw-toolbar .sw-range button { height: 28px; padding: 0 10px; font-weight: 600; }
.nw-toolbar .sw-custom input { width: 135px; }
.nw-stats + .nw-stats { margin-top: -2px; }

/* status summary that is also the status filter */
.nw-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #d9dde3; border-radius: 6px; overflow: hidden; background: #fff; }
.nw-seg button {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
    border: 0; border-right: 1px solid #e6e8ec; background: none; font-size: 12px; font-weight: 600; color: var(--sw-ink-2); white-space: nowrap;
}
.nw-seg button:last-child { border-right: 0; }
.nw-seg button b { font-size: 13px; color: var(--sw-ink); font-variant-numeric: tabular-nums; }
.nw-seg button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--sw-unknown)); }
.nw-seg button:hover { background: #f5f7fa; }
.nw-seg button.is-zero { color: #a3a7ad; }
.nw-seg button.is-zero b { color: #a3a7ad; font-weight: 500; }
.nw-seg button.is-zero i { opacity: .35; }
.nw-seg button.is-hot:not(.active) { background: var(--nw-down-bg); color: #a32020; }
.nw-seg button.is-hot:not(.active) b { color: #a32020; }
.nw-seg button.active { background: var(--nw-navy); color: #fff; }
.nw-seg button.active b { color: #fff; }

/* buttons */
.nw-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px;
    border: 1px solid #d5dbe3; border-radius: 6px; background: #fff; color: var(--nw-navy); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.nw-btn:hover, .nw-btn:focus { background: #f3f6f9; border-color: #b8c2ce; color: var(--nw-navy); text-decoration: none; outline: 0; }
.nw-btn--primary { background: var(--sw-accent); border-color: var(--sw-accent); color: #fff; }
.nw-btn--primary:hover, .nw-btn--primary:focus { background: #e06a12; border-color: #e06a12; color: #fff; }
.nw-btn--dark { background: var(--nw-navy); border-color: var(--nw-navy); color: #fff; }
.nw-btn--dark:hover, .nw-btn--dark:focus { background: #1d3756; border-color: #1d3756; color: #fff; }
.nw-btn--danger { color: #b42318; }
.nw-btn--danger:hover, .nw-btn--danger:focus { background: #fdecea; border-color: #f3b4ad; color: #b42318; }
.nw-btn--icon { width: 30px; padding: 0; }
.nw-btn[disabled] { opacity: .55; cursor: not-allowed; }
.nw-btngroup { display: inline-flex; }
.nw-btngroup .nw-btn { border-radius: 0; margin-left: -1px; }
.nw-btngroup .nw-btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.nw-btngroup .nw-btn:last-child { border-radius: 0 6px 6px 0; }
.nw-btngroup .nw-btn.active { background: var(--nw-navy); border-color: var(--nw-navy); color: #fff; position: relative; }

/* live indicator */
.nw-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sw-muted); white-space: nowrap; }
.nw-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--sw-up); animation: nw-ping 2s infinite; }
.nw-live.is-stale i { background: var(--sw-warning); animation: none; }
.nw-live.is-dead i { background: var(--sw-down); animation: none; }
@keyframes nw-ping { 0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, .45); } 70% { box-shadow: 0 0 0 7px rgba(12, 163, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); } }

.nw-banner { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; margin-bottom: 10px; border-radius: 8px; font-size: 13px; background: #fff6dc; border: 1px solid #f3d27a; color: #6b4e00; }
.nw-banner .ic { color: #b7791f; margin-top: 2px; }
.nw-banner code { background: rgba(0, 0, 0, .06); color: inherit; font-size: 11.5px; word-break: break-all; }

/* compact data table */
.nw-tablecard { overflow: visible; }
.nw-table { width: 100%; margin: 0; font-size: 13px; border-collapse: separate; border-spacing: 0; }
.nw-table > thead > tr > th {
    position: sticky; top: var(--header-h, 64px); z-index: 2;
    padding: 7px 8px; font-size: 10.5px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .06em;
    background: #f4f6f8; border-bottom: 1px solid var(--sw-grid); white-space: nowrap; text-align: left; user-select: none;
}
.nw-table > thead > tr > th:first-child { border-top-left-radius: 8px; }
.nw-table > thead > tr > th:last-child { border-top-right-radius: 8px; }
.nw-table > thead > tr > th[data-sort] { cursor: pointer; }
.nw-table > thead > tr > th[data-sort]:hover { color: var(--nw-navy); }
.nw-table > thead > tr > th.is-sorted { color: var(--nw-navy); }
.nw-table > thead > tr > th.is-sorted::after { content: " \25B2"; font-size: 8px; }
.nw-table > thead > tr > th.is-sorted.is-desc::after { content: " \25BC"; }
.nw-table > tbody > tr > td {
    padding: 4px 8px; height: 33px; border-top: 1px solid #edeef0; vertical-align: middle; white-space: nowrap; background: #fff;
}
.nw-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.nw-table th.num { text-align: right; }
.nw-table .nw-ell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.nw-table .nw-ip { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; color: #4b5563; }
.nw-table .nw-node { font-weight: 600; color: var(--sw-ink); }
.nw-table a.nw-node:hover { color: #1a6fb0; }
.nw-table .nw-dim { color: var(--sw-muted); }
.nw-table tbody tr { cursor: pointer; }
.nw-table tbody tr > td:first-child { box-shadow: inset 3px 0 0 var(--row-c, transparent); }
.nw-table tbody tr:hover > td { background-image: linear-gradient(rgba(16, 35, 58, .05), rgba(16, 35, 58, .05)); }
.nw-table tbody tr.is-open > td { background-image: linear-gradient(rgba(42, 120, 214, .13), rgba(42, 120, 214, .13)); }
.nw-table tbody tr.nw-empty-row { cursor: default; }
/* row colour by status */
.nw-row--up { --row-c: var(--sw-up); }
.nw-row--up > td { background-color: var(--nw-up-bg) !important; }
.nw-row--warning { --row-c: var(--sw-warning); }
.nw-row--warning > td { background-color: var(--nw-warning-bg) !important; }
.nw-row--critical { --row-c: var(--sw-critical); }
.nw-row--critical > td { background-color: var(--nw-critical-bg) !important; }
.nw-row--down { --row-c: var(--sw-down); }
.nw-row--down > td { background-color: var(--nw-down-bg) !important; }
.nw-row--down .nw-node { color: #a32020; }
.nw-row--unknown { --row-c: var(--sw-unknown); }
.nw-row--unmanaged { --row-c: var(--sw-unmanaged); }
.nw-row--unmanaged > td { background-color: var(--nw-paused-bg) !important; color: var(--sw-muted); }
.nw-table .sw-status { font-size: 12px; }
.nw-err { color: #b42318; font-size: 12px; font-weight: 600; }
.nw-actions { text-align: right; width: 1%; }
.nw-actions .nw-btn { height: 26px; width: 26px; padding: 0; border-color: transparent; background: transparent; color: #5b6878; }
.nw-actions .nw-btn .ic { width: 15px; height: 15px; }
.nw-actions .nw-btn:hover, .nw-actions .open > .nw-btn { background: #fff; border-color: #c9d1db; color: var(--nw-navy); }
.nw-menu { font-size: 13px; min-width: 180px; }
.nw-menu > li > a { display: flex; align-items: center; gap: 9px; padding: 6px 14px; }
.nw-menu .ic { color: #6b7280; }
.nw-menu .text-danger, .nw-menu .text-danger .ic { color: #b42318; }
.nw-table tfoot td { padding: 7px 10px; font-size: 12px; color: var(--sw-muted); background: #fafbfc; border-top: 1px solid var(--sw-grid); border-radius: 0 0 8px 8px; }

/* last-hour mini timeline: one bar per 2 minutes */
.nw-strip { display: inline-flex; gap: 1px; height: 16px; align-items: stretch; vertical-align: middle; }
.nw-strip i { width: 3px; border-radius: 1px; background: #dfe2e6; }
.nw-strip i[data-v="1"] { background: var(--sw-up); }
.nw-strip i[data-v="2"] { background: var(--sw-warning); }
.nw-strip i[data-v="3"] { background: var(--sw-critical); }
.nw-strip i[data-v="4"] { background: var(--sw-down); }
/* value with a small bar (response time vs thresholds, availability) */
.nw-val { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.nw-val u { display: inline-block; width: 36px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .08); overflow: hidden; text-decoration: none; }
.nw-val u s { display: block; height: 100%; background: var(--sw-up); text-decoration: none; }
.nw-val.is-warn u s { background: var(--sw-warning); }
.nw-val.is-bad u s { background: var(--sw-down); }
.nw-val.is-warn b { color: #8a6100; }
.nw-val.is-bad b { color: #b42318; }
.nw-val b { font-weight: 600; }
.nw-snmpdot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--sw-ink-2); }
.nw-snmpdot i { width: 8px; height: 8px; border-radius: 2px; background: var(--c, #d1d5db); }

/* tile view: many nodes on one screen */
.nw-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.nw-tile {
    position: relative; display: block; padding: 6px 9px 6px 12px; border-radius: 6px; cursor: pointer;
    background: #fff; border: 1px solid var(--sw-line); color: var(--sw-ink); overflow: hidden;
}
.nw-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--row-c, #d1d5db); }
.nw-tile b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-tile small { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; color: var(--sw-ink-2); font-variant-numeric: tabular-nums; }
.nw-tile small span:first-child { font-family: Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-tile .nw-strip { display: flex; height: 5px; margin-top: 5px; }
.nw-tile .nw-strip i { flex: 1; width: auto; }
.nw-tile:hover { box-shadow: 0 2px 8px rgba(16, 24, 40, .14); }
.nw-tile.nw-row--up { background: var(--nw-up-bg); border-color: #cfe9cf; }
.nw-tile.nw-row--warning { background: var(--nw-warning-bg); border-color: #f2dc9b; }
.nw-tile.nw-row--critical { background: var(--nw-critical-bg); border-color: #f1c4ad; }
.nw-tile.nw-row--down { background: #d03b3b; border-color: #b52e2e; color: #fff; }
.nw-tile.nw-row--down small { color: #ffe1e1; }
.nw-tile.nw-row--down::before { background: #7f1d1d; }
.nw-tile.nw-row--down .nw-strip i { opacity: .9; }
.nw-tile.nw-row--unmanaged { background: var(--nw-paused-bg); color: var(--sw-muted); }
.nw-tile.is-open { outline: 2px solid #2a78d6; outline-offset: 1px; }

/* compact stat strip */
.nw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); margin-bottom: 10px;
    background: #fff; border: 1px solid var(--sw-line); border-radius: 8px; overflow: hidden; }
.nw-stat { display: block; padding: 8px 12px 7px; border: 0; border-right: 1px solid #eef0f2; background: #fff; color: inherit; position: relative; text-align: left; width: 100%; }
.nw-stat:last-child { border-right: 0; }
.nw-stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c, transparent); }
a.nw-stat:hover, button.nw-stat:hover { background: #f6f8fa; text-decoration: none; }
.nw-stat > span { display: block; font-size: 10.5px; font-weight: 700; color: var(--sw-muted); text-transform: uppercase; letter-spacing: .06em; }
.nw-stat b { display: block; font-size: 20px; font-weight: 600; color: var(--sw-ink); font-variant-numeric: tabular-nums; line-height: 1.25; }
.nw-stat b small { font-size: 12px; color: var(--sw-muted); font-weight: 500; }
.nw-stat em { display: block; font-style: normal; font-size: 11px; color: var(--sw-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-stat.is-bad b { color: #b42318; }
.nw-stat.is-warn b { color: #8a6100; }

/* SNMP rows */
.nw-row--ok { --row-c: var(--sw-up); }
.nw-row--partial { --row-c: var(--sw-warning); }
.nw-row--partial > td { background-color: var(--nw-warning-bg) !important; }
.nw-row--no_reply { --row-c: var(--sw-critical); }
.nw-row--no_reply > td { background-color: var(--nw-critical-bg) !important; }
.nw-row--unreachable { --row-c: var(--sw-down); }
.nw-row--unreachable > td { background-color: var(--nw-down-bg) !important; }
.nw-row--pending, .nw-row--disabled { --row-c: var(--sw-unmanaged); }
.nw-row--disabled > td { background-color: var(--nw-paused-bg) !important; color: var(--sw-muted); }
.nw-table .sw-meter { width: 40px; }
.nw-table td.nw-reason { max-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: #7c2d12; }
.nw-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 700; text-align: center; background: #eef0f2; color: #4b5563; }
.nw-count.is-bad { background: #fbd5d5; color: #b42318; }
.nw-count.is-warn { background: #fff1c7; color: #8a6100; }
.nw-count.is-ok { background: #dcf2dc; color: #1b6e1b; }

/* tabbed panel under a table */
.nw-panel .sw-tabs { padding: 0 6px; }
.nw-panel .sw-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.nw-panel .sw-tabs .nw-count { font-weight: 700; }
.nw-panel .nw-scroll { max-height: 380px; overflow: auto; }
.nw-scroll .nw-table > thead > tr > th { top: 0; }

/* details drawer (right side) */
.nw-drawer {
    position: fixed; top: var(--header-h, 64px); right: 0; bottom: 0; z-index: 1040; width: 460px; max-width: 100%;
    display: flex; flex-direction: column; background: #fff; box-shadow: -8px 0 24px rgba(16, 24, 40, .16);
    transform: translateX(105%); transition: transform .22s ease, visibility .22s; visibility: hidden;
}
.nw-drawer.is-open { transform: none; visibility: visible; }
.nw-drawer__head { padding: 14px 14px 10px 16px; border-bottom: 1px solid var(--sw-grid); background: #fff; position: relative; }
.nw-drawer__head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--row-c, #d1d5db); }
.nw-drawer__head h3 { margin: 4px 40px 3px 0; font-size: 18px; font-weight: 700; color: var(--sw-ink); word-break: break-word; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nw-drawer__head .nw-sub { font-size: 12.5px; color: var(--sw-ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.nw-drawer__head .nw-sub .ic { width: 13px; height: 13px; color: var(--sw-muted); margin-right: 4px; vertical-align: -2px; }
.nw-drawer__close { position: absolute; right: 10px; top: 12px; }
.nw-drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 12px 16px 16px; background: #f7f8fa; }
.nw-drawer__foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--sw-grid); background: #fff; }
.nw-drawer__spacer { flex: 1 1 auto; }
.nw-dsec { margin-bottom: 14px; }
.nw-dsec__title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; }
.nw-dsec__title a, .nw-dsec__title small { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11.5px; }
.nw-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nw-fact { background: #fff; border: 1px solid #eceef1; border-radius: 6px; padding: 6px 9px; min-width: 0; }
.nw-fact span { display: block; font-size: 10.5px; color: var(--sw-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.nw-fact b { display: block; font-size: 14px; font-weight: 600; color: var(--sw-ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-fact.is-bad b { color: #b42318; }
.nw-fact.is-warn b { color: #8a6100; }
.nw-fact.is-good b { color: #1b6e1b; }
.nw-kvlist { margin: 0; background: #fff; border: 1px solid #eceef1; border-radius: 6px; font-size: 12.5px; }
.nw-kvlist > div { display: flex; gap: 10px; padding: 5px 10px; border-top: 1px solid #f1f2f4; }
.nw-kvlist > div:first-child { border-top: 0; }
.nw-kvlist dt { flex: 0 0 105px; color: var(--sw-muted); font-weight: 500; }
.nw-kvlist dd { margin: 0; flex: 1 1 auto; min-width: 0; color: var(--sw-ink); word-break: break-word; }
.nw-alert { display: flex; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: 12.5px; margin-bottom: 12px; background: var(--nw-down-bg); color: #8a1c1c; border: 1px solid #f3c0c0; line-height: 1.4; }
.nw-alert--warn { background: var(--nw-warning-bg); color: #6b4e00; border-color: #f2dc9b; }
.nw-alert--info { background: #eef4fb; color: #1e3a5f; border-color: #cddcf0; }
.nw-alert .ic { margin-top: 1px; }
.nw-mini { position: relative; height: 130px; background: #fff; border: 1px solid #eceef1; border-radius: 6px; padding: 6px 6px 2px; }
.nw-tl { display: flex; gap: 1px; height: 10px; border-radius: 3px; overflow: hidden; margin-top: 6px; background: #e5e7eb; }
.nw-tl i { flex: 1 1 0; background: #e5e7eb; }
.nw-tl i[data-s="UP"] { background: var(--sw-up); }
.nw-tl i[data-s="WARNING"] { background: var(--sw-warning); }
.nw-tl i[data-s="CRITICAL"] { background: var(--sw-critical); }
.nw-tl i[data-s="DOWN"] { background: var(--sw-down); }
.nw-tl-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--sw-muted); margin-top: 2px; }
.nw-mlist { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid #eceef1; border-radius: 6px; font-size: 12.5px; }
.nw-mlist li { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-top: 1px solid #f1f2f4; min-height: 30px; }
.nw-mlist li:first-child { border-top: 0; }
.nw-mlist li > :last-child:not(:first-child) { margin-left: auto; color: var(--sw-muted); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nw-mlist .nw-mlist__main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-mlist .nw-mlist__main small { color: var(--sw-muted); margin-left: 4px; }
.nw-mlist li.is-empty { justify-content: center; color: var(--sw-muted); }
.nw-drawer .sw-ping-out { max-height: 160px; }
.nw-drawer .sw-secs { margin: 0; }
.nw-drawer-backdrop { display: none; position: fixed; inset: var(--header-h, 64px) 0 0 0; z-index: 1035; background: rgba(15, 23, 42, .18); }
.nw-drawer-backdrop.is-on { display: block; }
.nw-skel { height: 12px; border-radius: 4px; background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 50%, #eef0f3 75%); background-size: 200% 100%; animation: nw-skel 1.2s infinite; margin: 8px 0; }
@keyframes nw-skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* dashboard: status map */
.nw-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; }
.nw-map a {
    display: block; height: 24px; line-height: 24px; padding: 0 6px 0 8px; border-radius: 4px; position: relative;
    font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: var(--nw-up-bg); color: #1d4d1d; box-shadow: inset 3px 0 0 var(--row-c, #d1d5db);
}
.nw-map a:hover { outline: 2px solid var(--nw-navy); outline-offset: 1px; text-decoration: none; }
.nw-map a.nw-row--warning { background: var(--nw-warning-bg); color: #6b4e00; }
.nw-map a.nw-row--critical { background: var(--nw-critical-bg); color: #7c2d12; }
.nw-map a.nw-row--down { background: var(--sw-down); color: #fff; box-shadow: none; }
.nw-map a.nw-row--unknown { background: #eef0f2; color: var(--sw-muted); }
.nw-maplegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--sw-ink-2); }
.nw-maplegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.nw-maplegend b { color: var(--sw-ink); }

@media (max-width: 1199px) {
    .nw-table .hide-lg { display: none; }
}
@media (max-width: 991px) {
    .nw-drawer { width: 400px; }
    .nw-table .hide-md { display: none; }
}
@media (max-width: 767px) {
    .nw-toolbar { gap: 6px; }
    .nw-search { flex: 1 1 100%; }
    .nw-toolbar select.form-control { flex: 1 1 0; max-width: none; }
    .nw-seg { width: 100%; }
    .nw-seg button { flex: 1 1 auto; justify-content: center; padding: 0 6px; }
    .nw-table .hide-sm { display: none; }
    .nw-table .nw-ell { max-width: 130px; }
    .nw-drawer { width: 100%; }
    .nw-facts { grid-template-columns: repeat(2, 1fr); }
    .nw-tiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .nw-search kbd { display: none; }
    .nw-btn__label { display: none; }
    .nw-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nw-stat { padding: 6px 8px; border-bottom: 1px solid #eef0f2; }
    .nw-stat b { font-size: 17px; }
    .nw-stat em { display: none; }
}
