/* แถบด้านบนแบบเดียวกันทุกระบบ (เจ้าของสั่ง 3 ธ.ค. 2569) — ไฟล์นี้ต้องเหมือนกันทุก repo (แก้ที่หนึ่ง คัดลอกไปทุกที่)
   ตรากองบินตำรวจ → เว็บกลุ่มงานการบิน (tpadhub.com) · ตราฝูงบิน → หน้าแรกของระบบนั้น · กดชื่อ → เมนูบัญชี
   สีของแถบคงที่ (ไม่ขึ้นกับธีมของแต่ละระบบ) · ปุ่มโหมดมืด (#themeBtn) ใช้ของแต่ละระบบ */
.hb{--hb-bg:#121110;--hb-gold:#e0a920;--hb-muted:#bdb4a8;background:var(--hb-bg);color:#fff;border-bottom:2px solid var(--hb-gold);position:sticky;top:0;z-index:1100;font-family:inherit}
.hb *{box-sizing:border-box}
.hb [hidden]{display:none!important}
.hb-in{display:flex;align-items:center;gap:10px;min-height:68px;padding:10px max(16px,env(safe-area-inset-right,0px)) 8px max(16px,env(safe-area-inset-left,0px));max-width:1280px;margin:0 auto}
.hb a{color:inherit;text-decoration:none}
.hb-logo{display:block;flex:none;border-radius:50%;line-height:0}
.hb-logo img{display:block}
.hb-logo:hover,.hb-logo:focus-visible{box-shadow:0 0 0 2px var(--hb-gold);outline:none}
.hb-sep{width:1px;height:28px;background:#ffffff55;flex:none}
.hb-nm{line-height:1.6;min-width:0;margin-right:auto}
.hb-nm>b{display:block;font-size:.98rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hb-nm>span{display:block;font-size:.76rem;color:var(--hb-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hb-acts{display:flex;align-items:center;gap:8px;flex:none}
.hb-btn{display:inline-flex;align-items:center;gap:6px;background:#ffffff0f;border:1px solid #ffffff38;color:#fff;border-radius:999px;font:inherit;font-size:.82rem;font-weight:600;padding:5px 13px;min-height:32px;white-space:nowrap;cursor:pointer}
.hb-btn:hover{background:#ffffff1f;border-color:var(--hb-gold)}
.hb-btn:focus-visible,.hb-me:focus-visible{outline:2px solid var(--hb-gold);outline-offset:2px}
.hb-me{display:flex;align-items:center;gap:8px;background:none;border:1px solid transparent;color:#fff;border-radius:999px;padding:3px 6px 3px 10px;font:inherit;cursor:pointer;min-width:0}
.hb-me:hover,.hb-me[aria-expanded="true"]{border-color:var(--hb-gold);background:#ffffff0f}
.hb-wn{display:grid;text-align:left;line-height:1.55;min-width:0;max-width:22vw}
.hb-wn b{font-size:.85rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hb-wn small{font-size:.72rem;color:var(--hb-muted)}
.hb-ava{width:32px;height:32px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--hb-gold);color:#141414;font-weight:700;font-size:.9rem}
.hb-cv{color:var(--hb-muted);font-size:.75rem}
.hb-menu{position:absolute;right:max(16px,env(safe-area-inset-right,0px));top:calc(100% + 6px);background:#fff;color:#141414;border-radius:12px;box-shadow:0 10px 30px #0005;min-width:230px;max-width:calc(100vw - 32px);padding:6px;font-size:.92rem;z-index:60}
.hb-menu[hidden]{display:none}
.hb-mh{padding:8px 12px 10px;color:#5e554e;font-size:.82rem;border-bottom:1px solid #eee;margin-bottom:4px}
.hb-mh b{display:block;color:#141414;font-size:.92rem}
.hb-menu a,.hb-menu button{display:block;width:100%;text-align:left;padding:10px 12px;border-radius:8px;background:none;border:0;font:inherit;color:inherit;cursor:pointer;min-height:40px}
.hb-menu a:hover,.hb-menu button:hover,.hb-menu a:focus-visible,.hb-menu button:focus-visible{background:#f3ede4;outline:none}
.hb-menu .hb-out{color:#9b1c1f;font-weight:600;border-top:1px solid #eee;border-radius:0 0 8px 8px;margin-top:4px}
.hb-menu .hb-mo{display:none}
.hb-sys{display:inline-flex;align-items:center;gap:6px;flex:none;background:#ffffff0f;border:1px solid #ffffff38;color:#fff;border-radius:999px;font:inherit;font-size:.82rem;font-weight:600;padding:5px 11px;min-height:32px;cursor:pointer;white-space:nowrap}
.hb-sys svg{width:15px;height:15px;fill:var(--hb-gold)}
.hb-sys:hover,.hb-sys[aria-expanded="true"]{border-color:var(--hb-gold);background:#ffffff1f}
.hb-sys:focus-visible{outline:2px solid var(--hb-gold);outline-offset:2px}
.hb-sysmenu{right:auto;left:16px;top:calc(100% + 4px);min-width:270px}
.hb-sysmenu::before{content:"";position:absolute;top:-6px;left:var(--hb-ax,22px);width:12px;height:12px;background:#fff;transform:rotate(45deg);border-radius:2px}
/* รายการระบบ: สีประจำระบบ + ไอคอน + ลูกเล่นตอนเปิดเมนู/ชี้ (เจ้าของสั่ง 5 ธ.ค. 2569 ให้มีสีสัน ไม่กลืนกัน) */
.hb-sysmenu a{display:flex;align-items:center;gap:12px;position:relative;transition:background .18s,transform .18s}
.hb-sysmenu a::after{content:"";width:8px;height:8px;margin-left:auto;flex:none;border:solid var(--sc,#b8860b);border-width:2px 2px 0 0;transform:translateX(-6px) rotate(45deg);opacity:0;transition:opacity .18s,transform .18s}
.hb-sysmenu a:hover,.hb-sysmenu a:focus-visible{background:color-mix(in srgb,var(--sc,#b8860b) 11%,#fff);transform:translateX(3px)}
.hb-sysmenu a:hover::after,.hb-sysmenu a:focus-visible::after{opacity:1;transform:translateX(0) rotate(45deg)}
.hb-si{width:38px;height:38px;flex:none;border-radius:10px;display:grid;place-items:center;color:#fff;background:var(--sc,#b8860b);background:linear-gradient(140deg,color-mix(in srgb,var(--sc,#b8860b) 78%,#fff),var(--sc,#b8860b));box-shadow:0 3px 10px color-mix(in srgb,var(--sc,#b8860b) 40%,transparent);transition:transform .25s cubic-bezier(.34,1.56,.64,1)}
.hb-si svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.hb-sysmenu a:hover .hb-si,.hb-sysmenu a:focus-visible .hb-si{transform:scale(1.1) rotate(-6deg)}
.hb-st{min-width:0}
.hb-sysmenu a b{display:block;font-weight:600}
.hb-sysmenu a small{display:block;color:#6b625b;font-size:.78rem;margin-top:1px}
.hb-sysmenu:not([hidden]){animation:hbPop .2s ease-out}
.hb-sysmenu:not([hidden]) a{animation:hbIn .32s cubic-bezier(.2,.8,.3,1) backwards}
.hb-sysmenu a:nth-of-type(2){animation-delay:.04s}.hb-sysmenu a:nth-of-type(3){animation-delay:.08s}.hb-sysmenu a:nth-of-type(4){animation-delay:.12s}.hb-sysmenu a:nth-of-type(5){animation-delay:.16s}
@keyframes hbPop{from{opacity:0;transform:translateY(-6px) scale(.98)}}
@keyframes hbIn{from{opacity:0;transform:translateX(-10px)}}
@media (prefers-reduced-motion:reduce){.hb-sysmenu:not([hidden]),.hb-sysmenu:not([hidden]) a{animation:none}.hb-sysmenu a,.hb-si{transition:none}}
/* แบ่งตามงาน: ปุ่มงาน (กดเปิด/ปิดรายการระบบ) + กรอบ coming soon */
.hb-sysmenu{min-width:290px;max-height:calc(100vh - 90px);overflow-y:auto}
.hb-sysmenu .hb-g{display:flex;align-items:center;gap:12px;font-weight:600;margin-top:2px}
.hb-sysmenu .hb-g:hover,.hb-sysmenu .hb-g:focus-visible{background:color-mix(in srgb,var(--sc,#b8860b) 10%,#fff)}
.hb-sysmenu .hb-g::after{content:"";width:8px;height:8px;margin-left:auto;flex:none;border:solid #8a817a;border-width:0 2px 2px 0;transform:translateY(-2px) rotate(45deg);transition:transform .2s}
.hb-sysmenu .hb-g[aria-expanded="true"]::after{transform:translateY(2px) rotate(225deg);border-color:var(--sc,#b8860b)}
.hb-sysmenu .hb-g[aria-expanded="true"]{background:color-mix(in srgb,var(--sc,#b8860b) 8%,#fff)}
.hb-sysmenu .hb-g b{display:block}
.hb-sysmenu .hb-g small{display:block;color:#6b625b;font-size:.78rem;font-weight:400;margin-top:1px}
.hb-gi{width:30px;height:30px;border-radius:8px}
.hb-gi svg{width:17px;height:17px}
.hb-gl{margin:2px 0 6px 14px;padding-left:10px;border-left:2px solid #eee}
.hb-gl:not([hidden]){animation:hbPop .2s ease-out}
.hb-soon{margin:4px 0;padding:14px 12px;border:1.5px dashed color-mix(in srgb,var(--sc,#b8860b) 55%,#fff);border-radius:10px;text-align:center;color:#6b625b;font-size:.82rem;background:color-mix(in srgb,var(--sc,#b8860b) 5%,#fff)}
.hb-soon b{display:block;color:var(--sc,#b8860b);font-size:.95rem;letter-spacing:.04em;text-transform:uppercase}
.hb-sysmenu a.hb-cur{background:color-mix(in srgb,var(--sc,#b8860b) 9%,#fff);box-shadow:inset 3px 0 0 var(--sc,#b8860b)}
.hb-sysmenu a.hb-cur b::after{content:"  · ระบบนี้";font-weight:400;color:#8a6d1d;font-size:.8rem}
@media (max-width:700px){
  .hb-sys{padding:6px 10px}.hb-sys>.hb-cv{display:none}
  .hb-in{gap:8px}
  .hb-nm>b{white-space:normal;font-size:.9rem;line-height:1.5;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .hb-nm>span,.hb-wn,.hb-acts .hb-opt,.hb-acts .hb-out,.hb-sep{display:none!important}
  .hb-logo img{width:32px;height:32px}
  .hb-me{padding:2px}
  .hb-cv{display:none}
  .hb-menu .hb-mo{display:block}
}
@media print{.hb{display:none}}
