*{box-sizing:border-box} :root{color-scheme:dark;--bg:#101923;--panel:#172838;--line:#344959;--gold:#f6c968;--text:#eaf2fa;--muted:#bacbdd} [hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--text);font:16px system-ui,sans-serif;display:grid;grid-template-columns:220px minmax(0,1fr);min-height:100vh}
aside{padding:22px 16px;border-right:1px solid var(--line);background:#111a23} aside img{height:auto;max-width:100%} nav{display:grid;gap:8px;margin:20px 0} nav button{text-align:left} nav button[aria-current=page]{background:#233a4c;color:var(--gold);border-left:3px solid var(--gold)}
main{width:100%;max-width:1200px;padding:28px} header,section{padding:24px;background:var(--panel);border:1px solid var(--line);border-radius:14px;margin:0 0 20px} header{background:linear-gradient(115deg,#172838,#302b21)} h1,h2,h3,p{margin:0 0 12px} .eyebrow{font-size:12px;color:var(--gold);letter-spacing:.1em;font-weight:800} header p:last-child,.entry p{color:var(--muted)}
form{max-width:540px;margin:0 0 24px} label{display:grid;gap:7px;margin:0 0 14px} input,textarea,select,button{font:inherit;border:1px solid var(--line);border-radius:8px;color:inherit;background:#101d2a;padding:10px 12px} button{cursor:pointer;min-height:42px} button.primary{background:var(--gold);color:#151b22;font-weight:750;border-color:var(--gold)} :focus-visible{outline:2px solid var(--gold);outline-offset:3px} button:disabled{opacity:.6} .entry{border-top:1px solid var(--line);padding:14px 0;overflow-wrap:anywhere} .entry button,form button+button{margin:4px 8px 0 0} #status{padding:12px;border:1px solid var(--line);border-radius:8px;background:#233a4c} #status.error{color:#ffc99b} #login{max-width:580px}
@media(max-width:690px){body{display:block} aside{border-right:0;border-bottom:1px solid var(--line)} main{padding:16px} nav{display:flex;flex-wrap:wrap} header,section{padding:18px}}

/* Login */
body.login-page { display:block; background:#06162e; }
.login-page > aside, .login-page > main { display:none; }
#login { position:relative; display:grid; min-height:100vh; min-height:100svh; margin:0; padding:0; max-width:none; border:0; border-radius:0; background:radial-gradient(ellipse at 77% 44%,#0a2141,#041228 69%); }
.login-art { position:absolute; inset:0; clip-path:polygon(0 0,64.55% 0,62.05% 10%,59.78% 20%,57.94% 30%,56.38% 40%,55% 50%,53.78% 60%,52.56% 70%,51.18% 80%,49.65% 90%,47.93% 100%,0 100%); }
.login-art img { width:100%; height:100%; object-fit:fill; display:block; }
.login-panel { z-index:1; align-self:center; margin-left:64%; padding:clamp(24px,4vw,68px) clamp(24px,4vw,68px) clamp(24px,4vw,68px) 0; }
.login-content { max-width:520px; margin-inline:auto; }
#login h1 { font-size:clamp(30px,3.45vw,58px); line-height:1.08; margin:0 0 clamp(24px,3.1vw,52px); color:#f6f8ff; }
#signin { max-width:none; margin:0 0 20px; }
#signin label { gap:10px; margin-bottom:clamp(17px,2vw,34px); font-size:clamp(16px,1.65vw,27px); font-weight:700; }
#signin input { min-width:0; min-height:clamp(48px,4.25vw,72px); border:1px solid #8da5c2; border-radius:14px; background:#132942; }
#signin button { width:100%; min-height:clamp(52px,5.2vw,88px); margin-top:clamp(5px,1vw,17px); border:0; border-radius:16px; background:linear-gradient(#ffc36a,#ffaf3d); color:#06162e; font-size:clamp(20px,2.3vw,38px); }
#login details { text-align:center; font-size:clamp(15px,1.45vw,24px); }
#login summary { display:inline-block; cursor:pointer; text-decoration:underline; text-underline-offset:4px; }
#login details p { margin:12px 0 0; color:var(--muted); font-size:15px; line-height:1.5; }
#login-status { padding:10px 12px; background:#172e4b; border-radius:8px; }
#login-status.error { color:#ffd2aa; }
@media(max-width:780px) {
  #login { display:block; }
  .login-art { position:relative; height:clamp(175px,53vw,350px); clip-path:none; border-bottom:2px solid #ffb850; overflow:hidden; }
  .login-art img { width:176%; height:auto; }
  .login-panel { margin-left:0; padding:28px 24px 34px; }
  #login h1 { margin-bottom:24px; }
}

.product-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:0 12px; }
#products form { max-width:800px; }
#products button, #products input, #products select { min-height:44px; min-width:44px; }
#products button { margin-right:8px; }
#more-movements { margin-top:12px; }
#stock-movements button, #stock-movements select { min-height:44px; }

#product-form textarea { min-height:140px; resize:vertical; width:100%; }
#catalog-tools { margin:0 0 24px; padding:12px 16px; border:1px solid var(--line); border-radius:8px; }
#catalog-tools summary { cursor:pointer; min-height:44px; align-content:center; font-weight:700; }
#catalog-tools form { padding-top:12px; }
#catalog-tools button + p, #import-form button + p { margin-top:12px; color:var(--muted); }
.action-link { display:inline-flex; align-items:center; min-height:44px; margin:0 0 12px; padding:0 12px; border:1px solid var(--line); border-radius:8px; color:var(--gold); }

#categories button, #categories input, #categories select { min-height:44px; min-width:44px; }
#reorder { margin:0 0 24px; padding:12px 16px; border:1px solid var(--line); border-radius:8px; }
#reorder summary { cursor:pointer; min-height:44px; align-content:center; font-weight:700; }

.product-name-field { grid-column:1 / -1; }
.product-name-field small { color:var(--muted); }

.product-toolbar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px 12px; margin-bottom:12px; }
.product-toolbar label { flex:0 1 max(30%, 140px); margin:0; }
#product-search { width:100%; }
#products .product-toolbar button { margin:0; }
.product-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.product-table { border-collapse:collapse; width:100%; text-align:left; }
.product-table thead { background:#101d2a; }
.product-table th, .product-table td { padding:12px; vertical-align:top; border-bottom:1px solid var(--line); }
.product-table tbody tr:last-child > * { border-bottom:0; }
.product-table tbody th { min-width:145px; text-wrap:wrap; overflow-wrap:anywhere; }
.product-table td { overflow-wrap:anywhere; }
.product-table small { display:block; font-weight:400; color:var(--muted); margin-top:4px; }
.product-table .stock-low { color:var(--gold); }
.product-actions { display:flex; gap:8px; flex-wrap:wrap; min-width:205px; }
#products .product-actions button { margin:0; }
#stock-dialog { width:min(560px,calc(100% - 24px)); max-height:calc(100% - 24px); overflow:auto; padding:22px; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:14px; }
#stock-dialog::backdrop { background:#050d18b8; }
#stock-dialog form { margin:0; }
#stock-status { padding:10px 12px; background:#233a4c; border:1px solid var(--line); border-radius:8px; }
#stock-status.error { color:#ffc99b; }

.checkout-mode { display:block; height:100dvh; overflow:hidden; }
.checkout-mode > aside, .checkout-mode > main > header { display:none; }
.checkout-mode > main { width:100%; max-width:none; height:100%; padding:12px; display:grid; grid-template-rows:auto minmax(0,1fr); }
.checkout-mode > main > #status { margin:0 0 6px; padding:6px 12px; }
#checkout { grid-row:2; display:flex; flex-direction:column; gap:10px; min-height:0; margin:0; padding:12px; }
.checkout-heading, .checkout-actions, .checkout-charge { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.checkout-heading h2, .checkout-heading p, .sale-panel h3, .sale-total { margin:0; }
.checkout-heading h2 { font-size:clamp(18px,2.4vw,27px); }
.checkout-heading p, #cart-count { color:var(--muted); font-size:14px; }
#cash-sale { flex:1; min-height:0; }
.checkout-grid { height:100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
.sale-panel { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:8px; min-height:0; min-width:0; padding:10px; border:1px solid var(--line); border-radius:10px; background:#101d2a; }
#checkout button, #checkout input { min-height:44px; min-width:44px; }
#sale-search-form { display:flex; align-items:flex-end; gap:8px; margin:0; }
#sale-search-form label { flex:1; min-width:0; margin:0; gap:3px; }
#sale-search { width:100%; }
#sale-products { display:grid; grid-template-columns:repeat(var(--sale-columns,1),minmax(0,1fr)); grid-auto-rows:48px; align-content:start; gap:6px; min-height:0; }
#sale-products button { text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#cart-items { min-height:0; }
.cart-row { height:52px; display:grid; grid-template-columns:minmax(0,1fr) auto auto auto auto; align-items:center; gap:5px; border-bottom:1px solid var(--line); }
.cart-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cart-row button { padding:4px; }
.checkout-pager { min-height:44px; display:flex; align-items:center; justify-content:flex-end; gap:8px; color:var(--muted); }
.checkout-pager[data-single="true"] { visibility:hidden; }
.sale-total { display:flex; align-items:center; gap:8px; font-size:clamp(16px,2vw,22px); }
#charge, #payment-form .primary { min-height:52px; font-weight:800; }
#charge { min-width:120px; }
#cash-close-dialog, #payment-dialog { width:min(660px,calc(100% - 20px)); max-height:calc(100dvh - 20px); overflow:auto; padding:16px; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:14px; }
#cash-close-dialog::backdrop, #payment-dialog::backdrop { background:#050d18b8; }
#payment-form, #cash-close form, #cash-close { max-width:none; margin:0; }
.payment-heading { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.payment-heading h3, .payment-heading p { margin:0 0 10px; }
#payment-options { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:8px; }
#checkout #payment-options button { min-height:48px; padding:4px 6px; font-weight:700; }
#payment-options button[aria-pressed="true"] { border-color:var(--gold); background:var(--gold); color:#151b22; }
#payment-parts { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; }
#payment-parts label { flex:1 1 130px; margin:0; gap:4px; min-width:0; }
#payment-parts input { width:100%; }
#payment-balance, .payment-note { margin:8px 0; }
.payment-note { color:var(--muted); font-size:14px; }
.payment-actions { display:flex; flex-wrap:wrap; gap:8px; }
.payment-actions button { flex:1 1 auto; }
#payment-status.error, #cash-close-status.error { color:#ffc99b; }
@media(min-width:1050px) { #sale-products { --sale-columns:2; } }
@media(max-width:639px) {
  .checkout-mode > main { padding:6px; }
  #checkout { padding:8px; gap:6px; }
  .checkout-grid { grid-template-columns:1fr; grid-template-rows:minmax(0,1fr) minmax(0,1fr); gap:6px; }
  .sale-panel { padding:6px; gap:4px; }
  .checkout-actions { gap:5px; }
  .checkout-actions button { padding:4px 6px; font-size:13px; }
}
@media(max-height:480px) { .checkout-mode { overflow:auto; height:auto; } .checkout-mode > main { min-height:480px; } .checkout-grid { min-height:330px; } }

.cart-heading { display:flex; align-items:center; gap:8px; min-width:0; }
.cart-heading h3 { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#leave-tab { margin-left:auto; padding:4px 8px; }
#tab-dialog, #pending-dialog { width:min(550px,calc(100% - 20px)); max-height:calc(100dvh - 20px); overflow:auto; padding:16px; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:14px; }
#tab-dialog::backdrop, #pending-dialog::backdrop { background:#050d18b8; }
#tab-form { margin:0; }
#pending-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
#pending-tabs button { text-align:left; }
.pending-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:4px 8px; overflow-wrap:anywhere; }
.pending-card span { color:var(--gold); font-weight:700; white-space:nowrap; }
.pending-card small { grid-column:1 / -1; color:var(--muted); }
#tab-status.error, #pending-status.error { color:#ffc99b; }
@media(max-width:639px) {
  .checkout-heading { flex-wrap:wrap; }
  .checkout-heading .checkout-actions { flex-wrap:wrap; }
  #charge { min-width:80px; }
}

.cash-figures { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:0 0 12px; }
.cash-figures > div { background:#101d2a; border:1px solid var(--line); border-radius:8px; padding:8px; }
.cash-figures dt { color:var(--muted); font-size:13px; }
.cash-figures dd { margin:4px 0 0; font-weight:750; overflow-wrap:anywhere; }
.cash-figures .cash-difference dd { color:var(--gold); }
#last-cash-report { max-width:700px; }
@media(max-width:520px) {
  .cash-figures { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #pending-tabs { grid-template-columns:1fr; }
}

#cash-movement-dialog { width:min(660px,calc(100% - 20px)); max-height:calc(100dvh - 20px); overflow:auto; padding:16px; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:14px; }
#cash-movement-dialog::backdrop { background:#050d18b8; }
#cash-movement-form { margin:0; max-width:none; }
#cash-movement-kinds, .cash-movement-inputs { display:grid; gap:8px; margin-bottom:10px; }
#cash-movement-kinds { grid-template-columns:repeat(3,minmax(0,1fr)); }
#cash-movement-kinds button[aria-pressed="true"] { background:var(--gold); color:#151b22; font-weight:700; }
.cash-movement-inputs { grid-template-columns:minmax(100px,1fr) minmax(0,2fr); }
.cash-movement-inputs label { min-width:0; margin:0; }
#cash-movement-dialog h4 { margin:14px 0 6px; }
#cash-movement-list { list-style:none; margin:0; padding:0; }
#cash-movement-list li { border-top:1px solid var(--line); padding:5px 0; overflow-wrap:anywhere; }
#cash-movement-list span, #cash-movement-list small { display:block; color:var(--muted); }
#cash-movement-pages[data-single="true"] { display:none; }
#cash-movement-status.error { color:#ffc99b; }

#payment-dialog { width:min(740px,calc(100% - 20px)); padding:clamp(14px,3vw,24px); }
#payment-dialog .payment-heading h3 { font-size:clamp(22px,4vw,28px); }
#payment-dialog .payment-heading p { display:flex; align-items:baseline; gap:8px; font-size:17px; color:var(--muted); }
#payment-total { color:var(--gold); font-size:clamp(24px,5vw,34px); line-height:1.1; white-space:nowrap; }
#checkout #payment-options button { min-height:56px; font-size:clamp(16px,3vw,20px); }
#payment-parts label { font-size:18px; font-weight:650; }
#payment-parts input { min-height:56px; font-size:clamp(21px,4vw,26px); font-weight:650; }
#payment-balance { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:7px 12px; border-radius:8px; background:#101d2a; font-size:18px; }
#payment-change { color:var(--gold); font-size:clamp(24px,5vw,32px); line-height:1.1; }
#payment-dialog .payment-note { font-size:15px; }
#payment-dialog .payment-actions button { min-height:52px; font-size:clamp(16px,3vw,19px); }
@media(max-width:639px) { #payment-options { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.sale-panel-footer { display:flex; align-items:center; justify-content:space-between; gap:6px; }
#open-quick-product { padding:5px 8px; }
#quick-product-dialog { width:min(620px,calc(100% - 20px)); max-height:calc(100dvh - 20px); overflow:auto; padding:16px; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:14px; }
#quick-product-dialog::backdrop { background:#050d18b8; }
#quick-product-form { max-width:none; margin:0; }
#quick-product-form label { margin-bottom:8px; min-width:0; }
.quick-product-inputs { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
#quick-product-form p { color:var(--muted); }
#quick-product-status.error { color:#ffc99b; }
#product-review-note { padding:10px; background:#233a4c; border:1px solid var(--line); border-radius:8px; overflow-wrap:anywhere; }
#products #review-products[aria-pressed="true"] { border-color:var(--gold); }

#checkout-keyboard-setting { margin:12px 0; }
#toggle-checkout-keyboard { min-height:44px; }
#toggle-checkout-keyboard[aria-pressed="true"] { border-color:var(--gold); }
#checkout-keyboard { position:fixed; z-index:10; left:8px; right:8px; bottom:8px; width:min(760px,calc(100vw - 16px)); max-height:calc(100dvh - 16px); overflow:auto; margin:0 auto; padding:8px; background:#172838; border:1px solid #5b788a; border-radius:12px; box-shadow:0 12px 30px #050d18a6; }
#checkout-keyboard[data-position="top"] { top:8px; bottom:auto; }
#checkout-keyboard[data-layout="numeric"] { width:min(326px,calc(100vw - 16px)); }
.keyboard-keys { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:4px; }
#checkout-keyboard[data-layout="numeric"] .keyboard-keys { grid-template-columns:repeat(3,minmax(0,1fr)); }
.keyboard-controls { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
#checkout #checkout-keyboard button { min-height:44px; min-width:0; padding:3px; font-weight:700; }
.keyboard-controls button { flex:1 0 auto; }
.keyboard-controls button:last-child { background:var(--gold); color:#151b22; }
@media(max-width:520px) { .keyboard-keys { grid-template-columns:repeat(7,minmax(0,1fr)); } }
@media(max-width:355px) { .keyboard-keys { grid-template-columns:repeat(6,minmax(0,1fr)); } }

#receipt-settings-form { padding:12px; border:1px solid var(--line); border-radius:8px; }
#receipt-settings-form button, #stores .entry button, #more-sales { min-height:44px; }
#last-sale-receipt { margin:5px 0 0; }
#sales-history .action-link { margin:0; }
#more-sales { margin-top:12px; }

#refund-dialog { width:min(620px,calc(100% - 20px)); max-height:calc(100dvh - 20px); overflow:auto; padding:16px; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:14px; }
#refund-dialog::backdrop { background:#050d18b8; }
#refund-dialog button, .sales-history-actions button { min-height:44px; }
#refund-dialog form { margin:12px 0; }
#refund-dialog textarea { resize:vertical; }
.refund-check { display:flex; align-items:center; gap:8px; min-height:44px; }
.refund-check input { width:20px; height:20px; flex-shrink:0; }
#refund-status.error { color:#ffc99b; }
.sales-history-actions > * { margin:0 6px 5px 0; }
.sales-history-actions span { color:var(--gold); }

.report-tabs, .report-filters { display:flex; flex-wrap:wrap; gap:10px; }
.report-tabs { margin-bottom:16px; }
.report-tabs button[aria-pressed="true"] { background:var(--gold); color:#151b22; font-weight:750; }
#report-form { max-width:none; }
.report-fields { display:contents; }
.report-filters label { min-width:150px; margin-bottom:8px; }
#reports button, #reports input, #reports select { min-height:44px; }
#report-note { color:var(--muted); line-height:1.45; }
#more-reports { margin-top:12px; }

#product-photo-fields { margin:0 0 12px; padding:10px; border:1px solid var(--line); border-radius:8px; }
#product-current-photo { width:88px; height:88px; object-fit:contain; margin:0 0 10px; background:#101d2a; }
.checkout-product-tile { display:grid; grid-template-columns:minmax(0,1fr) 48px; gap:5px; min-width:0; }
#sale-products .checkout-photo-button { position:relative; display:grid; place-items:center; overflow:hidden; padding:0; }
.checkout-photo-button img { width:100%; height:46px; object-fit:cover; }
.checkout-photo-button::after { content:'+'; position:absolute; right:2px; bottom:2px; border-radius:3px; padding:0 3px; background:#101923; color:#f6c968; line-height:1; }
#checkout-photo-dialog { width:min(700px,calc(100% - 20px)); max-height:calc(100dvh - 20px); padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--panel); color:var(--text); }
#checkout-photo-dialog::backdrop { background:#050d18b8; }
#checkout-photo-large { display:block; width:100%; max-height:calc(100dvh - 120px); object-fit:contain; }

.prep-catalog-actions { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
#checkout #send-prep { padding:5px 8px; }
#prep-send-dialog, #prep-queue-dialog, #prep-ready-dialog { width:min(650px,calc(100% - 20px)); max-height:calc(100dvh - 20px); overflow:auto; padding:16px; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:14px; }
#prep-send-dialog::backdrop, #prep-queue-dialog::backdrop, #prep-ready-dialog::backdrop { background:#050d18b8; }
#prep-send-form { margin:0; max-width:none; }
#prep-send-status.error, #prep-queue-status.error { color:#ffc99b; }
.preparation-list { display:grid; gap:8px; }
.preparation-card { padding:12px; background:#101d2a; border:1px solid var(--line); border-radius:10px; overflow-wrap:anywhere; }
.preparation-card h3, .preparation-card p { margin:0 0 4px; }
.preparation-card small { color:var(--muted); }
.preparation-card > strong { display:block; margin-top:4px; color:var(--gold); }
.preparation-actions { display:flex; flex-wrap:wrap; gap:6px; }
.preparation-actions:not(:empty) { margin-top:6px; }
#kitchen .preparation-actions button { min-height:48px; background:var(--gold); color:#151b22; font-weight:750; }
#prep-queue-pages[data-single="true"] { display:none; }
@media(max-width:860px) { .checkout-heading { flex-wrap:wrap; } .checkout-heading .checkout-actions { flex-wrap:wrap; } }

.profile-rules { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:12px; margin:16px 0; }
#profile-form { max-width:none; }
.profile-rules fieldset { min-width:0; border:1px solid var(--line); border-radius:12px; padding:12px; background:#132331; }
.profile-rules legend { font-weight:750; color:var(--gold); }
.profile-rules label { display:flex; align-items:center; gap:12px; min-height:44px; margin:0; cursor:pointer; }
.profile-rules input[type=checkbox] { width:24px; height:24px; min-height:24px; margin:0; accent-color:var(--gold); flex:none; }
#sale-detail-dialog { width:min(640px,calc(100vw - 32px)); }
#sale-detail-content li { margin:8px 0; }

#save-profile { min-height:48px; }

#login-keyboard-toggle { min-height:48px; width:100%; margin:0 0 16px; border-color:#7e94aa; background:#14283d; }
#login-keyboard-toggle[aria-expanded="true"] { border-color:var(--gold); color:var(--gold); }
#login #checkout-keyboard { z-index:20; }
#login #checkout-keyboard button { min-height:44px; min-width:0; padding:3px; font-weight:700; }

#sale-product-filters { display:flex; gap:6px; }
#sale-product-filters button { min-height:44px; flex:1; padding:5px 8px; }
#sale-product-filters button[aria-pressed="true"] { background:var(--gold); color:#151b22; font-weight:750; border-color:var(--gold); }
.product-actions button[aria-pressed="true"] { border-color:var(--gold); color:var(--gold); }

.checkout-grid > .sale-panel:first-child { grid-template-rows:auto auto minmax(0,1fr) auto; }

#offline-state { display:block; color:var(--muted); font-size:12px; }
#offline-state.offline-pending { color:var(--gold); }
#offline-dialog { width:min(620px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; }
#offline-dialog form { max-width:none; }
#offline-dialog input,#offline-dialog button { min-height:44px; }
#offline-notice { color:var(--gold); overflow-wrap:anywhere; }
#offline-pin-keys { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-bottom:12px; }
.offline-operation { border:1px solid var(--line); border-radius:10px; padding:12px; margin:10px 0; overflow-wrap:anywhere; }
.offline-operation strong { display:block; margin-bottom:5px; }
#offline-resume { width:100%; min-height:48px; margin-bottom:12px; border-color:var(--gold); }
@media(max-width:860px) {
 .checkout-heading > .checkout-actions { display:grid; width:100%; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; }
 .checkout-heading > .checkout-actions button { min-width:0; min-height:44px; font-size:13px; padding:4px 5px; }
}
@media(max-width:639px) { .checkout-heading > .checkout-actions { grid-template-columns:repeat(3,minmax(0,1fr)); } }
