/* ============================================================
   t1-pro.css — มาตรฐานหน้าตาแบบมืออาชีพของ tracking1/frontend (ใช้ทั้งเลย์เอาต์หลัก main.php และเลย์เอาต์ dash.php)
   โหลดท้ายสุด (หลัง AdminLTE / pv2-skin / t1-shell หรือ css/dash/*) — คงธีม pv2 (paper + เขียว/ทอง) ชุดเดียวกับ backend
   - การเข้าถึง: ลิงก์ข้ามไปเนื้อหา, กรอบโฟกัสคีย์บอร์ด, ลดการเคลื่อนไหว
   - สองภาษา: ปุ่ม TH | EN บนส่วนหัว / หน้า login / ส่วนท้าย (components/Lang.php, css/lang.css)
   - ส่วนหัวหน้า, ตาราง, ตัวเลข, ส่วนท้าย, จอมือถือ, การพิมพ์
   ============================================================ */
:root {
  --t1p-green: #1F6D45; --t1p-green-deep: #123B27; --t1p-gold: #A97D2F; --t1p-ink: #17251C; --t1p-soft: #4B5B4F;
  --t1p-faint: #7C877D; --t1p-rule: #CFDACB; --t1p-rule-soft: #E3EAE0; --t1p-band: #EEF2EA; --t1p-paper: #F7F5EE; --t1p-card: #fff;
  --t1p-focus: #A97D2F;
}

/* ---------- การเข้าถึง ---------- */
.t1-skip { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: 10px 16px; background: var(--t1p-green-deep); color: #fff !important; font: 600 14px 'Sarabun', sans-serif; text-decoration: none; transition: top .15s; }
.t1-skip:focus { top: 10px; outline: 3px solid var(--t1p-focus); outline-offset: 2px; }
#t1-main:focus { outline: none; }
body.pv2-skin a:focus-visible, body.pv2-skin button:focus-visible, body.pv2-skin summary:focus-visible, body.pv2-skin [tabindex]:not([tabindex="-1"]):focus-visible,
body.pv2 a:focus-visible, body.pv2 button:focus-visible, body.pv2 summary:focus-visible {
  outline: 3px solid var(--t1p-focus) !important; outline-offset: 2px; box-shadow: none;
}
::selection { background: #D9E8DC; color: var(--t1p-ink); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- ตัวอักษร / ตัวเลข ---------- */
body.pv2-skin, body.pv2 { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.pv2-skin .table, body.pv2 .table, .pv2-bellpanel, .t1gv-card, .t1gv-list, .small-box h3, .info-box-number { font-variant-numeric: tabular-nums; }
/* โหมด EN: ตัวอักษรละตินอ่านง่ายขึ้นเล็กน้อย (Sarabun มีละตินอยู่แล้ว) */
html[data-lang="en"] body.pv2-skin, html[data-lang="en"] body.pv2 { letter-spacing: .005em; }

/* ---------- ปุ่มสลับภาษา TH | EN ---------- */
.gs-langsw { flex: none; height: 32px; align-items: stretch; }
.gs-langsw button { padding: 0 10px; min-width: 38px; }
.gs-langsw button:hover:not([aria-pressed="true"]) { background: var(--t1p-band); }
.t1-nav > .gs-langsw { margin-left: 4px; }
.pv2-navlinks > .gs-langsw { margin-left: 2px; }
@media (max-width: 980px) {
  .t1-nav > .gs-langsw, .pv2-navlinks > .gs-langsw { align-self: flex-start; margin: 10px 4px; }
}
/* หน้า login: ชื่อระบบบนแผงสีเขียว (เดิมรับสีหัวเรื่องเขียวเข้มจากธีม — มองไม่เห็น) ; ไม่แสดงหมายเหตุโหมด EN */
.pv2 .pv2-main .lg-brand .lg-brand-title, .lg-brand .lg-brand-title { color: #fff; }
#t1-main > .gs-datanote:has(+ .lg-page) { display: none; }

/* หมายเหตุโหมด EN (Lang::dataNote) — ในเนื้อหา */
#t1-main > .gs-datanote { margin: 0 0 16px; max-width: 980px; }

/* ---------- ส่วนหัวของหน้า (เลย์เอาต์หลัก AdminLTE) ---------- */
body.pv2-skin .content-wrapper > .content-header {
  position: relative; display: flex; flex-direction: column-reverse; gap: 6px; padding-top: 22px; padding-bottom: 14px;
}
body.pv2-skin .content-wrapper > .content-header > h1 {
  margin: 0; font-size: clamp(21px, 2.2vw, 28px); line-height: 1.3; color: var(--t1p-green-deep); letter-spacing: -.005em;
  padding-left: 14px; border-left: 4px solid var(--t1p-gold);
}
body.pv2-skin .content-wrapper > .content-header > h1:empty { display: none; }
body.pv2-skin .content-wrapper > .content-header > h1 small { font-size: 55%; color: var(--t1p-faint); }
body.pv2-skin .content-wrapper > .content-header > .breadcrumb {
  position: static; float: none; margin: 0; padding: 0; background: transparent; font: 12px/1.4 'IBM Plex Mono', monospace; color: var(--t1p-faint);
}
body.pv2-skin .content-wrapper > .content-header > .breadcrumb > li + li::before { content: '›'; padding: 0 7px; color: var(--t1p-rule); }
body.pv2-skin .content-wrapper > .content-header > .breadcrumb > li > a { color: var(--t1p-green); text-decoration: none; }
body.pv2-skin .content-wrapper > .content-header > .breadcrumb > li > a:hover { text-decoration: underline; }
body.pv2-skin .content-wrapper > .content { padding-top: 6px; padding-bottom: 36px; min-height: 60vh; }

/* ---------- แผง / การ์ด / ตาราง ---------- */
body.pv2-skin .panel, body.pv2-skin .card, body.pv2-skin .box, body.pv2-skin .kv-panel { box-shadow: 0 1px 2px rgba(23, 37, 28, .04), 0 4px 14px rgba(23, 37, 28, .04); }
body.pv2-skin .grid-view, body.pv2 .grid-view { max-width: 100%; }
/* ตารางกว้าง: เลื่อนในกรอบตาราง ไม่ทำให้ทั้งหน้าเลื่อนแนวนอน (ยกเว้นมุมมองการ์ด/รายการ) */
body.pv2-skin .grid-view:not(.t1gv-card):not(.t1gv-list), body.pv2 .grid-view:not(.t1gv-card):not(.t1gv-list) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.pv2-skin .table > tbody > tr > td, body.pv2 .table > tbody > tr > td { line-height: 1.5; }
body.pv2-skin .table > thead > tr > th a, body.pv2 .table > thead > tr > th a { color: inherit; }
body.pv2-skin .table > thead > tr > th a.asc::after, body.pv2-skin .table > thead > tr > th a.desc::after { opacity: .6; }
body.pv2-skin .summary, body.pv2 .summary { margin: 0 0 8px; }
body.pv2-skin .empty, body.pv2 .empty { display: block; padding: 22px 10px; text-align: center; color: var(--t1p-faint); font-style: italic; }
/* ปุ่มในตาราง (ดู/แก้ไข/ลบ) */
body.pv2-skin .grid-view td .glyphicon, body.pv2-skin .grid-view td .fa, body.pv2-skin .grid-view td .fas { color: var(--t1p-green); }
body.pv2-skin .grid-view td a:hover .glyphicon, body.pv2-skin .grid-view td a:hover .fa, body.pv2-skin .grid-view td a:hover .fas { color: var(--t1p-green-deep); }

/* ปุ่ม: ความสูงสม่ำเสมอ + ปุ่มอันตราย */
body.pv2-skin .btn:not(.btn-xs):not(.btn-sm):not(.btn-lg):not(.btn-link) { min-height: 34px; }
body.pv2-skin .btn-danger:not(.main-header .btn-danger) { background: #A33A2B; border-color: #A33A2B; color: #fff; }
body.pv2-skin .btn-danger:not(.main-header .btn-danger):hover { background: #862E22; border-color: #862E22; }
body.pv2-skin .btn-warning { background: #C98B1E; border-color: #C98B1E; color: #fff; }
body.pv2-skin .btn-info { background: #2B6F8A; border-color: #2B6F8A; color: #fff; }

/* ข้อความแจ้ง (flash / alert) */
body.pv2-skin .alert { border-radius: 0; border-width: 0 0 0 4px; box-shadow: 0 1px 2px rgba(23, 37, 28, .05); }
body.pv2-skin .alert-success { background: #E7F2EA; border-color: var(--t1p-green); color: var(--t1p-green-deep); }
body.pv2-skin .alert-danger, body.pv2-skin .alert-error { background: #FBEDEA; border-color: #A33A2B; color: #6E2219; }
body.pv2-skin .alert-warning { background: #FBF3E2; border-color: #C98B1E; color: #6A4A10; }
body.pv2-skin .alert-info { background: #E8F1F5; border-color: #2B6F8A; color: #1E4A5C; }

/* ---------- ส่วนท้าย (_t1_footer.php) ---------- */
.t1-footer { border-top: 1px solid var(--t1p-rule); background: var(--t1p-card); color: var(--t1p-soft); font: 400 13px/1.55 'Sarabun', sans-serif; margin-top: 8px; }
body.pv2-skin .t1-footer { position: relative; z-index: 810; }
@media (min-width: 768px) { body.pv2-skin:not(.sidebar-collapse) .t1-footer { margin-left: 230px; } }
.t1-footer-in { max-width: 1440px; margin: 0 auto; padding: 26px 28px 22px; display: grid; grid-template-columns: minmax(260px, 1.4fr) 1fr; gap: 18px 40px; align-items: start; }
.t1-footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.t1-footer-brand img { flex: none; }
.t1-footer-brand b { display: block; font: 700 15px/1.3 'Taviraj', serif; color: var(--t1p-green-deep); letter-spacing: .02em; margin-bottom: 2px; }
.t1-footer-brand span { display: block; font-size: 12.5px; color: var(--t1p-faint); }
.t1-footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; padding-top: 4px; }
.t1-footer-links a { color: var(--t1p-green-deep) !important; text-decoration: none; font-weight: 500; border-bottom: 1px solid transparent; }
.t1-footer-links a:hover { border-bottom-color: var(--t1p-gold); }
/* ไม่มีบล็อกแบรนด์ (หน้า login): ลิงก์ชิดซ้าย แถวเดียว */
.t1-footer--nobrand .t1-footer-in { grid-template-columns: 1fr; }
.t1-footer--nobrand .t1-footer-links { justify-content: flex-start; padding-top: 0; }
.t1-footer--nobrand .t1-footer-meta:first-child { border-top: 0; padding-top: 0; }
.t1-footer-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; padding-top: 14px; border-top: 1px solid var(--t1p-rule-soft); font-size: 12px; color: var(--t1p-faint); }
@media (max-width: 760px) {
  .t1-footer-in { grid-template-columns: 1fr; padding: 22px 16px 18px; }
  .t1-footer-links { justify-content: flex-start; }
}

/* ---------- แถบบน: จอมือถือ (gutter 16px, ไม่เลื่อนแนวนอน) ---------- */
html, body { overflow-x: clip; }
@media (max-width: 640px) {
  .t1-top { padding: 8px 12px; gap: 8px; }
  .t1-brand img + img { width: 88px; height: auto; }
  body.pv2-skin .content-wrapper > .content-header, body.pv2-skin .content-wrapper > .content { padding-left: 16px; padding-right: 16px; }
}

/* ---------- พิมพ์ ---------- */
@media print {
  .t1-top, .t1-footer, .t1-skip, .main-sidebar, .gs-langsw, nav.pv2-topnav, .pv2-searchpanel, .pv2-bellpanel, .dh-drawer, .gs-datanote, .t1gv-bar { display: none !important; }
  body.pv2-skin .content-wrapper, body.pv2-skin .wrapper, body.pv2 { background: #fff !important; margin: 0 !important; }
  body.pv2-skin .content-wrapper > .content-header > h1 { border-left: 0; padding-left: 0; }
  a[href^="http"]::after { content: ''; }
  .table { font-size: 11px !important; }
  thead { display: table-header-group; }
  tr, td, th { page-break-inside: avoid; }
}

/* ---------- หน้าแรก site/index (views/site/_dash/_home.php) ---------- */
.dash-home .dh-head { margin: 26px 0 18px; }
.dash-home .dh-eyebrow { font: 600 12.5px/1.4 'Sarabun', sans-serif; letter-spacing: .04em; color: var(--t1p-gold); text-transform: uppercase; }
.dash-home .dh-title { margin: 4px 0 6px; font: 700 clamp(26px, 3.2vw, 38px)/1.2 'Taviraj', serif; color: var(--t1p-green-deep); letter-spacing: -.005em; }
.dash-home .dh-sub { margin: 0; max-width: 860px; font-size: 15px; line-height: 1.6; color: var(--t1p-soft); }
.dash-home > .pv2-section, .dash-home > .dash-heatmap { scroll-margin-top: 130px; }
.d2569 .d-footnote { margin-top: 10px; font-size: 12.5px; }
/* ตัวเลขสถิติ: จัดแนวตรงกันทุกภาษา */
.d2569 .d-big, .d2569 .d-legend-num, .d2569 .s-num, .d2569 .dv-row-val, .d2569 .d-goal-pct { font-variant-numeric: tabular-nums; }
/* โหมด EN: ป้ายภาษาอังกฤษยาวกว่า — ให้ตัดบรรทัดได้ในแถบนำทางและหัวการ์ด */
html[data-lang="en"] .dh-nav a { letter-spacing: .01em; }
/* ช่องค้นหาของแต่ละหัวข้อ: เว้นที่ให้ไอคอน ⌕ (กฎ .pv2 input ของ staff-v2.css ทับ padding เดิม) */
.pv2 .dv-search { flex: 0 1 320px; }
.pv2 .dv-search input[type="search"] { padding-left: 34px !important; }

/* ---------- หน้ารายงานมาตรฐาน (views/site/_dash/_pagehead.php และหน้าที่ใช้) ---------- */
.t1-page { padding-bottom: 12px; }
.t1-ph { margin: 26px 0 8px; }
.t1-ph .dh-eyebrow { font: 600 12.5px/1.4 'Sarabun', sans-serif; letter-spacing: .04em; color: var(--t1p-gold); text-transform: uppercase; }
.t1-ph-title { margin: 4px 0 6px; font: 700 clamp(26px, 3.2vw, 38px)/1.2 'Taviraj', serif; color: var(--t1p-green-deep); letter-spacing: -.005em; }
.t1-ph-sub { margin: 0; max-width: 860px; font-size: 15px; line-height: 1.6; color: var(--t1p-soft); }
.t1-ph-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 18px 0 0; border: 1px solid var(--t1p-rule); background: #fff; width: fit-content; max-width: 100%; }
.t1-ph-stats > div { padding: 12px 22px; border-right: 1px solid var(--t1p-rule-soft); }
.t1-ph-stats > div:last-child { border-right: 0; }
.t1-ph-stats dt { font: 500 12px/1.3 'Sarabun', sans-serif; color: var(--t1p-faint); }
.t1-ph-stats dd { margin: 2px 0 0; font: 600 24px/1.1 'IBM Plex Mono', monospace; color: var(--t1p-green-deep); font-variant-numeric: tabular-nums; }
.t1-ph-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--t1p-rule); }
.t1-ph-links { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.t1-ph-links a { padding: 6px 12px; border: 1px solid var(--t1p-rule); background: #fff; color: var(--t1p-green-deep); font: 600 13px/1.2 'Sarabun', sans-serif; text-decoration: none; }
.t1-ph-links a:hover { border-color: var(--t1p-green); background: var(--t1p-band); }
.t1-ph-links a.is-current { background: var(--t1p-green-deep); border-color: var(--t1p-green-deep); color: #fff; }
.t1-ph-action { white-space: nowrap; }

/* ตัวกรองแบบชิป */
.t1-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.t1-filters-k { min-width: 74px; font: 600 12px/1 'Sarabun', sans-serif; color: var(--t1p-faint); text-transform: uppercase; letter-spacing: .04em; }
.t1-filters a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--t1p-rule); border-radius: 999px; background: #fff; color: var(--t1p-ink); font: 500 13px/1.2 'Sarabun', sans-serif; text-decoration: none; }
.t1-filters a small { color: var(--t1p-faint); font-family: 'IBM Plex Mono', monospace; }
.t1-filters a:hover { border-color: var(--t1p-green); }
.t1-filters a.is-on { background: var(--t1p-green-deep); border-color: var(--t1p-green-deep); color: #fff; }
.t1-filters a.is-on small { color: rgba(255, 255, 255, .75); }
.t1-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--t1p-green)); }
.t1-filters + .dv, .t1-filters + .t1-filters + .dv, .t1-filters + .t1-filters + .t1-filters + .dv { margin-top: 14px; }

/* ปุ่ม CSV ในแถบเครื่องมือ (_bar.php) */
.dv-bar .dv-csv { height: 36px; padding: 0 12px; border: 1px solid var(--t1p-rule); background: #fff; color: var(--t1p-green-deep); font: 600 12.5px 'IBM Plex Mono', monospace; cursor: pointer; }
.dv-bar .dv-csv:hover { border-color: var(--t1p-green); background: var(--t1p-band); }

/* การ์ดกลุ่ม/ยุทธศาสตร์ (_classes.php) */
.t1-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.t1-class { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; background: #fff; border: 1px solid var(--t1p-rule); border-top: 5px solid var(--c); color: var(--t1p-ink); text-decoration: none; min-height: 190px; }
.t1-class:hover { box-shadow: 0 8px 22px rgba(23, 37, 28, .10); transform: translateY(-1px); }
.t1-class-no { position: absolute; top: 12px; right: 14px; font: 700 26px/1 'IBM Plex Mono', monospace; color: var(--c); opacity: .35; }
.t1-class-name { font: 700 19px/1.3 'Taviraj', serif; color: var(--t1p-green-deep); padding-right: 34px; }
.t1-class-nums { display: flex; gap: 16px; font-size: 13px; color: var(--t1p-soft); }
.t1-class-nums b { font: 600 18px 'IBM Plex Mono', monospace; color: var(--t1p-ink); }
.t1-class-bar { height: 6px; background: var(--t1p-rule-soft); }
.t1-class-bar i { display: block; height: 100%; background: var(--c); }
.t1-class-go { margin-top: auto; font: 600 13px 'Sarabun', sans-serif; color: var(--t1p-green); }
.t1-swatch { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, .1); }
.t1-muted { color: var(--t1p-faint); }
.t1-kr-code { font: 600 11.5px 'IBM Plex Mono', monospace; color: var(--t1p-gold); letter-spacing: .02em; }

/* รายการพับเก็บได้ (นโยบาย → OKR, ยุทธศาสตร์ → OKR) */
.t1-acc { display: flex; flex-direction: column; gap: 8px; }
.t1-acc-item { background: #fff; border: 1px solid var(--t1p-rule); border-left: 4px solid var(--c, var(--t1p-green)); }
.t1-acc-item[hidden] { display: none; }
.t1-acc-item > summary { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; }
.t1-acc-item > summary::-webkit-details-marker { display: none; }
.t1-acc-item > summary::after { content: '▸'; grid-column: 3; justify-self: end; color: var(--t1p-faint); transition: transform .15s; }
.t1-acc-item[open] > summary::after { transform: rotate(90deg); }
.t1-acc-item > summary:hover { background: var(--t1p-band); }
.t1-acc-code { font: 600 12.5px 'IBM Plex Mono', monospace; color: var(--t1p-gold); min-width: 52px; }
.t1-acc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.t1-acc-name { font: 600 14.5px/1.45 'Sarabun', sans-serif; color: var(--t1p-ink); }
.t1-acc-sub { font-size: 12.5px; color: var(--t1p-faint); }
.t1-acc-n { grid-column: 3; grid-row: 1; margin-right: 22px; white-space: nowrap; font-size: 12.5px; color: var(--t1p-soft); }
.t1-acc-n b { font: 600 16px 'IBM Plex Mono', monospace; color: var(--t1p-green-deep); }
.t1-acc-tbl { margin: 0; border-top: 1px solid var(--t1p-rule-soft); }
.t1-acc-body { padding: 0 0 6px; overflow-x: auto; }
.t1-icon-link { text-decoration: none; font-weight: 700; }
/* ตัวบ่งชี้ร้อยละ */
.t1-pct { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 120px; }
.t1-pct i { display: inline-block; width: 54px; height: 6px; background: var(--t1p-rule-soft); position: relative; }
.t1-pct i b { position: absolute; inset: 0 auto 0 0; background: var(--pc, var(--t1p-green)); }
.t1-pct.is-done { --pc: #1e8a44; } .t1-pct.is-mid { --pc: #d9a400; } .t1-pct.is-low { --pc: #e07b24; } .t1-pct.is-none { --pc: #c0392b; }
.t1-sum-row td { background: var(--t1p-band) !important; font-weight: 700; }
.t1-zone-row td { background: #F6F8F3 !important; font-weight: 600; color: var(--t1p-green-deep); }
@media (max-width: 640px) {
  .t1-acc-item > summary { grid-template-columns: 1fr auto; }
  .t1-acc-code { grid-column: 1 / -1; }
  .t1-ph-stats > div { padding: 10px 14px; }
}
/* การ์ดกลุ่ม/ยุทธศาสตร์เป็นกริด (กฎ .dv-pane ของ dash-views.css ตั้ง display:block) ; รายการพับเก็บ: ไม่มีกรอบ .dv-list ซ้อน */
.dv[data-view="card"] .dv-card.t1-class-grid { display: grid; }
.dv[data-view="list"] .dv-list.t1-acc { display: flex; background: transparent; border: 0; }
.t1-acc-item > summary { position: relative; padding-right: 40px; }
.t1-acc-item > summary::after { position: absolute; right: 16px; top: 50%; margin-top: -9px; grid-column: auto; }
.t1-acc-n { margin-right: 0; }
.t1-indent { padding-left: 26px !important; }
.t1-acc-foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--t1p-rule-soft); font-size: 13px; }
.dv-tile .t1-pct { justify-content: flex-start; }
.t1-acc-code img { display: block; }
.t1-nowrap { white-space: nowrap; }
.d2569 .dv-tbl td .t1-pct { white-space: nowrap; }
/* ยุทธศาสตร์ → OKR → โครงการ (_okrtree.php) */
.t1-page-related { margin: 10px 0 4px; }
.t1-acc-pol { margin: 0; padding: 10px 16px; font-size: 12.5px; color: var(--t1p-soft); border-top: 1px solid var(--t1p-rule-soft); }
.t1-pol-chip { display: inline-block; margin: 2px 2px 0 0; padding: 1px 7px; border: 1px solid var(--t1p-rule); background: var(--t1p-paper); font: 600 11.5px 'IBM Plex Mono', monospace; color: var(--t1p-green-deep); cursor: help; }
.t1-okrtree .d-strat-budget .t1-pct { min-width: 0; }

/* ---------- จอมือถือ: แถบเครื่องมือ / ส่วนหัว / ตาราง ---------- */
@media (max-width: 720px) {
  .dv-bar { flex-wrap: wrap; gap: 8px; }
  .dv-bar .dv-search { flex: 1 1 100%; order: 3; }
  .pv2 .dv-search { flex: 1 1 100%; }
  .dv-bar .dv-switch { margin-left: auto; }
  .dv-switch button { padding-left: 9px; padding-right: 9px; }
  .t1-ph { margin-top: 16px; }
  .t1-ph-stats { width: 100%; }
  .t1-ph-stats > div { flex: 1 1 45%; border-bottom: 1px solid var(--t1p-rule-soft); }
  .t1-ph-stats dd { font-size: 20px; }
  .t1-ph-links { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .t1-ph-links a { white-space: nowrap; }
  .t1-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .t1-filters a { white-space: nowrap; }
  .dv-tbl { font-size: 12.5px; }
  .dv-tbl th:first-child, .dv-tbl td:first-child { min-width: 170px; }
  .t1-acc-body { overflow-x: auto; }
  .t1-acc-n { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .d-strat-grid, .dv-grid, .t1-class-grid { grid-template-columns: 1fr !important; }
}

/* มุมมองการ์ด/รายการของ GridView (t1-gridviews.js): ป้ายหัวคอลัมน์ภาษาอังกฤษ */
html[data-lang="en"] .t1gv-card tbody td[data-label-en]::before { content: attr(data-label-en); }
html[data-lang="en"] .t1gv-list tbody td[data-label-en][data-label]::before { content: attr(data-label-en) ': '; }

/* ---------- หน้าโครงการ (views/tbproject/*) ---------- */
.t1-small { font-size: 12px; }
.t1-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.t1-sed { display: inline-block; padding: 2px 8px; border: 1px solid; font: 600 11.5px/1.4 'Sarabun', sans-serif; white-space: nowrap; }
.t1-sed.is-wait { color: #6A5A1E; border-color: #E2CF8F; background: #FBF5E1; }
.t1-sed.is-ok { color: #1E6B3A; border-color: #9FCFAE; background: #E8F4EC; }
.t1-sed.is-bad { color: #8A2A1E; border-color: #E5A99F; background: #FBEDEA; }
.t1-sed.is-redo { color: #2B5A8A; border-color: #A9C3E0; background: #EAF1F9; }
.t1-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.t1-act { display: inline-block; padding: 4px 9px; border: 1px solid var(--t1p-rule); background: #fff; color: var(--t1p-green-deep) !important; font: 600 12px/1.3 'Sarabun', sans-serif; text-decoration: none !important; white-space: nowrap; }
.t1-act:hover { border-color: var(--t1p-green); background: var(--t1p-band); }
.t1-act.is-view { background: var(--t1p-green-deep); border-color: var(--t1p-green-deep); color: #fff !important; }
.t1-act.is-report { border-color: #C98B1E; color: #6A4A10 !important; }
.t1-proj-card { display: flex; flex-direction: column; gap: 8px; }
.t1-proj-card .dv-tile-name { color: var(--t1p-green-deep); text-decoration: none; font-weight: 600; }
.t1-proj-card .dv-tile-name:hover { color: var(--t1p-green); }
.t1-proj-card .t1-acts { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--t1p-rule-soft); }
.t1-proj-row { cursor: default; }
.t1-proj-row .dv-row-name { color: var(--t1p-ink); text-decoration: none; font-weight: 600; }
.t1-proj-index { padding-bottom: 20px; }
.t1-proj-index .kv-panel-before, .t1-proj-index .kv-panel-after { border: 0; }
.t1-proj-index .grid-view td .t1-acts { margin-top: 0; }
.t1-proj-index .grid-view td:last-child { min-width: 210px; }
body.pv2-skin .t1-proj-index .t1-ph { margin-top: 6px; }

/* หน้ารายละเอียดโครงการ (view.php) */
.t1-pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0; margin: 0; border: 1px solid var(--t1p-rule); background: #fff; }
.t1-pv-grid > div { padding: 12px 16px; border-right: 1px solid var(--t1p-rule-soft); border-bottom: 1px solid var(--t1p-rule-soft); }
.t1-pv-grid dt { font: 500 12px/1.4 'Sarabun', sans-serif; color: var(--t1p-faint); margin-bottom: 3px; }
.t1-pv-grid dd { margin: 0; font-size: 14.5px; color: var(--t1p-ink); word-break: break-word; }
.t1-pv-text { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.t1-pv-block { background: #fff; border: 1px solid var(--t1p-rule); border-top: 3px solid var(--t1p-green); padding: 14px 18px; }
.t1-pv-block h3 { margin: 0 0 8px; font: 700 15px/1.4 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-pv-block p { margin: 0; white-space: pre-line; line-height: 1.7; color: var(--t1p-ink); }
.t1-pv-block .t1-muted { font-style: italic; }
.t1-danger-act { border-color: #E5A99F !important; color: #8A2A1E !important; }

/* แบบฟอร์มโครงการ (_formcreate-update.php) */
.t1-form-sec { background: #fff; border: 1px solid var(--t1p-rule); margin-bottom: 16px; }
.t1-form-sec > h2 { margin: 0; padding: 12px 18px; background: var(--t1p-band); border-bottom: 1px solid var(--t1p-rule); font: 700 15px/1.3 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-form-sec > h2 small { margin-left: 8px; font-weight: 400; color: var(--t1p-faint); }
.t1-form-body { padding: 16px 18px 4px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 18px; }
.t1-form-body > .t1-f-12 { grid-column: span 12; } .t1-form-body > .t1-f-6 { grid-column: span 6; } .t1-form-body > .t1-f-4 { grid-column: span 4; }
.t1-form-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; background: rgba(255, 255, 255, .96); border: 1px solid var(--t1p-rule); box-shadow: 0 -4px 14px rgba(23, 37, 28, .06); }
.t1-form-actions .btn { min-width: 120px; }
.t1-form-note { padding: 10px 14px; background: #E8F4EC; border-left: 4px solid var(--t1p-green); color: var(--t1p-green-deep); }
@media (max-width: 720px) {
  .t1-form-body > .t1-f-6, .t1-form-body > .t1-f-4 { grid-column: span 12; }
  .t1-pv-text { grid-template-columns: 1fr; }
  .t1-form-actions .btn { min-width: 0; flex: 1; }
}

/* เลย์เอาต์หลัก (AdminLTE): คลาสของธีม dash ที่ใช้ในส่วนหัว/ป้ายสถานะ */
body.pv2-skin .d-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
body.pv2-skin .pv2-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--t1p-green-deep); background: var(--t1p-green-deep); color: #fff !important; font: 600 13.5px 'Sarabun', sans-serif; text-decoration: none !important; }
body.pv2-skin .pv2-btn.ghost { background: #fff; color: var(--t1p-green-deep) !important; }
body.pv2-skin .pv2-btn.ghost:hover { background: var(--t1p-band); }
.t1-proj-index .grid-view td:first-child, .t1-proj-index .grid-view th:first-child { min-width: 260px; }
.t1-proj-index .grid-view th { white-space: nowrap; }

/* เลย์เอาต์หลัก (AdminLTE): หัวข้อส่วน (pv2-section) และแถบมุมมองของ dash-views สำหรับหน้าที่ฝังรายการแบบการ์ด/รายการ/ตาราง */
body.pv2-skin .pv2-section { margin: 26px 0 8px; }
body.pv2-skin .pv2-section-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 22px/1.3 'Taviraj', serif; color: var(--t1p-green-deep); }
body.pv2-skin .pv2-section-head .num { padding: 1px 6px; border: 1px solid var(--t1p-gold); font: 600 12px 'IBM Plex Mono', monospace; color: var(--t1p-gold); }
body.pv2-skin .dv-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--t1p-rule-soft); color: var(--t1p-ink); }
body.pv2-skin .dv-row-ic { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px; padding: 0 6px; background: var(--t1p-band); font: 600 11.5px 'IBM Plex Mono', monospace; color: var(--t1p-green-deep); }
body.pv2-skin .dv-tile { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: #fff; border: 1px solid var(--t1p-rule); border-top: 3px solid var(--t1p-green); }
body.pv2-skin .dv-tile-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--t1p-soft); }
@media (max-width: 720px) { body.pv2-skin .dv-row { grid-template-columns: 1fr; } }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.t1-flag { color: #C0392B; font-size: 14px; cursor: help; }
.t1-kl-proj { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--t1p-rule-soft); font-size: 13px; color: var(--t1p-soft); }
.t1-kl-proj .t1-pct { min-width: 0; }
/* แถบรายงานรายเดือน (_checklist.php) */
.t1-months { display: grid; grid-template-columns: repeat(12, minmax(22px, 1fr)); gap: 3px; min-width: 300px; }
.t1-months span { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 34px; background: var(--t1p-rule-soft); color: var(--t1p-faint); font: 600 10.5px/1.15 'IBM Plex Mono', monospace; }
.t1-months span small { font: 500 9.5px 'Sarabun', sans-serif; opacity: .8; }
.t1-months span.is-on { background: #E3F0E6; color: var(--t1p-green-deep); box-shadow: inset 0 -3px 0 var(--t1p-green); }
.t1-months span.is-zero { background: #FBF3E2; color: #6A4A10; box-shadow: inset 0 -3px 0 #C98B1E; }
.t1-months-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 12px; font-size: 12.5px; color: var(--t1p-soft); }
.t1-months-key i { display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: -1px; }

/* ---------- แถบตัวกรองฝั่งเซิร์ฟเวอร์ (views/tbproject/_srvbar.php) ---------- */
.t1-srv { background: #fff; border: 1px solid var(--t1p-rule); padding: 16px 18px 14px; margin: 0 0 16px; }
.t1-srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; }
.t1-srv-f { display: flex; flex-direction: column; gap: 5px; margin: 0; font-weight: 400; }
.t1-srv-f.is-wide { grid-column: span 2; }
.t1-srv-f > span { font: 600 12px/1.2 'Sarabun', sans-serif; color: var(--t1p-soft); }
.t1-srv-f input, .t1-srv-f select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--t1p-rule); background: #fff; font: 400 14px 'Sarabun', sans-serif; color: var(--t1p-ink); border-radius: 0; }
.t1-srv-f input:focus, .t1-srv-f select:focus { outline: 2px solid var(--t1p-green); outline-offset: -1px; }
.t1-srv-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--t1p-rule-soft); }
.t1-srv-acts .pv2-btn { padding: 8px 16px; font-size: 13.5px; cursor: pointer; }
.t1-srv-acts .t1-srv-csv { margin-left: auto; }
.t1-range { margin: -4px 0 10px; font-size: 12.5px; color: var(--t1p-faint); }
.t1-pager { display: flex; justify-content: center; margin: 18px 0 6px; }
.t1-pager .pagination { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0; }
.t1-pager .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--t1p-rule); background: #fff; color: var(--t1p-green-deep); font: 600 13px 'IBM Plex Mono', monospace; text-decoration: none; }
.t1-pager .page-item.active .page-link { background: var(--t1p-green-deep); border-color: var(--t1p-green-deep); color: #fff; }
.t1-pager .page-item.disabled .page-link { color: var(--t1p-rule); }
.t1-pager .page-link:hover { background: var(--t1p-band); }
.t1-proj-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 720px) {
  .t1-srv-f.is-wide { grid-column: auto; }
  .t1-srv-acts .t1-srv-csv { margin-left: 0; }
}

/* ---------- รายงานผล KR (views/tbprojkpireport/*) ---------- */
.t1-rep-card { padding-top: 0; overflow: hidden; }
.t1-rep-img { display: block; margin: 0 -16px 6px; height: 150px; background: var(--t1p-band); overflow: hidden; }
.t1-rep-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t1-rep-img.is-empty { display: flex; align-items: center; justify-content: center; height: 64px; color: var(--t1p-faint); font-size: 12.5px; text-decoration: none; }
.t1-rep-result { font-size: 13px; color: var(--t1p-soft); }
.t1-rep-result b { font: 600 20px 'IBM Plex Mono', monospace; color: var(--t1p-green-deep); }
.t1-rep-note { font-size: 12.5px; line-height: 1.55; color: var(--t1p-soft); }
.t1-rep-thumb { width: 52px; height: 40px; padding: 0 !important; overflow: hidden; }
.t1-rep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.t1-rep-mini { width: 56px; height: 40px; object-fit: cover; display: block; }
.t1-rep-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.t1-rep-photos figure { margin: 0; background: #fff; border: 1px solid var(--t1p-rule); }
.t1-rep-photos img { width: 100%; max-height: 360px; object-fit: contain; display: block; background: var(--t1p-band); }
.t1-rep-photos figcaption { padding: 8px 12px; font: 600 12.5px 'Sarabun', sans-serif; color: var(--t1p-soft); }
.t1-form-body-plain { padding: 14px 18px; }
.t1-rep-form .panel, .t1-rep-form .panel-body { border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; background: transparent !important; }
.t1-rep-form .row { margin-left: -8px; margin-right: -8px; }

/* ---------- แถบเมนูเด่นแบบกะทัดรัด (views/tbproject/_quicknav.php) — แผงเขียวเดียว หลายแถว ใต้ breadcrumb ก่อนหัวเรื่อง ---------- */
.t1-qnav { margin: 2px 0 16px; padding: 6px 14px; border-radius: 12px; color: #fff; border-bottom: 3px solid var(--t1p-gold);
  background: linear-gradient(135deg, var(--t1p-green-deep) 0%, var(--t1p-green) 100%); box-shadow: 0 5px 14px rgba(18, 59, 39, .2); }
/* แถว = ป้ายกลุ่ม (ซ้าย) + ชิป (ขวา จัดเป็นคอลัมน์เท่ากันทุกแถว) */
.t1-qnav-row { display: grid; grid-template-columns: 178px minmax(0, 1fr); gap: 8px 16px; align-items: center; padding: 9px 0; }
.t1-qnav-row + .t1-qnav-row { border-top: 1px solid rgba(233, 210, 155, .28); }
.t1-qnav-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.t1-qnav-label { display: flex; flex-direction: column; font: 600 12px/1.3 'Sarabun', sans-serif; color: #E9D29B; }
.t1-qnav-label b { font-weight: 700; letter-spacing: .02em; font-size: 12.5px; }
.t1-qnav-label small { font-size: 12px; font-weight: 500; color: #fff; opacity: .92; overflow-wrap: anywhere; }
.t1-qnav-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 7px; }
.t1-qnav-grid li { margin: 0; padding: 0; min-width: 0; }
.t1-qn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 5px 10px 5px 6px; border-radius: 10px; text-decoration: none !important;
  background: #fff; color: var(--t1p-green-deep) !important; border: 2px solid transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); transition: transform .12s, box-shadow .12s, border-color .12s, background .12s; }
.t1-qn:hover { transform: translateY(-1px); border-color: #E9D29B; background: #FFFCF3; box-shadow: 0 4px 10px rgba(0, 0, 0, .22); }
.t1-qn-ico { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: var(--t1p-band); color: var(--t1p-green); }
.t1-qn-ico svg { width: 15px; height: 15px; }
.t1-qn-txt { min-width: 0; font: 600 13px/1.2 'Sarabun', sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t1-qn.is-current { background: #FFF4D6; border-color: #D9A441; box-shadow: 0 0 0 2px rgba(233, 210, 155, .55), 0 3px 8px rgba(0, 0, 0, .2); }
.t1-qn.is-current .t1-qn-ico { background: var(--t1p-green-deep); color: #F3CF7A; }
.t1-qn.is-current .t1-qn-txt { font-weight: 800; }
.t1-qnav-cta { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 999px; text-decoration: none !important;
  font: 700 13px/1.2 'Sarabun', sans-serif; white-space: nowrap; color: #2A1D00 !important; background: linear-gradient(180deg, #F3CF7A, #D9A441); box-shadow: 0 2px 7px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .55); transition: transform .12s; }
.t1-qnav-cta svg { flex: 0 0 19px; width: 19px; height: 19px; padding: 3px; border-radius: 50%; background: #2A1D00; color: #F3CF7A; stroke-width: 2.8; }
.t1-qnav-cta:hover { transform: translateY(-1px); }

/* แท็บเล็ต: ป้ายอยู่บรรทัดบน ชิปใช้เต็มความกว้าง */
@media (max-width: 991px) {
  .t1-qnav-row { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 9px 0; }
  .t1-qnav-side { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
  .t1-qnav-label { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .t1-qnav-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
}
/* มือถือ: แต่ละแถวเป็นแถบชิปเลื่อนแนวนอน (ประหยัดพื้นที่) — เห็นชิปถัดไปโผล่ขอบขวาเป็นสัญญาณว่าเลื่อนได้ */
@media (max-width: 640px) {
  .t1-qnav { margin: 0 -4px 12px; padding: 4px 10px; border-radius: 10px; }
  .t1-qnav-grid { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 2px 18px 6px 0; margin-right: -10px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
  .t1-qnav-grid::-webkit-scrollbar { display: none; }
  .t1-qnav-grid li { flex: 0 0 auto; scroll-snap-align: start; }
  .t1-qn { width: auto; min-height: 42px; padding: 6px 13px 6px 7px; }
  .t1-qn-txt { overflow: visible; text-overflow: clip; font-size: 13.5px; }
  .t1-qnav-cta { padding: 8px 14px 8px 9px; font-size: 13.5px; }
}
@media print { .t1-qnav { display: none; } }

/* ชิปปีงบประมาณในหน้าข้อมูลรายหน่วยงาน (.pg) — แบบเดียวกับตัวกรองของ tbproject/index */
.pg > .t1-filters { margin: 2px 0 16px; }
@media (max-width: 640px) { .pg > .t1-filters { flex-wrap: wrap; overflow: visible; } .t1-filters-k { flex: 0 0 100%; } .t1-filters a { padding: 7px 13px; } }

/* ---------- แบบฟอร์มโครงการ: ปรับให้เป็นระเบียบ/มืออาชีพ (create/update) ---------- */
.t1-form-legend { margin: 0 0 10px; font: 500 12.5px/1.4 'Sarabun', sans-serif; color: var(--t1p-faint); }
.t1-req { color: #B3261E; font-weight: 700; }
.t1-form-sec { border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(23, 37, 28, .06); }
.t1-form-sec > h2 { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.t1-form-sec > h2 > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.t1-form-sec > h2 small { margin: 0; font: 400 12.5px/1.3 'Sarabun', sans-serif; }
.t1-form-num { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--t1p-green-deep); color: #F3CF7A; font: 700 14px/1 'IBM Plex Mono', monospace; }
.t1-form-body { padding: 18px 20px 6px; }
.tbproj-form .form-group { margin-bottom: 16px; }
.tbproj-form .control-label, .tbproj-form label.control-label { display: block; margin-bottom: 5px; font: 600 13.5px/1.35 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.tbproj-form .form-control, .tbproj-form .select2-container--krajee-bs4 .select2-selection, .tbproj-form .select2-container--default .select2-selection--single { border-radius: 8px; border-color: #C9D3CB; transition: border-color .12s, box-shadow .12s; }
.tbproj-form .form-control:focus, .tbproj-form .select2-container--open .select2-selection, .tbproj-form .select2-container--focus .select2-selection { border-color: var(--t1p-green); box-shadow: 0 0 0 3px rgba(31, 107, 66, .16); outline: 0; }
.tbproj-form textarea.form-control { line-height: 1.6; resize: vertical; min-height: 44px; }
.tbproj-form .form-control::placeholder { color: #98A39B; }
.tbproj-form .hint-block, .tbproj-form .help-block { margin-top: 4px; font: 400 12.5px/1.4 'Sarabun', sans-serif; color: var(--t1p-faint); }
.tbproj-form .has-error .help-block, .tbproj-form .invalid-feedback { color: #B3261E; font-weight: 500; }
.tbproj-form .has-error .form-control, .tbproj-form .form-control.is-invalid { border-color: #B3261E; }
.tbproj-form .file-caption { border-radius: 8px 0 0 8px; }
.tbproj-form .input-group-btn, .tbproj-form .input-group-append { flex: 0 0 auto; width: auto; }
.tbproj-form .btn-file { white-space: nowrap; border-radius: 0 8px 8px 0; background: var(--t1p-green-deep); border-color: var(--t1p-green-deep); color: #fff; font-weight: 600; }
.t1-form-actions { border-radius: 12px; padding: 12px 20px; margin-top: 4px; }
.t1-form-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border-radius: 9px; font-weight: 700; }
.t1-form-actions .btn-success { background: var(--t1p-green-deep); border-color: var(--t1p-green-deep); min-width: 160px; }
.t1-form-actions .btn-success:hover { background: var(--t1p-green); border-color: var(--t1p-green); }
@media (max-width: 720px) {
  .t1-form-body { padding: 14px 14px 4px; }
  .t1-form-sec > h2 { padding: 11px 14px; }
  .t1-form-actions { padding: 10px 12px; }
  .t1-form-actions .btn-success { flex: 2; }
}
/* ---------- ขั้นตอนการดำเนินงาน: Gantt + ตาราง (tbprojstep/index_by_proj_id) และฟอร์มเพิ่มขั้นตอน (tbprojstep/_formcreate) ---------- */
.t1-stp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 4px 0 14px; background: #fff; border: 1px solid var(--t1p-rule); border-radius: 12px; overflow: hidden; }
.t1-stp-stats > div { padding: 12px 16px; border-right: 1px solid var(--t1p-rule-soft, #E4EAE2); }
.t1-stp-stats > div:last-child { border-right: 0; }
.t1-stp-stats b { display: block; font: 700 20px/1.25 'IBM Plex Mono', monospace; color: var(--t1p-green-deep); }
.t1-stp-stats b small { font-size: 13px; color: var(--t1p-faint); font-weight: 500; }
.t1-stp-stats span { font: 500 12.5px/1.3 'Sarabun', sans-serif; color: var(--t1p-faint); }
.t1-stp-stats .is-warn b { color: #B3261E; }
.t1-stp-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.t1-stp-views { display: inline-flex; border: 1px solid var(--t1p-green-deep); border-radius: 10px; overflow: hidden; background: #fff; }
.t1-stp-views button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 18px; border: 0; background: #fff; color: var(--t1p-green-deep); font: 600 13.5px/1.2 'Sarabun', sans-serif; cursor: pointer; }
.t1-stp-views button + button { border-left: 1px solid var(--t1p-green-deep); }
.t1-stp-views button.is-on { background: var(--t1p-green-deep); color: #fff; }
.t1-stp-add, .t1-step-add { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; border: 0; text-decoration: none !important; cursor: pointer; font: 700 13.5px/1.2 'Sarabun', sans-serif; color: #2A1D00 !important; background: linear-gradient(180deg, #F3CF7A, #D9A441); box-shadow: 0 2px 6px rgba(0, 0, 0, .22); }
.t1-stp-pane[hidden] { display: none; }
.t1-stp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font: 500 12.5px/1.3 'Sarabun', sans-serif; color: var(--t1p-ink); }
.t1-stp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.t1-gt-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.t1-gt-line { width: 2px; height: 14px; background: #B3261E; display: inline-block; }
.is-done { --gt: #2E7D4F; } .is-doing { --gt: #D9A441; } .is-late { --gt: #C8473B; } .is-plan { --gt: #8FA397; }
.t1-gt-dot { background: var(--gt); }
.t1-gantt { background: #fff; border: 1px solid var(--t1p-rule); border-radius: 12px; overflow: hidden; }
.t1-gantt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t1-gantt-grid { min-width: calc(260px + var(--gt-months) * 84px); }
.t1-gt-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); border-bottom: 1px solid var(--t1p-rule-soft, #E4EAE2); }
.t1-gt-row:last-child { border-bottom: 0; }
.t1-gt-head { background: var(--t1p-band); }
.t1-gt-name { position: sticky; left: 0; z-index: 2; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: #fff; border-right: 1px solid var(--t1p-rule); font: 600 13.5px/1.35 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-gt-head .t1-gt-name { background: var(--t1p-band); align-items: center; font-size: 12.5px; }
.t1-gt-no { flex: 0 0 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--t1p-green-deep); color: #F3CF7A; font: 700 12px/1 'IBM Plex Mono', monospace; }
.t1-gt-txt { min-width: 0; }
.t1-gt-txt small { display: block; margin-top: 2px; font: 400 12px/1.3 'Sarabun', sans-serif; color: var(--t1p-faint); }
.t1-gt-track { position: relative; min-height: 52px; }
.t1-gt-head .t1-gt-track { min-height: 40px; }
.t1-gt-mon { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; padding-left: 8px; border-left: 1px solid var(--t1p-rule); font: 600 12.5px/1.2 'Sarabun', sans-serif; color: var(--t1p-green-deep); white-space: nowrap; overflow: hidden; }
.t1-gt-mon small { font: 500 10.5px/1.2 'IBM Plex Mono', monospace; color: var(--t1p-faint); }
.t1-gt-cell { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--t1p-rule-soft, #E4EAE2); }
.t1-gt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #B3261E; z-index: 1; opacity: .85; }
.t1-gt-bar { position: absolute; top: 12px; height: 28px; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--gt) 30%, #fff); border: 1px solid var(--gt); display: flex; align-items: center; min-width: 6px; z-index: 1; }
.t1-gt-bar em { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gt); }
.t1-gt-bar b { position: relative; padding: 0 8px; font: 700 11.5px/1 'IBM Plex Mono', monospace; color: #17251C; white-space: nowrap; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.t1-stp-hint { margin: 8px 2px 0; font: 400 12.5px/1.5 'Sarabun', sans-serif; color: var(--t1p-faint); }
.t1-stp-manage { margin-top: 16px; background: #fff; border: 1px solid var(--t1p-rule); border-radius: 12px; padding: 4px 14px 8px; }
.t1-stp-manage h3 { margin: 10px 0 4px; font: 700 15px/1.3 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-stp-mrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--t1p-rule-soft, #E4EAE2); }
.t1-stp-mname { flex: 1 1 auto; min-width: 0; font: 500 13.5px/1.4 'Sarabun', sans-serif; }
.t1-stp-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.t1-stp-act { padding: 5px 12px; border: 1px solid var(--t1p-rule); border-radius: 999px; background: #fff; color: var(--t1p-green-deep) !important; text-decoration: none !important; font: 600 12.5px/1.2 'Sarabun', sans-serif; white-space: nowrap; }
.t1-stp-act:hover { border-color: var(--t1p-green); background: var(--t1p-band); }
.t1-stp-act.is-main { background: var(--t1p-green-deep); border-color: var(--t1p-green-deep); color: #fff !important; }
.t1-stp-act.is-danger { color: #B3261E !important; border-color: #E5A99F; }
.t1-stp-tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--t1p-rule); border-radius: 12px; }
.t1-stp-tbl { width: 100%; min-width: 860px; border-collapse: collapse; font: 400 13.5px/1.45 'Sarabun', sans-serif; }
.t1-stp-tbl th { padding: 10px 12px; background: var(--t1p-band); text-align: left; font-weight: 700; color: var(--t1p-green-deep); border-bottom: 1px solid var(--t1p-rule); white-space: nowrap; }
.t1-stp-tbl td { padding: 10px 12px; border-bottom: 1px solid var(--t1p-rule-soft, #E4EAE2); vertical-align: top; }
.t1-stp-tbl .num { text-align: right; font-family: 'IBM Plex Mono', monospace; }
.t1-stp-tbl tfoot td { font-weight: 700; background: var(--t1p-band); border-bottom: 0; }
.t1-stp-note { display: block; font-size: 12px; color: var(--t1p-faint); }
.t1-gt-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 600 12px/1.5 'Sarabun', sans-serif; white-space: nowrap; background: color-mix(in srgb, var(--gt) 22%, #fff); color: #17251C; border: 1px solid var(--gt); }
/* ฟอร์มเพิ่มขั้นตอน */
.t1-form-sec > h2 .t1-step-add { margin-left: auto; }
.t1-step-items { padding: 16px 20px 6px; display: grid; gap: 14px; counter-reset: stp; }
.t1-step-card { border: 1px solid var(--t1p-rule); border-left: 4px solid var(--t1p-green); border-radius: 10px; background: #FCFDFB; padding: 4px 16px 4px; counter-increment: stp; }
.t1-step-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 4px; }
.t1-step-no { font: 700 14px/1.2 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-step-no::after { content: ' ' counter(stp); font-family: 'IBM Plex Mono', monospace; color: var(--t1p-gold, #B8860B); }
.t1-step-del { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid #E5A99F; border-radius: 999px; background: #fff; color: #B3261E; font: 600 12.5px/1.2 'Sarabun', sans-serif; cursor: pointer; }
.t1-step-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 16px; }
.t1-step-grid > .t1-sg-3 { grid-column: span 3; } .t1-step-grid > .t1-sg-12 { grid-column: span 12; }
.t1-step-grid .form-group { margin-bottom: 12px; }
.t1-step-grid input.dob { width: 100%; }
@media (max-width: 991px) { .t1-step-grid > .t1-sg-3 { grid-column: span 6; } }
@media (max-width: 640px) {
  .t1-stp-stats > div { border-right: 0; border-bottom: 1px solid var(--t1p-rule-soft, #E4EAE2); }
  .t1-gantt-grid { min-width: calc(190px + var(--gt-months) * 84px); }
  .t1-gt-row { grid-template-columns: 190px minmax(0, 1fr); }
  .t1-gt-name { padding: 9px 9px; font-size: 13px; }
  .t1-stp-views { flex: 1 1 100%; } .t1-stp-views button { flex: 1; justify-content: center; }
  .t1-stp-add { flex: 1 1 100%; justify-content: center; }
  .t1-stp-mrow { flex-wrap: wrap; } .t1-stp-mname { flex: 1 1 calc(100% - 40px); } .t1-stp-mrow .t1-stp-acts { flex: 1 1 100%; justify-content: flex-start; }
  .t1-step-grid > .t1-sg-3 { grid-column: span 12; }
  .t1-step-items { padding: 12px 12px 4px; } .t1-step-card { padding: 2px 12px; }
}
@media print { .t1-stp-bar, .t1-stp-manage { display: none; } }

.t1-form-sec > h2 > span:nth-child(2) { display: flex; flex-direction: column; gap: 1px; }
.t1-form-sec > h2 > span:nth-child(2) small { display: block; }

/* ---------- ตัวชี้วัดเจรจา 2568 ของหน่วยงาน (tbproject/_nego.php, tbproject/index?view=nego) ---------- */
.t1-nego-dep { margin: 0 0 12px; }
.t1-nego-dep label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 600 13px/1.3 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-nego-dep select { min-width: 260px; max-width: 100%; padding: 8px 12px; border: 1px solid #C9D3CB; border-radius: 8px; background: #fff; font: 500 14px 'Sarabun', sans-serif; }
.t1-nego-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.t1-nego-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.t1-nego-card { border-top: 4px solid var(--t1p-green); }
.t1-nego-st { display: inline-block; padding: 1px 9px; border-radius: 999px; font: 600 11.5px/1.6 'Sarabun', sans-serif; color: #17251C; background: color-mix(in srgb, var(--c) 22%, #fff); border: 1px solid var(--c); }
.t1-nego-flags { display: inline-flex; gap: 4px; margin-left: 6px; }
.t1-nego-flags span { padding: 0 6px; border-radius: 6px; border: 1px solid var(--t1p-rule); font: 600 11px/1.6 'IBM Plex Mono', monospace; color: var(--t1p-faint); background: #fff; }
.t1-nego-flags span.is-ok { color: #1F6D45; border-color: #9FCDB0; background: #E8F4EC; }
.t1-nego-pct { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.t1-nego-pct b { flex: 0 0 auto; min-width: 52px; font: 700 20px/1 'IBM Plex Mono', monospace; color: var(--t1p-green-deep); }
.t1-nego-bar { flex: 1 1 auto; display: inline-block; min-width: 50px; height: 8px; border-radius: 999px; background: #E4EAE2; overflow: hidden; vertical-align: middle; }
.t1-nego-bar i { display: block; height: 100%; border-radius: 999px; }
.t1-nego-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.t1-nego-nums span { min-width: 0; }
.t1-nego-nums small { display: block; font: 400 11.5px/1.3 'Sarabun', sans-serif; color: var(--t1p-faint); }
.t1-nego-nums b { display: block; font: 700 14px/1.4 'IBM Plex Mono', monospace; overflow-wrap: anywhere; }
.t1-nego-nums b.is-unit { font-family: 'Sarabun', sans-serif; font-weight: 600; }
.dv-tbl .t1-nego-bar { width: 70px; flex: none; }
@media (max-width: 640px) { .t1-nego-grid { grid-template-columns: 1fr; } .t1-nego-dep select { width: 100%; } }

/* ---------- ฟอร์มเชื่อม KR กับโครงการ (tbprojkpi/_kpiform.php) ---------- */
.t1-kpi .md-form { background: none; border: 0; padding: 0; max-width: none; }
.t1-kpi-ctx { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 16px; background: #fff; border: 1px solid var(--t1p-rule); border-left: 4px solid var(--t1p-gold, #D9A441); border-radius: 12px; }
.t1-kpi-ctx-ic { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--t1p-green-deep); color: #F3CF7A; }
.t1-kpi-ctx-txt { flex: 1 1 280px; min-width: 0; }
.t1-kpi-ctx-txt small { display: block; font: 500 12px/1.3 'Sarabun', sans-serif; color: var(--t1p-faint); }
.t1-kpi-ctx-txt b { display: block; font: 700 15px/1.4 'Sarabun', sans-serif; color: var(--t1p-green-deep); overflow-wrap: anywhere; }
.t1-kpi-ctx-act { display: flex; flex-wrap: wrap; gap: 6px; }
.t1-kpi-ctx-act a { padding: 5px 12px; border: 1px solid var(--t1p-rule); border-radius: 999px; background: #fff; color: var(--t1p-green-deep); text-decoration: none; font: 600 12.5px/1.2 'Sarabun', sans-serif; white-space: nowrap; }
.t1-kpi-ctx-act a:hover { border-color: var(--t1p-green); background: var(--t1p-band); }
.t1-kpi-body { padding: 4px 20px 18px; }
.t1-kpi .md-form-grid.t1-kpi-body { gap: 0 20px; }
.t1-kpi .md-field { margin-top: 14px; }
.t1-kpi .md-field > label, .t1-kpi .md-label { font-weight: 600; color: var(--t1p-green-deep); }
.t1-kpi .md-input, .t1-kpi .md-form select, .t1-kpi .md-pick { border-radius: 8px; border-color: #C9D3CB; }
.t1-kpi .md-pick { overflow: hidden; margin-top: 12px; }
.t1-kpi .md-pick-q { padding: 11px 14px; background: #F7FAF6; }
.t1-kpi .md-pick-list { max-height: 280px; }
.t1-kpi .md-pick-list label { padding: 8px 14px; border-top: 1px solid var(--t1p-rule-soft, #E4EAE2); }
.t1-kpi .md-pick-list label:has(input:checked) { background: #FFF4D6; font-weight: 600; }
.t1-kpi .md-pick-sel button { border-radius: 999px; padding: 3px 12px; }
.t1-kpi .t1-form-actions { margin: 0 0 16px; }
.t1-kpi-tblwrap { overflow-x: auto; }
.t1-kpi-linked .dv-tbl { width: 100%; min-width: 520px; }
.t1-kpi-linked tr.is-current td { background: #FFF4D6; }
@media (max-width: 720px) { .t1-kpi .md-form-grid.t1-kpi-body { grid-template-columns: 1fr; } .t1-kpi-body { padding: 2px 14px 14px; } .t1-kpi-ctx-act { width: 100%; } }
/* ---------- รายละเอียดโครงการ (tbproject/index_by_id.php) ---------- */
.t1-pd-sum { position: relative; margin: 4px 0 16px; padding: 14px 18px; background: #fff; border: 1px solid var(--t1p-rule); border-top: 4px solid var(--t1p-green); border-radius: 12px; box-shadow: 0 1px 3px rgba(23, 37, 28, .06); }
.t1-pd-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.t1-pd-chip { padding: 2px 11px; border: 1px solid var(--t1p-rule); border-radius: 999px; background: var(--t1p-band); font: 600 12.5px/1.6 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-pd-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin: 0; }
.t1-pd-kv > div { min-width: 0; }
.t1-pd-kv .is-wide { grid-column: 1 / -1; }
.t1-pd-kv dt { font: 500 12px/1.4 'Sarabun', sans-serif; color: var(--t1p-faint); margin-bottom: 2px; }
.t1-pd-kv dd { margin: 0; font: 500 14.5px/1.5 'Sarabun', sans-serif; color: var(--t1p-ink); overflow-wrap: anywhere; }
.t1-pd-kv dd.is-num { font: 700 18px/1.4 'IBM Plex Mono', monospace; color: var(--t1p-green-deep); }
.t1-pd-file { display: inline-flex; align-items: center; gap: 6px; color: var(--t1p-green-deep); font-weight: 600; text-decoration: underline; }
.t1-pd-owner { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--t1p-rule-soft, #E4EAE2); }
.t1-pd-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.t1-pd-block { padding: 14px 20px; border-top: 1px solid var(--t1p-rule-soft, #E4EAE2); min-width: 0; }
.t1-pd-block:nth-child(-n+2) { border-top: 0; }
.t1-pd-block.is-wide { grid-column: 1 / -1; }
.t1-pd-block.is-wide:nth-child(2) { border-top: 1px solid var(--t1p-rule-soft, #E4EAE2); }
.t1-pd-block h3 { margin: 0 0 6px; font: 700 13.5px/1.35 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-pd-block p { margin: 0; font: 400 14.5px/1.75 'Sarabun', sans-serif; color: var(--t1p-ink); overflow-wrap: anywhere; }
.t1-pd-head-act { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.t1-pd-empty { margin: 0; padding: 18px 20px; color: var(--t1p-faint); font: 400 14px 'Sarabun', sans-serif; }
.t1-pd-wrap { border: 0; border-radius: 0; }
.t1-pd .t1-form-sec > h2 { flex-wrap: wrap; }
@media (max-width: 720px) { .t1-pd-blocks { grid-template-columns: 1fr; } .t1-pd-block { padding: 12px 14px; border-top: 1px solid var(--t1p-rule-soft, #E4EAE2) !important; } .t1-pd-block:first-child { border-top: 0 !important; } .t1-pd-head-act { margin-left: 0; width: 100%; justify-content: flex-start; } .t1-pd-sum { padding: 12px 14px; } }
@media print { .t1-pd-head-act, .t1-pd-owner, .t1-stp-acts { display: none; } }
.t1-pd-head-act { flex-wrap: nowrap; white-space: nowrap; }
.t1-pd .t1-ph-title { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35; }
@media (max-width: 720px) { .t1-pd-head-act { flex-wrap: wrap; } }

.t1-stp-tbl td:not(.wrap) { white-space: nowrap; }
.t1-stp-tbl td.t1-stp-acts { display: table-cell; text-align: right; }
.t1-stp-tbl td.t1-stp-acts .t1-stp-act { display: inline-block; margin-left: 6px; }

/* ส่วนหัวหน้ารายงานรายหน่วยงาน (.pg-hero: _sed/_header.php, lutapprovedbysed/index2, site/indexprojlist1 ฯลฯ) — ตัวอักษรเหมือนหัวหน้า site/index (.dh-eyebrow/.dh-title/.dh-sub) */
.pg-hero > .pv2-eyebrow { font: 600 12.5px/1.4 'Sarabun', sans-serif; letter-spacing: .04em; color: var(--t1p-gold); text-transform: uppercase; }
.pg-hero > h1.pv2-hero-title { margin: 4px 0 6px; max-width: none; font: 600 clamp(26px, 3.2vw, 38px)/1.2 'Taviraj', serif; letter-spacing: -.005em; color: var(--t1p-green-deep); }
.pg-hero > .pv2-hero-sub { margin: 0; max-width: 860px; font-size: 15px; line-height: 1.6; color: var(--t1p-soft); }
.t1-step-warn { background: #F8EED8 !important; border-color: #E3C98F !important; color: #6A4A10 !important; border-radius: 10px; margin: 0 0 14px; }

/* ---------- ไฟล์เอกสารแนบ + ตัวแสดงเอกสาร (tbproject/index_by_id.php — ไม่เปิดเผยที่อยู่ไฟล์จริง) ---------- */
.t1-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--t1p-rule); border-radius: 12px; background: #FBFCFA; }
.t1-file-ic { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: #fff; font: 700 12px/1 'IBM Plex Mono', monospace; background: #C8473B; }
.t1-file-ic.is-doc { background: #2B6CB0; } .t1-file-ic.is-image { background: #2E7D4F; }
.t1-file-meta { flex: 1 1 180px; min-width: 0; }
.t1-file-meta b { display: block; font: 700 14px/1.4 'Sarabun', sans-serif; color: var(--t1p-green-deep); }
.t1-file-meta small { font: 500 12px/1.4 'IBM Plex Mono', monospace; color: var(--t1p-faint); }
.t1-file-act { display: flex; gap: 8px; flex-wrap: wrap; }
.t1-viewer { width: min(1100px, 96vw); height: min(88vh, 900px); padding: 0; border: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 60px rgba(0, 0, 0, .35); }
.t1-viewer[open] { display: flex; flex-direction: column; }
.t1-viewer::backdrop { background: rgba(18, 38, 28, .6); backdrop-filter: blur(2px); }
.t1-viewer > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--t1p-green-deep); color: #fff; }
.t1-viewer-title { font: 700 14.5px/1.3 'Sarabun', sans-serif; }
.t1-viewer-act { display: flex; gap: 8px; }
.t1-viewer-body { flex: 1 1 auto; min-height: 0; background: #E9EEE8; display: grid; }
.t1-viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.t1-viewer-body img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
@media (max-width: 640px) { .t1-viewer { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; } .t1-file-act { width: 100%; } .t1-file-act .t1-stp-act { flex: 1; text-align: center; } }
.t1-viewer-act .t1-stp-act { background: #fff; color: var(--t1p-green-deep) !important; border-color: #fff; }
.t1-viewer-act .t1-stp-act:hover { background: var(--t1p-band); }
.t1-viewer-act .t1-stp-act.is-main { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.6); }

/* ---- รูปแบบหน้าเว็บ 2 (BKK): ส่วนหัว .pg-hero ของหน้ารายงานให้ตรงกับหัวหน้า site/index (Anuphan, ไม่ใช้ Sao Chingcha/ป้ายสีเขียว) ---- */
.pv2 .pg-hero > h1.pv2-hero-title { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.2; font-weight: 600; letter-spacing: -.005em; }
.pv2 .pg-hero > .pv2-eyebrow { display: block; padding: 0; background: none; border-radius: 0; font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--t1p-gold); }
:root:has(.t1-bkk-header) .pv2 .pg-hero > h1.pv2-hero-title, :root:has(.t1-bkk-header) .pv2 h2.pv2-section-head { font-family: Anuphan, 'IBM Plex Sans Thai', 'Sarabun', sans-serif; }
.t1-filters-k, .t1-filters a { font-family: inherit; }