/* UPI payment pages and staff portal. Uses the Blueprint Navy theme tokens when present. */
.ahs-pay .bpn-wrap { padding-top: 18px; padding-bottom: 40px; }
.ahs-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.ahs-card { background: var(--ah-surface, #fff); border: 1px solid var(--ah-border, #DCE4EF); border-radius: 20px; padding: 20px; margin-bottom: 16px; }
.ahs-card h2 { font-size: 1.2rem; margin: 0 0 12px; }
.ahs-card h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.ahs-crumb { margin: 0 0 4px; font-size: 13px; opacity: .85; }
.ahs-crumb a { color: inherit; }
.ahs-alert, .ahs-note { padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; }
.ahs-alert { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.ahs-note { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.ahs-hint { color: var(--ah-muted, #5B6B82); font-size: 14px; margin: 8px 0 0; }
.ahs-wide { width: 100%; margin-top: 14px; }

.ahs-form label, .ahs-act label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
.ahs-form input, .ahs-form textarea, .ahs-act input, .ahs-search input, .ahs-qty {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: inherit;
  border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 12px; background: #fff;
}
.ahs-form input:focus, .ahs-form textarea:focus, .ahs-act input:focus { outline: none; border-color: var(--ah-blue, #2563EB); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.ahs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ahs-choice { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.ahs-choice legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ahs-choice label { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 14px; margin: 0; cursor: pointer; font-weight: 400; }
.ahs-choice label:has(input:checked) { border-color: var(--ah-blue, #2563EB); background: #F5F8FF; }
.ahs-choice input { width: auto; min-height: 0; margin-top: 4px; accent-color: var(--ah-blue, #2563EB); }
.ahs-choice span { display: flex; flex-direction: column; }
.ahs-choice small { color: var(--ah-muted, #5B6B82); }
.ahs-address[hidden] { display: none; }

.ahs-lines { list-style: none; padding: 0; margin: 0; }
.ahs-lines li { display: grid; grid-template-columns: 1fr 76px auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ah-border, #DCE4EF); }
.ahs-lines__name { display: flex; flex-direction: column; font-weight: 600; font-size: 14.5px; }
.ahs-lines__name small { font-weight: 400; color: var(--ah-muted, #5B6B82); }
.ahs-qty { min-height: 40px; text-align: center; }
.ahs-total { display: flex; justify-content: space-between; font-size: 1.15rem; margin: 14px 0; }

.ahs-paybox { text-align: center; }
.ahs-amount { font-size: clamp(2rem, 4vw + 1rem, 2.8rem); font-weight: 800; letter-spacing: -0.02em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.ahs-amount--ok { color: #15803D; font-size: 1.6rem; }
.ahs-timer { color: var(--ah-muted, #5B6B82); margin: 0; }
.ahs-qr { display: none; margin: 16px auto 0; width: 220px; }
.ahs-qr svg, .ahs-qr img { width: 220px; height: 220px; }
.ahs-report { text-align: left; border-top: 1px solid var(--ah-border, #DCE4EF); margin-top: 18px; padding-top: 4px; }

.ahs-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; counter-reset: s; }
.ahs-steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; color: var(--ah-muted, #5B6B82); padding: 6px 0; }
.ahs-steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ah-border, #DCE4EF); font-size: 13px; font-weight: 700; }
.ahs-steps li.done { color: var(--ah-text, #0B1F3A); }
.ahs-steps li.done::before { content: "✓"; background: #15803D; border-color: #15803D; color: #fff; }
.ahs-steps li.now { color: var(--ah-text, #0B1F3A); font-weight: 700; }
.ahs-steps li.now::before { border-color: var(--ah-blue, #2563EB); color: var(--ah-blue, #2563EB); }

.ahs-billhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.ahs-billhead p { color: var(--ah-muted, #5B6B82); margin: 0 0 12px; font-size: 14px; }
.ahs-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ahs-table th, .ahs-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--ah-border, #DCE4EF); vertical-align: top; }
.ahs-table thead th { font-size: 13px; color: var(--ah-muted, #5B6B82); }
.ahs-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ahs-table tfoot th { text-align: right; font-weight: 500; }
.ahs-table small { color: var(--ah-muted, #5B6B82); }
.ahs-tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--ah-border, #DCE4EF); border-radius: 16px; }
.ahs-row--attention { background: #FFFBEB; }
.ahs-payments { list-style: none; padding: 0; margin: 0; }
.ahs-payments li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--ah-border, #DCE4EF); font-size: 14px; }
.ahs-payments li span { flex: 1 1 180px; color: var(--ah-muted, #5B6B82); }

.ahs-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-style: normal; font-weight: 600; background: var(--ah-tile, #EEF3FA); color: var(--ah-text, #0B1F3A); }
.ahs-pill--reported, .ahs-pill--payment_request { background: #FEF3C7; color: #92400E; }
.ahs-pill--checked, .ahs-pill--order_created, .ahs-pill--handed_over { background: #DCFCE7; color: #166534; }
.ahs-pill--rejected, .ahs-pill--reversed, .ahs-pill--expired, .ahs-pill--cancelled { background: #FEE2E2; color: #991B1B; }

.ahs-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ahs-search { display: flex; gap: 8px; flex: 1 1 320px; }
.ahs-search .bpn-btn { min-height: 46px; }
.ahs-sum { display: grid; gap: 6px; margin: 0; }
.ahs-sum div { display: flex; justify-content: space-between; gap: 10px; }
.ahs-sum dt { color: var(--ah-muted, #5B6B82); }
.ahs-sum dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.ahs-sum__big { border-top: 1px solid var(--ah-border, #DCE4EF); padding-top: 8px; font-size: 1.2rem; }
.ahs-wa { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ahs-wa .bpn-btn { min-height: 44px; font-size: 14px; }
.ahs-payrow { display: grid; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ah-border, #DCE4EF); }
.ahs-payrow p { margin: 0; }
.ahs-payrow--reported { background: #FFFBEB; border-radius: 12px; padding: 12px; }
.ahs-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 6px 0; }
.ahs-act label { margin: 0; flex: 1 1 180px; }
.ahs-act .bpn-btn { min-height: 46px; }
.ahs-moves { display: grid; gap: 10px; }
.ahs-history { padding-left: 1.2em; margin: 0 0 14px; font-size: 14px; }
.ahs-history small { color: var(--ah-muted, #5B6B82); }
details summary { cursor: pointer; color: var(--ah-blue, #2563EB); font-weight: 600; margin: 8px 0; }

@media (min-width: 900px) {
  .ahs-grid { grid-template-columns: 1fr 1fr; }
  .ahs-pay-start .ahs-grid { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .ahs-qr { display: block; }
}
@media print {
  .bpn-header, .bpn-announce, .bpn-mobile-search, .bpn-footer, .bpn-tabbar, .bpn-fab, .ahs-paybox, .ahs-wa, .ahs-noprint, .ahs-crumb { display: none !important; }
  .ahs-report .ahs-grid { grid-template-columns: 1fr 1fr; }
  .ahs-report .ahs-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .bpn-band { background: none !important; color: #000 !important; padding: 0 !important; }
  @page { size: A4; margin: 12mm; }
}

/* Reports and audit log (M4c) */
.ahs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ahs-toolbar input, .ahs-toolbar select { min-height: 40px; }
.ahs-strong th, .ahs-strong td { font-weight: 700; }
.ahs-bars { list-style: none; margin: 0; padding: 0; }
.ahs-bars li { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 8px; align-items: center; padding: 3px 0; font-variant-numeric: tabular-nums; }
.ahs-bar { height: 14px; width: var(--w, 0%); min-width: 2px; background: var(--ah-blue, #2563EB); border-radius: 3px; }
.ahs-audit td { font-size: 13.5px; }
.ahs-detail { white-space: pre-wrap; word-break: break-word; font-size: 12px; }
.ahs-changed td { background: #FDECEC; }
.ahs-pager { display: flex; align-items: center; gap: 12px; }
.ahs-tabs { display: flex; gap: 8px; flex-wrap: wrap; }

/* POS devices */
.ahs-inline { display: inline-block; margin: 0 6px 6px 0; }
.ahs-paircode { font-size: 2rem; font-weight: 700; letter-spacing: .15em; font-variant-numeric: tabular-nums; margin: 8px 0; }
.ahs-flags { margin: 0; padding-left: 18px; }
.ahs-form--tight { gap: 6px; min-width: 200px; }

/* Staff portal shell (0.12.1): the menu on the left on a PC, a drawer behind "Menu" on a phone
   (includes/payments/nav.php, assets/pay.js). The navy rail with the blueprint grid is the one
   bold element; pages beside it stay light and quiet. */
.ahs-side {
  position: relative; z-index: 30; color: var(--ah-on-navy, #fff);
  background:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--ah-navy, #0B1F3A);
}
.ahs-side__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px var(--gutter, 16px); }
.ahs-side__home { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; line-height: 1.25; min-width: 0; }
.ahs-side__title { font-family: var(--ah-font-head, system-ui); font-weight: 700; font-size: 17px; letter-spacing: -.025em; }
.ahs-side__who { font-size: 13px; color: var(--ah-on-navy-muted, #B6C4DA); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahs-side__who em { font-style: normal; font-size: 12px; font-weight: 600; color: #fff; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.ahs-side__home { flex: 1 1 auto; }
.ahs-side__out { flex: none; display: inline-flex; align-items: center; min-height: var(--ah-tap, 44px); padding: 0 14px; border: 1px solid rgba(255, 255, 255, .32); border-radius: 999px; color: #fff; text-decoration: none; font: 600 14px/1 var(--ah-font-body, system-ui); white-space: nowrap; }
.ahs-side__out:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.ahs-side__pos { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: var(--ah-tap, 44px); padding: 0 16px; border-radius: 999px; background: var(--ah-yellow, #FACC15); color: var(--ah-on-yellow, #3A2E00); text-decoration: none; font: 700 15px/1 var(--ah-font-body, system-ui); white-space: nowrap; }
.ahs-side__pos:hover { background: #FDE047; }
.ahs-side__pos-more { display: none; font-weight: 600; }
.ahs-side__toggle { display: none; align-items: center; gap: 10px; min-height: var(--ah-tap, 44px); padding: 0 14px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(255, 255, 255, .06); color: #fff; font: 600 15px/1 var(--ah-font-body, system-ui); cursor: pointer; }
.ahs-side__burger, .ahs-side__burger::before, .ahs-side__burger::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transition: transform .2s; }
.ahs-side__burger { position: relative; }
.ahs-side__burger::before { position: absolute; top: -5px; }
.ahs-side__burger::after { position: absolute; top: 5px; }
.ahs-side.is-open .ahs-side__burger { background: transparent; }
.ahs-side.is-open .ahs-side__burger::before { transform: translateY(5px) rotate(45deg); }
.ahs-side.is-open .ahs-side__burger::after { transform: translateY(-5px) rotate(-45deg); }
.ahs-side__nav { padding: 0 10px 18px; }
.ahs-side__heading { margin: 16px 12px 6px; font-family: var(--ah-font-body, system-ui); font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--ah-on-navy-muted, #B6C4DA); }
.ahs-side__group.is-here .ahs-side__heading { color: #fff; }
.ahs-side__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ahs-side__link { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; min-height: 42px; padding: 8px 12px; border-radius: 10px; color: #DDE6F3; text-decoration: none; font-size: 14.5px; font-weight: 500; }
.ahs-side__link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.ahs-side__link[aria-current="page"] { background: rgba(255, 255, 255, .13); color: #fff; font-weight: 600; }
.ahs-side__link[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ah-yellow, #FACC15); }
.ahs-side__note { grid-column: 1 / -1; font-size: 12.5px; font-weight: 400; color: var(--ah-on-navy-muted, #B6C4DA); }
.ahs-side__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--ah-yellow, #FACC15); color: var(--ah-on-yellow, #3A2E00); font: 700 12px/1 var(--ah-font-body, system-ui); }
.ahs-side a:focus-visible, .ahs-side button:focus-visible { outline: 3px solid var(--ah-yellow, #FACC15); outline-offset: 2px; }

/* Phone and tablet: a bar with the Menu button; the menu opens as a panel under it. */
@media (max-width: 1023.98px) {
  .ahs-side.is-ready .ahs-side__toggle { display: inline-flex; }
  .ahs-side.is-ready .ahs-side__nav { display: none; }
  .ahs-side.is-ready.is-open .ahs-side__nav {
    display: block; position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 60px); overflow-y: auto;
    background: var(--ah-navy, #0B1F3A); border-radius: 0 0 18px 18px; box-shadow: 0 18px 40px rgba(11, 31, 58, .35);
    animation: ahs-drop .18s ease-out;
  }
}
/* A small phone: the bar keeps POS, Sign out and the menu button (its word hidden, still read out). */
@media (max-width: 479.98px) {
  .ahs-side__top { gap: 8px; }
  .ahs-side__pos, .ahs-side__out, .ahs-side__toggle { padding: 0 12px; }
  .ahs-side__menutext { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@keyframes ahs-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* PC: the menu is a full-height rail on the left, always open; notes show on hover only. */
@media (min-width: 1024px) {
  .ahs-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); align-items: start; }
  .ahs-side {
    position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
    background:
      radial-gradient(360px 260px at 0% 100%, rgba(37, 99, 235, .45), transparent 70%),
      linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 32px 32px,
      linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 32px 32px,
      var(--ah-navy, #0B1F3A);
  }
  .ahs-side__top { padding: 24px 22px 6px; flex-wrap: wrap; }
  .ahs-side__pos { order: 3; flex: 1 1 100%; margin-top: 6px; }
  .ahs-side__pos-more { display: inline; }
  .ahs-side__title { font-size: 19px; }
  .ahs-side__note { display: none; }
  .ahs-shell__main { min-width: 0; }
}

/* Pages inside the shell: a light, slim page header instead of a second navy band. */
.ahs-shell .bpn-band { background: none; color: var(--ah-text, #0B1F3A); margin: 0; border-radius: 0; width: auto; max-width: none; }
.ahs-shell .bpn-band__inner { max-width: 1280px; margin: 0; padding: 22px var(--gutter, 16px) 6px; }
.ahs-shell .bpn-band h1 { font-size: clamp(1.55rem, 1.1vw + 1.15rem, 2.15rem); letter-spacing: -.035em; margin: 2px 0 6px; }
.ahs-shell .bpn-band p { color: var(--ah-muted, #5B6B82); font-size: 15px; max-width: 70ch; }
.ahs-shell .ahs-crumb { opacity: 1; color: var(--ah-muted, #5B6B82); font-size: 13.5px; }
.ahs-shell .ahs-crumb a { color: var(--ah-blue, #2563EB); text-decoration: none; }
.ahs-shell .ahs-crumb a:hover { text-decoration: underline; }
.ahs-shell .bpn-wrap { max-width: 1280px; margin: 0; padding: 14px var(--gutter, 16px) 48px; }
@media (min-width: 1024px) {
  .ahs-shell .bpn-band__inner { padding: 34px 36px 6px; }
  .ahs-shell .bpn-wrap { padding: 18px 36px 56px; }
}

/* Quieter, denser data: tables and cards inside the portal. */
.ahs-shell .ahs-card { border-radius: 16px; padding: 22px 24px; }
.ahs-shell .ahs-card > h2 { font-size: 1.12rem; letter-spacing: -.02em; margin: 0 0 12px; }
.ahs-shell .ahs-tablewrap { border-radius: 14px; }
.ahs-shell .ahs-table th, .ahs-shell .ahs-table td { padding: 11px 14px; }
.ahs-shell .ahs-table thead th { position: sticky; top: 0; background: var(--ah-paper, #F8FAFC); font-size: 12.5px; font-weight: 600; z-index: 1; }
.ahs-shell .ahs-table tbody tr:hover td { background: #F6F9FE; }
.ahs-shell .ahs-table tbody tr:last-child td { border-bottom: 0; }
.ahs-shell .ahs-toolbar input, .ahs-shell .ahs-toolbar select { min-height: 42px; padding: 8px 12px; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 10px; background: #fff; font: inherit; color: inherit; }
.ahs-shell .ahs-toolbar input:focus, .ahs-shell .ahs-toolbar select:focus { outline: none; border-color: var(--ah-blue, #2563EB); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.ahs-shell .ahs-toolbar input[type="search"] { flex: 1 1 240px; max-width: 360px; }
.ahs-shell .ahs-toolbar select { flex: 0 1 auto; max-width: 260px; }

@media (prefers-reduced-motion: reduce) {
  .ahs-side__burger, .ahs-side__burger::before, .ahs-side__burger::after { transition: none; }
  .ahs-side.is-ready.is-open .ahs-side__nav { animation: none; }
}
@media print {
  body.ahs-pay, .ahs-shell, .ahs-shell__main { background: #fff !important; }
  .ahs-shell { display: block; }
  .ahs-shell .bpn-wrap, .ahs-shell .bpn-band__inner { padding: 0; max-width: none; }
}

/* Products and stock (0.12.0) */
.ahs-warn { padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; background: #FFFBEB; color: #854D0E; border: 1px solid #FDE68A; }
.ahs-products td small { color: var(--ah-muted, #5B6B82); }
.ahs-products .ahs-pill { margin-left: 4px; }
.ahs-stock--below { color: #B42318; font-weight: 700; }
.ahs-stock--low { color: #B54708; font-weight: 600; }
.ahs-stocknow { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 12px; }
.ahs-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ahs-portal .ahs-form select { width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: inherit; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 12px; background: #fff; }
.ahs-portal .ahs-form .ahs-check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.ahs-portal .ahs-form .ahs-check input { width: auto; min-height: 0; }
.ahs-more { margin-top: 16px; }
.ahs-more > summary { cursor: pointer; color: var(--ah-muted, #5B6B82); }
.ahs-history { list-style: none; margin: 0; padding: 0; }
.ahs-history li { padding: 8px 0; border-top: 1px solid var(--ah-line, #E3E8F0); }
.ahs-history li span { color: var(--ah-muted, #5B6B82); font-size: 13.5px; }
@media (min-width: 900px) { .ahs-grid--product { grid-template-columns: 1.3fr 1fr; align-items: start; } }

/* Stock-take sheet (0.12.1): a paper form. On screen a preview of the page; printed on A4 with the
   column heads repeated on every page and the page number in the corner. */
.ahs-stctl { display: grid; gap: 10px 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); align-items: end; }
.ahs-stctl__f { display: grid; gap: 6px; min-width: 0; }
.ahs-stctl__f select { width: 100%; min-width: 0; }
.ahs-stctl__f label { font-weight: 600; font-size: 13.5px; }
.ahs-stctl select { min-height: 42px; padding: 8px 12px; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 10px; background: #fff; font: inherit; }
.ahs-stctl__check { display: flex; gap: 8px; align-items: center; font-weight: 400 !important; grid-column: 1 / -1; }
.ahs-stctl__go { display: flex; gap: 8px; grid-column: 1 / -1; flex-wrap: wrap; }
.ahs-stctl .ahs-hint { grid-column: 1 / -1; margin: 0; }
.ahs-sheet { page: stocktake; background: #fff; color: #0B1F3A; border: 1px solid var(--ah-border, #DCE4EF); border-radius: 6px; padding: 28px 30px; box-shadow: 0 1px 0 rgba(11, 31, 58, .04), 0 12px 32px rgba(11, 31, 58, .07); font-size: 13.5px; }
.ahs-sheet__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 2px solid #0B1F3A; }
.ahs-sheet__shop { margin: 0; font-size: 12px; font-weight: 600; color: #5B6B82; }
.ahs-sheet__title { margin: 2px 0 4px; font-family: var(--ah-font-head, system-ui); font-size: 26px; letter-spacing: -.03em; line-height: 1.1; }
.ahs-sheet__what { margin: 0; font-size: 12.5px; color: #5B6B82; }
.ahs-sheet__fill { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 10px 18px; margin: 0; min-width: min(100%, 380px); }
.ahs-sheet__fill div { display: grid; gap: 2px; }
.ahs-sheet__fill dt { font-size: 11.5px; font-weight: 600; color: #5B6B82; }
.ahs-sheet__fill dd { margin: 0; height: 22px; border-bottom: 1px solid #0B1F3A; }
.ahs-sheet__rule { margin: 10px 0 12px; font-size: 12.5px; color: #33445E; }
.ahs-sheet__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ahs-sheet__table .c-no { width: 2.6em; } .ahs-sheet__table .c-code { width: 5.5em; } .ahs-sheet__table .c-unit { width: 4.2em; }
.ahs-sheet__table .c-rec { width: 5.5em; } .ahs-sheet__table .c-count { width: 7.5em; } .ahs-sheet__table .c-note { width: 22%; }
.ahs-sheet__table th, .ahs-sheet__table td { padding: 0 6px; height: 34px; border-bottom: 1px solid #C9D3E0; text-align: left; vertical-align: middle; overflow: hidden; }
.ahs-sheet__table thead th { height: 28px; font-size: 11.5px; font-weight: 700; color: #33445E; border-bottom: 1.5px solid #0B1F3A; }
.ahs-sheet__table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ahs-sheet__table td.c-no { color: #5B6B82; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ahs-sheet__table td.c-code { font-variant-numeric: tabular-nums; font-weight: 600; }
.ahs-sheet__table td.c-name { white-space: nowrap; text-overflow: ellipsis; }
.ahs-sheet__table td.c-unit { color: #5B6B82; font-size: 12px; }
.ahs-sheet__table td.c-note { border-left: 1px dashed #C9D3E0; }
.ahs-sheet__box { display: block; height: 24px; border: 1.5px solid #0B1F3A; border-radius: 4px; background: #fff; }
.ahs-sheet__cat th { height: 30px; padding-top: 10px; background: #EEF3FA; font-family: var(--ah-font-head, system-ui); font-size: 13.5px; letter-spacing: -.01em; border-bottom: 1.5px solid #0B1F3A; }
.ahs-sheet__cat span { font-family: var(--ah-font-body, system-ui); font-weight: 500; font-size: 11.5px; color: #5B6B82; margin-left: 6px; }
.ahs-sheet__foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid #C9D3E0; font-size: 11.5px; color: #5B6B82; }
@media (max-width: 640px) {
  .ahs-sheet { padding: 16px; overflow-x: auto; }
  .ahs-sheet__table { min-width: 560px; }
}
@page stocktake {
  size: A4 portrait; margin: 12mm 10mm 14mm;
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 9pt Inter, system-ui, sans-serif; color: #5B6B82; }
  @bottom-left { content: "Al Hadid Establishment · stock count"; font: 9pt Inter, system-ui, sans-serif; color: #5B6B82; }
}
@media print {
  .ahs-sheet { border: 0; border-radius: 0; box-shadow: none; padding: 0; font-size: 10pt; }
  .ahs-sheet__table th, .ahs-sheet__table td { height: 8.2mm; }
  .ahs-sheet__table thead { display: table-header-group; }
  .ahs-sheet__table tr { break-inside: avoid; }
  .ahs-sheet__cat { break-after: avoid; }
  .ahs-sheet__cat th, .ahs-sheet__box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ahs-sheet__head { break-after: avoid; }
}

/* Stock-take on a thermal roll (80 mm or 58 mm): two lines per product (name; number, code, unit),
   the box on the right, no shading (thermal printers print black only). */
.ahs-sheet--roll { margin: 0 auto; padding: 10px 10px 14px; border-radius: 2px; font-size: 12px; }
.ahs-sheet--80 { width: 80mm; page: stocktake-80; }
.ahs-sheet--58 { width: 58mm; page: stocktake-58; font-size: 11px; }
.ahs-sheet--roll .ahs-sheet__head { display: block; padding-bottom: 8px; border-bottom-width: 1.5px; }
.ahs-sheet--roll .ahs-sheet__title { font-size: 18px; }
.ahs-sheet--roll .ahs-sheet__what { font-size: 10.5px; }
.ahs-sheet--roll .ahs-sheet__fill { grid-template-columns: 1fr; gap: 6px; min-width: 0; margin-top: 8px; }
.ahs-sheet--roll .ahs-sheet__fill div { grid-template-columns: auto 1fr; align-items: end; gap: 6px; }
.ahs-sheet--roll .ahs-sheet__fill dt { font-size: 10.5px; color: #000; }
.ahs-sheet--roll .ahs-sheet__fill dd { height: 18px; border-bottom-color: #000; }
.ahs-sheet--roll .ahs-sheet__rule { font-size: 10.5px; margin: 6px 0 8px; color: #000; }
.ahs-sheet--roll .ahs-sheet__table, .ahs-sheet--roll .ahs-sheet__table tbody { display: block; width: 100%; }
.ahs-sheet--roll .ahs-sheet__table colgroup, .ahs-sheet--roll .ahs-sheet__table thead, .ahs-sheet--roll .ahs-sheet__table .c-note { display: none; }
.ahs-sheet--roll .ahs-sheet__table tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr) 22mm; grid-template-areas: "name name name box" "no code unit box"; column-gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px dashed #000; break-inside: avoid; }
.ahs-sheet--58 .ahs-sheet__table tr { grid-template-columns: auto auto minmax(0, 1fr) 15mm; }
.ahs-sheet--roll .ahs-sheet__table td, .ahs-sheet--roll .ahs-sheet__table th { display: block; height: auto; padding: 0; border: 0; width: auto; overflow: visible; }
.ahs-sheet--roll .ahs-sheet__table td.c-name { grid-area: name; white-space: normal; font-weight: 600; line-height: 1.25; color: #000; }
.ahs-sheet--roll .ahs-sheet__table td.c-no { grid-area: no; color: #000; font-size: 10px; }
.ahs-sheet--roll .ahs-sheet__table td.c-no::before { content: "#"; }
.ahs-sheet--roll .ahs-sheet__table td.c-code { grid-area: code; font-size: 10.5px; }
.ahs-sheet--roll .ahs-sheet__table td.c-unit { grid-area: unit; font-size: 10px; color: #000; }
.ahs-sheet--roll .ahs-sheet__table td.num { grid-area: unit; justify-self: end; font-size: 10px; }
.ahs-sheet--roll .ahs-sheet__table td.c-count { grid-area: box; align-self: stretch; display: flex; align-items: center; }
.ahs-sheet--roll .ahs-sheet__box { width: 100%; height: 26px; border-color: #000; }
.ahs-sheet--roll .ahs-sheet__cat { display: block !important; padding: 8px 0 3px; border-bottom: 1.5px solid #000; }
.ahs-sheet--roll .ahs-sheet__cat th { background: none; padding: 0; font-size: 12.5px; color: #000; }
.ahs-sheet--roll .ahs-sheet__cat span { color: #000; }
.ahs-sheet--roll .ahs-sheet__foot { font-size: 10px; color: #000; border-top-color: #000; }
/* No size here: "80mm auto" isn't valid CSS, and the roll's size comes from the receipt printer's
   own paper setting. The printable width is fixed instead (80 mm roll: 72 mm, 58 mm roll: 48 mm). */
@page stocktake-80 { margin: 3mm 4mm; }
@page stocktake-58 { margin: 2mm 5mm; }
@media print {
  .ahs-sheet--roll { padding: 0; margin: 0; }
  .ahs-sheet--80 { width: 72mm; }
  .ahs-sheet--58 { width: 48mm; }
  .ahs-sheet--roll, .ahs-sheet--roll * { color: #000 !important; }
  .ahs-sheet--roll .ahs-sheet__table tr { height: auto; }
}
/* The customers' floating WhatsApp button isn't needed on staff pages (it covers table rows). */
body:has(.ahs-shell) .bpn-fab { display: none; }
/* Suppliers (0.13.0): money owed out in red, as Hameed is used to; voided rows struck through. */
.ahs-money--out { color: #B42318; font-weight: 600; }
.ahs-row--void td { color: var(--ah-muted, #5B6B82); text-decoration: line-through; }
.ahs-row--void td small { text-decoration: none; display: inline-block; }

/* Dashboard (0.13.0): one money panel (to collect green, to pay red, today), then what needs you. */
.ahs-ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); background: #fff; border: 1px solid var(--ah-border, #DCE4EF); border-radius: 18px; overflow: hidden; margin-bottom: 16px; }
.ahs-ledger__cell { display: grid; gap: 4px; padding: 20px 22px; color: var(--ah-text, #0B1F3A); text-decoration: none; border-left: 1px solid var(--ah-border, #DCE4EF); position: relative; }
.ahs-ledger__cell:first-child { border-left: 0; }
.ahs-ledger__cell:hover { background: #F7FAFE; }
.ahs-ledger__cell:focus-visible { outline: 3px solid var(--ah-blue, #2563EB); outline-offset: -3px; }
.ahs-ledger__cell::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ah-border, #DCE4EF); }
.ahs-ledger__cell--in::before { background: #16A34A; }
.ahs-ledger__cell--out::before { background: #DC2626; }
.ahs-ledger__label { font-size: 13.5px; font-weight: 600; color: var(--ah-muted, #5B6B82); }
.ahs-ledger__value { font-family: var(--ah-font-head, system-ui); font-size: clamp(1.6rem, 1.2vw + 1.2rem, 2.2rem); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ahs-ledger__cell--in .ahs-ledger__value { color: #15803D; }
.ahs-ledger__cell--out .ahs-ledger__value { color: #B42318; }
.ahs-ledger__note { font-size: 13px; color: var(--ah-muted, #5B6B82); }
@media (max-width: 720px) { .ahs-ledger__cell { border-left: 0; border-top: 1px solid var(--ah-border, #DCE4EF); } .ahs-ledger__cell:first-child { border-top: 0; } }
.ahs-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ahs-quick__main { background: var(--ah-yellow, #FACC15); color: var(--ah-on-yellow, #3A2E00); border-color: var(--ah-yellow, #FACC15); font-weight: 700; }
.ahs-quick__main:hover { filter: brightness(.96); }
.ahs-jobs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ahs-jobs a { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; color: var(--ah-text, #0B1F3A); text-decoration: none; }
.ahs-jobs a:hover { background: var(--ah-tile, #EEF3FA); }
.ahs-jobs b { min-width: 2.2em; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--ah-yellow, #FACC15); color: var(--ah-on-yellow, #3A2E00); font-variant-numeric: tabular-nums; }
.ahs-rows { list-style: none; margin: 0; padding: 0; }
.ahs-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--ah-border, #DCE4EF); }
.ahs-rows li:first-child { border-top: 0; }
.ahs-rows li > a { font-weight: 600; text-decoration: none; color: var(--ah-blue, #2563EB); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ahs-rows li > b { grid-column: 2; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; }
.ahs-rows__sub { grid-column: 1; font-size: 13px; color: var(--ah-muted, #5B6B82); }
.ahs-rows .ahs-pill { justify-self: start; grid-column: 1; }
.ahs-money--due { color: #B42318; }
/* Due reminders (0.13.0) */
.ahs-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; border-left: 4px solid var(--ah-whatsapp, #25D366); }
.ahs-next__label { margin: 0; font-size: 13px; font-weight: 600; color: var(--ah-muted, #5B6B82); }
.ahs-next__who { margin: 2px 0 4px; font-size: 1.2rem; }
.ahs-pre { white-space: pre-wrap; background: var(--ah-paper, #F8FAFC); border: 1px solid var(--ah-border, #DCE4EF); border-radius: 12px; padding: 12px 14px; }
/* Sale invoices (0.13.1) */
.ahs-ledger--4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ahs-ledger--4 .ahs-ledger__value { font-size: clamp(1.25rem, .8vw + 1rem, 1.6rem); }
.ahs-stctl__f input[type="date"], .ahs-stctl__f input[type="search"] { min-height: 42px; padding: 8px 12px; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 10px; background: #fff; font: inherit; width: 100%; min-width: 0; }
.ahs-stctl__q { grid-column: span 2; }
@media (max-width: 640px) { .ahs-stctl__q { grid-column: auto; } }
.ahs-st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-style: normal; font-weight: 700; }
.ahs-st--ok { background: #DCFCE7; color: #166534; }
.ahs-st--warn { background: #FEF3C7; color: #92400E; }
.ahs-st--due { background: #FEE2E2; color: #991B1B; }
.ahs-st--muted { background: var(--ah-tile, #EEF3FA); color: var(--ah-muted, #5B6B82); }

/* Order page (0.13.3): details left, order summary right (sticky); items first on phones. */
.ahs-checkout { display: grid; gap: 16px; align-items: start; }
.ahs-checkout .ahs-card { margin-bottom: 0; }
.ahs-checkout__main { display: grid; gap: 16px; }
.ahs-checkout__summary { order: -1; }
.ahs-checkout__pay { display: none; }
.ahs-req { color: #B91C1C; font-weight: 700; }
.ahs-form small.ahs-hint { display: block; margin-top: 6px; }
.ahs-olines { list-style: none; margin: 0; padding: 0; }
.ahs-olines li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--ah-border, #DCE4EF); }
.ahs-olines__img { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--ah-tile, #EEF3FA); }
.ahs-olines__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ahs-olines__name { display: grid; gap: 2px; min-width: 0; font-weight: 600; font-size: 14.5px; }
.ahs-olines__name a { color: var(--ah-navy, #0B1F3A); text-decoration: none; }
.ahs-olines__name small { font-weight: 400; color: var(--ah-muted, #5B6B82); }
.ahs-olines__end { display: grid; justify-items: end; gap: 8px; font-variant-numeric: tabular-nums; }
.ahs-olines__rm { width: 32px; height: 32px; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--ah-muted, #5B6B82); cursor: pointer; }
.ahs-olines__rm:hover { background: #FEE2E2; color: #B91C1C; }
.ahs-olines .bpn-i { width: 16px; height: 16px; }
.ahs-form .bpn-step button { width: 36px; min-height: 0; height: 34px; padding: 0; }
.ahs-loc { margin-top: 14px; display: grid; gap: 6px; justify-items: start; }
.ahs-loc .bpn-btn { gap: 8px; }
.ahs-loc .bpn-btn.is-set { border-color: #15803D; color: #15803D; }
.ahs-loc .ahs-hint { margin: 0; }
.ahs-linkbtn { border: 0; background: none; padding: 0; color: var(--ah-blue, #2563EB); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.ahs-more { display: inline-block; margin-top: 8px; font-weight: 600; }
.ahs-checkout [hidden] { display: none !important; }
@media (min-width: 900px) {
  .ahs-checkout { grid-template-columns: 1.15fr 1fr; }
  .ahs-checkout__summary { order: 0; position: sticky; top: 96px; }
  .ahs-checkout__pay { display: flex; }
  .ahs-checkout__paym { display: none; }
}

/* Product photos and "Shown to customers" (0.13.4) */
.ahs-photos__list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ahs-photos__list li { position: relative; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--ah-border, #DCE4EF); border-radius: 14px; background: #fff; }
.ahs-photos__list img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--ah-tile, #EEF3FA); display: block; }
.ahs-photos__main { position: absolute; top: 14px; left: 14px; padding: 3px 9px; border-radius: 999px; background: var(--ah-navy, #0B1F3A); color: #fff; font-size: 12px; font-weight: 700; }
.ahs-photos__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.ahs-photos__acts button:not(.ahs-linkbtn) { min-width: 34px; height: 32px; padding: 0 10px; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 999px; background: #fff; color: var(--ah-navy, #0B1F3A); font: inherit; font-weight: 700; cursor: pointer; }
.ahs-photos__acts .ahs-photos__rm { margin-left: auto; color: #B91C1C; }
.ahs-photos__acts .ahs-photos__rm:hover { background: #FEE2E2; border-color: #FCA5A5; }
.ahs-photos__list--gone { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); margin-top: 10px; }
.ahs-photos__list--gone img { opacity: .6; }
.ahs-photos__add input[type="file"] { padding: 10px; border: 1.5px dashed var(--ah-border, #DCE4EF); border-radius: 12px; width: 100%; background: var(--ah-tile, #EEF3FA); }
.ahs-subhead { margin: 22px 0 4px; padding-top: 16px; border-top: 1px solid var(--ah-border, #DCE4EF); font-size: 1.05rem; }
.ahs-form textarea { width: 100%; min-height: 0; padding: 10px 12px; font: inherit; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 12px; resize: vertical; }
.ahs-specs { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.ahs-specs legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.ahs-specs__row { display: grid; grid-template-columns: 2fr 3fr; gap: 6px; }

/* Products: list or photo cards, a photo straight from the row or card (0.13.14). */
.ahs-items { border: 1px solid var(--ah-border, #DCE4EF); border-radius: 12px; padding: 12px; margin: 8px 0 12px; display: grid; gap: 8px; }
.ahs-items legend { font-weight: 700; padding: 0 6px; }
.ahs-items__head { display: none; }
.ahs-items__row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed var(--ah-border, #DCE4EF); }
.ahs-items__row input[list] { grid-column: 1 / -1; }
.ahs-items__row input { min-width: 0; }
.ahs-items__row output { text-align: right; font-variant-numeric: tabular-nums; }
.ahs-items > button { justify-self: start; }
.ahs-viewbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; }
.ahs-viewbar .ahs-hint { margin: 0; }
.ahs-seg { display: inline-flex; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 999px; overflow: hidden; background: #fff; }
.ahs-seg a { padding: 7px 16px; color: var(--ah-navy, #0B1F3A); font-weight: 700; text-decoration: none; }
.ahs-seg a[aria-current="page"] { background: var(--ah-navy, #0B1F3A); color: #fff; }
.ahs-seg a:focus-visible { outline: 3px solid var(--ah-blue, #2563EB); outline-offset: -3px; }
.ahs-products td.ahs-products__pic, .ahs-products th.ahs-products__pic { width: 128px; }
.ahs-products__pic img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--ah-tile, #EEF3FA); margin-bottom: 6px; }
.ahs-snap { margin: 0; display: grid; gap: 4px; }
.ahs-snap__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ahs-snap__pc { display: none; }
/* A PC (mouse, no touch): one button that opens the file picker; the camera button is for phones. */
@media (hover: hover) and (pointer: fine) {
  .ahs-snap__cam { display: none; }
  .ahs-snap__touch { display: none; }
  .ahs-snap__pc { display: inline; }
}
.ahs-photos__cam { margin: 4px 0; }
.ahs-snap__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 12px; border: 1.5px dashed var(--ah-blue, #2563EB); border-radius: 10px; background: #fff; color: var(--ah-blue, #2563EB); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ahs-snap__btn:hover { background: #EFF5FF; }
.ahs-snap__btn:focus-within { outline: 3px solid var(--ah-blue, #2563EB); outline-offset: 2px; }
.ahs-snap__btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ahs-snap.is-js .ahs-snap__send { display: none; }
.ahs-snap.is-busy .ahs-snap__btn { opacity: .6; pointer-events: none; }
.ahs-snap__out { font-size: 13px; color: var(--ah-muted, #5B6B82); }
.ahs-snap__out:empty { display: none; }
.ahs-pgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.ahs-pcard { display: grid; align-content: start; gap: 6px; padding: 10px; border: 1px solid var(--ah-border, #DCE4EF); border-radius: 14px; background: #fff; }
.ahs-pcard:target { border-color: var(--ah-blue, #2563EB); box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.ahs-pcard__pic { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--ah-tile, #EEF3FA); }
.ahs-pcard__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ahs-pcard__pic .ahs-snap { position: absolute; left: 8px; right: 8px; bottom: 8px; }
.ahs-pcard__pic--none { display: grid; place-items: center; border: 1.5px dashed var(--ah-border, #DCE4EF); }
.ahs-pcard__pic--none .ahs-snap { position: absolute; inset: 0; align-content: center; padding: 8px; }
.ahs-pcard__pic--none .ahs-snap__btns { flex-direction: column; align-items: stretch; }
.ahs-pcard__pic--none .ahs-snap__btn { min-height: 46px; background: #fff; font-size: 15px; }
.ahs-pcard__pic .ahs-snap__btns .ahs-snap__btn { flex: 1 1 auto; }
.ahs-snap__ico { flex: none; }
.ahs-camscan-row { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ahs-camscan-row [hidden] { display: none; }
.ahs-camscan { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: rgba(11, 31, 58, .92); color: #fff; }
.ahs-camscan video { width: 100%; max-width: 480px; max-height: 60vh; border-radius: 10px; background: #000; object-fit: cover; }
.ahs-camscan p { margin: 0; text-align: center; }
.ahs-camscan button { min-height: 44px; padding: 8px 20px; border: 0; border-radius: 10px; background: #fff; color: var(--ah-navy, #0B1F3A); font-size: 16px; font-weight: 700; cursor: pointer; }
.ahs-pcard__pic--none .ahs-snap__out { position: absolute; left: 6px; right: 6px; bottom: 6px; text-align: center; }
.ahs-pcard__name { font-weight: 700; color: var(--ah-navy, #0B1F3A); text-decoration: none; line-height: 1.3; }
.ahs-pcard__name:hover { text-decoration: underline; }
.ahs-pcard__meta { margin: 0; display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ah-muted, #5B6B82); }
.ahs-pcard__meta b { color: var(--ah-navy, #0B1F3A); }
@media (max-width: 560px) {
  .ahs-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ahs-products td.ahs-products__pic, .ahs-products th.ahs-products__pic { width: 96px; }
}

/* Print buttons on bill pages (0.13.19): the page prints as a clean A4 document. */
.ahs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
@media print {
  .ahs-side, .ahs-shell__side, .ahs-portal form, .ahs-actions, .ahs-flash { display: none !important; }
}

/* The customer's bill on a phone (0.13.20): each item on its own lines, nothing wider than the screen. */
@media (max-width: 600px) {
  .ahs-bill .bpn-wrap, .ahs-bill.bpn-wrap { padding-left: 12px; padding-right: 12px; }
  .ahs-bill .ahs-card { padding: 16px 14px; }
  .ahs-table--bill { width: 100%; table-layout: fixed; font-size: 15px; }
  .ahs-table--bill thead { display: none; }
  .ahs-table--bill tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--ah-border, #DCE4EF); }
  .ahs-table--bill tbody td { padding: 0; border: 0; text-align: left; overflow-wrap: anywhere; }
  .ahs-table--bill tbody td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .ahs-table--bill tbody td:nth-child(2) { grid-column: 1; color: var(--ah-muted, #5B6B82); text-align: left; }
  .ahs-table--bill tbody td:nth-child(2)::before { content: "Qty "; }
  .ahs-table--bill tbody td:nth-child(3) { grid-column: 1; color: var(--ah-muted, #5B6B82); text-align: left; }
  .ahs-table--bill tbody td:nth-child(3)::before { content: "Price "; }
  .ahs-table--bill tbody td:nth-child(4) { grid-column: 2; grid-row: 2 / span 2; align-self: center; font-weight: 700; text-align: right; }
  .ahs-table--bill tfoot tr { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
  .ahs-table--bill tfoot th, .ahs-table--bill tfoot td { padding: 0; border: 0; }
}


/* Quotations and to-do list (0.13.22) */
.ahs-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.ahs-filters a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1.5px solid var(--ah-border, #DCE4EF); border-radius: 999px; background: #fff; color: var(--ah-navy, #0B1F3A); font-weight: 600; text-decoration: none; }
.ahs-filters a[aria-current="page"] { background: var(--ah-navy, #0B1F3A); border-color: var(--ah-navy, #0B1F3A); color: #fff; }
.ahs-filters a:focus-visible { outline: 3px solid var(--ah-blue, #2563EB); outline-offset: 2px; }
.ahs-toolbar__find { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ahs-card--wide { grid-column: 1 / -1; }
.ahs-pill--q-draft { background: #EEF3FA; }
.ahs-pill--q-sent { background: #E0EAFF; color: #1E40AF; }
.ahs-pill--q-accepted { background: #DCFCE7; color: #166534; }
.ahs-pill--q-billed { background: #0B1F3A; color: #fff; }
.ahs-pill--q-expired, .ahs-pill--q-cancelled { background: #FDECEC; color: #9F1C1C; }
.ahs-quote__qr { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.ahs-quote__qr .ahs-qr { width: 120px; flex: none; }
.ahs-items--two .ahs-items__row { grid-template-columns: 1fr 110px; }
.ahs-items--two .ahs-items__row input[list] { grid-column: auto; }
.ahs-tasklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ahs-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--ah-border, #DCE4EF); border-left: 5px solid var(--ah-border, #DCE4EF); border-radius: 12px; }
.ahs-task--high { border-left-color: #C62828; }
.ahs-task--medium { border-left-color: var(--ah-yellow, #FACC15); }
.ahs-task--low { border-left-color: var(--ah-blue, #2563EB); }
.ahs-task.is-done, .ahs-task.is-cancelled { opacity: .7; }
.ahs-task.is-done .ahs-task__title { text-decoration: line-through; }
.ahs-task.is-late { background: #FFF8F8; }
.ahs-task__title { margin: 0 0 4px; font-weight: 700; font-size: 16px; }
.ahs-task__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 0; font-size: 13.5px; color: var(--ah-muted, #5B6B82); }
.ahs-task__notes { margin: 8px 0 0; font-size: 14px; }
.ahs-task__items { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.ahs-task__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 14px; }
.ahs-task__acts { display: flex; flex-wrap: wrap; gap: 6px; align-content: start; justify-content: flex-end; }
.ahs-pill--p-high { background: #FDECEC; color: #9F1C1C; }
.ahs-pill--p-medium { background: #FFF7D6; color: #6B5300; }
.ahs-pill--p-low { background: #E0EAFF; color: #1E40AF; }
@media (max-width: 599.98px) {
  .ahs-task { grid-template-columns: 1fr; }
  .ahs-task__acts { justify-content: flex-start; }
  .ahs-toolbar__find { margin-left: 0; width: 100%; }
}
@media print {
  .ahs-quote .ahs-card { box-shadow: none; border: 0; }
}
.ahs-btn-quiet { color: var(--ah-muted, #5B6B82); }

/* Website orders to pick up and pay at the shop; send-to-shop button (0.13.23) */
.ahs-pill--q-web { background: #DCFCE7; color: #166534; }
.ahs-wa-send { margin: 0 0 12px; }
.ahs-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ahs-find { margin: 0 0 16px; }
.ahs-find label { flex: 1 1 100%; font-weight: 600; }
.ahs-find input { flex: 1 1 260px; }
.ahs-amount-due { font-size: 1.15rem; font-weight: 700; color: #9F1C1C; margin: 0 0 10px; }
.bpn-btn[data-utr-gate]:disabled { opacity: .5; cursor: not-allowed; }
/* Products list: "Hide price" (0.13.26) */
.ahs-products__hide { text-align: center; white-space: nowrap; }
.ahs-hide { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.ahs-hide__box { display: inline-flex; padding: 8px; cursor: pointer; }
.ahs-hide__box input { width: 20px; height: 20px; margin: 0; cursor: pointer; }
.ahs-hide__save { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.ahs-hide--js .ahs-hide__save { display: none; }
.ahs-hide__out { font-size: 12px; color: var(--ah-muted, #5B6B82); }

/* Quotation form (0.13.31) */
.ahs-qcust { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ahs-qnew { background: var(--ah-tile, #EEF3FA); border-radius: 12px; padding: 12px; margin-top: 10px; }
.ahs-qnew[hidden], .ahs-qsug[hidden], .ahs-qempty[hidden], .ahs-qform [data-ahs-toorder][hidden], .ahs-qsum p[hidden] { display: none; }
.ahs-qsug { border: 1px solid var(--ah-border, #DCE4EF); border-radius: 12px; max-height: 260px; overflow: auto; }
.ahs-qsug__r { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; background: #fff; border: 0; border-bottom: 1px solid var(--ah-border, #DCE4EF); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ahs-qsug__r:last-child { border-bottom: 0; }
.ahs-qsug__r:hover, .ahs-qsug__r:focus-visible { background: var(--ah-tile, #EEF3FA); }
.ahs-qsug__r b, .ahs-qsug__r small { display: block; }
.ahs-qsug__r small { color: var(--ah-muted, #5B6B82); }
.ahs-qsug__add { color: var(--ah-blue, #2563EB); font-weight: 600; font-size: 14px; white-space: nowrap; }
.ahs-qline { border: 1px solid var(--ah-border, #DCE4EF); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.ahs-qline__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.ahs-qline__x { background: none; border: 0; min-width: 44px; min-height: 44px; font: inherit; color: var(--ah-muted, #5B6B82); cursor: pointer; }
.ahs-qline__f { display: grid; grid-template-columns: repeat(3, 1fr) 1.1fr; gap: 8px; align-items: end; }
.ahs-qform.is-gst .ahs-qline__f { grid-template-columns: repeat(4, 1fr) 1.1fr; }
.ahs-qform .ahs-qline__f label { margin: 0; font-size: 12px; color: var(--ah-muted, #5B6B82); }
.ahs-qform .ahs-qline__f input { width: 100%; min-width: 0; }
.ahs-qform .ahs-qline__f .ahs-qline__gst { display: none; }
.ahs-qform.is-gst .ahs-qline__f .ahs-qline__gst { display: block; }
.ahs-qline__f output { text-align: right; font-weight: 700; padding-bottom: 12px; font-variant-numeric: tabular-nums; }
.ahs-qempty { text-align: center; color: var(--ah-muted, #5B6B82); margin: 14px 0 4px; }
.ahs-qsum { background: var(--ah-tile, #EEF3FA); border-radius: 12px; padding: 10px 14px; margin-top: 12px; }
.ahs-qsum p { display: flex; justify-content: space-between; margin: 3px 0; color: var(--ah-muted, #5B6B82); }
.ahs-qsum b { color: var(--ah-navy, #0B1F3A); font-variant-numeric: tabular-nums; }
.ahs-qsum__t b { font-size: 1.25rem; }
.ahs-qstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.ahs-qstats p { background: var(--ah-surface, #fff); border: 1px solid var(--ah-border, #DCE4EF); border-radius: 12px; padding: 10px 14px; margin: 0; }
.ahs-qstats span { display: block; color: var(--ah-muted, #5B6B82); font-size: 13px; }
.ahs-qstats b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .ahs-qline__f, .ahs-qform.is-gst .ahs-qline__f { grid-template-columns: 1fr 1fr; }
  .ahs-qline__f output { grid-column: 1 / -1; padding-bottom: 0; }
}

/* Purchase bill: "not in the store" prompt and the new-item panel (0.13.37). */
.ahs-newitem-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--ah-tile, #EEF3FA); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.ahs-newitem-ask[hidden], [data-ahs-ni][hidden], .ahs-newitem-ask [hidden] { display: none; }
[data-ahs-ni] h3 { margin: 0 0 4px; font-size: 1.05rem; }

/* Products list: selling price changed in the list (0.13.37). */
.ahs-products__price { white-space: nowrap; }
.ahs-lprice { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 6px; margin: 0; }
.ahs-lprice__in { display: inline-flex; align-items: center; gap: 2px; }
.ahs-lprice__in input { width: 6.5em; min-height: 36px; padding: 4px 8px; text-align: right; font: inherit; border: 1px solid var(--ah-border, #DCE4EF); border-radius: 8px; }
.ahs-lprice__in input:focus { outline: 2px solid var(--ah-blue, #1E5BB8); outline-offset: 1px; }
.ahs-lprice__save { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.ahs-lprice--js .ahs-lprice__save { display: none; }
.ahs-lprice__out { flex-basis: 100%; text-align: right; font-size: 12px; color: var(--ah-muted, #5B6B82); white-space: normal; max-width: 16em; margin-left: auto; }
.ahs-lprice__out:empty { display: none; }

/* Purchase bill rows: expiry month and batch number for items that track expiry (0.13.38). */
.ahs-items__lot { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 6px 8px; align-items: center; background: var(--ah-tile, #EEF3FA); border-radius: 8px; padding: 6px 8px; }
.ahs-items__lot[hidden] { display: none; }
.ahs-items__lot label { font-size: 13px; color: var(--ah-muted, #5B6B82); margin: 0; }
@media (max-width: 520px) { .ahs-items__lot { grid-template-columns: 1fr; } }

/* Expiry and lots (0.13.38). */
.ahs-lot--expired { background: #FDECEA; color: #B42318; }
.ahs-lot--soon { background: #FFF4DE; color: #8A4B00; }
.ahs-lot--ok { background: #E7F6EC; color: #157F3B; }
.ahs-lot--unknown { background: var(--ah-tile, #EEF3FA); color: var(--ah-muted, #5B6B82); }
.ahs-lotlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ahs-lotlist li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--ah-border, #DCE4EF); }
.ahs-suggest { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; max-height: 420px; overflow: auto; }

/* Labels (0.13.39): barcode and price stickers. */
.ahs-lbl__grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .ahs-lbl__grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .ahs-lbl__side { position: sticky; top: 12px; } }
.ahs-lbl__find { display: flex; gap: 8px; }
.ahs-lbl__find input { flex: 1; min-width: 0; font-size: 17px; min-height: 48px; }
.ahs-lbl__find [hidden] { display: none; }
.ahs-lbl__sug { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--ah-border, #DCE4EF); border-radius: 12px; max-height: 320px; overflow: auto; background: #fff; }
.ahs-lbl__sug[hidden] { display: none; }
.ahs-lbl__opt { padding: 10px 12px; border-bottom: 1px solid var(--ah-border, #DCE4EF); cursor: pointer; }
.ahs-lbl__opt:last-child { border-bottom: 0; }
.ahs-lbl__opt[aria-selected="true"], .ahs-lbl__opt:hover { background: var(--ah-tile, #EEF3FA); box-shadow: inset 3px 0 0 var(--ah-blue, #2563EB); }
.ahs-lbl__opt b, .ahs-lbl__opt small, .ahs-lbl__pick b, .ahs-lbl__pick small { display: block; overflow-wrap: anywhere; }
.ahs-lbl__opt small, .ahs-lbl__pick small { color: var(--ah-muted, #5B6B82); }
.ahs-lbl__none { padding: 10px 12px; color: var(--ah-muted, #5B6B82); }
.ahs-lbl .is-bad { color: #B42318; font-weight: 600; }
.ahs-lbl__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ahs-lbl__head [hidden] { display: none; }
.ahs-lbl__empty { color: var(--ah-muted, #5B6B82); text-align: center; margin: 12px 0; }
.ahs-lbl__empty[hidden] { display: none; }
.ahs-lbl__list { list-style: none; margin: 0; padding: 0; }
.ahs-lbl__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--ah-border, #DCE4EF); border-radius: 10px; }
.ahs-lbl__row.is-current { background: var(--ah-tile, #EEF3FA); }
.ahs-lbl__pick { background: none; border: 0; padding: 4px 0; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.ahs-lbl__note { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 13px; color: #92400E; }
.ahs-lbl__qty { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ahs-lbl__qty input { width: 64px; text-align: center; min-height: 44px; }
.ahs-lbl__step, .ahs-lbl__x { min-width: 44px; min-height: 44px; border: 1px solid var(--ah-border, #DCE4EF); border-radius: 10px; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ah-text, #0B1F3A); }
.ahs-lbl__x { border-color: transparent; color: var(--ah-muted, #5B6B82); }
.ahs-lbl__stock { min-height: 44px; border: 1px dashed var(--ah-border, #DCE4EF); border-radius: 10px; background: #fff; padding: 0 10px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ah-blue, #2563EB); }
@media (max-width: 599.98px) { .ahs-lbl__row { grid-template-columns: 1fr; } .ahs-lbl__note { grid-row: auto; } .ahs-lbl__qty { justify-content: flex-start; } }
.ahs-lbl__pv { background: repeating-conic-gradient(#F1F4F9 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 12px; padding: 14px; display: flex; justify-content: center; }
.ahs-lbl__pv canvas { width: 100%; max-width: 320px; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(11, 31, 58, .25); image-rendering: pixelated; }
.ahs-lbl__show { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 2px; }
.ahs-lbl__go { display: flex; gap: 10px; flex-wrap: wrap; }
.ahs-lbl__go .bpn-btn { flex: 1 1 220px; min-height: 52px; font-size: 16px; }
.ahs-lbl__bar { height: 8px; background: var(--ah-tile, #EEF3FA); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.ahs-lbl__bar[hidden] { display: none; }
.ahs-lbl__bar span { display: block; height: 100%; width: 0; background: var(--ah-blue, #2563EB); transition: width .2s; }
.ahs-lbl__conn span { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--ah-tile, #EEF3FA); color: var(--ah-muted, #5B6B82); font-weight: 600; font-size: 14px; }
.ahs-lbl__conn span.is-on { background: #DCFCE7; color: #166534; }
.ahs-lbl [data-lbl-chbox][hidden], .ahs-lbl [data-lbl-back][hidden], .ahs-lbl__find [data-lbl-cam][hidden], .ahs-lbl [data-lbl-tspl][hidden], .ahs-lbl [data-lbl-esc][hidden], .ahs-lbl [data-lbl-stop][hidden], .ahs-lbl [data-lbl-forget][hidden] { display: none; }
.ahs-lbl__dlg { border: 0; border-radius: 16px; padding: 18px; max-width: min(420px, calc(100vw - 32px)); }
.ahs-lbl__dlg::backdrop { background: rgba(11, 31, 58, .45); }
.ahs-lbl__dlg ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ahs-lbl__dlg li .bpn-btn { width: 100%; justify-content: flex-start; text-align: left; }
.ahs-lbl select { width: 100%; max-width: 100%; min-width: 0; }
.ahs-lbl__side .ahs-card { min-width: 0; }
