/* ===========================================================================
   โหมดมือถือ (html.hc-m) — เปิดอัตโนมัติเมื่อจอกว้าง ≤ 767px หรืออุปกรณ์สัมผัสจอ ≤ 950px
   ตั้งค่าคลาสโดยสคริปต์ใน layouts/partials/head.blade.php

   แนวทางหน้าตา: เมนูล่างแบบแคปซูลลอยพร้อมปุ่มกลาง · แถบหัวเรื่องเล็กพร้อมปุ่มย้อนกลับ ·
   การ์ดมุมโค้ง · ปุ่ม/ช่องกรอกขนาดนิ้วแตะ (≥ 44px, ตัวอักษร 16px กัน iOS ซูม) ·
   ตารางแปลงเป็นการ์ด · หน้าต่างป๊อปอัปเป็นแผ่นเลื่อนขึ้นจากล่าง
   สี ฟอนต์ และโทนทั้งหมดใช้ของ StrikingDash/ระบบเดิม ไม่เปลี่ยน
   =========================================================================== */

:root { --m-p: #5f63f2; --m-p-dark: #4a4ee0; --m-ink: #272b41; --m-mute: #9299b8; --m-line: #e3e6ef; --m-bg: #f4f5f7; }

/* ชิ้นส่วนของโหมดมือถือ ซ่อนไว้บนจอใหญ่ */
.hc-m-back, .hc-m-title, .hc-m-bell, .hc-m-nav, .hc-m-sheet, .hc-m-filter-toggle { display: none; }

html.hc-m body { background: var(--m-bg); -webkit-tap-highlight-color: rgba(95, 99, 242, .12); overflow-x: hidden; }
html.hc-m { -webkit-text-size-adjust: 100%; }
html.hc-m a, html.hc-m button, html.hc-m label { touch-action: manipulation; }

/* ---------- แถบหัวเรื่อง ---------- */
html.hc-m .header-top { height: calc(56px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); box-shadow: 0 1px 0 var(--m-line), 0 4px 14px rgba(146, 153, 184, .12); }
html.hc-m .header-top .navbar { padding: 0 6px 0 4px; height: 56px; flex-wrap: nowrap; }
html.hc-m .navbar-left { flex: 1; min-width: 0; margin: 0; }
html.hc-m .navbar-left .sidebar-toggle,
html.hc-m .navbar-left .navbar-brand,
html.hc-m .navbar-right__menu,
html.hc-m .navbar-right__mobileAction,
html.hc-m .mobile-author-actions,
html.hc-m .mobile-search { display: none !important; }
html.hc-m .navbar-right { flex: none; margin: 0; }
html.hc-m .hc-m-back { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--m-ink); flex: none; }
html.hc-m .hc-m-back:active { background: rgba(95, 99, 242, .1); }
html.hc-m .hc-m-back svg { width: 24px; height: 24px; }
html.hc-m .hc-m-title { display: block; flex: 1; min-width: 0; padding-left: 12px; }
html.hc-m .hc-m-back + .hc-m-title { padding-left: 0; }
html.hc-m .hc-m-title__t { display: block; font-size: 18px; font-weight: 600; color: var(--m-ink); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.hc-m .hc-m-bell { display: grid; place-items: center; position: relative; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; color: var(--m-ink); padding: 0; }
html.hc-m .hc-m-bell:active { background: rgba(95, 99, 242, .1); }
html.hc-m .hc-m-bell svg { width: 22px; height: 22px; }
html.hc-m .hc-m-bell__n { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff4d4f; color: #fff; font: 600 11px/18px 'Inter', sans-serif; text-align: center; font-style: normal; }

/* ---------- เนื้อหา ---------- */
html.hc-m .sidebar-wrapper, html.hc-m .overlay-dark-sidebar, html.hc-m .footer-wrapper { display: none !important; }
html.hc-m .contents, html.hc-m .contents.expanded { padding: calc(56px + env(safe-area-inset-top, 0px) + 12px) 12px calc(104px + env(safe-area-inset-bottom, 0px)); }
html.hc-m .container-fluid { padding-left: 0; padding-right: 0; }
html.hc-m .row { margin-left: -6px; margin-right: -6px; }
html.hc-m .row > [class*="col-"] { padding-left: 6px; padding-right: 6px; }
html.hc-m .breadcrumb-main { display: block; margin: 0 0 12px; padding: 0; min-height: 0; }
html.hc-m .breadcrumb-main .breadcrumb-title { display: none; }
html.hc-m .breadcrumb-main .breadcrumb-action { display: flex !important; flex-wrap: nowrap; justify-content: flex-start !important; gap: 8px; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
html.hc-m .breadcrumb-main .breadcrumb-action::-webkit-scrollbar { display: none; }
html.hc-m .breadcrumb-main .breadcrumb-action:empty { display: none !important; }
html.hc-m .breadcrumb-main .breadcrumb-action > *, html.hc-m .breadcrumb-main .breadcrumb-action .btn { flex: none; white-space: nowrap; margin: 0; }
html.hc-m .mb-30 { margin-bottom: 14px !important; }
html.hc-m .mb-25 { margin-bottom: 12px !important; }
html.hc-m .mt-30 { margin-top: 14px !important; }
html.hc-m .p-30 { padding: 16px !important; }

/* การ์ด */
html.hc-m .card { border: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(39, 43, 65, .05), 0 6px 18px rgba(146, 153, 184, .12); }
html.hc-m .card-header { padding: 14px 16px; min-height: 0; flex-wrap: wrap; gap: 8px; }
html.hc-m .card-header h6, html.hc-m .card-header h4 { font-size: 16px; margin: 0; }
html.hc-m .card-body { padding: 14px 16px; }
html.hc-m .card-extra { min-width: 0 !important; width: 100%; margin: 0 !important; }
html.hc-m .card-footer { padding: 12px 16px; }
html.hc-m h1 { font-size: 24px; } html.hc-m h2 { font-size: 21px; } html.hc-m h3 { font-size: 19px; }
html.hc-m .alert { border-radius: 14px; font-size: 14px; }
html.hc-m .hc-note { border-radius: 14px; }

/* ปุ่มและช่องกรอก — ขนาดนิ้วแตะ */
html.hc-m .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 15px; padding: 0 18px; }
html.hc-m .btn-sm, html.hc-m .btn-xs { min-height: 38px; font-size: 14px; padding: 0 14px; }
html.hc-m .btn-squared { border-radius: 12px; }
html.hc-m .btn-block { width: 100%; }
html.hc-m .form-control, html.hc-m select.form-control, html.hc-m .form-control-sm, html.hc-m .custom-select { height: 48px; min-height: 48px; font-size: 16px; border-radius: 12px; padding: 0 14px; }
html.hc-m textarea.form-control { height: auto; min-height: 96px; padding: 12px 14px; }
html.hc-m .form-group { margin-bottom: 14px; }
html.hc-m .form-group label, html.hc-m label { font-size: 14px; }
html.hc-m .select2-container { width: 100% !important; }
html.hc-m .select2-container--default .select2-selection--single { height: 48px; border-radius: 12px; }
html.hc-m .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 46px; font-size: 16px; }
html.hc-m .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
html.hc-m .custom-checkbox, html.hc-m .custom-radio { width: 100%; margin: 0 0 6px !important; }
html.hc-m .checkbox-theme-default.custom-checkbox label { min-height: 44px; display: flex; align-items: center; padding-top: 6px; padding-bottom: 6px; }
html.hc-m .input-group > .form-control { height: 48px; }
html.hc-m .pagination { justify-content: center; flex-wrap: wrap; gap: 4px; }
html.hc-m .page-link { min-width: 40px; min-height: 40px; display: grid; place-items: center; border-radius: 10px !important; }
html.hc-m .badge { font-size: 12px; }

html.hc-m pre, html.hc-m code { white-space: pre-wrap; word-break: break-all; }
html.hc-m pre { max-width: 100%; overflow-x: auto; }
html.hc-m input[type="file"] { max-width: 100%; font-size: 14px; }
html.hc-m .p-25, html.hc-m .p-20 { padding: 16px !important; }
html.hc-m .ap-po-details { min-height: 0; }
html.hc-m .ap-po-details p, html.hc-m .ap-po-details h1 { margin-bottom: 4px; }
html.hc-m a[href*="forgot"], html.hc-m .signUp-admin-right a.forgot-pass { white-space: nowrap; }
html.hc-m .hc-m-hide { display: none !important; }

/* การ์ดรายข้อ / ภาพรวม / แผนที่ */
html.hc-m .hc-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
html.hc-m .hc-item { padding: 14px; border-radius: 16px; }
html.hc-m .hc-overview { gap: 14px; }
html.hc-m .hc-map { height: 340px; border-radius: 14px; }
html.hc-m .hc-chain { gap: 8px; }
html.hc-m canvas { max-width: 100%; }
html.hc-m .hc-flow { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
html.hc-m .hc-flow::-webkit-scrollbar { display: none; }
html.hc-m .hc-flow__step { flex: none; }

/* ตัวกรอง — พับเป็นปุ่มเดียว แตะเพื่อกางออก */
html.hc-m .hc-m-filter-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 16px; border: 0; background: transparent; text-align: left; color: var(--m-ink); font-size: 15px; font-weight: 500; }
html.hc-m .hc-m-filter-toggle small { display: block; font-size: 12px; font-weight: 400; color: var(--m-mute); line-height: 1.3; margin-top: 1px; }
html.hc-m .hc-m-filter-toggle > span:nth-child(2) { flex: 1; min-width: 0; }
html.hc-m .hc-m-filter-toggle small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.hc-m .hc-m-filter-toggle svg { width: 20px; height: 20px; color: var(--m-p); flex: none; }
html.hc-m .hc-m-filter-toggle .hc-m-chev { transition: transform .2s; color: var(--m-mute); }
html.hc-m [data-filterbar].hc-open .hc-m-chev { transform: rotate(180deg); }
html.hc-m [data-filterbar].is-collapsed .card-body { display: none; }
html.hc-m [data-filterbar] > .card-body { padding: 4px 16px 16px; }
html.hc-m .hc-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html.hc-m .hc-filterbar .form-group { margin-bottom: 0; min-width: 0; }
html.hc-m .hc-filterbar [data-level-wrap="5"], html.hc-m .hc-filterbar .form-group:last-child { grid-column: 1 / -1; }
html.hc-m .hc-filterbar [data-level-wrap].is-locked { display: none; }
/* ตัวโหลดหน้าของธีม (แผ่นขาวโปร่ง) ค้างจนกว่าทรัพยากรทุกอย่างโหลดเสร็จ — บนมือถือไม่ใช้ และไม่ให้บังการแตะ */
html.hc-m #overlayer, html.hc-m body:after { display: none !important; }
html.hc-m .hc-filterbar .form-control { height: 44px; min-height: 44px; padding: 0 10px; text-overflow: ellipsis; }
html.hc-m [data-filterbar].hc-open .card-body { max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ตาราง → การ์ดซ้อน (ตารางไม่เกิน 6 คอลัมน์) หรือเลื่อนแนวนอน (ตารางกว้าง) — ใส่คลาสโดย mobile.js */
html.hc-m .hc-m-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
html.hc-m .table-responsive { border: 0; }
html.hc-m table.hc-stack-tbl, html.hc-m table.hc-stack-tbl tbody, html.hc-m table.hc-stack-tbl tr, html.hc-m table.hc-stack-tbl td { display: block; width: 100%; }
html.hc-m table.hc-stack-tbl { border: 0; background: transparent; }
html.hc-m table.hc-stack-tbl thead { display: none; }
html.hc-m table.hc-stack-tbl tbody tr { background: #fff; border: 1px solid var(--m-line); border-radius: 14px; padding: 4px 14px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(39, 43, 65, .04); }
html.hc-m table.hc-stack-tbl td { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 9px 0 !important; border: 0 !important; border-bottom: 1px dashed var(--m-line) !important; text-align: right; font-size: 14px; word-break: break-word; }
html.hc-m table.hc-stack-tbl td:last-child { border-bottom: 0 !important; }
html.hc-m table.hc-stack-tbl td::before { content: attr(data-label); flex: none; max-width: 42%; text-align: left; color: var(--m-mute); font-size: 13px; font-weight: 500; }
html.hc-m table.hc-stack-tbl td[data-label=""]::before, html.hc-m table.hc-stack-tbl td:not([data-label])::before { display: none; }
html.hc-m table.hc-stack-tbl td[data-label=""], html.hc-m table.hc-stack-tbl td:not([data-label]) { justify-content: flex-end; }
html.hc-m table.hc-stack-tbl td > .btn, html.hc-m table.hc-stack-tbl td form { margin: 0; }
html.hc-m table.hc-stack-tbl td .btn-group, html.hc-m table.hc-stack-tbl td .d-flex { justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
html.hc-m table.hc-stack-tbl td.text-center, html.hc-m table.hc-stack-tbl td[colspan] { display: block; text-align: center; }
html.hc-m table.hc-stack-tbl td[colspan]::before { display: none; }

/* หน้าต่างป๊อปอัป → แผ่นเลื่อนขึ้นจากล่าง */
html.hc-m .modal-dialog { margin: 0; position: fixed; left: 0; right: 0; bottom: 0; max-width: none; width: 100%; }
html.hc-m .modal.fade .modal-dialog { transform: translateY(100%); transition: transform .25s ease-out; }
html.hc-m .modal.show .modal-dialog { transform: none; }
html.hc-m .modal-content { border: 0; border-radius: 22px 22px 0 0; max-height: 88vh; display: flex; }
html.hc-m .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

/* ---------- เมนูล่าง (แคปซูลลอย + ปุ่มกลาง) ---------- */
html.hc-m .hc-m-nav { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9980; padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px)); pointer-events: none; max-width: 560px; margin: 0 auto; }
html.hc-m .hc-m-nav::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: -22px; z-index: -1; background: linear-gradient(to bottom, rgba(244, 245, 247, 0), var(--m-bg) 58%); pointer-events: none; }
html.hc-m .hc-m-nav > * { pointer-events: auto; }
html.hc-m .hc-m-nav__bar { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 999px; background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(227, 230, 239, .9); box-shadow: 0 10px 30px rgba(39, 43, 65, .14), 0 2px 6px rgba(39, 43, 65, .06); }
html.hc-m .hc-m-nav__item, html.hc-m .hc-m-nav__gap { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 62px; padding: 9px 2px 0; color: var(--m-mute); background: transparent; border: 0; font-family: inherit; text-decoration: none; }
html.hc-m .hc-m-nav__item svg { width: 23px; height: 23px; stroke-width: 1.8; }
html.hc-m .hc-m-nav__item i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
html.hc-m .hc-m-nav__item b, html.hc-m .hc-m-nav__gap b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 500; line-height: 1.3; }
html.hc-m .hc-m-nav__item.is-active { color: var(--m-p); }
html.hc-m .hc-m-nav__item.is-active i { background: var(--m-p); }
html.hc-m .hc-m-nav__item.is-active b { font-weight: 600; }
html.hc-m .hc-m-nav__item em { position: absolute; top: 4px; left: 50%; margin-left: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #fa8b0c; color: #fff; font: 600 10px/17px 'Inter', sans-serif; text-align: center; font-style: normal; }
html.hc-m .hc-m-nav__gap { justify-content: flex-end; padding-bottom: 9px; }
html.hc-m .hc-m-nav__fab { position: absolute; left: 50%; top: 0; transform: translate(-50%, -30%); display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--m-p), var(--m-p-dark)); box-shadow: 0 10px 22px rgba(95, 99, 242, .42); transition: transform .15s, box-shadow .15s; }
html.hc-m .hc-m-nav__fab svg { width: 26px; height: 26px; stroke-width: 1.9; }
html.hc-m .hc-m-nav__fab:active { transform: translate(-50%, -30%) scale(.94); }
html.hc-m .hc-m-nav__fab.is-active { box-shadow: 0 0 0 4px rgba(95, 99, 242, .22), 0 10px 22px rgba(95, 99, 242, .42); }

/* ---------- แผ่นเมนู / แจ้งเตือน ---------- */
html.hc-m .hc-m-sheet { position: fixed; inset: 0; z-index: 10000; }
html.hc-m .hc-m-sheet[hidden] { display: none; }
html.hc-m .hc-m-sheet:not([hidden]) { display: block; }
html.hc-m .hc-m-sheet__bg { position: absolute; inset: 0; background: rgba(39, 43, 65, .45); animation: hcmFade .2s ease-out; }
html.hc-m .hc-m-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(39, 43, 65, .2); animation: hcmUp .26s cubic-bezier(.2, .8, .2, 1); max-width: 560px; margin: 0 auto; }
html.hc-m .hc-m-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--m-line); margin: 4px auto 12px; }
html.hc-m .hc-m-sheet__h { margin: 14px 0 8px; font-size: 13px; font-weight: 600; color: var(--m-mute); letter-spacing: .02em; }
html.hc-m .hc-m-sheet__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html.hc-m .hc-m-sheet__grid a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border: 1px solid var(--m-line); border-radius: 14px; color: var(--m-ink); background: #fff; text-decoration: none; }
html.hc-m .hc-m-sheet__grid a:active { background: rgba(95, 99, 242, .08); }
html.hc-m .hc-m-sheet__grid a.is-active { border-color: var(--m-p); background: rgba(95, 99, 242, .08); color: var(--m-p); }
html.hc-m .hc-m-sheet__grid svg { width: 20px; height: 20px; flex: none; color: var(--m-p); }
html.hc-m .hc-m-sheet__grid b { font-size: 14px; font-weight: 500; line-height: 1.3; }
html.hc-m .hc-m-sheet__grid em { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #fa8b0c; color: #fff; font: 600 11px/20px 'Inter', sans-serif; text-align: center; font-style: normal; }
html.hc-m .hc-m-me { display: flex; align-items: center; gap: 12px; padding: 6px 2px 4px; }
html.hc-m .hc-m-me b { display: block; font-size: 16px; color: var(--m-ink); }
html.hc-m .hc-m-me small { display: block; font-size: 13px; color: var(--m-mute); line-height: 1.4; }
html.hc-m .hc-m-note { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--m-line); color: var(--m-ink); text-decoration: none; }
html.hc-m .hc-m-note svg { width: 20px; height: 20px; flex: none; color: var(--m-p); margin-top: 2px; }
html.hc-m .hc-m-note b { display: block; font-size: 14px; }
html.hc-m .hc-m-note small { display: block; font-size: 13px; color: var(--m-mute); }
html.body-lock, html.hc-m body.hc-m-lock { overflow: hidden; }
@keyframes hcmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hcmUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- แบบประเมิน (หน้าหลักของผู้เก็บข้อมูล) ---------- */
html.hc-m .hc-likert, html.hc-m .hc-likert:has(> label:nth-child(2):last-child) { gap: 8px; }
html.hc-m .hc-likert { grid-template-columns: minmax(0, 1fr); }
html.hc-m .hc-likert:has(> label:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.hc-m .hc-likert label { display: flex; align-items: center; justify-content: flex-start; min-height: 50px; padding: 10px 14px; border-radius: 12px; font-size: 15px; text-align: left; line-height: 1.35; }
html.hc-m .hc-likert:has(> label:nth-child(2):last-child) label { justify-content: center; text-align: center; }
html.hc-m .hc-likert label:active { background: rgba(95, 99, 242, .08); }
html.hc-m .hc-question { border-radius: 14px; padding: 14px; margin-bottom: 12px; }
html.hc-m .hc-question p { font-size: 15px; line-height: 1.5; }
html.hc-m .hc-person { padding: 14px; border-radius: 14px; margin-bottom: 8px; min-height: 64px; }
html.hc-m .atbd-steps-wrap, html.hc-m .atbd-steps { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
html.hc-m .atbd-steps ul.nav { flex-wrap: nowrap; }
html.hc-m .atbd-steps__item { flex: none; }
html.hc-m .atbd-steps-wrap::-webkit-scrollbar, html.hc-m .atbd-steps::-webkit-scrollbar { display: none; }
/* ระหว่างทำแบบประเมินให้เหลือเฉพาะแถบปุ่ม ก่อนหน้า/ถัดไป ติดล่างจอ */
html.hc-m body[data-page="collector-assess"] .hc-m-nav { display: none; }
html.hc-m body[data-page="collector-assess"] .contents { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
html.hc-m body[data-page="collector-assess"] #assess-form .card-body > .d-flex.justify-content-between.mt-4 {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9985; margin: 0 !important; gap: 10px; background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--m-line);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 20px rgba(39, 43, 65, .08);
}
html.hc-m body[data-page="collector-assess"] #assess-form .card-body > .d-flex.justify-content-between.mt-4 > div { flex: 1; display: flex; }
html.hc-m body[data-page="collector-assess"] #assess-form .card-body > .d-flex.justify-content-between.mt-4 .btn { flex: 1; min-height: 50px; font-size: 16px; }
html.hc-m body[data-page="collector-assess"] #assess-form .card-body > .d-flex.justify-content-between.mt-4 > .btn { flex: 0 0 38%; }

/* ---------- หน้าเข้าสู่ระบบ / ลงทะเบียน ---------- */
html.hc-m .signUP-admin { min-height: 100vh; background: var(--m-bg); }
html.hc-m .signUP-admin .container-fluid { padding: 0; }
html.hc-m .signUP-admin .row { margin: 0; }
html.hc-m .signUP-admin .row > [class*="col-"] { padding: 0; }
html.hc-m .signUP-admin-left { min-height: 0 !important; height: auto !important; padding: calc(28px + env(safe-area-inset-top, 0px)) 24px 44px !important; border-radius: 0 0 28px 28px; }
html.hc-m .signUP-admin-left__img, html.hc-m .signUP-overlay { display: none !important; }
html.hc-m .signUP-admin-left__content { padding: 0 !important; margin: 0 !important; }
html.hc-m .signUP-admin-left__content h1 { font-size: 22px !important; line-height: 1.4; margin: 0; }
html.hc-m .signUp-admin-right { padding: 0 12px 24px !important; margin-top: -24px; position: relative; }
html.hc-m .signUp-topbar { margin: 0 !important; padding: 14px 4px 10px; justify-content: center !important; text-align: center; font-size: 14px; }
html.hc-m .signUp-admin-right .edit-profile { margin-top: 0 !important; }
html.hc-m .signUp-admin-right .card-header { padding: 18px 16px 4px !important; }
html.hc-m .signUp-admin-right .card-body { padding: 8px 16px 20px; }
html.hc-m .signUp-admin-right .btn[type="submit"] { width: 100%; min-height: 50px; font-size: 16px; }

/* ---------- พิมพ์ ---------- */
@media print { .hc-m-nav, .hc-m-sheet, .hc-m-back, .hc-m-bell { display: none !important; } }

html.hc-m .contents a, html.hc-m .text-break { overflow-wrap: anywhere; word-break: break-word; }

/* ตัวนำทางส่วนของแบบประเมิน: แถวเดียวเลื่อนแนวนอน (ไม่กินความสูงจอ) */
html.hc-m .atbd-steps ul.nav { flex-direction: row !important; align-items: center; }
html.hc-m .atbd-steps__item { margin: 0 14px 0 0 !important; width: auto !important; }
html.hc-m .atbd-steps__line { display: none !important; }
html.hc-m .atbd-steps__content { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
html.hc-m .atbd-steps__text { font-size: 14px; }


/* ===========================================================================
   ฝั่งผู้เก็บข้อมูล (หน้าตาตามต้นแบบ ต้นแบบระบบเก็บข้อมูลสุขภาวะ v22) — ใช้โทนสีและฟอนต์ของ StrikingDash เดิม
   ใช้ได้ทั้งมือถือและจอใหญ่ (คลาสขึ้นต้นด้วย cm-)
   =========================================================================== */
.cm-home, .cm-people, .cm-wiz, .cm-pre, .cm-review { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cm-tiny { font-size: 12px; color: var(--m-mute); }
.cm-small { font-size: 14px; }
.cm-mute { color: var(--m-mute); }
.cm-big { font-size: 26px; line-height: 1.1; }
.cm-h3 { font-size: 17px; font-weight: 600; color: var(--m-ink); display: block; }
.cm-sub { margin: 0; font-size: 14px; color: var(--m-mute); }
.cm-eyebrow { font-size: 13px; font-weight: 600; color: var(--m-p); letter-spacing: .02em; }
.cm-stack { display: flex; flex-direction: column; gap: 4px; }
.cm-row { display: flex; align-items: center; gap: 12px; }
.cm-between { justify-content: space-between; }
.cm-ok { color: #20c997 !important; } .cm-warn { color: #fa8b0c !important; }
.cm-err { color: #ff4d4f; font-size: 13px; margin-top: 4px; }
.req { color: #ff4d4f; font-style: normal; }

/* ป้าย/ชิป */
.cm-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1f2f6; color: #5a5f7d; white-space: nowrap; }
.cm-pill.ok, .cm-pill.success { background: rgba(32, 201, 151, .14); color: #12936f; }
.cm-pill.warn, .cm-pill.warning { background: rgba(250, 139, 12, .14); color: #b8620a; }
.cm-pill.danger { background: rgba(255, 77, 79, .12); color: #d4393b; }
.cm-pill.info, .cm-pill.primary { background: rgba(95, 99, 242, .12); color: #4a4ee0; }
.cm-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* วงกลมไอคอนกลุ่มวัย */
.cm-av { position: relative; display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.cm-av svg { width: 24px; height: 24px; stroke-width: 1.9; }
.cm-av--lg { width: 62px; height: 62px; } .cm-av--lg svg { width: 32px; height: 32px; }
.cm-av--sm { width: 34px; height: 34px; } .cm-av--sm svg { width: 19px; height: 19px; }
.cm-av--g1 { background: linear-gradient(140deg, #ff9a7a, #ff6a4d); }
.cm-av--g2 { background: linear-gradient(140deg, #ffd45c, #ffa51f); }
.cm-av--g3 { background: linear-gradient(140deg, #6fb0ff, #3d7ff0); }
.cm-av--g4 { background: linear-gradient(140deg, #4fd8a4, #17a673); }
.cm-av--g5 { background: linear-gradient(140deg, #b093fb, #7c5ce6); }
.cm-av__b { position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid #fff; color: #fff; }
.cm-av__b svg { width: 10px; height: 10px; stroke-width: 3; }
.cm-av__b.ok { background: #20c997; } .cm-av__b.idle { background: #9aa0bd; }

/* หน้าแรก */
.cm-hello { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 16px; border-radius: 18px; border: 1px solid var(--m-line); background: radial-gradient(120% 140% at 100% 0%, #e7e8ff 0%, #f5f5ff 45%, #fff 100%); box-shadow: 0 6px 18px rgba(146, 153, 184, .12); }
.cm-hello__txt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.cm-hello h2 { font-size: 21px; margin: 0; color: var(--m-ink); }
.cm-hello p { margin: 0; font-size: 14px; color: #5a5f7d; }
.cm-gauge { flex: none; }
.cm-tile { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--m-line); color: var(--m-ink); box-shadow: 0 6px 18px rgba(146, 153, 184, .12); text-decoration: none; min-width: 0; }
.cm-tile:hover { color: var(--m-ink); border-color: var(--m-p); }
.cm-tile b { font-size: 16px; font-weight: 600; } .cm-tile small { font-size: 13px; color: #5a5f7d; line-height: 1.45; } .cm-tile small b { font-size: inherit; color: var(--m-p); }
.cm-tile__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: rgba(95, 99, 242, .12); color: var(--m-p); }
.cm-tile__ic svg { width: 23px; height: 23px; }
.cm-tile__ic.cm-blue { background: rgba(44, 153, 255, .14); color: #1f7fdc; } .cm-tile__ic.cm-violet { background: rgba(95, 99, 242, .12); color: #5f63f2; }
.cm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cm-tile--main { flex-direction: row; align-items: center; gap: 14px; padding: 18px 16px; color: #fff; border: 0; background: linear-gradient(120deg, #4a4ee0 0%, #5f63f2 55%, #7d80f8 100%); box-shadow: 0 12px 24px -10px rgba(95, 99, 242, .6); position: relative; overflow: hidden; }
.cm-tile--main:hover { color: #fff; }
.cm-tile--main::after { content: ""; position: absolute; right: -30px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .1); pointer-events: none; }
.cm-tile--main .cm-tile__ic { background: rgba(255, 255, 255, .2); color: #fff; width: 50px; height: 50px; }
.cm-tile--main .cm-tile__tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-tile--main b { font-size: 18px; } .cm-tile--main small { color: rgba(255, 255, 255, .9); }
.cm-tile__go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #4a4ee0; flex: none; z-index: 1; }
.cm-sec { display: flex; flex-direction: column; gap: 8px; }
.cm-list { display: flex; flex-direction: column; gap: 10px; }
.cm-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--m-line); border-radius: 16px; padding: 12px 14px; color: var(--m-ink); text-decoration: none; min-width: 0; }
a.cm-item:hover { border-color: var(--m-p); color: var(--m-ink); }
.cm-item__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.cm-item__main:hover { color: inherit; }
.cm-item__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cm-item__tx b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-item__tx small { font-size: 12.5px; color: var(--m-mute); }
.cm-item__edit { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--m-mute); flex: none; }
.cm-item__edit:hover { background: #f4f5f7; color: var(--m-p); }
.cm-chev { width: 20px; height: 20px; color: var(--m-mute); flex: none; }
.cm-meter { display: block; height: 7px; border-radius: 7px; background: #eceef7; overflow: hidden; }
.cm-meter i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, #ffbe6b, #fa8b0c); }
.cm-meter i.full { background: linear-gradient(90deg, #5f63f2, #8d90f7); }
.cm-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cm-strip__cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px; background: #fff; border: 1px solid var(--m-line); border-radius: 16px; color: var(--m-ink); text-decoration: none; min-width: 0; }
.cm-strip__cell:hover { border-color: var(--m-p); color: var(--m-ink); }
.cm-strip__cell b { font-size: 18px; font-weight: 600; margin-top: 2px; } .cm-strip__cell span:last-child { font-size: 11.5px; color: #5a5f7d; white-space: nowrap; }
.cm-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; background: #eef6ff; color: var(--m-ink); }
.cm-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.cm-note--info { background: rgba(95, 99, 242, .08); } .cm-note--info svg { color: #5f63f2; }
.cm-note--warn { background: rgba(250, 139, 12, .12); } .cm-note--warn svg { color: #b8620a; }
.cm-note--bad { background: rgba(255, 77, 79, .1); } .cm-note--bad svg { color: #d4393b; }
.cm-note--ok { background: rgba(32, 201, 151, .12); } .cm-note--ok svg { color: #12936f; }
.cm-note[hidden], .cm-field[hidden], .cm-step[hidden], .cm-review[hidden], input[hidden] { display: none !important; }

/* ทะเบียนประชากร */
.cm-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cm-kpis > div { background: #fff; border: 1px solid var(--m-line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.cm-kpis b { font-size: 24px; font-weight: 600; line-height: 1.2; } .cm-kpis small { font-size: 11.5px; color: var(--m-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-search { position: relative; } .cm-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--m-mute); pointer-events: none; }
.cm-search .form-control { padding-left: 44px; }
.cm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-field label, .cm-lbl { font-size: 14px; font-weight: 600; color: var(--m-ink); margin: 0; display: flex; align-items: center; gap: 6px; }
.cm-field label svg { width: 17px; height: 17px; color: var(--m-p); }
.cm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cm-chip { border: 1.5px solid var(--m-line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13.5px; font-weight: 500; color: #5a5f7d; white-space: nowrap; }
.cm-chip.on { background: var(--m-ink); border-color: var(--m-ink); color: #fff; }
.cm-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cm-group__h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 2px solid rgba(95, 99, 242, .18); padding-bottom: 6px; }
.cm-group__h b { font-size: 16px; color: #4a4ee0; font-weight: 600; }
.cm-empty { border: 1.5px dashed var(--m-line); border-radius: 14px; padding: 18px; text-align: center; color: #5a5f7d; background: #fafbfd; }
.cm-fab { position: fixed; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 9970; display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-radius: 18px; background: #fa8b0c; color: #fff; font-weight: 600; box-shadow: 0 10px 22px rgba(250, 139, 12, .4); text-decoration: none; }
.cm-fab:hover { color: #fff; } .cm-fab svg { width: 21px; height: 21px; }

/* ตัวช่วยฟอร์ม (ขั้นตอนเพิ่มรายชื่อ / ยืนยันก่อนประเมิน) */
.cm-steps { display: flex; gap: 6px; } .cm-steps i { flex: 1; height: 5px; border-radius: 5px; background: #e3e6ef; } .cm-steps i.on { background: var(--m-p); } .cm-steps i.done { background: var(--m-p); opacity: .45; }
.cm-step { display: flex; flex-direction: column; gap: 14px; }
.cm-sechead { display: flex; flex-direction: column; gap: 4px; } .cm-sechead h2 { font-size: 20px; margin: 0; color: var(--m-ink); } .cm-sechead p { margin: 0; }
.cm-card { background: #fff; border: 1px solid var(--m-line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 4px 14px rgba(146, 153, 184, .1); }
.cm-card--accent { border-color: var(--m-p); }
.cm-card--miss { border-color: #ff4d4f; box-shadow: 0 0 0 2px rgba(255, 77, 79, .15); }
.cm-card p { margin: 0; }
.cm-opts { display: flex; flex-direction: column; gap: 8px; } .cm-opts--row { flex-direction: row; flex-wrap: wrap; } .cm-opts--row .cm-opt { flex: 1 1 160px; }
.cm-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--m-line); border-radius: 14px; background: #fff; cursor: pointer; margin: 0; font-weight: 400; }
.cm-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cm-opt .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #9aa0bd; flex: none; display: grid; place-items: center; background: #fff; }
.cm-opt:has(input:checked) { border-color: var(--m-p); background: var(--m-p); color: #fff; }
.cm-opt:has(input:checked) .dot { border-color: #fff; background: #fff; } .cm-opt:has(input:checked) .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--m-p); }
.cm-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-chipopt { position: relative; margin: 0; } .cm-chipopt input { position: absolute; opacity: 0; pointer-events: none; }
.cm-chipopt span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 15px; border: 1.5px solid var(--m-line); border-radius: 999px; background: #fff; font-size: 14.5px; font-weight: 500; color: var(--m-ink); }
.cm-chipopt input:checked + span { background: var(--m-p); border-color: var(--m-p); color: #fff; font-weight: 600; }
.cm-chipopt input:focus-visible + span { outline: 3px solid #fa8b0c; outline-offset: 2px; }
.cm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cm-preview { font-size: 15px; min-height: 1.2em; } .cm-preview b { color: #4a4ee0; font-weight: 600; }
.cm-bmi { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: #f8f9fb; border: 1px dashed var(--m-line); }
.cm-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--m-line); border-radius: 14px; background: #fff; margin: 0; font-weight: 400; font-size: 14.5px; }
.cm-check input { width: 22px; height: 22px; accent-color: var(--m-p); flex: none; margin-top: 2px; }
.cm-bar { display: flex; gap: 10px; padding: 8px 0 0; }
.cm-bar .btn { flex: 1; min-height: 48px; }
.cm-bar--static { padding-top: 6px; }
.cm-secrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--m-line); } .cm-secrow:last-child { border-bottom: 0; }
.cm-secrow > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .cm-secrow small { color: var(--m-mute); font-size: 12px; }
.cm-kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--m-line); font-size: 14px; } .cm-kv:last-child { border-bottom: 0; } .cm-kv span { color: var(--m-mute); } .cm-kv b { font-weight: 500; text-align: right; }
.cm-domains { display: flex; flex-direction: column; text-align: left; max-width: 420px; margin: 0 auto 16px; }
.cm-dom { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--m-line); font-size: 14.5px; } .cm-dom:last-child { border-bottom: 0; }

/* แบบประเมิน: ส่วนที่ยังล็อก / ปุ่มรอตอบ */
.atbd-steps__item.lock { opacity: .4; }
#btn-next.is-pending { background: #e9ebf5; border-color: #e9ebf5; color: #5a5f7d; }

@media (max-width: 575px) { .cm-grid2 { grid-template-columns: minmax(0, 1fr); } .cm-grid2 .cm-field { } }
@media (min-width: 768px) { .cm-bar:not(.cm-bar--static) { justify-content: flex-end; } .cm-bar .btn { flex: 0 0 auto; min-width: 140px; } }

/* มือถือ: แถบปุ่มล่างติดขอบจอ และซ่อนเมนูล่างระหว่างกรอกข้อมูล */
html.hc-m .cm-home, html.hc-m .cm-people, html.hc-m .cm-wiz, html.hc-m .cm-pre, html.hc-m .cm-review { max-width: none; }
html.hc-m .cm-wiz .cm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9985; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--m-line); box-shadow: 0 -6px 20px rgba(39, 43, 65, .08); }
html.hc-m .cm-wiz { padding-bottom: 84px; }
html.hc-m body[data-page="collector-add"] .hc-m-nav { display: none; }
html.hc-m body[data-page="collector-add"] .contents { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
html.hc-m body[data-page="collector-assess"] .cm-review .cm-bar, html.hc-m body[data-page="collector-assess"] .cm-pre .cm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9985; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--m-line); box-shadow: 0 -6px 20px rgba(39, 43, 65, .08); margin: 0; }
html.hc-m body[data-page="collector-people"] .contents { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
html.hc-m .cm-fab { right: 14px; }
html.hc-m body[data-page="collector-home"] .breadcrumb-main, html.hc-m body[data-page="collector-people"] .breadcrumb-main { display: none; }
html.hc-m .cm-wiz .form-control, html.hc-m .cm-people .form-control { height: 48px; font-size: 16px; border-radius: 12px; }
html.hc-m .cm-wiz .hc-area .form-group { margin-bottom: 12px; }

/* แก้ไขหลังทดสอบบนมือถือ */
html.hc-m .cm-search .form-control { padding-left: 44px !important; }
html.hc-m body[data-page^="collector"] .hc-flow { display: none; }
html.hc-m body[data-page="collector-assess"] .col-xl-3 { display: none; }
html.hc-m body[data-page="collector-assess"] #assess-form > .card-header { flex-direction: column; align-items: stretch; }
@media (max-width: 575px) { .cm-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* สถิติผู้เก็บข้อมูล */
.cm-bars { display: flex; flex-direction: column; gap: 10px; }
.cm-brow { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 34px; gap: 10px; align-items: center; font-size: 14px; }
.cm-brow__l { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.cm-brow__t { height: 14px; border-radius: 7px; background: #eceef7; overflow: hidden; }
.cm-brow__t i { display: block; height: 100%; border-radius: 7px; }
.cm-brow b { text-align: right; font-weight: 600; }
.cm-legend { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 10px; overflow: hidden; }
.cm-legend span { padding: 7px 4px; font-size: 11.5px; font-weight: 600; text-align: center; color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, .45); line-height: 1.3; }
.cm-tbwrap { overflow-x: auto; }
.cm-tb { width: 100%; border-collapse: collapse; font-size: 14px; }
.cm-tb th, .cm-tb td { padding: 9px 6px; text-align: left; border-bottom: 1px solid var(--m-line); vertical-align: middle; }
.cm-tb th { font-size: 12px; font-weight: 600; color: var(--m-mute); }
.cm-tb .r { text-align: right; } .cm-tb .nw { white-space: nowrap; }
.cm-lv { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; line-height: 1.35; }
.cm-lv i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; flex: none; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, .4); }
.cm-dist { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: #eceef7; }
html.hc-m body[data-page="collector-stats"] .breadcrumb-main { display: none; }


/* แถบหัวเรื่องผู้เก็บข้อมูล (ตามต้นแบบ): โลโก้/ย้อนกลับ · ชื่อหน้า+ตำบล · สถานะเครือข่าย · ฟันเฟือง */
.hc-m-logo, .hc-m-net, .hc-m-gear, .hc-m-title__s { display: none; }
html.hc-m .hc-m-logo { display: grid; place-items: center; width: 44px; height: 44px; margin-left: 4px; flex: none; }
html.hc-m .hc-m-logo img { width: 100%; height: 100%; object-fit: contain; }
html.hc-m .hc-m-back { background: rgba(95, 99, 242, .12); color: var(--m-p); border-radius: 12px; width: 40px; height: 40px; margin: 0 6px 0 6px; }
html.hc-m .hc-m-logo + .hc-m-title { padding-left: 10px; }
html.hc-m .hc-m-title__s { display: block; font-size: 12.5px; color: var(--m-mute); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.hc-m .hc-m-net { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(32, 201, 151, .14); color: #12936f; font-size: 12.5px; font-weight: 600; flex: none; }
html.hc-m .hc-m-net i { width: 8px; height: 8px; border-radius: 50%; background: #20c997; box-shadow: 0 0 0 3px rgba(32, 201, 151, .22); }
html.hc-m .hc-m-net.off { background: rgba(250, 139, 12, .14); color: #b8620a; } html.hc-m .hc-m-net.off i { background: #fa8b0c; box-shadow: none; }
html.hc-m .hc-m-net b { background: #fa8b0c; color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; min-width: 18px; text-align: center; }
html.hc-m .hc-m-gear { display: grid; place-items: center; width: 40px; height: 40px; margin-left: 6px; border-radius: 12px; background: rgba(95, 99, 242, .12); color: var(--m-p); flex: none; }
html.hc-m .hc-m-gear svg { width: 21px; height: 21px; }

/* ตัวอักษรใหญ่ (ตั้งค่าที่หน้า "เกี่ยวกับ") */
html.hc-big body { zoom: 1.12; }

/* หน้าข้อมูลบุคคล / ผลหลังส่ง / แบบประเมิน (ต้นแบบ v22) */
.cm-h2 { font-size: 20px; font-weight: 600; color: var(--m-ink); line-height: 1.3; }
.cm-hr { border: 0; border-top: 1px solid var(--m-line); margin: 2px 0; }
.cm-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; font-weight: 600; color: #b8620a; background: rgba(250, 139, 12, .12); border-radius: 6px; padding: 1px 8px; }
.cm-link { border: 0; background: none; padding: 0; color: var(--m-p); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.cm-rules { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: #5a5f7d; }
.cm-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 8px 0 2px; }
.cm-done__ic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: rgba(32, 201, 151, .16); color: #12936f; animation: hcmPop .35s ease-out; }
.cm-done__ic svg { width: 40px; height: 40px; } .cm-done h2 { font-size: 21px; margin: 0; }
@keyframes hcmPop { from { transform: scale(.6); opacity: .2; } to { transform: none; opacity: 1; } }
.cm-overall { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 16px; background: #f8f9fb; }
.cm-score { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--m-line); }
.cm-score:last-of-type { border-bottom: 0; }
.cm-score__t { grid-column: 1 / -1; height: 8px; border-radius: 8px; background: #eceef7; overflow: hidden; } .cm-score__t i { display: block; height: 100%; border-radius: 8px; }
.cm-score__l { grid-column: 1 / -1; } .cm-score__sub { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 3px; padding-left: 12px; border-left: 2px solid var(--m-line); margin-top: 4px; }
.cm-json { border: 1px solid var(--m-line); border-radius: 12px; background: #fafbfd; } .cm-json summary { padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.cm-json pre { margin: 0; padding: 12px 14px; border-top: 1px solid var(--m-line); font-size: 11.5px; line-height: 1.5; overflow: auto; max-height: 320px; white-space: pre; }
.cm-pill.primary { background: rgba(95, 99, 242, .12); color: #4a4ee0; }

/* แบบประเมิน: หัวข้อส่วน เลขข้อ ตัวเลือก ป้ายยังไม่ได้ตอบ กล่อง MNA/หกล้ม */
.cm-sechead--row { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 12px; } .cm-sechead--row h6 { margin: 0; font-size: 17px; }
.cm-sb { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; flex: none; }
.cm-sb svg { width: 23px; height: 23px; }
.cm-sb--slate { background: #e3ebef; color: #3e5563; } .cm-sb--violet { background: #eee6ff; color: #6b3fd4; } .cm-sb--indigo { background: #e4e8ff; color: #3a4fc9; } .cm-sb--coral { background: #ffe7de; color: #e0522f; }
.cm-sb--green { background: #dbf5e7; color: #0e8a55; } .cm-sb--blue { background: #dfebff; color: #2366cf; } .cm-sb--amber { background: #ffefc7; color: #b26a00; } .cm-sb--orange { background: #ffe6d1; color: #d9650b; }
.cm-sb--teal { background: #d3f2ec; color: #00766a; } .cm-sb--red { background: #ffe1e2; color: #d0373d; }
.hc-qt { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: end; }
.hc-qt__n { font-weight: 600; color: var(--m-p); margin-right: 6px; }
.hc-qt__c { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; font-weight: 500; color: var(--m-mute); opacity: .8; white-space: nowrap; max-width: 6.5em; overflow: hidden; text-overflow: ellipsis; }
.hc-misspill { display: none; margin-bottom: 8px; } .hc-question.is-missing .hc-misspill { display: inline-flex; }
.hc-likert.has-ans label:not(.is-checked) { opacity: .45; background: #f8f9fb; }
.hc-likert.has-ans label:not(.is-checked):hover { opacity: .9; }
.hc-pts { margin-left: auto; padding-left: 10px; font-size: 12px; color: var(--m-mute); font-weight: 600; white-space: nowrap; }
.hc-likert label.is-checked .hc-pts { color: rgba(255, 255, 255, .9); }
.cm-mna { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #f8f9fb; border: 1px solid var(--m-line); flex-wrap: wrap; margin-top: 10px; }
.cm-check--bad { background: transparent; border-color: #ff4d4f; margin-top: 10px; }
.cm-saved { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--m-mute); margin-top: 6px; } .cm-saved svg { width: 14px; height: 14px; }
.cm-ring { width: 34px; height: 34px; flex: none; }
.cm-secrow .btn { flex: none; }

.cm-group__t { display: flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0; font-size: 17px; font-weight: 600; color: #4a4ee0; } .cm-group__t svg { width: 18px; height: 18px; }
.cm-av__b.info { background: #2c99ff; } .cm-av__b.warn { background: #fa8b0c; }

/* กันแถบข้อความยาวดันหน้าจอกว้างเกินจอ */
.cm-check { max-width: 100%; min-width: 0; } .cm-check span { min-width: 0; overflow-wrap: anywhere; }
.hc-question .alert { overflow-wrap: anywhere; }
html.hc-m .navbar-right { display: flex; align-items: center; gap: 0; flex: none; }
html.hc-m .header-top .navbar-left { min-width: 0; }
html.hc-m .header-top .navbar-right { flex-direction: row !important; flex-wrap: nowrap; align-items: center; }
html.hc-m .header-top .navbar-right > * { flex: none; }
.cm-kv span { flex: none; white-space: nowrap; }
.cm-kv b { min-width: 0; overflow-wrap: anywhere; }
