/* Service view and fast catalogue controls inherit the AkiBusiness theme. */
.hp-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hp-shell .hp-mode-switch.hp-service-nav{display:grid!important;grid-template-columns:auto auto minmax(90px,1fr) auto;align-items:center;gap:8px!important;overflow:visible!important;white-space:normal;padding:0!important;flex:none}
.hp-service-nav .action-btn,.hp-service-tools select{min-height:44px!important;border-radius:11px;font-size:13px!important;white-space:nowrap!important}
.hp-service-nav .action-btn[aria-pressed=true]{background:color-mix(in srgb,var(--accent,#8058f8) 22%,var(--surface));border-color:var(--accent,#8058f8)}
.hp-service-count{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:5px;padding:0 4px;border-radius:7px;background:var(--surface-3);font-size:11px}
.hp-service-tools{min-width:0;justify-self:end;max-width:200px;width:100%}
.hp-service-tools select,.hp-service-filters input,.hp-service-filters select{width:100%;min-width:0;background:var(--surface-2);border:1px solid var(--border-strong);color:var(--text);padding:10px 12px;border-radius:11px;outline-offset:2px}
.hp-service-fullscreen{display:flex;align-items:center;gap:7px;justify-content:center;min-width:44px}
.hp-service-fullscreen>span:first-child{font-size:21px;line-height:1}
.hp-order-open .hp-terminal-catalogue{display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;min-height:0!important;gap:8px!important}
.hp-order-open .hp-category-grid{max-height:144px;overflow-y:auto;align-content:start;overscroll-behavior:contain}
.hp-search-tools{display:grid;grid-template-columns:minmax(0,1fr) 44px auto;align-items:center;gap:6px;min-width:0}
.hp-product-search-label{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;padding:0 11px;border:1px solid var(--border-strong);border-radius:11px;background:var(--surface-2)}
.hp-product-search-label>span[aria-hidden]{font-size:22px;line-height:1;color:var(--muted)}
.hp-product-search-label input{width:100%;min-width:0;min-height:42px;padding:6px 0;border:0;background:transparent;color:var(--text);font-size:13px;outline:none}
.hp-product-search-label:focus-within{outline:2px solid var(--accent);outline-offset:1px}
.hp-search-tools .action-btn{min-height:44px;min-width:44px;padding:8px;font-size:12px}
.hp-search-clear{font-size:22px!important;line-height:1}
.hp-favourites{display:flex;gap:5px;align-items:center;justify-content:center}
.hp-favourites>span:first-child{font-size:21px;line-height:1}
.hp-favourites[aria-pressed=true]{background:color-mix(in srgb,var(--accent) 20%,var(--surface));border-color:var(--accent)}
.hp-search-result-count{margin:0 0 7px;padding:2px 4px;color:var(--muted);font-size:12px}
.hp-v4-product{position:relative;overflow:hidden}
.hp-v4-product>span:first-child{padding:0 11px;overflow-wrap:anywhere}
.hp-product-favourite{position:absolute;top:5px;right:7px;font-size:11px;color:var(--pos-attention,var(--warning))}
.hp-product-buttons .action-btn small.hp-stock-warning{color:var(--pos-attention,var(--warning));font-size:10px!important;opacity:1;line-height:1.2}
.hp-products-empty{grid-column:1/-1;padding:20px 10px;text-align:center;color:var(--muted);font-size:13px}
.hp-products-empty p{margin:8px 0;line-height:1.5}
.hp-product-flags{display:grid;gap:9px}
.hp-shell.hp-terminal.hp-service-host{display:flex!important;flex-direction:column;height:calc(100dvh - 200px);min-height:380px;max-height:1100px;gap:12px;overflow:hidden!important;background:var(--surface);color:var(--text);padding:16px;border:1px solid var(--border-strong)}
.hp-service-host>.hp-mode-switch,.hp-service-heading,.hp-service-summary,.hp-service-filters,.hp-service-tabs{flex:none}
.hp-service-heading h2{font-size:24px;letter-spacing:-.03em;margin:3px 0 5px}
.hp-service-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
.hp-service-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.hp-service-summary>div{display:flex;flex-direction:column;gap:5px;background:var(--surface-2);border:1px solid var(--border);border-radius:13px;padding:12px;min-width:0}
.hp-service-summary strong{font-size:24px;letter-spacing:-.035em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.hp-service-summary span{font-size:11px;color:var(--muted)}
.hp-service-summary>div:nth-child(3) strong{color:var(--pos-attention,var(--warning))}
.hp-service-filters{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr);gap:8px}
.hp-service-filters label{min-width:0}
.hp-service-filters input,.hp-service-filters select{min-height:44px;font-size:13px}
.hp-service-tabs{display:flex;flex-wrap:wrap;gap:7px}
.hp-service-tabs .action-btn{min-height:40px;font-size:12px}
.hp-service-tabs .action-btn[aria-pressed=true]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 16%,var(--surface))}
.hp-service-tabs span{margin-left:4px;font-variant-numeric:tabular-nums}
.hp-service-list{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:2px 3px 10px 1px}
.hp-service-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,275px),1fr));gap:12px;align-items:start}
.hp-service-card{min-width:0;border:1px solid var(--border-strong);border-radius:16px;background:var(--surface-2);overflow:hidden;padding:15px;box-shadow:0 3px 15px #0000000b;display:flex;flex-direction:column;gap:12px}
.hp-service-card.needs-attention{border-top:3px solid var(--pos-attention,var(--warning));padding-top:13px}
.hp-service-card>header{display:flex;justify-content:space-between;align-items:start;gap:10px}
.hp-service-card header>div{min-width:0}
.hp-service-card header small{color:var(--muted);font-size:11px}
.hp-service-card h3{margin:4px 0 0;font-size:21px;letter-spacing:-.02em;overflow-wrap:anywhere}
.hp-service-age{font-size:11px;color:var(--muted);max-width:100px;text-align:right;line-height:1.5;font-variant-numeric:tabular-nums}
.hp-service-prep{font-size:11px;margin:0;line-height:1.5;color:var(--muted);border-radius:8px;background:var(--surface-3);padding:7px 9px;display:flex;justify-content:space-between;gap:4px}
.hp-service-prep.pending{color:var(--pos-attention,var(--warning));background:color-mix(in srgb,var(--pos-attention,var(--warning)) 8%,var(--surface))}
.hp-service-detail{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;color:var(--muted);font-size:11px}
.hp-service-note{margin:0;font-size:12px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hp-service-balance{border-top:1px solid var(--border);padding-top:12px;display:flex;flex-direction:column;gap:5px}
.hp-service-balance small{font-size:11px;color:var(--muted)}
.hp-service-balance strong{font-size:26px;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.hp-service-card footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}
.hp-service-card footer .action-btn{font-size:12px;min-height:44px;padding:9px 6px;white-space:normal;touch-action:manipulation}
.hp-service-empty{grid-column:1/-1;display:grid;place-items:center;padding:45px 18px;text-align:center;border:1px dashed var(--border-strong);border-radius:16px;color:var(--muted)}
.hp-service-empty p{font-size:13px;line-height:1.6;max-width:440px}
.hp-service-overlay .hp-v4-dialog{background:var(--bg);color:var(--text);border-color:var(--border-strong)}
.hp-service-overlay .hp-v4-dialog>header p{color:var(--muted)}
.hp-service-overlay .hp-v4-dialog>header .action-btn{min-width:44px;min-height:44px;flex:none}
.hp-service-overlay .hp-v4-warning{color:var(--text);background:color-mix(in srgb,var(--pos-attention,var(--warning)) 10%,var(--surface));border:1px solid color-mix(in srgb,var(--pos-attention,var(--warning)) 30%,transparent)}
.hp-service-overlay .hp-v4-dialog-body{min-height:0;flex:1;gap:14px}
.hp-prep-change{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--border-strong);border-radius:12px;overflow:hidden}
.hp-prep-change h3{grid-column:1/-1;padding:10px 12px;border-bottom:1px solid var(--border);background:var(--surface-2);font-size:13px!important}
.hp-prep-change>div{display:flex;flex-direction:column;gap:6px;min-width:0;padding:12px;font-size:13px;overflow-wrap:anywhere}
.hp-prep-change>div>span:first-child,.hp-prep-change small{font-size:11px;color:var(--muted)}
.hp-prep-change p{margin:2px 0;white-space:pre-wrap}
.hp-prep-before{border-right:1px solid var(--border)}
.hp-prep-none{color:var(--muted)}
.hp-prep-footer{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 16px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--border);flex:none;background:var(--surface)}
.hp-prep-footer .action-btn{min-height:48px;font-size:13px;white-space:normal}
.hp-prep-footer .action-btn:disabled{opacity:.45;cursor:not-allowed}
.hp-service-host .action-btn:focus-visible,.hp-service-nav .action-btn:focus-visible,.hp-service-host input:focus-visible,.hp-service-host select:focus-visible,.hp-search-tools button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
body:has(.hp-service-host.hp-immersive) .hp-service-host{height:calc(100dvh - 16px)!important;min-height:0!important;max-height:none!important}
@media(max-width:900px){
 .hp-shell.hp-terminal.hp-service-host{height:calc(100dvh - 155px);min-height:0;gap:10px;padding:12px}
 .hp-order-open .hp-category-grid{max-height:80px}
 .hp-service-nav .action-btn,.hp-service-tools select{padding:7px!important;font-size:12px!important}
 .hp-fullscreen-label{display:none}
 .hp-service-tools{max-width:180px}
 .hp-service-summary strong{font-size:21px}
 .hp-search-tools{grid-template-columns:minmax(0,1fr) 44px 44px}
 .hp-favourites>span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
}
@media(max-width:560px){
 .hp-shell .hp-mode-switch.hp-service-nav{grid-template-columns:auto auto minmax(65px,1fr) 44px;gap:5px!important}
 .hp-service-nav .action-btn,.hp-service-tools select{font-size:11px!important}
 .hp-service-count{min-width:18px;height:18px;margin-left:2px;font-size:10px}
 .hp-service-heading h2{font-size:21px}
 .hp-service-heading p{display:none}
 .hp-service-summary{gap:5px}
 .hp-service-summary>div{padding:9px 7px;border-radius:10px}
 .hp-service-summary strong{font-size:19px}
 .hp-service-summary span{font-size:10px;line-height:1.4}
 .hp-service-filters{grid-template-columns:1fr 1fr;gap:6px}
 .hp-service-search{grid-column:1/-1}
 .hp-service-filters select,.hp-service-filters input{font-size:12px;padding:8px}
 .hp-service-tabs{gap:5px}
 .hp-service-tabs .action-btn{font-size:11px;padding:7px;min-height:40px}
 .hp-service-cards{gap:9px}
 .hp-service-card{padding:12px}
 .hp-service-overlay .hp-v4-dialog{max-height:95dvh}
 .hp-service-overlay .hp-v4-dialog>header h2{font-size:21px}
 .hp-product-search-label{padding:0 8px}
 .hp-product-search-label input{font-size:12px}
}
@media(max-height:550px) and (orientation:landscape){
 .hp-service-heading{display:none}
 .hp-service-summary>div{padding:7px 10px;gap:2px}
 .hp-service-summary strong{font-size:19px}
 .hp-service-host{gap:7px!important}
 .hp-service-filters{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr)}
 .hp-service-search{grid-column:auto}
 .hp-service-overlay .hp-v4-dialog{max-height:100dvh;height:100dvh}
}
/* Immersive terminals own the viewport even on short phones. The ordinary
   embedded till keeps its established scroll behaviour when fullscreen exits. */
body .hp-shell.hp-terminal.hp-immersive{
 position:fixed;inset:8px;z-index:1000;box-sizing:border-box;
 width:calc(100vw - 16px)!important;height:calc(100dvh - 16px)!important;
 min-height:0!important;max-height:none!important;margin:0!important
}
@media(max-width:900px){
 .hp-shell.hp-terminal.hp-order-open.hp-immersive{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto minmax(0,1fr) minmax(252px,43%)!important;
  gap:6px!important;overflow:hidden!important;align-content:stretch
 }
 .hp-order-open.hp-immersive>.hp-register-intro{grid-column:1;grid-row:1}
 .hp-order-open.hp-immersive>.hp-register-menu{
  grid-column:1;grid-row:2!important;min-height:0!important;height:100%!important;
  max-height:none!important;overflow:hidden!important
 }
 .hp-order-open.hp-immersive>.hp-register-ticket{
  grid-column:1;grid-row:3!important;height:100%!important;min-height:0!important;
  max-height:none!important;overflow:hidden!important;margin:0!important
 }
 .hp-order-open.hp-immersive .hp-quick-bill{
  display:grid!important;grid-template-rows:auto minmax(0,1fr) auto auto auto!important;
  height:100%!important;max-height:100%!important;overflow:hidden!important
 }
 .hp-order-open.hp-immersive .hp-quick-lines{height:auto!important;min-height:0!important;max-height:none!important;overflow:auto!important}
 .hp-order-open.hp-immersive .hp-product-scroll{min-height:0!important;height:auto!important;max-height:none!important;overflow:auto!important}
}
@media(max-width:900px) and (max-height:670px){
 .hp-order-open.hp-immersive .hp-category-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;max-height:40px;gap:4px!important
 }
 .hp-order-open.hp-immersive .hp-category-grid .action-btn{overflow:hidden;text-overflow:ellipsis}
 .hp-order-open.hp-immersive .hp-terminal-catalogue{gap:5px!important}
}
@media(min-width:600px) and (max-width:900px) and (max-height:670px){
 .hp-shell.hp-terminal.hp-order-open.hp-immersive{
  grid-template-columns:minmax(0,1.1fr) minmax(280px,1fr)!important;
  grid-template-rows:auto minmax(0,1fr)!important
 }
 .hp-order-open.hp-immersive>.hp-register-intro{grid-column:1/-1;grid-row:1}
 .hp-order-open.hp-immersive>.hp-register-menu{grid-column:1;grid-row:2!important}
 .hp-order-open.hp-immersive>.hp-register-ticket{grid-column:2;grid-row:2!important}
}
@media(prefers-reduced-motion:reduce){
 .hp-shell .action-btn,.hp-service-card{transition:none!important;animation:none!important}
}
/* Use actual theme surfaces, rather than dark-only legacy bill backgrounds. */
.hp-shell{--pos-attention:var(--warning)}
html[data-theme=light] .hp-shell{--pos-attention:#885100}
.hp-shell.hp-terminal{background:var(--surface);color:var(--text);border-color:var(--border-strong)}
.hp-shell .hp-terminal-bill,.hp-shell .hp-v4-dialog{background:var(--surface);color:var(--text);border-color:var(--border-strong)}
.hp-shell .hp-quick-line,.hp-shell .hp-qty-stepper,.hp-shell .hp-qty-stepper button{background:var(--surface-2);color:var(--text);border-color:var(--border-strong)}
.hp-shell .hp-product-buttons .action-btn{background:color-mix(in srgb,var(--pos-color) 7%,var(--surface-2));color:var(--text);border-color:var(--border-strong)}
.hp-shell .hp-category-grid .action-btn{background:var(--surface-2);color:var(--text);border-color:var(--border-strong)}
.hp-shell .hp-category-grid .action-btn[aria-pressed=true]{background:color-mix(in srgb,var(--accent) 20%,var(--surface));color:var(--text);border-color:var(--accent)}
.hp-service-nav .action-btn[aria-pressed=true]{color:var(--text)}
.hp-shell .hp-v4-dialog>header p{color:var(--muted)}
.hp-shell .hp-v4-form input,.hp-shell .hp-v4-form select,.hp-shell .hp-v4-form textarea,.hp-shell .hp-v4-inline-form input,.hp-shell .hp-v4-product-row input,.hp-shell .hp-v4-product-row select{background:var(--surface-2);color:var(--text);border-color:var(--border-strong)}
.hp-shell .hp-v4-warning{color:var(--text);background:color-mix(in srgb,var(--pos-attention) 9%,var(--surface));border:1px solid var(--border-strong)}
/* A view entrance transform must not become the containing block of the
   fullscreen terminal; dashboard chrome must stay hidden beneath it. */
body:has(.hp-shell.hp-terminal.hp-immersive) .contextbar{display:none!important}
body:has(.hp-shell.hp-terminal.hp-immersive) .view{transform:none!important;animation:none!important}
/* Keep the service bar within a 320px phone even with wider system fonts. */
@media(max-width:350px){
 .hp-shell .hp-mode-switch.hp-service-nav{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 65px 44px;gap:4px!important}
 .hp-service-nav .hp-service-count{display:none}
 .hp-service-nav>.action-btn{min-width:0;padding:6px 4px!important}
 .hp-service-tools select{padding:6px 3px!important}
}
