/* The computer's design (web layout guide v28), on top of the phone components: sidebar, top bar, wide content,
   right-aligned action bar. Everything here is under body.gbw, so a phone is never touched. */

html, body.gbm-body.gbw { background: #F4F7FB; }

/* ---- the frame ---- */
body.gbw .gbm-phone.gbw-main { max-width: none; width: auto; margin: 0 0 0 232px; height: 100vh; height: 100dvh; background: #F4F7FB; }

.gbw-side { position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 40; display: flex; flex-direction: column; padding: 14px 12px 10px; overflow-y: auto;
  color: #fff; background: linear-gradient(180deg, #0B4F8F 0%, #1B72C4 55%, #3B9BEA 100%); }
.gbw-side nav { display: flex; flex-direction: column; gap: 2px; flex: 1 0 auto; }
.gbw-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; border-bottom: 1px solid rgba(255,255,255,.22); }
.gbw-logo { width: 38px; height: 38px; border-radius: 11px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.gbw-logo img { max-width: 30px; max-height: 30px; }
.gbw-brand b { display: block; font-size: 13.5px; line-height: 1.2; }
.gbw-brand span { display: block; font-size: 11px; opacity: .8; }
.gbw-brand > div:last-child { min-width: 0; }
.gbw-group { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; opacity: .7; padding: 12px 8px 3px; }
body.gbw a.gbw-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; color: #fff; }
body.gbw a.gbw-item:hover { background: rgba(255,255,255,.13); }
body.gbw a.gbw-item.gbm-on { background: rgba(255,255,255,.22); }
.gbw-item .gbm-icon { width: 18px; height: 18px; flex: none; }
.gbw-subs { display: flex; flex-direction: column; margin: 2px 0 4px 18px; border-left: 2px solid rgba(255,255,255,.25); padding-left: 8px; }
body.gbw .gbw-subs a { padding: 5px 9px; border-radius: 8px; font-size: 12px; color: rgba(255,255,255,.88); }
body.gbw .gbw-subs a:hover { background: rgba(255,255,255,.1); }
body.gbw .gbw-subs a.gbm-on { background: rgba(255,255,255,.2); color: #fff; font-weight: 700; }
.gbw-user { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 2px 0; border-top: 1px solid rgba(255,255,255,.22); }
body.gbw .gbw-user a { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; color: #fff; }
.gbw-user i { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 11.5px; flex: none; }
.gbw-user b { display: block; font-size: 12.5px; line-height: 1.2; }
.gbw-user span { display: block; font-size: 10.5px; opacity: .8; }
body.gbw button.gbw-signout { width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255,255,255,.4); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.gbw-signout .gbm-icon { width: 16px; height: 16px; }

/* ---- top bar ---- */
.gbw-top { display: flex; align-items: center; gap: 12px; padding: 12px 28px 8px; flex-shrink: 0; }
.gbw-top .gbm-bk { width: 38px; height: 38px; border-radius: 12px; background: #fff; box-shadow: 0 4px 10px -5px rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; flex: none; }
.gbw-tt { flex: 1; min-width: 0; }
.gbw-crumb { font-size: 11px; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbw-crumb b { color: #12599E; }
body.gbw h1.gbw-title { font-size: 21px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbw-sub { font-size: 12px; color: #5B6B7F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.gbw a.gbw-act, body.gbw button.gbw-act { color: #1B72C4; font-weight: 600; font-size: 13px; padding: 8px 6px; flex: none; }
body.gbw .gbm-crumb { display: none; }

.gbw-find { position: relative; display: flex; align-items: center; gap: 8px; width: min(300px, 28vw); height: 40px; padding: 0 12px; border: 1px solid #C9D3DF; border-radius: 10px; background: #fff; color: #64748B; flex: none; }
.gbw-find:focus-within { border-color: #1B72C4; box-shadow: 0 0 0 3px rgba(27,114,196,.14); }
.gbw-find .gbm-icon { width: 17px; height: 17px; flex: none; }
.gbw-find input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: #0F172A; width: 100%; min-width: 0; }
.gbw-found { position: absolute; top: 46px; right: 0; width: max(100%, 320px); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #E3E8EF; border-radius: 12px; box-shadow: 0 18px 36px -16px rgba(15,23,42,.45); z-index: 60; }
body.gbw a.gbw-hit { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #1B72C4; }
body.gbw a.gbw-hit:hover { background: #F1F6FC; }
.gbw-hit span { display: flex; flex-direction: column; min-width: 0; }
.gbw-hit b { font-size: 13px; color: #0F172A; }
.gbw-hit small { font-size: 11.5px; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbw-nohit { padding: 12px; font-size: 12.5px; color: #64748B; }

.gbw-shop { position: relative; flex: none; font-size: 12.5px; font-weight: 600; }
.gbw-shop > summary, .gbw-shop-fixed { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 1px solid #E3E8EF; border-radius: 10px; background: #fff; cursor: pointer; list-style: none; }
.gbw-shop-fixed { cursor: default; }
.gbw-shop > summary::-webkit-details-marker { display: none; }
.gbw-shop .gbm-icon { width: 15px; height: 15px; color: #12599E; }
.gbw-shoplist { position: absolute; top: 46px; right: 0; min-width: 200px; background: #fff; border: 1px solid #E3E8EF; border-radius: 12px; box-shadow: 0 18px 36px -16px rgba(15,23,42,.45); z-index: 60; overflow: hidden; display: flex; flex-direction: column; }
.gbw-shoplist a { padding: 10px 14px; }
.gbw-shoplist a:hover { background: #F1F6FC; }
.gbw-shoplist a.gbm-on { color: #1B72C4; font-weight: 700; }

body.gbw a.gbw-bell, a.gbw-avatar { position: relative; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
body.gbw a.gbw-bell { background: #fff; border: 1px solid #E3E8EF; color: #0F172A; }
.gbw-bell .gbm-icon { width: 19px; height: 19px; }
body.gbw a.gbw-avatar { border-radius: 50%; background: #EAF1FB; color: #1B72C4; font-weight: 700; font-size: 12px; }

/* ---- content: wide, in two columns where the things are small ---- */
body.gbw .gbm-phone .gbm-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 12px 18px; padding: 8px 28px 28px; }
body.gbw .gbm-content > * { grid-column: 1 / -1; width: 100%; max-width: 1060px; min-width: 0; }
body.gbw .gbm-content > .gbm-fld, body.gbw .gbm-content > .gbm-lcard { grid-column: auto; }
body.gbw .gbm-content > form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 12px 18px; }
body.gbw .gbm-content > form > * { grid-column: 1 / -1; min-width: 0; }
body.gbw .gbm-content > form > .gbm-fld, body.gbw .gbm-content > form > .gbm-lcard { grid-column: auto; }
/* a field with no neighbouring field to share its row takes the whole row, so the form's edges stay aligned */
body.gbw .gbm-content > .gbm-fld:not(.gbm-fld + .gbm-fld):not(:has(+ .gbm-fld)),
body.gbw .gbm-content > form > .gbm-fld:not(.gbm-fld + .gbm-fld):not(:has(+ .gbm-fld)) { grid-column: 1 / -1; }
body.gbw .gbm-content > form.gbm-inp, body.gbw .gbm-content > form.gbm-scanrow { display: flex; }
body.gbw .gbm-content > [hidden], body.gbw .gbm-content > form > [hidden] { display: none; }
body.gbw .gbm-phone .gbm-grid2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.gbw .gbm-phone .gbm-stp { width: 100%; max-width: 760px; margin: 0 auto 0 0; padding: 0 28px 4px; flex-shrink: 0; }
body.gbw a.gbm-lcard:hover, body.gbw a.gbm-q:hover { box-shadow: 0 8px 20px -10px rgba(27,114,196,.55); }
body.gbw .gbm-list a.gbm-row:hover { background: #F7FAFD; }

/* ---- the action buttons keep the phone's look; where they sit is set with the page shapes below ---- */
body.gbw .gbm-phone:not(:has(.gbm-btnbar)) .gbm-content { margin-bottom: 0; }
body.gbw .gbm-content .gbm-btnbar { padding-inline: 0; background: transparent; border-top: 0; justify-content: flex-start; }

/* sheets are dialogs in the middle, messages sit at the top right */
body.gbw dialog.gbm-sheet { inset: 0; margin: auto; height: fit-content; max-width: 520px; width: calc(100% - 40px); border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(15,23,42,.6); }
body.gbw .gbm-toast { position: fixed; top: 74px; right: 28px; left: auto; bottom: auto; transform: none; max-width: 420px; z-index: 90; }

/* ---- dashboard: figures and shortcuts on the left, what needs attention on the right (guide p.13-21) ---- */
body.gbw .gbm-phone .gbm-content.gbm-hc { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); grid-template-rows: auto auto auto 1fr; margin-top: 0; padding-top: 8px; gap: 14px 22px; overflow-y: auto !important; z-index: auto; }
body.gbw .gbm-content.gbm-hc > * { grid-column: 1; max-width: none; }
body.gbw .gbm-content.gbm-hc > .gbm-hero { margin-top: 0; padding: 18px 22px; }
body.gbw .gbm-content.gbm-hc > .gbm-side { grid-column: 2; grid-row: 1 / span 4; display: flex; flex-direction: column; gap: 10px; }
body.gbw .gbm-content.gbm-hc > .gbm-quick { gap: 14px; }
body.gbw .gbm-phone .gbm-quick .gbm-q { padding: 18px 6px; font-size: 12.5px; }
body.gbw .gbm-hero .gbm-v { font-size: 34px; }
body.gbw .gbm-phone .gbm-mini { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }

/* ---- signed out: the product on the left, the form on the right (guide p.9) ---- */
.gbw-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.gbw-brandside { color: #fff; background: linear-gradient(160deg, #0B4F8F 0%, #1B72C4 55%, #3B9BEA 100%); padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.gbw-brandside .gbm-login-tile { margin: 0; }
.gbw-brandside h2 { font-size: 34px; line-height: 1.1; margin: 0; }
.gbw-brandside p { margin: 0; max-width: 460px; opacity: .92; line-height: 1.6; }
.gbw-brandside ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gbw-brandside li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.gbw-brandside li span { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; flex: none; }
.gbw-brandside li .gbm-icon { width: 17px; height: 17px; }
body.gbw .gbm-phone.gbw-formside { max-width: none; width: auto; height: auto; min-height: 100vh; margin: 0; justify-content: center; align-items: center; overflow: visible; padding: 32px 16px; }
.gbw-authhead { width: 100%; max-width: 400px; }
body.gbw .gbw-authhead h1 { font-size: 24px; font-weight: 700; color: #12599E; }
.gbw-authhead div { font-size: 12.5px; color: #64748B; margin-top: 2px; }
body.gbw .gbw-formside .gbm-login-body { width: 100%; max-width: 400px; flex: none; margin: 0; overflow: visible; padding-inline: 0; }

/* ---- narrower windows: an icon rail, one column ---- */
@media (max-width: 960px) {
  .gbw-find { width: 190px; }
  .gbw-shop > summary, .gbw-shop-fixed { max-width: 150px; overflow: hidden; white-space: nowrap; }
  body.gbw .gbm-phone .gbm-content.gbm-hc { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  body.gbw .gbm-content.gbm-hc > .gbm-side { grid-column: 1; grid-row: auto; }
  body.gbw .gbm-phone .gbm-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .gbw-find { width: 130px; }
  .gbw-split { grid-template-columns: minmax(0, 1fr); }
  .gbw-brandside { display: none; }
  body.gbw .gbm-phone .gbm-content, body.gbw .gbm-content > form { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .gbw-side, .gbw-top { display: none !important; }
  body.gbw .gbm-phone.gbw-main { margin: 0; height: auto; }
  body.gbw .gbm-phone .gbm-content { display: block; padding: 0; }
}

/* ===== the guide's page shapes ===== */

/* a screen with actions: the work on the left, a panel with its buttons on the right (guide p.15, 48, 54) */
body.gbw .gbm-phone.gbw-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto auto minmax(0, 1fr) auto; }
body.gbw .gbw-main > * { grid-column: 1 / -1; min-width: 0; }
body.gbw .gbw-main > .gbw-top { grid-row: 1; }
body.gbw .gbw-main > .gbm-stp { grid-row: 2; order: 0; }
body.gbw .gbw-main > .gbm-content, body.gbw .gbw-main > form:not(.gbm-btnbar) { grid-row: 3; min-height: 0; overflow-y: auto; }
body.gbw .gbw-main:has(> .gbm-btnbar) > .gbm-content, body.gbw .gbw-main:has(> .gbm-btnbar) > form:not(.gbm-btnbar) { grid-column: 1; }
body.gbw .gbm-phone.gbw-main > .gbm-btnbar { grid-column: 2; grid-row: 3 / span 2; display: flex; flex-direction: row; flex-wrap: wrap; align-content: flex-end; justify-content: center; align-items: flex-end;
  gap: 16px; margin: 8px 20px 20px 0; padding: 18px 14px; background: #fff; border: 1px solid #E3E8EF; border-radius: 16px; box-shadow: 0 6px 18px -12px rgba(15,23,42,.45); overflow-y: auto; }
body.gbw .gbm-phone.gbw-main > .gbm-btnbar > .gbm-btn, body.gbw .gbm-phone.gbw-main > .gbm-btnbar > form > .gbm-btn { min-width: 0; width: 100%; }

/* lists: the list on the left, the picked one on the right (guide p.30, 46, 52) */
body.gbw.gbw-master .gbm-phone.gbw-main { grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); }
body.gbw.gbw-master .gbw-main > .gbm-content { grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr); padding-right: 0; }
body.gbw.gbw-master .gbw-main > .gbm-content > * { grid-column: 1; }
body.gbw.gbw-master .gbm-phone.gbw-main > .gbm-btnbar { grid-column: 1; grid-row: 4; margin: 8px 0 14px 28px; padding: 10px; }
body.gbw .gbm-phone.gbw-main > .gbw-pane { grid-column: 2; grid-row: 3 / span 2; display: flex; flex-direction: column; margin: 8px 20px 20px 18px; background: #fff; border: 1px solid #E3E8EF; border-radius: 16px; overflow: hidden; min-height: 0; }
.gbw-pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 18px 4px; }
.gbw-pane-head b { display: block; font-size: 16px; }
.gbw-pane-head small { display: block; color: #64748B; font-size: 12px; }
body.gbw .gbw-pane-head a { color: #1B72C4; font-weight: 600; font-size: 12.5px; flex: none; }
body.gbw .gbm-phone .gbw-pane .gbm-content { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; padding: 8px 18px 14px; margin: 0; }
body.gbw .gbm-phone .gbw-pane .gbm-btnbar { justify-content: center; margin: 0; padding: 10px 14px 14px; border-top: 1px solid #E3E8EF; background: #fff; }
.gbw-pane-wait { padding: 24px 18px; color: #64748B; }
body.gbw .gbm-content a.gbm-picked-row { outline: 2px solid #1B72C4; outline-offset: -2px; background: #EAF3FC; }

/* quick sale: product tiles, with the current sale in the panel (guide p.24) */
body.gbw [data-gba-sale] [data-gba-screen="items"] [data-gba-items] { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; background: transparent; border: 0; box-shadow: none; padding: 0 !important; }
body.gbw [data-gba-items] > button.gbm-pickrow { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; background: #fff; border: 1px solid #E3E8EF; border-radius: 16px; }
body.gbw [data-gba-items] > button.gbm-pickrow:hover { border-color: #1B72C4; box-shadow: 0 6px 16px -8px rgba(27,114,196,.5); }
body.gbw [data-gba-items] > button.gbm-pickrow[hidden] { display: none; }
body.gbw [data-gba-items] .gbm-av { width: 100%; height: 56px; border-radius: 12px; }
body.gbw [data-gba-items] .gbm-m { width: 100%; flex: none; }
body.gbw [data-gba-items] .gbm-n1, body.gbw [data-gba-items] .gbm-n2 { display: block; }
body.gbw [data-gba-items] .gbm-r { color: #1B72C4; text-align: left; }
body.gbw .gbm-phone.gbw-main:has(> .gbm-salebar) { grid-template-columns: minmax(0, 1fr) 320px; }
body.gbw .gbm-phone.gbw-main > .gbm-btnbar.gbm-salebar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; }
body.gbw .gbm-salebar > .gbm-saletotal { order: 2; display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid #E3E8EF; padding-top: 10px; }
body.gbw .gbm-salebar > .gbm-saleacts { order: 3; justify-content: center; }
.gbw-cart { order: 1; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.gbw-cart h3 { margin: 0 0 6px; font-size: 14px; color: #12599E; }
.gbw-cart div { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid #EEF1F5; font-size: 13px; }
.gbw-cart span { flex: 1; min-width: 0; font-weight: 600; }
.gbw-cart small { color: #64748B; }
.gbw-cart p { margin: 0; color: #64748B; font-size: 12.5px; padding: 8px 0; }

@media (max-width: 960px) {
  body.gbw .gbm-phone.gbw-main, body.gbw .gbm-phone.gbw-main:has(> .gbm-salebar) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
  body.gbw .gbw-main:has(> .gbm-btnbar) > .gbm-content, body.gbw .gbw-main:has(> .gbm-btnbar) > form:not(.gbm-btnbar) { grid-column: 1; }
  body.gbw .gbm-phone.gbw-main > .gbm-btnbar, body.gbw .gbm-phone.gbw-main > .gbm-btnbar.gbm-salebar { grid-column: 1; grid-row: 4; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; padding: 10px 16px; }
  .gbw-cart { display: none; }
}

@media print {
  body.gbw .gbm-phone.gbw-main { display: block; }
  body.gbw .gbm-phone.gbw-main > .gbw-pane, .gbw-cart { display: none !important; }
}

/* narrow windows: the count and the total stand apart */
@media (max-width: 960px) { body.gbw .gbm-salebar > .gbm-saletotal { gap: 12px; border-top: 0; padding-top: 0; margin-right: auto; } }

/* stock as the guide's table: item, type, price, stock, status (p.53) */
body.gbw.gbw-master .gbm-phone.gbw-main:has(.gbw-table) { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
body.gbw .gbw-table > .gbw-th, body.gbw .gbw-table > .gbm-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 80px 130px; align-items: center; gap: 10px; }
body.gbw .gbw-table > .gbw-th { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748B; padding: 8px 0; border-bottom: 1px solid #E3E8EF; }
body.gbw .gbw-table > .gbw-th span:nth-child(3), body.gbw .gbw-table .gbw-num { text-align: right; }
body.gbw .gbw-table > .gbw-th span:nth-child(5) { display: none; }
body.gbw .gbw-table .gbm-av { display: none; }
body.gbw .gbw-table .gbw-type, body.gbw .gbw-table .gbw-num { font-size: 12.5px; }
body.gbw .gbw-table .gbm-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
body.gbw .gbw-table .gbm-r .gbm-badge { margin: 0; }
body.gbw .gbw-table > .gbw-th span:nth-child(4)::after { content: " · status"; }

/* a single message (subscription ended, not found): a narrow column in the middle (guide p.11) */
body.gbw .gbm-phone .gbm-content.gbm-ended { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 24px; }
body.gbw .gbm-phone .gbm-content.gbm-ended > * { width: min(100%, 360px); flex: none; }
body.gbw .gbm-phone .gbm-content.gbm-ended > .gbm-ended-icon { width: 76px; }

/* selling with the steps side by side (guide p.24, p.37) */
body.gbw .gbm-content > form.gbw-two.gbw-split-now { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
body.gbw .gbm-content > form.gbw-three.gbw-split-now { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.gbw .gbm-content > form.gbw-split-now > section { align-self: start; min-width: 0; }
body.gbw .gbm-content > form.gbw-split-now > section[data-gba-screen] { grid-column: auto; }
body.gbw .gbm-content > form.gbw-two.gbw-split-now > section[data-gba-screen="items"] { grid-column: 1; grid-row: 3 / span 2; }
body.gbw .gbm-content > form.gbw-two.gbw-split-now > section[data-gba-screen="edit"] { grid-column: 2; grid-row: 3; }
body.gbw .gbm-content > form.gbw-two.gbw-split-now > section[data-gba-screen="customer"] { grid-column: 2; grid-row: 4; }
body.gbw .gbm-content > form.gbw-three.gbw-split-now > section { grid-row: 3; background: #fff; border: 1px solid #E3E8EF; border-radius: 16px; padding: 12px; }
body.gbw .gbm-content:has(> form.gbw-split-now) > *, body.gbw .gbm-content > form.gbw-split-now { max-width: none; }
body.gbw form.gbw-split-now .gbm-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.gbw .gbm-phone.gbw-main:has(form.gbw-split-now) { grid-template-columns: minmax(0, 1fr); }
body.gbw .gbm-phone.gbw-main:has(form.gbw-split-now) > .gbm-content { grid-column: 1; }
body.gbw .gbm-phone.gbw-main:has(form.gbw-split-now) > .gbm-btnbar.gbm-salebar { grid-column: 1; grid-row: 4; flex-direction: row; align-items: center; justify-content: flex-end; margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; padding: 10px 28px; }
body.gbw .gbm-phone.gbw-main:has(form.gbw-split-now) .gbm-saletotal { margin-right: auto; gap: 12px; border-top: 0; padding-top: 0; }
body.gbw .gbm-phone.gbw-main:has(form.gbw-split-now) .gbw-cart { display: none; }

/* the receipt as it will be, beside the payment (guide p.25) */
.gbw-paper { border-top: 1px dashed #94A3B8; margin-top: 8px; padding-top: 8px; font-size: 12.5px; }
.gbw-cart .gbw-paper div { border: 0; padding: 2px 0; justify-content: space-between; }
.gbw-cart .gbw-paper b { font-size: 13px; }
.gbw-cart h4 { margin: 0; text-align: center; font-size: 13px; text-transform: uppercase; }
.gbw-cart .gbw-who { color: #64748B; font-size: 12px; text-align: center; margin: 0 0 6px; }

/* what the fields of a form accept (guide "Rules for this screen") */
.gbw-rules { flex: 1 0 100%; order: -1; align-self: stretch; margin-bottom: auto; min-height: 0; text-align: left; }
.gbw-rules h3 { margin: 0 0 6px; font-size: 14px; color: #12599E; }
.gbw-rules div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #EEF1F5; font-size: 12px; }
.gbw-rules span { color: #475569; flex: none; }
.gbw-rules b { text-align: right; font-weight: 600; }
@media (max-width: 960px) { .gbw-rules { display: none; } }

@media print { .gbw-rules { display: none !important; } }

.gbw-cart > .gbw-paper { display: block; }
.gbw-cart .gbw-paper div { display: flex; }
.gbw-cart .gbw-paper span { font-weight: 400; }
body.gbw .gbm-phone.gbw-main > .gbm-btnbar:has(> .gbw-rules) { align-content: space-between; }
body.gbw .gbm-phone.gbw-main > .gbm-btnbar > .gbw-rules { margin: 0; }

/* ===== tablet (tablet guide v29): a white icon rail with the sale button in the middle; the rest is the wide design ===== */
.gbt-rail, .gbt-pages { display: none; }
@media (max-width: 1100px), (pointer: coarse) and (max-width: 1400px) {
  .gbw-side { display: none; }
  .gbt-rail { position: fixed; inset: 0 auto 0 0; width: 84px; z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; background: #fff; border-right: 1px solid #E3E8EF; overflow-y: auto; }
  .gbt-rail nav { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; flex: 1 0 auto; }
  body.gbw a.gbt-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 68px; min-height: 52px; border-radius: 12px; color: #64748B; font-size: 10.5px; font-weight: 600; flex: none; }
  body.gbw a.gbt-item.gbm-on { background: #EAF3FC; color: #1B72C4; }
  .gbt-item .gbm-icon { width: 21px; height: 21px; }
  body.gbw a.gbt-scan { width: 52px; height: 52px; border-radius: 50%; margin: 6px 0; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #1B72C4, #3B9BEA); box-shadow: 0 8px 18px -6px rgba(27,114,196,.8); }
  .gbt-scan .gbm-icon { width: 24px; height: 24px; }
  body.gbw a.gbt-me { width: 36px; height: 36px; border-radius: 50%; background: #EAF1FB; color: #1B72C4; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
  body.gbw .gbm-phone.gbw-main { margin-left: 84px; }
  body.gbw a.gbw-avatar { display: none; }
  .gbw-top { padding-inline: 18px; }
  .gbt-pages { display: flex; gap: 6px; padding: 2px 18px 6px; overflow-x: auto; flex-shrink: 0; }
  body.gbw .gbt-pages a { white-space: nowrap; }
  /* the pages row is a line of its own under the top bar */
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages) { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
  body.gbw .gbw-main > .gbt-pages { grid-row: 2; }
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages) > .gbm-stp { grid-row: 3; }
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages) > .gbm-content, body.gbw .gbm-phone.gbw-main:has(> .gbt-pages) > form:not(.gbm-btnbar) { grid-row: 4; }
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages) > .gbm-btnbar { grid-row: 4 / span 2; }
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages) > .gbw-pane { grid-row: 4 / span 2; }
  body.gbw.gbw-master .gbm-phone.gbw-main:has(> .gbt-pages) > .gbm-btnbar { grid-row: 5; }
  /* fingers need room */
  body.gbw .gbm-phone .gbm-chip { padding-block: 9px; }
}
@media (max-width: 960px) {
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages) > .gbm-btnbar { grid-row: 5; }
  body.gbw .gbm-phone .gbm-content { padding-inline: 16px; }
  body.gbw .gbm-phone .gbm-btnbar { padding-inline: 16px; }
  .gbw-find { width: 150px; }
}
@media print { .gbt-rail, .gbt-pages { display: none !important; } body.gbw .gbm-phone.gbw-main { margin-left: 0; } }

/* tablet, selling side by side: the bar has its own line under the work, never over it */
@media (max-width: 1100px), (pointer: coarse) and (max-width: 1400px) {
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages):has(form.gbw-split-now) > .gbm-btnbar.gbm-salebar { grid-column: 1 / -1; grid-row: 5; }
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages):has(form.gbw-split-now) > .gbm-content { grid-column: 1 / -1; grid-row: 4; }
}

/* lines as the guide's table while selling: quantity, rate, discount, amount in one row (p.24, p.33) */
body.gbw form.gbw-two.gbw-split-now { --gbw-cols: 96px minmax(0, 1fr) 64px 92px; }
body.gbw .gbm-content > form.gbw-two.gbw-split-now { grid-template-columns: minmax(0, 1.2fr) minmax(380px, 1fr); }
body.gbw form.gbw-two.gbw-split-now [data-gba-cart] { gap: 0; background: #fff; border: 1px solid #E3E8EF; border-radius: 14px; padding: 4px 12px; }
body.gbw form.gbw-two.gbw-split-now [data-gba-cart]:empty { display: none; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] { display: grid; grid-template-columns: var(--gbw-cols); grid-template-areas: "head head head head" "qty fields fields total"; gap: 6px 8px; border: 0; border-bottom: 1px solid #EEF1F5; border-radius: 0; box-shadow: none; padding: 8px 0; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-linehead { grid-area: head; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-two { grid-area: fields; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 6px; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] .gbm-two .gbm-hint:first-child { display: none; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] .gbm-inp { height: 36px; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-linefoot { display: contents; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] .gbm-stepper { grid-area: qty; align-self: start; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] .gbm-linefoot > .gbm-muted { display: none; }
body.gbw form.gbw-two.gbw-split-now [data-gba-line] .gbm-linefoot > b { grid-area: total; align-self: start; text-align: right; padding-top: 8px; }

/* a delivery's item: name, rate and made month in one row (p.62) */

.gbw-paper-logo { width: 34px; height: 34px; object-fit: contain; align-self: center; flex: none; }
body.gbw .gbm-phone .gbm-content.gbw-with-receipt { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); align-items: start; }
body.gbw .gbm-content.gbw-with-receipt > * { grid-column: 1; }
body.gbw .gbm-content.gbw-with-receipt > .gbw-receipt-beside { grid-column: 2; grid-row: 1 / span 12; }
@media (max-width: 960px) { body.gbw .gbm-phone .gbm-content.gbw-with-receipt { grid-template-columns: minmax(0, 1fr); } body.gbw .gbm-content.gbw-with-receipt > .gbw-receipt-beside { grid-column: 1; grid-row: auto; } }

/* scan: the scanning area on the left, what was found on the right (p.36) */
body.gbw .gbm-phone .gbm-content.gbm-scanpage { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); align-items: stretch; }
body.gbw .gbm-content.gbm-scanpage > .gbm-scanarea { grid-column: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; background: #0B1220; border-radius: 18px; padding: 28px; min-height: 360px; }
body.gbw .gbm-content.gbm-scanpage > .gbm-scanresult { grid-column: 2; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 960px) { body.gbw .gbm-phone .gbm-content.gbm-scanpage { grid-template-columns: minmax(0, 1fr); } body.gbw .gbm-content.gbm-scanpage > * { grid-column: 1 !important; } body.gbw .gbm-content.gbm-scanpage > .gbm-scanarea { min-height: 220px; } }

/* label on the left, figure on the right */
body.gbw .gbm-scanresult .gbm-line, body.gbw .gbw-bars .gbm-line { display: flex; justify-content: space-between; gap: 12px; }
body.gbw .gbw-bars progress { width: 100%; }

/* items as the guide's table (p.57) */
body.gbw .gbw-items > .gbw-th, body.gbw .gbw-items > .gbm-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 100px; align-items: center; gap: 10px; }
body.gbw .gbw-items > .gbw-th { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748B; padding: 8px 0; border-bottom: 1px solid #E3E8EF; }
body.gbw .gbw-items > .gbw-th span:last-child, body.gbw .gbw-items .gbm-r { text-align: right; }
body.gbw .gbw-items .gbm-av { display: none; }
body.gbw .gbw-items .gbw-type { font-size: 12.5px; }

/* print labels: items and options on the left, the sheet as it will look on the right with its buttons under it (p.70) */
body.gbw .gbm-content:has([data-gba-labels]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
body.gbw .gbm-content:has([data-gba-labels]) > [data-gba-label-options] { grid-column: 1; }
body.gbw .gbm-content:has([data-gba-labels]) > .gbw-preview { grid-column: 2; grid-row: 1; background: #fff; border: 1px solid #E3E8EF; border-radius: 16px; padding: 14px; }
.gbw-copies { width: 76px; text-align: right; height: 34px; }
@media (min-width: 961px) {
  body.gbw .gbm-phone.gbw-main:has([data-gba-labels]) { grid-template-columns: minmax(0, 1fr); }
  body.gbw .gbm-phone.gbw-main:has([data-gba-labels]) > .gbm-content { grid-column: 1; }
  body.gbw .gbm-phone.gbw-main:has([data-gba-labels]) > .gbm-btnbar { grid-column: 1; grid-row: 4; margin: 0 20px 12px; padding: 10px; justify-content: flex-end; }
}
@media (max-width: 960px) { body.gbw .gbm-content:has([data-gba-labels]) { grid-template-columns: minmax(0, 1fr); } body.gbw .gbm-content:has([data-gba-labels]) > * { grid-column: 1 !important; grid-row: auto !important; } }
@media print {
  body.gbw .gbm-content:has([data-gba-labels]) > .gbw-preview { border: 0; padding: 0; grid-column: 1; }
}

/* the stock and item tables give way on narrower windows: columns shrink, then Type goes (it is under the name too) */
body.gbw .gbw-table > .gbw-th, body.gbw .gbw-table > .gbm-row { grid-template-columns: minmax(0, 1fr) minmax(0, 90px) minmax(0, 76px) minmax(0, 122px); }
body.gbw .gbw-table > * > *, body.gbw .gbw-items > * > * { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1400px) {
  body.gbw .gbw-table > .gbw-th, body.gbw .gbw-table > .gbm-row { grid-template-columns: minmax(0, 1fr) minmax(0, 66px) minmax(0, 112px); gap: 8px; }
  body.gbw .gbw-table > .gbw-th span:nth-child(2), body.gbw .gbw-table .gbw-type { display: none; }
  body.gbw .gbw-items > .gbw-th, body.gbw .gbw-items > .gbm-row { grid-template-columns: minmax(0, 1fr) minmax(0, 76px) minmax(0, 76px); }
}

/* the facts of a picked line */
.gbw-facts { padding: 6px 18px 14px; }
.gbw-facts div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid #EEF1F5; font-size: 13px; }
.gbw-facts span { color: #64748B; flex: none; }
.gbw-facts b { text-align: right; overflow-wrap: anywhere; min-width: 0; }
body.gbw .gbm-content [data-gbw-row] { cursor: pointer; }
body.gbw.gbw-master .gbm-phone.gbw-main:has(input[name="promise"]) .gbw-pane .gbm-content { grid-template-columns: none; }


/* receiving: an item, its rate and made month on one line, the batteries under it (p.62) */

/* reports as the guide's tables (p.111-122) */
.gbw-tablewrap { overflow-x: auto; }
.gbw-report { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.gbw-report th, .gbw-report td { padding: 8px 8px; border-bottom: 1px solid #EEF1F5; text-align: right; vertical-align: top; }
.gbw-report th:first-child, .gbw-report td:first-child { text-align: left; padding-left: 0; }
.gbw-report thead th { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748B; white-space: nowrap; }
.gbw-report tbody th { font-weight: 700; }
body.gbw .gbw-report a { color: #12599E; }

/* a form that only carries hidden fields for a button of the bar takes no place: it must never lie over the work */
body.gbw .gbm-phone.gbw-main > form:not(:has(:not([type="hidden"]))) { display: none; }

/* the panel's heading and the table's column names, shown once there is a line (p.23, p.33) */
body.gbw .gbw-carthead { display: none; }
body.gbw form.gbw-two.gbw-split-now .gbw-carthead:has(+ [data-gba-cart] > *) { display: block; }
.gbw-carthead > b { display: block; font-size: 14px; color: #12599E; }
.gbw-carthead > div { display: none; }
/* where there is room each line is one row of that table */
@media (min-width: 1280px) {
  body.gbw form.gbw-two.gbw-split-now { --gbw-cols: minmax(0, 1fr) 96px 104px 54px 72px; }
  body.gbw .gbm-content > form.gbw-two.gbw-split-now { grid-template-columns: minmax(0, 1fr) minmax(500px, 1.1fr); }
  .gbw-carthead > div { display: grid; grid-template-columns: var(--gbw-cols); gap: 6px; margin-top: 6px; padding: 0 13px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748B; }
  .gbw-carthead > div span:last-child { text-align: right; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] { grid-template-areas: "head qty fields fields total"; align-items: start; gap: 6px; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-two { grid-template-columns: 104px 54px; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-two .gbm-hint:not([data-gba-was]) { display: none; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-two [data-gba-was] { font-size: 10.5px; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] .gbm-inp { padding-inline: 6px; gap: 3px; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] .gbm-stepper { gap: 2px; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-linehead { display: flex; gap: 4px; justify-content: space-between; min-width: 0; font-size: 12.5px; overflow-wrap: anywhere; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-linehead span { display: block; font-size: 11px; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-linefoot > b { font-size: 12.5px; }
}
.gbw-cart > section { display: block; flex: none; }
.gbw-cart > .gbw-paper-total span, .gbw-cart > .gbw-paper-total b { font-weight: 800; font-size: 15px; }
.gbw-cart > .gbw-paper-warranty { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #EAF3FC; font-size: 12px; overflow-wrap: anywhere; }
.gbw-cart > .gbw-paper-warranty span { font-weight: 400; }
.gbw-paper-warranty b { display: block; color: #12599E; }
/* the guide's order under the sale: cancel, hold, next */
body.gbw .gbm-saleacts [data-gba-cancel] { order: -1; }
/* narrower than that the rate keeps its room: the column is under "Rs" already by the amount beside it */
@media (min-width: 961px) and (max-width: 1279px) {
  body.gbw form.gbw-two.gbw-split-now { --gbw-cols: 92px minmax(0, 1fr) 48px 76px; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-two { grid-template-columns: minmax(0, 1fr) 48px; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] > .gbm-two .gbm-prefix { display: none; }
  body.gbw form.gbw-two.gbw-split-now [data-gba-line] .gbm-inp { padding-inline: 6px; gap: 3px; }
}

/* ===== receive stock: scanning on the left, pay and save on the right (guide p.62, p.64) ===== */
.gbw-steptitle, .gbw-scanhead { display: none; }
@media (min-width: 961px) {
  body.gbw .gbm-content > form.gbw-receive { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: 16px; align-items: start; max-width: none; }
  body.gbw .gbm-content:has(> form.gbw-receive) > * { max-width: none; }
  body.gbw form.gbw-receive > * { grid-column: 1; min-width: 0; }
  body.gbw form.gbw-receive > [data-gba-pay-step] { grid-column: 2; grid-row: 1 / span 6; position: sticky; top: 0; background: #fff; border: 1px solid #E3E8EF; border-radius: 16px; padding: 14px; }
  body.gbw form.gbw-receive > .gbm-note, body.gbw form.gbw-receive > [role=alert] { grid-column: 1 / -1; }
  body.gbw form.gbw-receive .gbw-steptitle { display: block; margin: 0; font-size: 14px; color: #12599E; }
  body.gbw form.gbw-receive .gbm-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* the batteries as the guide's table */
  body.gbw form.gbw-receive .gbw-scanhead, body.gbw form.gbw-receive [data-gba-scanned-rows] > .gbm-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 70px 110px 24px; gap: 10px; align-items: center; }
  body.gbw .gbw-scanhead { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748B; padding: 6px 0; border-bottom: 1px solid #E3E8EF; }
  body.gbw form.gbw-receive [data-gba-scanned-rows] .gbm-av, body.gbw form.gbw-receive [data-gba-scanned-rows] .gbm-r { display: none; }
  body.gbw form.gbw-receive [data-gba-scanned-rows] .gbm-m { display: contents; }
  body.gbw form.gbw-receive [data-gba-scanned-rows] .gbm-n2 { overflow-wrap: anywhere; }
  body.gbw form.gbw-receive [data-gba-scanned-rows] > .gbm-row::after { content: "✓"; color: #12805C; font-weight: 700; grid-column: 5; }
  .gbw-made { font-size: 12.5px; }
  body.gbw .gbw-ratepill { border: 1px solid #C9D6E5; border-radius: 10px; background: #fff; padding: 6px 10px; font-weight: 700; font-size: 12.5px; color: #0F172A; cursor: pointer; text-align: right; }
  body.gbw .gbw-ratepill:hover { border-color: #1B72C4; }
  /* the table above lists them, so each item's card keeps only its figures and the typing box */
  body.gbw form.gbw-receive [data-gba-serial-rows] { display: none; }
  body.gbw .gbm-phone.gbw-main:has(form.gbw-receive) { grid-template-columns: minmax(0, 1fr); }
  body.gbw .gbm-phone.gbw-main:has(form.gbw-receive) > .gbm-content { grid-column: 1; }
  body.gbw .gbm-phone.gbw-main:has(form.gbw-receive) > .gbm-btnbar { grid-column: 1; grid-row: 4; flex-direction: row; align-items: center; justify-content: flex-end; margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; padding: 10px 28px; }
  body.gbw .gbm-phone.gbw-main:has(form.gbw-receive) > .gbm-btnbar > .gbw-rules { display: none; }
}
@media (min-width: 961px) and (max-width: 1100px), (min-width: 961px) and (pointer: coarse) and (max-width: 1400px) {
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages):has(form.gbw-receive) > .gbm-content { grid-column: 1 / -1; grid-row: 4; }
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages):has(form.gbw-receive) > .gbm-btnbar { grid-column: 1 / -1; grid-row: 5; }
}
.gbw-edithead { display: none; }
@media (min-width: 961px) {
  /* vendor, warehouse, date and bill number two to a row, so the table starts higher */
  body.gbw form.gbw-receive > [data-gba-step]:not([data-gba-pay-step]):first-of-type:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.gbw form.gbw-receive > [data-gba-step]:first-of-type > * { grid-column: 1 / -1; min-width: 0; }
  body.gbw form.gbw-receive > [data-gba-step]:first-of-type > .gbm-fld { grid-column: auto; }
  body.gbw form.gbw-receive > [data-gba-step]:first-of-type > .gbm-two { display: contents; }
  body.gbw form.gbw-receive > [data-gba-step]:first-of-type > .gbm-two > * { grid-column: auto; min-width: 0; }
  /* rates and discounts as the guide's table (p.64) */
  body.gbw form.gbw-receive .gbw-edithead { display: block; }
  .gbw-edithead > b { display: block; font-size: 14px; color: #12599E; }
  .gbw-edithead > div { display: grid; grid-template-columns: minmax(0, 1fr) 110px 120px 80px 100px; gap: 10px; padding: 8px 14px 0; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748B; }
  .gbw-edithead > div span:last-child { text-align: right; }
  body.gbw form.gbw-receive [data-gba-edit-line] { display: grid; grid-template-columns: minmax(0, 1fr) 110px 120px 80px 100px; grid-template-areas: "head qty fields fields total"; align-items: start; gap: 10px; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-linehead { grid-area: head; display: block; min-width: 0; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-linehead span:not(.gbm-badge) { display: block; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-two { grid-area: fields; grid-template-columns: 120px 80px; gap: 10px; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-two .gbm-hint:not([data-e-was]) { display: none; }
  body.gbw form.gbw-receive [data-gba-edit-line] .gbm-inp { height: 38px; padding-inline: 8px; gap: 4px; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-linefoot { display: contents; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-linefoot > .gbm-muted { display: none; }
  body.gbw form.gbw-receive [data-gba-edit-line] .gbm-stepper { grid-area: qty; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-linefoot > b { grid-area: total; text-align: right; padding-top: 8px; }
}
@media (min-width: 961px) and (max-width: 1279px) {
  .gbw-edithead > div { display: none; }
  body.gbw form.gbw-receive [data-gba-edit-line] { grid-template-columns: 100px minmax(0, 1fr) 90px; grid-template-areas: "head head head" "qty fields total"; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-two { grid-template-columns: minmax(0, 1fr) 60px; }
  body.gbw form.gbw-receive [data-gba-edit-line] > .gbm-two .gbm-prefix { display: none; }
}

/* a report: the table with its period beside the split and the PDF, Excel and share buttons (p.112-122) */
.gbw-rep { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: stretch; }
.gbw-rep > * { min-width: 0; }
.gbw-rep-main, .gbw-rep-side { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.gbw-rep-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.gbw-rep-head > b, .gbw-rep-side .gbw-bars > b { font-size: 14px; color: #12599E; }
.gbw-rep-side .gbw-bars { display: flex; flex-direction: column; gap: 4px; }
.gbw-rep-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px; margin-top: auto; padding-top: 12px; }
.gbw-rep-actions .gbm-ibw { background: none; border: 0; padding: 0; text-decoration: none; font: inherit; }
@media (min-width: 961px) {
  .gbw-rep { grid-template-columns: minmax(0, 1fr) 280px; min-height: calc(100dvh - 250px); height: max-content; }
}
@media print {
  .gbw-rep { display: block; min-height: 0; }
  .gbw-rep.gbm-noprint, .gbw-rep-actions { display: none; }
}
/* money received: cash, bank, wallets and credit each in its colour (p.111) */
.gbw-money progress:nth-of-type(2)::-webkit-progress-value { background: #3B9AF0; }
.gbw-money progress:nth-of-type(n+3)::-webkit-progress-value { background: #22B8E0; }
.gbw-money progress:last-of-type::-webkit-progress-value { background: #C27803; }
@media (min-width: 961px) {
  /* every figure on one row, however many the report has */
  body.gbw .gbm-content > .gbm-grid2.gbw-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
  /* the statement's account and dates on as few lines as fit */
  body.gbw .gbw-rep-main > form.gbm-stack[data-gba-autosave] { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  body.gbw .gbw-rep-main > form[data-gba-autosave] > .gbm-fld { flex: 1 1 220px; }
  body.gbw .gbw-rep-main > form[data-gba-autosave] > .gbm-two { flex: 2 1 320px; }
}
@media (min-width: 961px) {
  /* a long table scrolls; the split and the buttons beside it stay on the screen */
  .gbw-rep-side { align-self: start; position: sticky; top: 0; box-sizing: border-box; height: calc(100vh - 250px); height: calc(100dvh - 250px); min-height: 300px; overflow-y: auto; }
  .gbw-rep-side > * { flex: 0 0 auto; }
  .gbw-rep-actions { position: sticky; bottom: 0; background: #fff; }
}

/* ===== warranty claims: the list, and the picked claim with its test and decision (guide p.102) ===== */
body.gbw.gbw-master .gbm-phone.gbw-main:has(> .gbw-claims) { grid-template-columns: minmax(290px, 360px) minmax(0, 1fr); }
body.gbw .gbw-claims > .gbm-lcard { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; }
body.gbw .gbw-claims > .gbm-lcard > .gbm-a, body.gbw .gbw-claims > .gbm-lcard > .gbm-b { grid-column: 1; }
body.gbw .gbw-claims > .gbm-lcard > .gbm-a { justify-content: flex-start; gap: 10px; }
body.gbw .gbw-claims > .gbm-lcard > div:last-child { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
body.gbw .gbm-content > .gbw-claimhead, body.gbw .gbm-content > .gbw-test { flex: 0 0 auto; }
body.gbw .gbw-claimhead { display: flex; flex-direction: column; gap: 8px; }
body.gbw .gbm-phone .gbw-claimhead .gbm-stp { width: 100%; max-width: none; margin: 0; padding: 0; }
body.gbw .gbm-content > form.gbw-test { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; align-items: stretch; }
body.gbw .gbm-content > form.gbw-test > section { grid-column: auto; min-width: 0; margin: 0; }
body.gbw .gbm-content > form.gbw-test > [role=alert], body.gbw .gbm-content > form.gbw-test > .gbm-note { grid-column: 1 / -1; }
body.gbw .gbw-test .gbm-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.gbw-cardname { font-size: 14px; color: #12599E; }
/* what the chosen decision means */
.gbw-decide [data-gbw-when] { display: none; }
.gbw-decide:has(input[value=Replace]:checked) [data-gbw-when=Replace],
.gbw-decide:has(input[value=Repair]:checked) [data-gbw-when=Repair],
.gbw-decide:has(input[value=Company]:checked) [data-gbw-when=Company] { display: block; }
.gbw-decide:has(input[name=Approve][value=false]:checked) [data-gbw-when] { display: none; }

/* the panel's summary of a screen (guide p.100-111): what it moves there is not said twice */
.gbw-summary { overflow-wrap: anywhere; }
.gbw-summary[hidden] { display: none; }
.gbw-summary p.gbm-note { margin: 0 0 4px; font-size: 12px; }
.gbw-summary b { min-width: 0; }
body.gbw .gbm-phone.gbw-main > .gbm-btnbar > .gbw-summary ~ .gbw-summary { margin-top: -8px; }
@media (min-width: 961px) { body.gbw.gbw-summarised .gbw-dup { display: none; } }
@media (max-width: 960px) { .gbw-summary { display: none; } }

/* two things side by side: the company's answer and what it changed (p.111) */
body.gbw .gbm-content > .gbw-col { grid-column: auto; align-self: start; }

/* claim to the company: tick on the left, the sheet as it will be on the right with its buttons under it (p.108) */
.gbw-sheetpreview { display: none; }
@media (min-width: 961px) {
  body.gbw .gbm-phone.gbw-main:has(> .gbm-btnbar > .gbw-sheetpreview) { grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr); }
  body.gbw .gbm-btnbar > .gbw-sheetpreview { display: flex; flex-direction: column; gap: 8px; flex: 1 0 100%; align-self: stretch; margin-bottom: auto; max-height: calc(100vh - 300px); max-height: calc(100dvh - 300px); overflow-y: auto; text-align: left; }
  body.gbw .gbm-btnbar > .gbw-sheetpreview .gbm-challan { border: 1px solid #E3E8EF; }
  body.gbw .gbm-phone.gbw-main > .gbm-btnbar:has(> .gbw-sheetpreview) { align-content: space-between; }
}

/* the claim beside the list has its own heading card: only "Open" stays above it */
.gbw-pane:has(.gbw-claimhead) .gbw-pane-head { justify-content: flex-end; padding-top: 8px; }
.gbw-pane:has(.gbw-claimhead) .gbw-pane-head > div { display: none; }

/* import: the problem rows or the ready ones, picked above the list (p.143) */
.gbw-filtered { display: none !important; }
@media (min-width: 961px) {
  .gbw-importfind { display: flex; flex-direction: column; gap: 8px; }
  .gbw-import:has(input[name=show][value=problems]:checked) [data-gbw-ready] { display: none; }
  .gbw-import:has(input[name=show][value=ready]:checked) [data-gbm-problem] { display: none; }
}
@media (max-width: 960px) { body.gbw .gbw-importfind, body.gbw [data-gbw-ready] { display: none !important; } }

/* the buttons under the right-hand column instead of in a column of their own (p.70, p.73) */
@media (min-width: 961px) {
  body.gbw .gbm-phone.gbw-main:has(.gbw-under) { grid-template-columns: minmax(0, 1fr); }
  body.gbw .gbm-phone.gbw-main:has(.gbw-under) > .gbm-content { grid-column: 1 / -1; }
  body.gbw .gbm-phone.gbw-main:has(.gbw-under) > .gbm-btnbar { grid-column: 1 / -1; grid-row: 4; flex-direction: row; align-items: center; align-content: center; justify-content: flex-end; margin: 0 28px 12px; padding: 10px; }
  body.gbw .gbm-phone.gbw-main:has(> .gbt-pages):has(.gbw-under) > .gbm-btnbar { grid-row: 5; }
  body.gbw .gbm-phone.gbw-main:has(.gbw-under) > .gbm-btnbar > .gbw-rules { display: none; }
  body.gbw .gbm-content > .gbw-under { grid-column: 2; }
}
body.gbw .gbm-content > .gbm-card.gbw-col { align-self: start; }

/* a customer's card: buttons under the figures, last order and open bills side by side (p.82) */
.gbw-cardacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.gbw-pairauto { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; align-items: start; }
body.gbw .gbm-content > .gbw-pairauto, body.gbw .gbm-content > [data-gbw-customer] { flex: 0 0 auto; }
.gbw-hidden { display: none !important; }

/* small things seen on screenshots */
body.gbw .gbw-report input.gbw-copies { display: block; width: 76px; height: 32px; margin-left: auto; padding-block: 2px; }
body.gbw .gbw-report[data-gbw-copies] td { vertical-align: middle; }
.gbw-shophead span:last-child { text-align: right; }
.gbw-pane:has([data-gbw-customer]) .gbw-pane-head { justify-content: flex-end; padding-top: 8px; }
.gbw-pane:has([data-gbw-customer]) .gbw-pane-head > div { display: none; }
/* four buttons beside a report still stand in one row */
@media (min-width: 961px) {
  .gbw-rep-actions:has(> :nth-child(4)) { gap: 8px; flex-wrap: nowrap; }
  body.gbw .gbw-rep-actions:has(> :nth-child(4)) .gbm-ibtn { width: 52px; height: 50px; }
}

/* what a payment settles, in the panel (p.92-94) */
body.gbw .gbm-btnbar > .gbw-listsum { flex: 1 0 100%; align-self: stretch; margin-bottom: auto; min-height: 0; text-align: left; }
.gbw-listsum h3 { margin: 0 0 6px; font-size: 14px; color: #12599E; }
.gbw-listsum [data-gbw-copy] { font-size: 12.5px; color: #475569; }
body.gbw .gbm-phone.gbw-main > .gbm-btnbar:has(> .gbw-listsum) { align-content: space-between; }
@media (max-width: 960px) { body.gbw .gbw-listsum { display: none; } }
@media print { .gbw-listsum { display: none !important; } }

/* with Cancel and Save in the panel the top bar needs no second Save */
@media (min-width: 961px) { body.gbw.gbw-savebar .gbw-act-save { display: none; } }

/* a pair of choice buttons that is its own form stays one row (tax p.141) */
body.gbw .gbm-content > form.gbm-seg { display: flex; }
body.gbw .gbm-content > form.gbm-seg > * { flex: 1; }

/* however long a panel's list is, it scrolls by itself and the buttons under it stay on the screen */
@media (min-width: 961px) {
  body.gbw .gbm-phone.gbw-main > .gbm-btnbar > .gbw-listsum, body.gbw .gbm-phone.gbw-main > .gbm-btnbar > .gbw-rules {
    max-height: calc(100vh - 310px); max-height: calc(100dvh - 310px); overflow-y: auto; }
}

/* the bar belongs to the right-hand column, not to the whole width */
@media (min-width: 961px) {
  body.gbw .gbm-phone.gbw-main:has(.gbw-under) > .gbm-btnbar { margin-left: calc(50% + 4px); justify-content: center; }
  body.gbw .gbm-phone.gbw-main:has([data-gba-labels]) > .gbm-btnbar { margin-left: calc(45.5% + 12px); justify-content: center; }
}

/* notifications: search and All / Unread above the list (p.22) */
.gbw-alertfind { display: flex; flex-direction: column; gap: 8px; }
.gbw-alerts:has(input[name=gbw-show][value=unread]:checked) [data-gbw-row]:not(.gbm-new) { display: none; }
body.gbw .gbm-phone .gbw-pane > .gbm-btnbar { margin-top: auto; }
.gbw-version { margin-top: auto; opacity: .8; font-size: 12px; }
@media (max-width: 960px) { body.gbw .gbw-alertfind { display: none; } }
/* room inside the outline of the picked notification */
body.gbw .gbm-content.gbw-alerts .gbm-list a.gbm-row { padding-inline: 8px; }

/* exchange side by side: Cancel and Complete under the third column, "Pay the difference" (p.36) */
@media (min-width: 1101px) and (pointer: fine) {
  body.gbw .gbm-phone.gbw-main:has(form.gbw-three.gbw-split-now) > .gbm-btnbar.gbm-salebar { margin-left: calc(66.666% - 4px); justify-content: center; padding-inline: 8px; }
  body.gbw .gbm-phone.gbw-main:has(form.gbw-three.gbw-split-now) .gbm-saletotal { display: none; }
}

/* a new category typed on the page itself (p.59) */
body.gbw .gbm-content > form.gbw-newcat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
body.gbw .gbm-content > form.gbw-newcat > b { grid-column: 1 / -1; font-size: 14px; color: #12599E; }
