/* screens-endpoint-ui.css · Option ENDPOINT หน้าจอ รายงาน ค่าตั้ง (lane E3 · 13-endpoint.md §10 · DESIGN-TOKENS.md)
   ภาพรวม (วิดเจ็ตผู้บริหาร) · เครื่อง · ซอฟต์แวร์ · รอจับคู่ · รอบสำรวจ · รายงาน · ตั้งค่า
   สีจากตัวแปรของชุดสีเท่านั้น · ตัวอักษร ≥ 12px · สถานะมีไอคอน + ข้อความเสมอ · เป้ากด ≥ 24px · ไม่มี style ในหน้า (CSP) · จอ 375px ไม่เลื่อนแนวนอนทั้งหน้า */

.ep { display: block; min-width: 0; }
.ep-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.ep-h1 { display: flex; align-items: center; gap: 8px; margin: 0; }
.ep-h2 { margin: 0 0 4px; overflow-wrap: anywhere; }
.ep-h3 { margin: 12px 0 4px; font-size: 14px; }
.ep-tabs { margin: 12px 0 8px; }
.ep-lede { margin: 4px 0 12px; max-width: 72ch; }
.ep-foot { margin-top: 12px; }
.ep-wrap { overflow-wrap: anywhere; word-break: break-word; }
.ep-pre { white-space: pre-line; overflow-wrap: anywhere; }
.ep-inline { display: inline; margin: 0; }
.ep-off th, .ep-off td { color: var(--muted); }

/* ป้ายสถานะ */
.ep-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; }
.ep-badge .ico { width: 14px; height: 14px; flex: none; }
.ep-b-ok { background: var(--teal-bg); color: var(--teal-fg); }
.ep-b-bad { background: var(--p1-bg); color: var(--p1-fg); }
.ep-b-warn { background: var(--p3-bg); color: var(--p3-fg); }
.ep-b-info { background: var(--vendor-bg); color: var(--vendor-fg); }
.ep-b-muted { background: var(--surf2); color: var(--ink2); }
.ep-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }

/* วิดเจ็ตผู้บริหาร */
.ep-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 16px; }
.ep-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); }
.ep-tile:hover { border-color: var(--brand); }
.ep-tile:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ep-tile-warn { border-left-color: var(--p3-fg); }
.ep-tile-bad { border-left-color: var(--p1-fg); }
.ep-tile-l { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.ep-tile-l .ico { width: 16px; height: 16px; }
.ep-tile-n { font-size: 28px; line-height: 1.1; color: var(--ink); }
.ep-tile-d { font-size: 12.5px; color: var(--muted); }

.ep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 0 0 12px; align-items: start; }
.ep-grid > .card, .ep .card { min-width: 0; }
.ep-bars th { font-weight: 500; }
.ep-meter { width: 100%; min-width: 80px; height: 12px; }
.ep-todo { list-style: none; margin: 0; padding: 0; }
.ep-todo li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ep-todo li:last-child { border-bottom: 0; }
.ep-agents { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }

/* รายการแบบหัวข้อ-ค่า */
.ep-dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 6px 12px; margin: 0; }
.ep-dl dt { color: var(--ink2); font-size: 13px; }
.ep-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ep-dl-tight { grid-template-columns: auto 1fr; min-width: 220px; }
.ep-devhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: flex-start; }
.ep-devhead > div { min-width: 0; flex: 1 1 280px; }
.ep-list { margin: 0; padding-left: 18px; }
.ep-list li { margin: 4px 0; overflow-wrap: anywhere; }
.ep-counts { margin: 0 0 8px; }

/* ตาราง + ตัวกรอง */
.ep-table th[scope="row"] { font-weight: 500; overflow-wrap: anywhere; }
.ep-table .nowrap { white-space: nowrap; }
.ep-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 12px; }
.ep-filters label { display: flex; flex-direction: column; gap: 2px; min-width: 140px; flex: 0 1 180px; }
.ep-filters .ep-f-q { flex: 1 1 240px; }
.ep-filters .ep-check { flex-direction: row; align-items: center; min-height: 32px; }
.ep-f-act { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ep-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.ep-check { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.ep-check input { width: 18px; height: 18px; flex: none; }

/* คิวรอจับคู่ */
.ep-review td:first-child { width: 36px; }
.ep-review input[type="checkbox"] { width: 20px; height: 20px; }
.ep-decide { margin: 12px 0; border: 1px solid var(--line); }
.ep-decide legend { font-weight: 600; padding: 0 4px; }
.ep-radios { display: flex; flex-wrap: wrap; gap: 8px 16px; border: 0; padding: 0; margin: 8px 0; }
.ep-radios label { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; }
.ep-newprod summary, .ep-profile-form summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; gap: 6px; }

/* รายงาน */
.ep-reports { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 12px; }
.ep-report { display: flex; flex-direction: column; gap: 6px; }
.ep-report .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.ep-clause { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surf2); color: var(--ink2); font-size: 12.5px; }
.ep-kv th { width: 60%; font-weight: 500; }

/* ตั้งค่า */
.ep-notice { padding: 10px 14px; margin: 0 0 10px; border-left: 4px solid var(--brand); background: var(--surf2); border-radius: var(--r-sm); }
.ep-notice ul { margin: 6px 0 0; padding-left: 18px; }
.ep-notice li { margin: 3px 0; }
.ep-steps { margin: 6px 0; padding-left: 20px; }
.ep-steps li { margin: 6px 0; }
.ep-cmd { margin: 6px 0; padding: 8px 10px; background: var(--surf2); border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--font-mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ep-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; border: 0; padding: 0; margin: 4px 0; }
.ep-row legend { font-weight: 600; margin-bottom: 4px; }
.ep-row label { display: flex; flex-direction: column; gap: 2px; width: 140px; }
.ep-checks { border: 0; padding: 0; margin: 4px 0; }
.ep-checks legend { font-weight: 600; margin-bottom: 4px; }
.ep textarea.mono { font-family: var(--font-mono); font-size: 13px; }

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

/* ลิงก์ในตารางที่มีข้อความอื่นต่อท้าย (ป้าย "ต้องมีสิทธิ์ใช้งาน") ต้องแยกจากข้อความด้วยเส้นใต้ ไม่ใช่สีอย่างเดียว (WCAG 1.4.1 · axe link-in-text-block) */
.ep-table td a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }

/* ฟอร์มแนวตั้งของแพ็กนี้ (ไม่ยืม class ของหน้าอื่น) · ช่องติ๊กเป็นแถวชิดซ้าย · ปุ่มกว้างตามข้อความ */
.ep-stack { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 8px; }
.ep-stack > label:not(.ep-check), .ep-stack .grid2 > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ep-stack .ep-check { flex-direction: row; justify-content: flex-start; text-align: start; font-size: 13px; }
.ep-stack > .btn { align-self: flex-start; }

/* M14 lane P2 · ผลตรวจแฮช/ลายเซ็นของรายงานที่ออก · ซอฟต์แวร์ต้องห้ามบนหน้าเครื่อง */
.ep-verdict { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 12px; border-radius: var(--r-md); font-weight: 600; }
.ep-verdict .ico { width: 18px; height: 18px; flex: none; }
.ep-verdict-ok { background: var(--teal-bg); color: var(--teal-fg); }
.ep-verify-dl dd { min-width: 0; }
.ep-alerts .table th[scope="row"] a { text-decoration: underline; text-underline-offset: 3px; }
.ep-pagehead { margin-bottom: 4px; }
.ep-crumbs { flex-wrap: wrap; }
