:root{
  --bg:#e9edf1;--panel:#fff;--ink:#17212b;--muted:#6f7b86;--line:#d9e0e6;
  --accent:#1f6feb;--cash:#218739;--card:#1658c7;--danger:#c73939;
  --shadow:0 5px 18px rgba(27,39,51,.12)
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--ink);background:var(--bg);overflow:hidden}
button,input{font:inherit}
button{border:0;cursor:pointer;touch-action:manipulation}
.topbar{height:72px;background:#16202a;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.brand{font-size:24px;font-weight:800;line-height:1.05}
.station-label{font-size:13px;color:#bdc7d0;margin-top:4px}
.top-actions{display:flex;gap:10px;align-items:center}.clock{font-size:20px;font-weight:700;margin-right:8px}.icon-btn{width:48px;height:48px;border-radius:12px;background:#293642;color:#fff;font-size:23px}
.layout{height:calc(100vh - 72px);display:grid;grid-template-columns:minmax(0,1.65fr) minmax(360px,.85fr);gap:12px;padding:12px}
.sales-area,.cart-area{background:var(--panel);border-radius:16px;box-shadow:var(--shadow);min-width:0;overflow:hidden}
.sales-area{display:flex;flex-direction:column}.category-tabs{display:flex;gap:8px;padding:12px;border-bottom:1px solid var(--line);overflow-x:auto;min-height:70px}
.category-tab{padding:0 22px;border-radius:12px;background:#eef2f5;color:#33404c;font-weight:800;font-size:18px;white-space:nowrap}
.category-tab.active{background:#16202a;color:white}
.product-grid{padding:12px;display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));grid-auto-rows:minmax(105px,1fr);gap:10px;overflow-y:auto}
.product{border-radius:14px;padding:12px;display:flex;flex-direction:column;justify-content:space-between;text-align:left;color:#17212b;box-shadow:inset 0 0 0 2px rgba(0,0,0,.06);font-weight:800}
.product:active{transform:scale(.98)}
.product-name{font-size:21px;line-height:1.08}.product-price{font-size:18px;opacity:.8}
.product[data-group="Bier"]{background:#f8d56b}.product[data-group="Grill"]{background:#f3a199}.product[data-group="Pommes"]{background:#f8c476}.product[data-group="Getränke"]{background:#a9d4f5}.product[data-group="Pfand"]{background:#c4b6ee}
.cart-area{display:flex;flex-direction:column}.cart-head{height:76px;display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line)}
.cart-title{font-size:23px;font-weight:850}.order-no{font-size:14px;color:var(--muted)}
.small{padding:10px 14px;border-radius:10px;font-weight:700}.danger-soft{background:#fbe8e8;color:var(--danger)}
.cart-head-actions{display:flex;align-items:center;gap:8px}.custom-item-btn{background:#e8f1ff;color:#174e91}.custom-item-btn:disabled{opacity:.4;cursor:not-allowed}
.cart-list{flex:1;overflow-y:auto;padding:8px 12px}.empty-cart{height:100%;display:grid;place-items:center;color:#a1abb5;font-size:20px}
.cart-item{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:10px 2px;border-bottom:1px solid #edf0f2}
.cart-item-name{font-size:18px;font-weight:750}.cart-item-sub{font-size:13px;color:var(--muted);margin-top:2px}
.qty{display:flex;align-items:center;gap:7px}.qty button{width:40px;height:40px;border-radius:10px;background:#edf1f4;font-size:22px;font-weight:700}.qty span{min-width:28px;text-align:center;font-size:19px;font-weight:800}
.cart-item-variant{background:#f7f9fb;border-radius:12px;padding:10px 8px;margin-top:4px;border-bottom:0}
.cart-item-variant .cart-item-sub{color:#38536b;font-weight:750}
.cart-item-linked-deposit{margin-left:18px;padding:7px 2px 7px 12px;border-left:3px solid #b9c8d5}
.cart-item-linked-deposit .cart-item-name{font-size:15px}
.cart-item-linked-deposit .cart-item-sub{font-size:12px}
.cart-item-linked-deposit .qty button{width:36px;height:36px}
.cart-footer{padding:12px;border-top:1px solid var(--line)}.totals{display:flex;align-items:end;justify-content:space-between;margin-bottom:12px;font-size:19px}.totals strong{font-size:32px}
.payment-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pay{height:82px;border-radius:14px;color:#fff;display:flex;justify-content:center;align-items:center;gap:10px;font-size:23px;font-weight:900}.pay:disabled{opacity:.35}.cash{background:var(--cash)}.card{background:var(--card)}.pay-symbol{font-size:28px}
.modal{position:fixed;inset:0;background:rgba(10,18,25,.65);display:none;align-items:center;justify-content:center;padding:18px;z-index:50}.modal.show{display:flex}
.modal-card{background:#fff;border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.3);padding:26px;position:relative;max-height:94vh;overflow:auto}.setup-card{width:min(720px,94vw)}
.modal h1,.modal h2{margin:0 0 8px}.modal p{margin:0 0 18px;color:var(--muted)}
.close-x{position:absolute;right:14px;top:10px;background:transparent;font-size:34px;color:#68737d}
.app-dialog{z-index:2500}
.app-dialog-card{width:min(520px,calc(100vw - 24px));text-align:center;padding:30px 26px 24px}
.app-dialog-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 14px;border-radius:50%;background:#e7f0ff;color:var(--accent);font-size:30px;font-weight:900}
.app-dialog[data-tone="danger"] .app-dialog-icon{background:#fbe8e8;color:var(--danger)}
.app-dialog[data-tone="success"] .app-dialog-icon{background:#e3f4e7;color:var(--cash)}
.app-dialog-card h2{padding:0 38px}
.app-dialog-card p{white-space:pre-line;line-height:1.45}
.app-dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.app-dialog:not(.has-cancel) #appDialogConfirm{grid-column:1/-1}
.app-dialog-actions button[hidden]{display:none}
@media(max-width:520px){.app-dialog-actions{grid-template-columns:1fr}.app-dialog-actions button{width:100%;margin:0}}
.printer-startup-modal{z-index:2450}
.printer-startup-card{width:min(620px,calc(100vw - 24px))}
.printer-startup-icon{font-size:48px;text-align:center;margin-bottom:8px}
.printer-startup-card>h2{text-align:center;padding:0 34px}
.printer-startup-steps{margin:18px 0;padding-left:24px;color:#3c4853;line-height:1.45}
.printer-startup-steps li+li{margin-top:8px}
.printer-browser-link{display:flex;align-items:center;justify-content:center;width:100%;min-height:58px;margin-top:14px;border-radius:12px;text-decoration:none;font-size:18px;font-weight:850}
.printer-startup-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
.printer-startup-actions button{width:100%;margin:0}
@media(max-width:560px){.printer-startup-actions{grid-template-columns:1fr}}
.setup-printer-check-hint{margin:0 0 8px!important;text-align:center;font-size:13px;line-height:1.35;color:var(--muted)!important}
.group-choices{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:20px 0}
.group-choice{display:flex;align-items:center;gap:12px;border:2px solid var(--line);border-radius:14px;padding:17px;font-size:20px;font-weight:800}.group-choice input{width:24px;height:24px}
.field{display:grid;gap:7px;margin:16px 0}.field span{font-weight:700}.field input{height:52px;border:2px solid var(--line);border-radius:11px;padding:0 13px;font-size:19px}
.primary,.secondary{height:58px;border-radius:12px;font-size:19px;font-weight:850}.primary{background:var(--accent);color:#fff}.secondary{background:#edf2f6;color:#263440;margin:7px 0}.full{width:100%}
.payment-card{width:min(540px,92vw);text-align:center}.payment-icon{font-size:58px;margin:8px}.payment-amount{font-size:45px;font-weight:900;margin:16px}.payment-actions{display:grid;gap:9px}.success{color:#1d8737}.error{color:#bd3030}.muted{color:var(--muted)}
.print-card{width:min(900px,95vw)}.print-preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:12px;margin:18px 0}
.ticket{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;border:2px dashed #70777e;padding:15px;background:#fff;min-height:210px}.ticket h3{text-align:center;margin:0 0 4px;font-size:22px}.ticket-meta{text-align:center;border-bottom:1px dashed #555;padding-bottom:9px;margin-bottom:10px;font-size:13px}.ticket-row{display:flex;gap:9px;font-size:18px;margin:8px 0}.ticket-row strong{width:32px}.ticket-total{border-top:1px dashed #555;margin-top:12px;padding-top:9px;font-size:18px;font-weight:800;display:flex;justify-content:space-between}
.ticket-custom-details{display:grid;gap:4px;margin:10px 0;padding:9px 0;border-top:1px dashed #777;border-bottom:1px dashed #777;font-size:14px}.ticket-custom-details strong{font-weight:850}
.history-card,.settings-card{width:min(650px,94vw)}.history-list{display:grid;gap:8px;margin-top:18px}.history-entry{border:1px solid var(--line);border-radius:12px;padding:13px;display:flex;justify-content:space-between}.history-entry strong{display:block}.info-box{display:grid;gap:6px;background:#fff3cd;border-radius:12px;padding:14px;margin-top:15px;font-size:14px}
@media(max-width:950px){.layout{grid-template-columns:minmax(0,1.5fr) 350px}.product-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-height:650px){.topbar{height:60px}.layout{height:calc(100vh - 60px)}.product-grid{grid-auto-rows:minmax(90px,1fr)}.pay{height:68px}.cart-head{height:66px}}

.toggle-row{display:flex;align-items:center;justify-content:space-between;background:#f1f4f6;border-radius:12px;padding:15px 16px;margin:8px 0;font-size:18px;font-weight:800}
.toggle-row input{width:28px;height:28px}
.print-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.print-actions button{width:100%;height:58px;border-radius:12px;font-size:18px;font-weight:850}

/* Druck erfolgt in einem separaten 80-mm-Dokument über printTickets(). */

.printer-config-card{width:min(620px,94vw)}
.config-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.config-actions button{height:56px;border-radius:12px;font-size:18px;font-weight:850}
.connection-result{padding:13px 14px;border-radius:11px;margin-top:14px;font-weight:750}
.connection-result.neutral{background:#eef2f5;color:#51606c}
.connection-result.success{background:#dff3e4;color:#176c2b}
.connection-result.error{background:#fbe1e1;color:#a51e1e}
.status-dot{width:18px;height:18px;border-radius:50%;display:block;flex:none}
.status-dot.online{background:#27a745;box-shadow:0 0 0 4px rgba(39,167,69,.16)}
.status-dot.offline{background:#c43b3b;box-shadow:0 0 0 4px rgba(196,59,59,.14)}
.status-dot.connecting{background:#e3a11a;box-shadow:0 0 0 4px rgba(227,161,26,.16)}

.ticket-footer-note{text-align:center;margin-top:4px;font-size:14px;line-height:1.15}
.ticket-promotion-note{margin-top:8px;padding:7px;border:2px solid #111;text-align:center;font-size:15px;font-weight:800;line-height:1.2}
.children-promotion-banner{padding:8px 16px;background:#fff1a8;color:#5d4200;border-bottom:2px solid #e3b913;text-align:center;font-weight:900;letter-spacing:.01em}
.product-card-promotion{border-color:#e3b913;background:linear-gradient(145deg,#fffdf2,#fff4b8)}
.product-promotion-badge{display:inline-flex;align-self:flex-start;padding:3px 7px;border-radius:999px;background:#e3b913;color:#3d2b00;font-size:12px;font-weight:900}
.ticket-separator{border-top:1px dashed #555;margin:4px 0}
.ticket-variant-detail{margin:-3px 0 7px 41px;font-size:14px;color:#3f4c57}

.password-field{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.password-field input{min-width:0}.compact{padding:10px 12px;white-space:nowrap}.warning-box{border-color:#d5a000;background:#fff8dc}.field select{width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font:inherit}

.cash-summary{display:flex;flex-direction:column;gap:16px}
.cash-summary-items{display:flex;flex-direction:column;gap:8px;max-height:48vh;overflow:auto}
.cash-summary-row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #ddd;font-size:18px}
.cash-summary-row:last-child{border-bottom:none}
.cash-finish-btn{margin-top:8px;min-height:58px;font-size:20px}

.setting-input-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0}
.setting-input-inline{display:flex;align-items:center;gap:8px}
.setting-input-inline input{width:76px;text-align:center}

.cash-progress-wrap{
  height:10px;
  width:100%;
  overflow:hidden;
  border-radius:999px;
  background:rgba(0,0,0,.12);
  margin-top:2px;
}
.cash-progress-wrap[hidden]{display:none}
.cash-progress-bar{
  height:100%;
  width:100%;
  border-radius:inherit;
  background:currentColor;
  transition:width .08s linear;
}

.card-payment-popup{display:flex;flex-direction:column;gap:16px}
.card-payment-items{display:flex;flex-direction:column;gap:8px;max-height:38vh;overflow:auto}
.card-payment-row{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid #ddd;font-size:17px}
.card-payment-row:last-child{border-bottom:none}
.card-payment-status{display:flex;align-items:center;justify-content:center;gap:12px;padding:16px;border-radius:12px;font-weight:700;text-align:center}
.card-payment-status.pending{background:rgba(0,0,0,.06)}
.card-payment-status.success{background:rgba(28,140,75,.12)}
.card-payment-status.error{background:rgba(190,45,45,.12)}
.card-payment-spinner{width:22px;height:22px;border:3px solid rgba(0,0,0,.18);border-top-color:currentColor;border-radius:50%;animation:card-payment-spin .8s linear infinite}
.card-payment-status.success .card-payment-spinner,
.card-payment-status.error .card-payment-spinner{display:none}
@keyframes card-payment-spin{to{transform:rotate(360deg)}}

.history-order{
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap:14px;
  padding:14px 0;
  border-bottom:1px solid #ddd;
}
.history-order:last-child{border-bottom:none}
.history-order-main{flex:1;min-width:0}
.history-order-head,
.history-order-foot{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.history-order-head{margin-bottom:6px}
.history-order-items{font-size:14px;opacity:.82;line-height:1.35;margin-bottom:8px}
.history-order-actions{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  min-width:180px;
}
.history-reprint-btn,
.history-cancel-btn{
  align-self:center;
  white-space:nowrap;
  width:100%;
}
@media (max-width:700px){
  .history-order{flex-direction:column}
  .history-order-actions{width:100%;min-width:0}
}

.header-text-btn{min-height:40px;padding:0 14px;border:1px solid rgba(255,255,255,.22);border-radius:10px;background:rgba(255,255,255,.08);color:inherit;font-weight:700;font-size:14px;white-space:nowrap}
.header-text-btn:active{transform:translateY(1px)}
.cashbook-required-modal{z-index:1200}.cashbook-required-card{text-align:center;max-width:480px}.cashbook-lock-icon{font-size:46px;margin-bottom:8px}
.cashbook-card{max-width:880px}.cashbook-current{margin-bottom:14px}.cashbook-status{display:flex;flex-direction:column;gap:5px;padding:14px;border-radius:12px}.cashbook-status.open{background:rgba(25,145,80,.12)}.cashbook-status.closed{background:rgba(180,70,40,.10)}
.cashbook-actions{display:flex;gap:10px;margin-bottom:20px}.cashbook-actions button{flex:1}
.cashbook-list{display:flex;flex-direction:column;gap:10px;max-height:48vh;overflow:auto}.cashbook-entry{padding:14px;border:1px solid #ddd;border-radius:12px}.cashbook-entry-head{display:flex;justify-content:space-between;gap:10px}.cashbook-entry-meta{font-size:14px;opacity:.78;margin:7px 0 10px}.cashbook-badge{padding:3px 8px;border-radius:999px;font-size:12px}.cashbook-badge.open{background:rgba(25,145,80,.14)}.cashbook-badge.closed{background:rgba(0,0,0,.08)}.cashbook-export-actions{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:760px){.header-text-btn{padding:0 9px;font-size:12px}.cashbook-actions{flex-direction:column}}

.cashbook-summary-print-btn{white-space:nowrap}

#productGrid{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.product-section{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.product-section-title{
  font-size:18px;
  font-weight:800;
  padding:8px 12px;
  border-radius:10px;
  background:rgba(0,0,0,.06);
}
.product-section-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(145px,1fr));
  gap:12px;
}
.product-section-deposit{
  padding-top:4px;
  border-top:2px solid rgba(0,0,0,.12);
}
.product-section-deposit .product-section-title{
  background:rgba(0,0,0,.1);
}

/* Tablet-Grid für gegliederte Artikelübersichten (z. B. Verkaufsgruppe Bier). */
.product-overview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  align-items:start;
}
.product-overview-grid .product-section{
  min-width:0;
  padding:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8fafc;
}
.product-overview-grid .product-section-title{
  padding:5px 8px;
  font-size:15px;
}
.product-overview-grid .product-section-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
}
.product-overview-grid .product-card{
  min-height:68px;
  padding:7px 8px;
  font-size:14px;
}
.product-overview-grid .product-price{
  font-size:16px;
  margin-top:3px;
}

@media (max-width:700px){
  .product-overview-grid{grid-template-columns:1fr}
}

.cashbook-header-status{
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:10px;
  background:rgba(0,0,0,.06);
  font-size:14px;
  white-space:nowrap;
}
.cashbook-header-status strong{font-weight:800}
.cashbook-header-status strong.open{color:#167a3f}
.cashbook-open-notice{
  padding:10px 12px;
  margin-bottom:10px;
  border-radius:10px;
  background:rgba(185,45,45,.1);
  font-weight:700;
}
.cashbook-open-notice[hidden]{display:none}
@media (max-width:900px){
  .cashbook-header-status{
    width:100%;
    justify-content:center;
    order:3;
  }
}

/* V34 – größere und farblich hinterlegte Artikelbuttons */
.product-section-grid{
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:14px;
}
.product-card{
  min-height:112px;
  padding:16px 14px;
  border:2px solid rgba(0,0,0,.12);
  border-radius:14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:flex-start;
  text-align:left;
  font-size:17px;
  font-weight:700;
  box-shadow:0 2px 7px rgba(0,0,0,.08);
  transition:transform .08s ease,box-shadow .08s ease,filter .08s ease;
}
.product-card:active{
  transform:scale(.98);
  box-shadow:0 1px 3px rgba(0,0,0,.12);
}
.product-variant-badge{display:inline-flex;align-self:flex-start;margin-top:3px;padding:3px 7px;border-radius:999px;background:rgba(255,255,255,.62);font-size:11px;font-weight:850;letter-spacing:.02em;text-transform:uppercase}
.product-card:hover{
  filter:brightness(.98);
}
.product-name{
  line-height:1.25;
}
.product-price{
  align-self:flex-end;
  font-size:21px;
  margin-top:10px;
}
.product-group-bier{
  background:#f5cf70;
}

.sync-header-status{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:9px;
  background:rgba(255,255,255,.08);
  color:#eaf0f3;
  font-size:12px;
  font-weight:700;
}
.sync-status-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#8c9aa3;flex:0 0 auto}
.sync-status-dot.success{background:#4fc58b;box-shadow:0 0 0 3px rgba(79,197,139,.14)}
.sync-status-dot.pending{background:#e8b23f;box-shadow:0 0 0 3px rgba(232,178,63,.14)}
.sync-status-dot.syncing{background:#4d9ed0;box-shadow:0 0 0 3px rgba(77,158,208,.14);animation:sync-pulse 1.2s infinite}
.sync-status-dot.error{background:#df6262;box-shadow:0 0 0 3px rgba(223,98,98,.14)}
@keyframes sync-pulse{50%{opacity:.45}}
.sync-settings-section{border:1px solid var(--line);border-radius:12px;background:#f7f9fa}
.sync-settings-section summary{cursor:pointer;padding:13px 14px;font-weight:800}
.sync-settings-body{display:grid;gap:12px;padding:0 14px 14px}
.sync-settings-status{display:flex;align-items:center;gap:10px;padding:12px;border-radius:10px;background:white;border:1px solid var(--line)}
.sync-settings-status div{display:grid;gap:2px}
.sync-settings-status span:last-child{font-size:12px;color:var(--muted)}
.sync-pending-panel{border:1px solid var(--line);border-radius:10px;background:#fff}.sync-pending-panel summary{cursor:pointer;padding:11px 12px;font-weight:800}.sync-pending-panel>p{margin:0;padding:0 12px 10px;color:var(--muted);font-size:12px}.sync-pending-list{display:grid;gap:8px;padding:0 10px 10px}.sync-pending-book{display:grid;gap:3px;padding:9px 10px;border-radius:9px;background:#fff8dc;border:1px solid #ead88d}.sync-pending-book>span{font-size:12px;color:var(--muted)}.sync-pending-orders{display:grid;gap:2px;margin-top:4px;padding-top:5px;border-top:1px solid rgba(138,110,25,.18)}.sync-pending-orders span{font-size:12px;color:#584a21}
.sync-actions{display:grid;grid-template-columns:1fr 1fr}
.sync-pairing-card{display:grid;gap:10px;padding:12px;border:1px solid #e2c45b;border-radius:11px;background:#fff8dc}.sync-pairing-card strong,.sync-pairing-card small{display:block}.sync-pairing-card small{margin-top:4px;color:var(--muted);font-size:12px}.sync-pairing-row{display:grid;grid-template-columns:1fr auto;gap:9px}.sync-pairing-row input{min-width:0;padding:12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font-size:20px;font-weight:850;letter-spacing:.15em;text-align:center}.sync-pairing-row button{min-height:48px}
.sync-dashboard-link{text-decoration:none;text-align:center}
.product-group-grill{
  background:#f3a36f;
}
.product-group-getränke,
.product-group-getr-nke{
  background:#8fd3f4;
}
.product-group-wein{
  background:#e7b0c4;
}
.product-group-brotzeit{
  background:#d9b486;
}
.product-group-spezialit-ten{
  background:#b8d8a8;
}
.product-group-kuchenbar{
  background:#e5c3a7;
}
.product-group-pfand,
.product-card-deposit{
  background:#c9c9c9;
}
.product-card-deposit{
  border-style:dashed;
}
@media (max-width:900px){
  .product-section-grid{
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  }
  .product-card{
    min-height:104px;
    font-size:16px;
  }
}

/* V39 – kompakte Aktionsbuttons in gespeicherten Kassenbüchern */
.cashbook-export-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
  overflow-x:auto;
  padding-bottom:2px;
}
.cashbook-export-actions button{
  flex:0 0 auto;
  min-width:0;
  min-height:32px;
  padding:6px 9px;
  border-radius:8px;
  font-size:12px;
  line-height:1.1;
  white-space:nowrap;
}
.cashbook-summary-print-btn{
  min-width:0 !important;
}
@media (max-width:900px){
  .cashbook-export-actions{
    gap:5px;
  }
  .cashbook-export-actions button{
    padding:6px 8px;
    font-size:11px;
  }
}

.setup-card{max-width:520px}
.setup-card select{
  width:100%;
  min-height:52px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.18);
  border-radius:10px;
  font-size:17px;
  background:#fff;
}
.setup-error{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(185,45,45,.1);
  color:#9a1f1f;
  font-weight:700;
}
.setup-error[hidden]{display:none}
.cash-register-station-status{
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:10px;
  background:rgba(0,0,0,.06);
  font-size:14px;
  white-space:nowrap;
}
.cash-register-station-status strong{font-weight:800}

/* V51 – Kassenbuchaktionen im Zeilenmenü */
.cashbook-entry{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:
    "head menu"
    "meta menu";
  column-gap:12px;
  align-items:center;
}
.cashbook-entry-head{grid-area:head}
.cashbook-entry-meta{grid-area:meta}
.cashbook-row-menu{
  grid-area:menu;
  position:relative;
  align-self:center;
}
.cashbook-menu-toggle{
  min-width:74px;
  min-height:34px;
  padding:7px 12px;
  font-size:12px;
  white-space:nowrap;
}
.cashbook-menu-panel{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:30;
  min-width:210px;
  padding:6px;
  border:1px solid rgba(0,0,0,.14);
  border-radius:10px;
  background:#fff;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
}
.cashbook-menu-panel[hidden]{display:none}
.cashbook-menu-item{
  display:block;
  width:100%;
  min-height:36px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  text-align:left;
  font-size:13px;
  white-space:nowrap;
}
.cashbook-menu-item:hover,
.cashbook-menu-item:focus{
  background:rgba(0,0,0,.07);
}
.cashbook-menu-item:active{
  background:rgba(0,0,0,.12);
}
@media (max-width:700px){
  .cashbook-entry{
    grid-template-columns:minmax(0,1fr) auto;
  }
  .cashbook-menu-panel{
    min-width:190px;
  }
}

/* V52 – kompakter, klar erkennbarer Menü-Button */
.cashbook-menu-toggle{
  min-width:0;
  min-height:30px;
  padding:5px 8px;
  gap:4px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:700;
  border-radius:7px;
}
.cashbook-menu-dots{
  font-size:17px;
  line-height:1;
  margin-top:-2px;
}
.cashbook-menu-label{
  line-height:1;
}
.cashbook-menu-caret{
  font-size:10px;
  transition:transform .12s ease;
}
.cashbook-menu-toggle[aria-expanded="true"] .cashbook-menu-caret{
  transform:rotate(180deg);
}

/* V55 – Verkauf nur mit geöffnetem Kassenbuch */
.product-card.cashbook-locked{
  opacity:.48;
  filter:grayscale(.45);
  cursor:not-allowed;
}
body.cashbook-closed #cashBtn,
body.cashbook-closed #cardBtn{
  opacity:.5;
  cursor:not-allowed;
}
.cashbook-open-actions{
  display:flex;
  justify-content:flex-end;
  margin:8px 0 14px;
}
.cashbook-open-actions button{
  min-height:34px;
  padding:7px 12px;
}

/* V60 – Message Toast */
.message-toast{
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:9999;
  transform:translate(-50%,20px);
  max-width:min(90vw,520px);
  padding:12px 18px;
  border-radius:10px;
  background:rgba(25,25,25,.94);
  color:#fff;
  font-size:15px;
  font-weight:700;
  text-align:center;
  box-shadow:0 8px 24px rgba(0,0,0,.28);
  opacity:0;
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.message-toast.show{
  opacity:1;
  transform:translate(-50%,0);
}

/* V64 – Kassenbuchaktionen in einer gemeinsamen Zeile */
.cashbook-open-actions{
  display:none !important;
}
#openCashbookFromModal{
  margin-right:8px;
}

/* V65 – kompaktere Bestellhistorie */
#historyModal .history-entry,
#historyModal .history-item,
#historyModal .order-entry{
  padding:8px 10px;
  margin-bottom:6px;
  min-height:0;
}

#historyModal .history-entry-head,
#historyModal .history-header,
#historyModal .order-header{
  margin-bottom:4px;
  line-height:1.2;
}

#historyModal .history-entry-meta,
#historyModal .history-meta,
#historyModal .order-meta{
  line-height:1.2;
  margin-top:2px;
}

#historyModal .history-entry-items,
#historyModal .history-items,
#historyModal .order-items{
  margin-top:4px;
  line-height:1.25;
}

#historyModal .history-entry button,
#historyModal .history-item button,
#historyModal .order-entry button{
  min-height:30px;
  padding:5px 9px;
  font-size:12px;
}

#historyModal .history-list,
#historyModal #historyList{
  gap:6px;
}


/* V71 – Zahlungsbuttons bleiben sichtbar, sind bei Bedarf deaktiviert */
#cashBtn:disabled,
#cardBtn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

/* V72 – Einstellungen Kassenplatz / Verkaufsgruppe */
#settingsModal .modal-card button:not(.close-x){
  width:100%;
}
#settingsModal .modal-card .close-x{
  position:absolute;
  top:6px;
  right:8px;
  width:var(--touch-target);
  height:var(--touch-target);
  margin:0;
  z-index:2;
}
#salesGroupModal select{
  width:100%;
  min-height:52px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.18);
  border-radius:10px;
  font-size:17px;
  background:#fff;
}

/* V73 – Mehrfachauswahl Verkaufsgruppen */
.sales-group-choices{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:8px;
  margin-top:8px;
}
.sales-group-choice{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.14);
  border-radius:10px;
  background:#fff;
  cursor:pointer;
}
.sales-group-choice input{
  width:20px;
  height:20px;
  margin:0;
}
.sales-group-choice span{
  font-weight:700;
}
.sales-group-choice:has(input:checked){
  background:rgba(0,110,200,.08);
  border-color:rgba(0,110,200,.35);
}

/* V83 – Versionsanzeige in der Kopfzeile */
.app-version{
  display:inline-block;
  margin-left:8px;
  padding:3px 8px;
  border-radius:999px;
  font-size:.48em;
  font-weight:700;
  line-height:1.2;
  vertical-align:middle;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.28);
  opacity:.9;
}

/* V85 – Tablet First
   Die Grundansicht ist für Tablets ausgelegt. Breite Desktop-Ansichten werden
   erst ab 1280 px erweitert; Hochformat bleibt vollständig bedienbar. */
:root{
  --topbar-height:88px;
  --app-gap:10px;
  --touch-target:48px;
}

html,body{
  width:100%;
  min-width:0;
  height:100%;
  height:100dvh;
  overscroll-behavior:none;
}

body{
  overflow:hidden;
}

#app{
  width:100%;
  height:100%;
  height:100dvh;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.topbar{
  flex:0 0 var(--topbar-height);
  width:100%;
  min-width:0;
  height:var(--topbar-height);
  padding:10px 12px;
  gap:12px;
  overflow:hidden;
}

.topbar>div:first-child{
  flex:0 1 auto;
  min-width:160px;
}

.brand{font-size:22px}
.station-label{
  max-width:280px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.top-actions{
  flex:1 1 auto;
  min-width:0;
  justify-content:flex-end;
  gap:8px;
}

.clock,
.cash-register-station-status{
  display:none;
}

.header-text-btn,
.icon-btn{
  min-height:var(--touch-target);
}

#headerFullscreenBtn.active{
  background:var(--accent);
  color:#fff;
}

.header-text-btn{
  padding:0 12px;
  font-size:13px;
}

.cashbook-header-status{
  order:0;
  min-width:0;
  max-width:250px;
  padding:7px 10px;
  font-size:12px;
  overflow:hidden;
}

.cashbook-header-status strong{
  overflow:hidden;
  text-overflow:ellipsis;
}

.layout{
  flex:1 1 auto;
  width:100%;
  min-width:0;
  min-height:0;
  height:auto;
  display:grid;
  grid-template-columns:minmax(0,3fr) minmax(320px,2fr);
  gap:var(--app-gap);
  padding:var(--app-gap);
}

.sales-area,
.cart-area{
  min-width:0;
  min-height:0;
  border-radius:14px;
}

.category-tabs{
  flex:0 0 64px;
  min-height:64px;
  padding:8px;
  gap:7px;
  scrollbar-width:thin;
}

.category-tab{
  min-width:112px;
  min-height:var(--touch-target);
  padding:0 16px;
  font-size:16px;
}

#productGrid{
  flex:1 1 auto;
  min-height:0;
  padding:10px;
  gap:14px;
  overflow-y:auto;
  overscroll-behavior:contain;
}

.product-section{gap:8px}
.product-section-title{
  padding:6px 10px;
  font-size:16px;
}

.product-section-grid{
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px;
}

.product-card{
  min-width:0;
  min-height:104px;
  padding:13px 12px;
  font-size:16px;
  touch-action:manipulation;
}

.product-price{
  font-size:20px;
  margin-top:8px;
}

.product-card.cashbook-locked{
  opacity:.48;
  filter:grayscale(.45);
  cursor:not-allowed;
}

.cart-head{
  flex:0 0 66px;
  height:66px;
  padding:10px 12px;
}

.cart-title{font-size:21px}
.cart-list{
  min-height:0;
  padding:6px 10px;
  overscroll-behavior:contain;
}

.cart-item{padding:8px 0}
.cart-item-name{font-size:16px}
.qty button{
  width:var(--touch-target);
  height:var(--touch-target);
}

.cart-footer{
  flex:0 0 auto;
  padding:10px;
}

.totals{margin-bottom:8px}
.totals strong{font-size:28px}
.pay{
  min-height:68px;
  height:68px;
  font-size:20px;
}

.modal{
  padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
}

.modal-card{
  max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 24px);
  padding:24px;
}

.close-x{
  right:8px;
  top:6px;
  width:var(--touch-target);
  height:var(--touch-target);
}

.field input,
.field select,
.setup-card select{
  min-height:var(--touch-target);
  font-size:16px;
}

.primary,.secondary,
.config-actions button,
.print-actions button{
  min-height:var(--touch-target);
}

/* Tablets im Hochformat: Verkauf und Warenkorb werden untereinander angeordnet. */
@media (orientation:portrait){
  body:before{content:none;display:none}

  :root{--topbar-height:112px}

  .topbar{
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:auto auto;
    align-content:center;
    gap:7px;
    padding:8px 10px;
  }

  .topbar>div:first-child{
    display:flex;
    align-items:baseline;
    gap:12px;
    min-width:0;
  }

  .brand{font-size:20px;white-space:nowrap}
  .station-label{
    margin:0;
    max-width:none;
    flex:1;
    text-align:right;
  }

  .top-actions{
    width:100%;
    justify-content:stretch;
  }

  .top-actions .header-text-btn{flex:1 1 0}
  .cashbook-header-status{flex:1.4 1 0;max-width:none}

  .layout{
    grid-template-columns:1fr;
    grid-template-rows:minmax(330px,1.25fr) minmax(300px,.95fr);
  }

  .product-section-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .product-card{min-height:96px}
  .cart-head{flex-basis:58px;height:58px}
  .pay{height:62px;min-height:62px}
}

/* Kompakte Tablets und große Mobilgeräte. */
@media (max-width:700px){
  :root{--topbar-height:104px;--app-gap:7px}

  .topbar{padding:7px 8px}
  .brand{font-size:18px}
  .station-label{font-size:11px}
  .cashbook-header-status span{display:none}
  .header-text-btn{padding:0 8px;font-size:12px}
  .icon-btn{width:44px;height:44px}

  .layout{
    grid-template-rows:minmax(300px,1.15fr) minmax(285px,1fr);
  }

  .sales-area,.cart-area{border-radius:11px}
  .category-tabs{flex-basis:58px;min-height:58px}
  .category-tab{min-width:100px;font-size:15px}
  .product-section-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .product-card{min-height:92px;padding:11px;font-size:15px}
  .payment-row{gap:7px}
  .pay{font-size:18px}
  .modal-card{padding:22px 16px}
  .config-actions,.print-actions{grid-template-columns:1fr}
  .cashbook-actions{flex-direction:column}
}

@media (max-width:860px) and (orientation:landscape){
  .brand{font-size:18px;white-space:nowrap}
  .app-version{display:none}
  .cashbook-header-status span{display:none}
}

/* Bier auf Tablets: die beiden direkten Biergrößen stehen nebeneinander. */
@media (min-width:701px) and (max-width:1366px){
  .product-section-grid.product-section-grid-beer{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .product-section-grid-beer .product-card:nth-child(1){grid-area:1 / 1}
  .product-section-grid-beer .product-card:nth-child(2){grid-area:1 / 2}
  .product-section-grid-beer .product-card:nth-child(3){grid-area:1 / 3}
  .product-section-grid-beer .product-card:nth-child(4){grid-area:2 / 1}
  .product-section-grid-beer .product-card:nth-child(5){grid-area:2 / 2}
  .product-section-grid-beer .product-card:nth-child(6){grid-area:3 / 1}
  .product-section-grid-beer .product-card:nth-child(7){grid-area:3 / 2}
  .product-section-grid-beer .product-card:nth-child(8){grid-area:3 / 3}
}

/* Breite Desktop- und große Tablet-Ansichten erweitern das Tablet-Layout. */
@media (min-width:1280px){
  :root{--topbar-height:76px;--app-gap:12px}
  .topbar{height:var(--topbar-height);padding:0 18px}
  .clock,.cash-register-station-status{display:flex}
  .layout{grid-template-columns:minmax(0,1.65fr) minmax(380px,.85fr)}
  .category-tabs{flex-basis:70px;min-height:70px;padding:12px}
  #productGrid{padding:12px}
  .product-section-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
  .product-card{min-height:112px;padding:16px 14px;font-size:17px}
  .cart-head{flex-basis:76px;height:76px;padding:14px 16px}
  .cart-item-name{font-size:18px}
  .pay{height:82px;font-size:23px}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
  }
}

/* V117 – einklappbare Kopfzeile und kompaktere Artikelkarten */
.header-toggle-btn{
  flex:0 0 44px;
  width:44px;
  height:44px;
  border-radius:12px;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:25px;
  font-weight:900;
  line-height:1;
}

.product-card{
  min-height:70px;
  padding:5px 10px;
  font-size:15px;
}
.product-price{font-size:17px;margin-top:4px}
.product-section-grid{gap:8px}

body.header-collapsed{--topbar-height:48px}
body.header-collapsed .topbar{
  display:flex;
  flex:0 0 48px;
  height:48px;
  min-height:48px;
  justify-content:flex-end;
  padding:2px 8px;
  gap:0;
}
body.header-collapsed .topbar>div{display:none}
body.header-collapsed .header-toggle-btn{height:44px;background:var(--accent)}

@media (orientation:portrait){
  .product-card{min-height:65px;padding:5px 9px}
}

/* V122 – dauerhaft kompakte Kopfzeile */
:root{
  --topbar-height:56px;
}

.topbar,
body.header-collapsed .topbar{
  display:flex;
  flex:0 0 var(--topbar-height);
  width:100%;
  height:var(--topbar-height);
  min-height:var(--topbar-height);
  align-items:center;
  justify-content:space-between;
  padding:4px 10px;
  gap:10px;
}

.topbar>div:first-child,
body.header-collapsed .topbar>div:first-child{
  display:flex;
  flex:1 1 auto;
  min-width:0;
  align-items:baseline;
  gap:9px;
}

.topbar .brand{
  flex:0 0 auto;
  font-size:17px;
  line-height:1;
  white-space:nowrap;
}

.topbar .app-version{
  margin-left:4px;
  padding:2px 5px;
  font-size:9px;
}

.topbar .station-label{
  flex:1 1 auto;
  min-width:0;
  max-width:360px;
  margin:0;
  font-size:12px;
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.topbar .top-actions,
body.header-collapsed .topbar .top-actions{
  display:flex;
  flex:0 0 auto;
  width:auto;
  min-width:0;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}

.topbar .clock{
  display:block;
  min-width:58px;
  margin:0 2px 0 0;
  font-size:15px;
  text-align:center;
  font-variant-numeric:tabular-nums;
}

.topbar .cash-register-station-status,
.topbar .cashbook-header-status{
  display:none;
}

.topbar .header-text-btn,
.topbar .icon-btn{
  flex:0 0 auto;
  min-height:48px;
  height:48px;
  margin:0;
}

.topbar .header-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 11px;
}

.header-action-icon{
  font-size:21px;
  line-height:1;
}

.header-action-label{
  white-space:nowrap;
}

@media (max-width:700px){
  .topbar,
  body.header-collapsed .topbar{
    padding-inline:7px;
    gap:6px;
  }

  .topbar .brand{
    display:none;
  }

  .topbar .station-label{
    max-width:none;
    font-size:12px;
    font-weight:700;
  }

  .topbar .clock{
    min-width:52px;
    font-size:13px;
  }

  .topbar .top-actions{
    gap:4px;
  }

  .topbar .header-text-btn,
  .topbar .icon-btn{
    width:44px;
    min-height:44px;
    height:44px;
  }

  .topbar .header-action-btn{
    width:auto;
    min-height:44px;
    height:44px;
    gap:4px;
    padding:0 7px;
    font-size:11px;
  }

  .topbar .header-action-icon{
    font-size:17px;
  }
}

@media (max-width:700px){
  .product-card{min-height:62px;padding:4px 8px;font-size:14px}
  .product-price{font-size:16px}
}

@media (min-width:1280px){
  .product-card{min-height:76px;padding:7px 12px;font-size:16px}
}

/* V87 – Hardware-Vorschläge je Kassenplatz im Einrichtungsdialog */
.station-setup-card{
  width:min(920px,calc(100vw - 24px));
  max-width:920px;
}
.station-setup-card #startupPairCode{font-weight:850;letter-spacing:.16em;text-align:center}.station-setup-card #startupPairingHint{color:var(--muted);font-size:12px}.station-setup-card #startupPairingField.paired #startupPairCode{display:none}.station-setup-card #startupBackendStatus{margin:10px 0 0}

.station-hardware-config[hidden]{display:none!important}
.station-hardware-config{margin-top:14px}
.station-sales-group-summary[hidden]{display:none!important}
.station-sales-group-summary{
  margin-top:12px;
  padding:11px 12px;
  border:1px solid #cbd9e8;
  border-radius:11px;
  background:#f5f9fd;
}
.station-sales-group-summary>strong{
  display:block;
  margin-bottom:8px;
  color:#29445f;
  font-size:14px;
}
.station-sales-group-list{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.station-sales-group-badge{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:5px 10px;
  border-radius:999px;
  background:#dcecff;
  color:#194f83;
  font-size:14px;
  font-weight:800;
}
.station-sales-group-empty{
  color:var(--muted);
  font-size:14px;
}
.station-config-hint{
  margin-bottom:10px!important;
  padding:10px 12px;
  border-radius:10px;
  background:#eef5ff;
  color:#31506f!important;
  font-size:14px;
}

.setup-config-section{
  margin:10px 0;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8fafb;
  overflow:hidden;
}

.setup-config-section summary{
  min-height:var(--touch-target);
  display:flex;
  align-items:center;
  padding:0 14px;
  font-size:17px;
  font-weight:850;
  cursor:pointer;
  touch-action:manipulation;
}

.setup-config-section[open] summary{border-bottom:1px solid var(--line)}
.setup-fields-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 12px;
  padding:4px 14px 10px;
}

.setup-fields-grid .field{margin:8px 0}
.setup-field-wide{grid-column:1/-1}
.setup-toggle-row{
  min-height:52px;
  margin:8px 0;
  align-self:end;
}

.setup-start-actions{
  position:sticky;
  bottom:-24px;
  z-index:4;
  margin:14px -24px -24px;
  padding:12px 24px 24px;
  background:linear-gradient(to bottom,rgba(255,255,255,.92),#fff 12px);
}

@media (max-width:700px){
  .setup-fields-grid{grid-template-columns:1fr;padding-inline:10px}
  .setup-field-wide{grid-column:auto}
  .setup-start-actions{
    bottom:-22px;
    margin:12px -16px -22px;
    padding:10px 16px 22px;
  }
}

/* V91 – Gutschein einlösen */
.voucher-btn{
  width:100%;
  min-height:48px;
  margin-bottom:9px;
  padding:8px 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:2px solid #d2a72d;
  border-radius:11px;
  background:#fff8dc;
  color:#684f05;
  font-weight:850;
}
.voucher-btn.active{background:#f8df83;border-color:#b78a0d}
.voucher-btn:disabled{opacity:.45;cursor:not-allowed}
.voucher-symbol{font-size:21px}

.voucher-calculation{
  display:grid;
  gap:4px;
  margin-bottom:7px;
  padding:8px 10px;
  border-radius:9px;
  background:#f6f7f8;
  font-size:14px;
}
.voucher-calculation[hidden]{display:none}
.voucher-calculation>div,
.payment-amount-summary>div{
  display:flex;
  justify-content:space-between;
  gap:14px;
}
.voucher-deduction{color:#956500}

.voucher-card{width:min(520px,calc(100vw - 24px))}
.voucher-card .field>label{font-weight:700}
.voucher-input-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 58px;
  gap:8px;
}
.voucher-input-row #voucherValue{width:100%;min-width:0}
.voucher-input-delete{
  min-height:52px;
  border:1px solid #e1bcbc;
  border-radius:11px;
  background:#f8e8e8;
  color:var(--danger);
  font-size:23px;
  font-weight:850;
}
.voucher-keypad{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
.voucher-keypad button{
  min-height:54px;
  border:1px solid #ccd5dd;
  border-radius:11px;
  background:#eef2f5;
  color:var(--ink);
  font-size:22px;
  font-weight:850;
}
.voucher-keypad button:active{background:#dce5ec;transform:scale(.98)}
.voucher-input-delete:active{background:#f2d5d5;transform:scale(.98)}
.voucher-keypad-spacer{min-height:54px}
.voucher-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:14px;
}

.product-variant-modal{z-index:2300}
.product-variant-card{width:min(680px,calc(100vw - 24px))}
.product-variant-card>h2{padding-right:38px}
.product-variant-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}
.product-variant-choice{min-height:68px;padding:12px;border:2px solid var(--line);border-radius:13px;background:#f5f7f9;color:#263440;font-size:19px;font-weight:850}
.product-variant-choice span,.product-variant-choice small{display:block}
.product-variant-choice small{margin-top:4px;font-size:14px;color:var(--muted)}
.product-variant-choice.selected small{color:#315f91}
.product-variant-choice.selected{border-color:var(--accent);background:#e8f1ff;color:#174e91;box-shadow:0 0 0 2px rgba(24,105,197,.12)}
.variant-deposit-section{margin:18px 0;padding:15px;border-radius:14px;background:#f7f9fb;border:1px solid var(--line)}
.variant-deposit-heading strong,.variant-deposit-heading span{display:block}
.variant-deposit-heading span{margin-top:4px;color:var(--muted);font-size:13px}
.variant-deposit-choices{display:grid;gap:9px;margin-top:12px}
.variant-deposit-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;background:#fff;border-radius:11px;border:1px solid #dfe5ea}
.variant-deposit-row strong,.variant-deposit-row span{display:block}
.variant-deposit-row span{font-size:13px;color:var(--muted);margin-top:2px}
.variant-deposit-empty{padding:12px;text-align:center;color:var(--muted);background:#fff;border-radius:11px}
@media(max-width:560px){.product-variant-choices{grid-template-columns:1fr}}
.voucher-actions button{width:100%;margin:0}
.voucher-actions button:disabled{opacity:.42;cursor:not-allowed}
#voucherValue.input-error{
  border-color:var(--danger);
  background:#fff7f7;
  box-shadow:0 0 0 3px rgba(199,57,57,.13);
}
#voucherValue.input-error:focus{outline:none;border-color:var(--danger)}

.custom-item-modal{z-index:2300}
.custom-item-card{width:min(620px,calc(100vw - 24px))}
.custom-item-card>h2{padding-right:38px}
.custom-item-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 12px}
.custom-item-description{grid-column:1/-1}
.custom-item-card .field>span{font-weight:700}
.custom-item-card .field input,.custom-item-card .field select{width:100%;min-width:0}
.custom-item-card .setup-error{margin:2px 0 14px}
@media(max-width:560px){.custom-item-fields{grid-template-columns:1fr}.custom-item-description{grid-column:1}}

.payment-amount-summary{
  display:grid;
  gap:6px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f7f8f9;
}
.payment-amount-summary>div:last-child{
  padding-top:6px;
  border-top:1px solid var(--line);
  font-size:18px;
}
.history-voucher{
  margin:5px 0 8px;
  color:#8a6200;
  font-size:14px;
  font-weight:700;
}

@media (max-width:700px){
  .voucher-actions{grid-template-columns:1fr}
}

/* V92 – aufgeräumte Einstellungen und Druckerkonfiguration */
.printer-status-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:14px 0 10px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f1f4f6;
}
.printer-status-card>div{
  min-width:0;
  display:grid;
  gap:4px;
}
.printer-status-card strong{font-size:16px}
.printer-status-card span:not(.status-dot){color:var(--muted);font-size:14px}
.printer-test-button{margin-top:12px}

.setting-control-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:8px 0;
  padding:14px 16px;
  border-radius:12px;
  background:#f1f4f6;
}
.setting-control-copy{
  min-width:0;
  display:grid;
  gap:4px;
}
.setting-control-copy strong{font-size:17px}
.setting-control-copy small{color:var(--muted);line-height:1.25}
.setting-number-control{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:750;
}
.setting-number-control input{
  width:76px;
  height:46px;
  padding:0 8px;
  border:2px solid var(--line);
  border-radius:9px;
  background:#fff;
  text-align:center;
  font:inherit;
  font-size:18px;
  font-weight:800;
}
.setting-number-control input:focus{border-color:var(--accent);outline:0}

@media (max-width:560px){
  .setting-control-card{align-items:flex-start;flex-direction:column}
  .setting-number-control{width:100%}
  .setting-number-control input{flex:1;width:auto}
}

.variant-quantity-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin-top:14px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f1f4f6;
}
.variant-quantity-row[hidden]{display:none}
.variant-quantity-row strong,
.variant-quantity-row>div:first-child span{display:block}
.variant-quantity-row>div:first-child span{margin-top:3px;color:var(--muted);font-size:13px}
.variant-quantity-control input{
  width:64px;
  height:42px;
  border:2px solid var(--line);
  border-radius:9px;
  background:#fff;
  text-align:center;
  font-size:20px;
  font-weight:850;
}
.variant-quantity-control button:disabled{opacity:.4;cursor:not-allowed}

/* V167 – universelle, einzeilige Pfand-Direktaktionen */
.product-section-deposit-actions{
  flex:0 0 auto;
  padding-top:5px;
  border-top:2px solid rgba(0,0,0,.12);
}

.product-deposit-actions-grid{
  display:grid;
  grid-template-columns:repeat(var(--deposit-action-count,6),minmax(120px,1fr))!important;
  grid-auto-flow:column;
  gap:6px!important;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:2px;
}

.product-deposit-actions-grid .product-deposit-action{
  min-height:66px!important;
  padding:6px 9px!important;
  border-radius:10px;
  font-size:16px!important;
}

.product-deposit-action .product-name{
  font-size:16px;
  line-height:1.1;
}

.product-deposit-action-label{
  font-size:13px;
  font-weight:850;
  line-height:1;
}

.product-deposit-action .product-price{
  margin-top:2px;
  font-size:16px;
  line-height:1;
}

.product-deposit-charge{background:#d8ead8}
.product-deposit-return{background:#f0d2d2}

.product-section-deposit-all{
  flex:1 1 auto;
  padding-top:0;
  border-top:0;
}

.product-deposit-actions-grid.product-deposit-actions-grid-all{
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important;
  grid-auto-flow:row;
  gap:8px!important;
  overflow:visible;
}

.product-deposit-actions-grid-all .product-deposit-action{
  min-height:70px!important;
  padding:5px 10px!important;
  border-radius:14px;
  font-size:15px!important;
}

.product-deposit-actions-grid-all .product-name{font-size:15px}
.product-deposit-actions-grid-all .product-deposit-action-label{font-size:12px}
.product-deposit-actions-grid-all .product-price{font-size:17px}

@media(max-width:700px){
  .product-deposit-actions-grid.product-deposit-actions-grid-all{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .product-deposit-actions-grid-all .product-deposit-action{
    min-height:62px!important;
    padding:4px 8px!important;
    font-size:14px!important;
  }
}

@media(min-width:1280px){
  .product-deposit-actions-grid.product-deposit-actions-grid-all{
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr))!important;
    gap:14px!important;
  }

  .product-deposit-actions-grid-all .product-deposit-action{
    min-height:76px!important;
    padding:7px 12px!important;
    font-size:16px!important;
  }

  .product-deposit-actions-grid-all .product-name{font-size:16px}
}
