/* screens-netmonops.css · NETMON สถานะ · แจ้งเตือน · ช่วงบำรุงรักษา · ความพร้อมใช้ (M14 lane S3 · 07-space-netmon.md §6 · DESIGN-TOKENS.md)
   สีจากตัวแปรของชุดสีเท่านั้น · ตัวอักษร ≥ 12px · สถานะมีไอคอน + ข้อความเสมอ · เป้ากด ≥ 24px · ไม่มี style ในหน้า (CSP) · จอ 375px ไม่เลื่อนแนวนอนทั้งหน้า */

.nm { display: block; min-width: 0; }
.nm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.nm-h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; min-width: 0; }
/* ชื่อหน้าย่อยในหัวหน้าเดียวของ /netmon/* (components/netmon_head.html · M15 N3) · เช่นชื่อ poller · ยาวแล้วตัดบรรทัดได้ */
.nm-h1-sub { font-weight: 500; color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.nm-h1-sep { margin-right: 8px; }
.nm-h2 { margin: 0 0 4px; overflow-wrap: anywhere; }
.nm-h3 { margin: 12px 0 6px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.nm-tabs { margin: 12px 0 8px; }
.nm-lede { margin: 4px 0 12px; max-width: 80ch; }
.nm-back { margin: 0 0 8px; }
.nm-section { margin: 0 0 12px; min-width: 0; }
.nm .card { min-width: 0; }
.nm-sechead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.nm-sechead h2 { margin: 0; }

/* ป้าย */
.nm-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.nm-badge .ico { width: 14px; height: 14px; flex: none; }
.nm-b-ok { background: var(--teal-bg); color: var(--teal-fg); }
.nm-b-bad { background: var(--p1-bg); color: var(--p1-fg); }
.nm-b-warn { background: var(--p3-bg); color: var(--p3-fg); }
.nm-b-info { background: var(--vendor-bg); color: var(--vendor-fg); }
.nm-b-maint { background: var(--purple-bg); color: var(--purple-fg); }
.nm-b-muted { background: var(--surf2); color: var(--ink2); }
.nm-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }

/* ตัวเลขสรุป */
.nm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 16px; }
.nm-tile { display: flex; flex-direction: column; gap: 4px; min-height: 112px; padding: 14px 16px; color: var(--fg); text-decoration: none; border: 1px solid var(--line); border-left-width: 4px; border-left-color: var(--teal-fg); }
.nm-tile:hover { border-color: var(--brand); }
.nm-tile:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.nm-tile-warn { border-left-color: var(--p3-fg); }
.nm-tile-bad { border-left-color: var(--p1-fg); }
.nm-tile-maint { border-left-color: var(--purple-fg); }
.nm-tile-l { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.nm-tile-l .ico { width: 16px; height: 16px; }
.nm-tile-n { font-size: 28px; line-height: 1.1; color: var(--ink); }
.nm-tile-d { font-size: 12.5px; color: var(--muted); }

.nm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 0 0 12px; align-items: start; }
.nm-grid > * { min-width: 0; }
.nm-plist { list-style: none; margin: 0; padding: 0; }
.nm-plist li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.nm-plist li:last-child { border-bottom: 0; }
.nm-plist .small-l { display: block; margin-top: 2px; }

/* หัวอุปกรณ์ · รายการหัวข้อ-ค่า */
.nm-devhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: flex-start; margin: 0 0 12px; }
.nm-devhead > * { min-width: 0; flex: 1 1 280px; }
.nm-dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; margin: 0; }
.nm-dl dt { color: var(--ink2); font-size: 13px; }
.nm-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* กราฟ */
.nm-range { display: flex; flex-wrap: wrap; gap: 4px; }
.nm-range a[aria-current="true"] { background: var(--soft); color: var(--ink); font-weight: 600; }
.nm-graphs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px 16px; }
.nm-graph { min-width: 0; }
.nm .sc-fig { margin: 0; }
.nm .sc-fig svg.sc { display: block; width: 100%; max-width: 100%; height: auto; }

/* ตาราง + ตัวกรอง */
.nm-table th[scope="row"] { font-weight: 500; overflow-wrap: anywhere; }
.nm-table .nowrap { white-space: nowrap; }
.nm-table td a:not(.btn), .nm-plist a, .nm-dl a { text-decoration: underline; text-underline-offset: 2px; }
.nm-table tr.nm-sel th, .nm-table tr.nm-sel td { background: var(--soft); }
.nm-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 12px; }
.nm-filters label { display: flex; flex-direction: column; gap: 2px; min-width: 140px; flex: 0 1 200px; }
.nm-filters .nm-f-q { flex: 1 1 240px; }
.nm-f-act { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.nm-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }

/* ฟอร์ม */
.nm-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 8px 0 0; }
.nm-form > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; flex: 0 1 200px; min-width: 140px; }
.nm-form > .nm-wide { flex: 1 1 100%; }
.nm-form .nm-check, .nm-check { flex-direction: row; align-items: center; gap: 8px; min-height: 28px; }
.nm-check input { width: 18px; height: 18px; flex: none; }
.nm-form textarea, .nm-form select, .nm-form input[type="text"] { width: 100%; }
.nm-radios { display: flex; flex-wrap: wrap; gap: 8px 16px; border: 0; padding: 0; margin: 4px 0; flex: 1 1 100%; }
.nm-radios legend { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.nm-radios label { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; }
.nm-edit summary { cursor: pointer; min-height: 28px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 2px; }
.nm-edit[open] { min-width: min(320px, 80vw); }

@media (max-width: 640px) {
  .nm-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nm-tile { min-height: 96px; padding: 10px 12px; }
  .nm-tile-n { font-size: 22px; }
  .nm-grid, .nm-graphs { grid-template-columns: 1fr; }
  .nm-dl { grid-template-columns: 1fr; gap: 2px; }
  .nm-dl dd { margin-bottom: 6px; }
  .nm-filters label, .nm-form > label { flex: 1 1 100%; }
}
@media (max-width: 380px) {
  .nm-tiles { grid-template-columns: 1fr; }
}
