/* Beheer: acties per productgroep (#/beheer/acties, assets/views/beheer.js) */
.bh{padding-block:12px 40px;background:var(--ground-2)}
.bh-wrap{display:grid;gap:20px}
.bh-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:8px 16px;padding-top:16px}
.bh-head .h1{margin-top:6px}
.bh-user{margin:0;font-size:13px;color:var(--ink-2)}
.bh-card{background:#fff;border:1px solid var(--line);border-radius:16px}
.bh-h2{font-size:16px;font-weight:600;letter-spacing:-.01em}
.bh .nw{white-space:nowrap}

/* access states */
.bh-gate{display:grid;justify-items:start;gap:10px;max-width:560px;padding:32px 0 96px}
.bh-gate .h1{margin-top:-4px}
.bh-gate-t{font-size:16px;color:var(--ink-2)}
.bh-gate .btn{margin-top:8px}

/* bar preview */
.bh-prev{display:grid;gap:14px;padding:16px 20px 20px}
.bh-prev-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px}
.bh-prev-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.bh-select{position:relative;display:inline-flex}
.bh-select select{appearance:none;-webkit-appearance:none;min-height:40px;padding:0 38px 0 16px;border:1px solid var(--line);border-radius:999px;background:#fff;font:500 14px/1 var(--font);color:var(--ink);cursor:pointer}
.bh-select select:hover{border-color:#d9d3c9}
.bh-select select:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.bh-select svg{position:absolute;right:14px;top:50%;width:15px;height:15px;margin-top:-7.5px;color:var(--ink-2);pointer-events:none}
.bh-device button{min-height:34px}
.bh-frame{overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#fff}
.bh-frame.is-phone{padding:18px 16px;background:var(--ground-2)}
.bh-frame-in{background:#fff}
.bh-frame.is-phone .bh-frame-in{--gut:20px;max-width:390px;margin-inline:auto;overflow:hidden;border:1px solid var(--line);border-radius:18px}
.bh-nobar{display:grid;place-items:center;min-height:48px;margin:0;background:var(--ground-2);font-size:13px;color:var(--ink-3)}
.bh-fake{display:flex;align-items:center;gap:22px;height:58px;padding-inline:var(--gut)}
.bh-fake img{width:auto;height:20px;margin-right:18px}
.bh-fake i{display:block;width:84px;height:8px;border-radius:99px;background:var(--line-2)}
.bh-fake b{display:block;width:104px;height:28px;margin-left:auto;border-radius:99px;background:var(--accent-soft)}
.bh-frame.is-phone .bh-fake i{display:none}
.bh-frame.is-phone .bh-fake b{width:72px}
/* the phone view on a large screen: the same rules the bar gets below 768 px */
.bh-frame.is-phone .promo-offer--more,.bh-frame.is-phone .promo-note--all{display:none}
.bh-frame.is-phone .promo-note--first{display:block}
.bh-frame.is-phone .promo-row>.code-chip,.bh-frame.is-phone .promo-row>.promo-clock{display:none}
.bh-frame.is-phone .promo-mob{display:flex}
.bh-frame.is-phone .promo-t{font-size:13px;white-space:normal;text-align:center}
.bh-frame.is-phone .promo-spark{display:none}
.bh-frame.is-phone .promo-note{margin-top:0}
@media (max-width:767px){
  .bh-device{display:none}
  .bh-fake i{display:none}
  .bh-fake b{width:72px}
}

/* groups */
.bh-thead{display:none}
.bh-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 116px;grid-template-areas:"g g" "code pct" "end end" "bar bar" "wc wc" "ex ex";gap:12px;padding:18px 16px}
.bh-row+.bh-row{border-top:1px solid var(--line)}
.bh-row.is-changed::before{content:"";position:absolute;left:-1px;top:16px;bottom:16px;width:3px;border-radius:0 3px 3px 0;background:var(--accent)}
.bh-g{grid-area:g;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 10px;min-width:0}
.bh-name{font-size:16px;font-weight:600;line-height:1.3;letter-spacing:-.01em}
.bh-meta{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13px;color:var(--ink-3)}
.bh-pill{display:inline-flex;align-items:center;min-height:22px;padding:0 9px;border-radius:999px;background:var(--ground-2);color:var(--ink-2);font-size:12px;font-weight:600;line-height:1}
.bh-pill[hidden]{display:none}
.bh-pill--on{background:var(--ok-soft);color:var(--ok)}
.bh-pill--end{background:#FBF0E4;color:#8A4B12}
.bh-pill--off{background:#F3F0EA;color:var(--ink-3)}
.bh-code{grid-area:code}
.bh-pct{grid-area:pct}
.bh-end{grid-area:end}
.bh-bar{grid-area:bar}
.bh-wc{grid-area:wc}
.bh-ex{grid-area:ex}
.bh-f{display:grid;gap:6px;align-content:start;min-width:0}
.bh-l{font-size:13px;font-weight:600;color:var(--ink-2)}
.bh-in{width:100%;min-width:0;height:44px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:#fff;font:500 16px/1.2 var(--font);color:var(--ink);transition:border-color .2s,box-shadow .2s}
.bh-in:hover{border-color:#d9d3c9}
.bh-in:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(20,18,17,.08)}
.bh-in[aria-invalid="true"]{border-color:#D0342C}
.bh-in[aria-invalid="true"]:focus{box-shadow:0 0 0 3px rgba(208,52,44,.12)}
.bh-in--code{font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.bh-in::-webkit-calendar-picker-indicator{opacity:.55;cursor:pointer}
/* the code suggestions arrow only shows on hover and focus */
.bh-in--code::-webkit-calendar-picker-indicator{opacity:.4}
.bh-in--code:not(:hover):not(:focus)::-webkit-calendar-picker-indicator{opacity:0}
.bh-suf{position:relative;display:block}
.bh-suf .bh-in{padding-right:32px}
.bh-suf>span{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:15px;color:var(--ink-3);pointer-events:none}
.bh-dt{display:grid;grid-template-columns:minmax(0,1fr) 108px;gap:8px}
.bh-dt[hidden]{display:none}
.bh-check{display:inline-flex;align-items:center;gap:8px;width:max-content;min-height:32px;font-size:14px;color:var(--ink-2);cursor:pointer}
.bh-check input{width:18px;height:18px;margin:0;accent-color:var(--accent);cursor:pointer}
.bh-err{margin:0;font-size:12.5px;line-height:1.35;color:#B32A22}
.bh-err[hidden]{display:none}
.bh-switch{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;cursor:pointer}
.bh-switch input{appearance:none;-webkit-appearance:none;position:relative;flex:none;width:44px;height:26px;margin:0;border-radius:999px;background:#D9D3C9;cursor:pointer;transition:background-color .2s}
.bh-switch input::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(20,18,17,.25);transition:transform .2s var(--ease)}
.bh-switch input:checked{background:var(--accent)}
.bh-switch input:checked::after{transform:translateX(18px)}
.bh-switch input:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.bh-row.is-off .bh-switch input{opacity:.5}
.bh-wc{display:flex;align-items:baseline;gap:7px;margin:0;font-size:12.5px;line-height:1.35;color:var(--ink-2)}
.bh-wc[hidden]{display:none}
.bh-wc::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:var(--ink-3);transform:translateY(-1px)}
.bh-wc--ok::before{background:var(--ok-dot)}
.bh-wc--warn::before{background:#E0A030}
.bh-wc--bad{color:#B32A22}
.bh-wc--bad::before{background:#D0342C}
.bh-wc--wait{color:var(--ink-3)}
.bh-ex{display:grid;gap:6px;min-width:0}
.bh-ex>.bh-l{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.bh-ex-in{display:flex;align-items:flex-start;gap:12px;min-height:72px;padding:10px 12px;border-radius:10px;background:var(--ground-2)}
.bh-ex-im{flex:none;width:52px;height:52px;overflow:hidden;border:1px solid var(--line-2);border-radius:8px;background:#fff}
.bh-ex-im img{width:100%;height:100%;object-fit:cover}
.bh-ex-t{display:grid;gap:1px;min-width:0;font-size:13px;line-height:1.4;color:var(--ink-2)}
.bh-ex-name{overflow:hidden;font-weight:600;color:var(--ink);white-space:nowrap;text-overflow:ellipsis}
.bh-ex-price b{font-weight:600;color:var(--ink)}
.bh-ex-price s{margin-left:4px;color:var(--ink-3)}
.bh-ex-code b{font-weight:600;letter-spacing:.06em;color:var(--accent-2)}
.bh-ex-code .nw{font-weight:600;color:var(--ink)}
.bh-ex-left{font-size:12.5px;color:var(--accent-2)}
.bh-ex-left .nw{font-weight:600}
.bh-ex-off{font-size:12.5px;color:var(--ink-3)}

/* actions: always in reach while scrolling the groups */
.bh-actions{position:sticky;bottom:0;z-index:5;margin-top:4px;padding-block:14px calc(14px + env(safe-area-inset-bottom,0px));background:linear-gradient(to top,var(--ground-2) 72%,rgba(250,248,244,0))}
.bh-actions-in{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:10px 10px 10px 18px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 10px 28px -14px rgba(20,18,17,.3)}
.bh-state{margin:0;font-size:14px;color:var(--ink-2)}
.bh-state:focus{outline:none}
.bh-state-dirty{font-weight:600;color:var(--accent-2)}
.bh-state-bad{font-weight:600;color:#B32A22}
.bh-state-ok{font-weight:600;color:var(--ok)}
.bh-linkbtn{padding:0;border:0;background:none;font:inherit;cursor:pointer}
.bh-btns{display:flex;flex-wrap:wrap;gap:8px}
.bh-btns .btn[disabled]{opacity:.4}

@media (max-width:699px){
  .bh-head{padding-top:8px}
  .bh-prev{padding:14px 14px 16px}
  .bh-actions-in{padding:10px}
  .bh-state{width:100%;padding-inline:4px}
  .bh-btns{display:grid;grid-template-columns:1fr 1fr 1.25fr;width:100%}
  .bh-btns .btn{padding-inline:8px}
}
@media (min-width:700px) and (max-width:1199px){
  .bh-row{grid-template-columns:minmax(0,1fr) 112px minmax(0,1.35fr) auto;grid-template-areas:"g g g g" "code pct end bar" "wc wc wc wc" "ex ex ex ex";padding:18px 20px}
  .bh-g{justify-content:flex-start}
  .bh-switch{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:6px;min-height:0}
  .bh-switch input{margin-top:9px}
}
@media (min-width:1200px){
  .bh-thead,.bh-row{grid-template-columns:minmax(150px,1fr) 164px 88px 272px 84px minmax(240px,1.4fr);column-gap:16px;padding-inline:20px}
  .bh-thead{display:grid;padding-block:11px;border-bottom:1px solid var(--line);border-radius:16px 16px 0 0;background:#FCFBF8;font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3)}
  .bh-thead+.bh-row{border-top:0}
  .bh-row{grid-template-areas:"g code pct end bar ex" ". wc wc wc wc ex";row-gap:0;padding-block:16px}
  .bh-l{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .bh-g{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px;padding-top:2px}
  .bh-switch{justify-content:flex-start}
  .bh-wc{margin-top:10px}
}
