/* LuciHQ framework extensions (2026-09-30): top bar, sync badge, nav groups, mobile drawer (<=768px), Workqueue, Ask Luci panel.
   Client tokens only: --hq-accent. Everything else is the framework styles.css. */
.hq{--hq-accent:#5bd0a0}
.hq .brand span{color:var(--hq-accent)}
.sr{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.hq-top{position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:12px;min-height:56px;padding:6px 18px;background:#151820;border-bottom:1px solid var(--line)}
.hq-top-title{font:600 15px/1.2 'Segoe UI',Arial,sans-serif;color:var(--ink);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hq .hq-menu{display:none}
.hq .hq-top .hq-menu{align-items:center;gap:10px;min-height:44px;min-width:44px;padding:0 14px;font-weight:600}
.hq-menu .bars{width:18px;height:2px;background:currentColor;position:relative;display:inline-block}
.hq-menu .bars::before,.hq-menu .bars::after{content:"";position:absolute;left:0;width:18px;height:2px;background:currentColor}
.hq-menu .bars::before{top:-6px}.hq-menu .bars::after{top:6px}
.sync-badge{display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:22px;font-size:12px;color:var(--ink);white-space:nowrap}
.sync-badge em{font-style:normal;color:var(--mut)}
.sync-badge.ok{border-color:#3fb96e}.sync-badge.warn{border-color:#e6a23c}
.sync-badge .dot{width:9px;height:9px;border-radius:50%;background:#e6a23c;display:inline-block}
.sync-badge .dot.ok{background:#3fb96e}
.hq .hq-top .ask-open{min-height:44px;padding:0 16px;background:#302b48;border-color:#8b7ff5;color:#e9e6ff;font-weight:600;font-size:13px}
.hq-backdrop{position:fixed;inset:0;z-index:44;background:rgba(0,0,0,.55)}
.hq .hq-shell{min-height:calc(100vh - 56px)}
.hq .sidebar{position:sticky;top:56px;align-self:start;max-height:calc(100vh - 56px);overflow:auto}
.hq .sidebar nav{display:block;margin-top:22px}
.hq .sidebar nav>button,.hq .group-items button{display:block;width:100%;min-height:44px;margin:2px 0;padding:0 12px}
.nav-group{margin:6px 0}
.hq .sidebar .group-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:0 12px;background:none;border:0;color:var(--ink);font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700}
.group-toggle i{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .15s;margin-right:4px}
.group-toggle[aria-expanded=true] i{transform:rotate(-135deg)}
.group-items[hidden]{display:none}
.group-items{padding-left:6px}
.hq .sidebar label{display:flex;align-items:center;gap:10px;min-height:44px;margin:12px 0}
.hq .sidebar input[type=checkbox]{width:20px;height:20px}
.hq .sidebar .note{display:block}
.hq .sidebar a.note{display:inline-flex;align-items:center;min-height:44px}
.hq main{padding-bottom:80px}
.hq .delivery .btn{display:inline-flex;align-items:center;min-height:44px}
.hq .card h3{font-size:18px}
/* Workqueue */
.wq-list{display:grid;gap:14px;margin-top:18px}
.wq-item{border:1px solid var(--line);background:var(--card);border-radius:10px;padding:18px 20px}
.wq-item h3{margin:10px 0 6px}
.wq-item.approved{border-color:#3fb96e}.wq-item.rejected{opacity:.8;border-color:#7a4a4a}
.wq-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.wq-meta .state{margin-left:auto;color:var(--ink)}
.wq-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:14px}
.hq .wq-actions button{min-height:44px;padding:0 18px;font-weight:600}
.hq .wq-actions .wq-yes{background:#2b4a3a;border-color:#3fb96e;color:#dff5e8}
.wq-kpi{margin:18px 0}
/* Ask Luci panel */
.ask-panel{position:fixed;z-index:70;right:18px;top:68px;bottom:18px;width:min(380px,calc(100vw - 36px));display:flex;flex-direction:column;background:#171b24;border:1px solid #596173;border-radius:12px;box-shadow:0 20px 60px #000a;padding:14px}
.ask-panel[hidden]{display:none}
.ask-head{display:flex;align-items:center;gap:10px}
.ask-head strong{flex:1;font-size:16px}
.hq .ask-head button{min-width:44px;min-height:44px;padding:0}
.ask-log{flex:1;overflow:auto;margin:10px 0;display:grid;gap:8px;align-content:start}
.ask-msg{margin:0;padding:10px 12px;border-radius:8px;background:#1f2430;font-size:14px;line-height:1.5;color:var(--ink)}
.ask-msg b{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#b6abff;margin-bottom:2px}
.ask-msg.me{background:#26233a}
.ask-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.hq .ask-chips .chipbtn{min-height:44px;padding:0 12px;font-size:12.5px;border-radius:22px}
.ask-form{display:flex;gap:8px;max-width:none}
.ask-form input{flex:1;min-height:44px;width:auto}
.hq .ask-form button{min-height:44px;padding:0 16px;font-weight:600}
.ask-panel .note{margin:10px 0 0;font-size:11.5px}
/* Mobile: <=768px is mobile. Top bar + drawer; no horizontal page scroll. */
@media (max-width:768px){
  .hq-top{padding:6px 12px;gap:8px}
  .hq .hq-top .hq-menu{display:inline-flex;position:static;width:auto;margin:0;padding:0 14px;border:1px solid #596173;border-radius:6px;background:#262b35;color:#f2f2f5}
  .sync-badge em{display:none}
  .sync-badge{padding:0 10px}
  .hq .hq-shell{display:block;min-height:0}
  .hq .sidebar{position:fixed;z-index:50;top:56px;left:0;bottom:0;width:min(84vw,320px);max-height:none;display:block;transform:translateX(-105%);visibility:hidden;transition:transform .2s,visibility .2s;background:#151820;border-right:1px solid var(--line);border-bottom:0;padding:18px;box-shadow:0 12px 40px #000a}
  .hq.nav-open .sidebar{transform:none;visibility:visible}
  .hq .sidebar nav{grid-template-columns:none}
  .hq main{padding:20px 16px 90px}
  .hq h1{font-size:30px}
  .hq .grid,.hq .stats{grid-template-columns:1fr}
  .hq .stats{grid-template-columns:1fr 1fr}
  .ask-panel{left:0;right:0;top:auto;bottom:0;width:auto;max-height:78vh;border-radius:14px 14px 0 0}
  .hq .hq-top .ask-open{padding:0 12px}
}
@media (max-width:420px){.hq-top-title{display:none}.hq-top{justify-content:space-between}.hq-menu{margin-right:auto}}
body.nav-open{overflow:hidden}

.hq .sidebar .brand{display:block;min-height:44px}
.hq .sidebar label{cursor:pointer}
