:root{--pos-brand:#621837;--pos-paper:#fff;--pos-bg:#f3f1ed;--pos-line:#ddd7d2;--pos-muted:#756d71;--pos-green:#237553;--pos-red:#a33b35}
*{box-sizing:border-box}body.pos-body{margin:0;background:var(--pos-bg);color:#1d191b;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;touch-action:manipulation}
button,input,select{font:inherit}.pos-topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:68px;padding:10px 18px;background:#fff;border-bottom:1px solid var(--pos-line)}
.pos-brand small,.pos-brand strong{display:block}.pos-brand small{font-size:9px;font-weight:900;letter-spacing:.12em;color:var(--pos-brand)}.pos-brand strong{font-size:20px}.pos-top-actions{display:flex;align-items:center;gap:8px}.pos-link,.pos-lock{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 13px;border:1px solid var(--pos-line);border-radius:10px;background:#fff;color:var(--pos-brand);text-decoration:none;font-weight:850;cursor:pointer}
.pos-login-shell{min-height:100dvh;display:grid;place-items:center;padding:20px}.pos-login-card{width:min(460px,100%);padding:28px;border:1px solid var(--pos-line);border-radius:22px;background:#fff;box-shadow:0 24px 70px rgba(43,25,33,.12)}.pos-login-card h1{margin:7px 0;font-size:clamp(36px,8vw,58px);letter-spacing:-.06em}.pos-login-card p{color:var(--pos-muted);line-height:1.5}.pos-login-card label{display:grid;gap:7px;font-size:12px;font-weight:850}.pos-login-card input{min-height:54px;padding:10px 13px;border:1px solid var(--pos-line);border-radius:12px;font-size:20px}.pos-login-card button{width:100%;min-height:54px;margin-top:12px;border:0;border-radius:12px;background:var(--pos-brand);color:#fff;font-weight:900}.pos-notice{margin:12px 0;padding:12px 14px;border-radius:11px;background:#fff0eb;color:#8d372a}
.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,390px);gap:14px;padding:14px;min-height:calc(100dvh - 68px)}.pos-catalog,.pos-cart{min-width:0}.pos-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:13px;border:1px solid var(--pos-line);border-radius:15px;background:#fff}.pos-toolbar label{display:flex;align-items:center;gap:9px;font-size:11px;font-weight:850}.pos-toolbar select{min-height:42px;max-width:360px;border:1px solid var(--pos-line);border-radius:10px;padding:0 10px;background:#fff}
.pos-category{margin-bottom:18px}.pos-category h2{margin:0 0 9px;font-size:15px}.pos-product-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:9px}.pos-product{position:relative;min-height:105px;padding:14px;border:0;border-radius:15px;background:var(--product-color,var(--pos-brand));color:#fff;text-align:left;cursor:pointer;box-shadow:0 8px 18px rgba(38,25,31,.09);transition:transform .08s ease}.pos-product:active{transform:scale(.97)}.pos-product strong,.pos-product span{display:block}.pos-product strong{font-size:16px;line-height:1.15}.pos-product span{position:absolute;left:14px;bottom:12px;font-weight:900}.pos-product .open-price{font-size:11px}
.pos-cart{position:sticky;top:82px;align-self:start;display:flex;flex-direction:column;max-height:calc(100dvh - 96px);border:1px solid var(--pos-line);border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 16px 40px rgba(42,24,33,.07)}.pos-cart-head{padding:17px 18px;border-bottom:1px solid var(--pos-line)}.pos-cart-head h2{margin:0}.pos-cart-head small{color:var(--pos-muted)}.pos-cart-lines{flex:1;min-height:160px;overflow:auto;padding:8px 14px}.pos-empty{display:grid;place-items:center;min-height:160px;color:var(--pos-muted);text-align:center}.pos-line-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:11px 0;border-bottom:1px solid #eeeae7}.pos-line-item strong,.pos-line-item small{display:block}.pos-line-item small{margin-top:3px;color:var(--pos-muted)}.pos-line-controls{display:flex;align-items:center;gap:5px}.pos-line-controls button{width:34px;height:34px;border:1px solid var(--pos-line);border-radius:9px;background:#fff;font-weight:900}.pos-line-controls .remove{color:var(--pos-red)}
.pos-cart-total{display:flex;justify-content:space-between;align-items:end;padding:15px 18px;border-top:1px solid var(--pos-line)}.pos-cart-total span{color:var(--pos-muted);font-size:11px;font-weight:800}.pos-cart-total strong{font-size:30px}.pos-pay-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 14px 14px}.pos-pay-actions button{min-height:62px;border:0;border-radius:13px;color:#fff;font-weight:900;font-size:17px}.pos-cash{background:var(--pos-green)}.pos-card{background:var(--pos-brand)}.pos-pay-actions button:disabled{opacity:.42}.pos-today{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:12px 14px;background:#f7f5f2}.pos-today div{padding:9px;border-radius:9px;background:#fff}.pos-today small,.pos-today strong{display:block}.pos-today small{color:var(--pos-muted);font-size:9px}.pos-today strong{margin-top:4px;font-size:13px}
.pos-history{margin:0 14px 18px;padding:14px;border:1px solid var(--pos-line);border-radius:16px;background:#fff}.pos-history h2{margin:0 0 10px;font-size:16px}.pos-history-row{display:grid;grid-template-columns:70px minmax(0,1fr) auto auto;gap:10px;padding:8px 0;border-top:1px solid #eeeae7;align-items:center;font-size:11px}.pos-history-row small{color:var(--pos-muted)}.pos-pill{padding:5px 7px;border-radius:999px;background:#eee;font-size:8px;font-weight:900}.pos-pill.PAID{background:#e7f5ee;color:#1e6d4d}.pos-pill.PENDING{background:#fff3cf;color:#865e00}.pos-pill.FAILED{background:#fee9e6;color:#9b372e}
.pos-dialog{width:min(430px,calc(100% - 28px));border:0;border-radius:20px;padding:0;box-shadow:0 28px 90px rgba(20,10,15,.32)}.pos-dialog::backdrop{background:rgba(20,14,17,.55)}.pos-dialog-body{padding:24px}.pos-dialog h2{margin:0 0 6px;font-size:27px}.pos-dialog p{color:var(--pos-muted)}.pos-dialog label{display:grid;gap:7px;font-size:11px;font-weight:850}.pos-dialog input{width:100%;min-height:60px;border:1px solid var(--pos-line);border-radius:12px;padding:8px 12px;font-size:28px;text-align:right}.pos-dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.pos-dialog-actions button{min-height:50px;border:1px solid var(--pos-line);border-radius:11px;background:#fff;font-weight:850}.pos-dialog-actions .primary{border:0;background:var(--pos-brand);color:#fff}.pos-change{padding:12px;border-radius:10px;background:#edf7f1;color:#226b4e;font-size:18px;font-weight:900;text-align:center}.pos-wait{text-align:center}.pos-spinner{width:54px;height:54px;margin:10px auto 18px;border:5px solid #eadfe4;border-top-color:var(--pos-brand);border-radius:50%;animation:pos-spin .85s linear infinite}@keyframes pos-spin{to{transform:rotate(360deg)}}
.footer-cash-entry{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;padding:0 13px;border-radius:10px;background:#621837;color:#fff!important;text-decoration:none;font-weight:900}
@media(max-width:1180px){.pos-product-grid{grid-template-columns:repeat(3,minmax(120px,1fr))}}@media(max-width:860px){.pos-layout{grid-template-columns:1fr;padding:10px}.pos-cart{position:static;max-height:none;order:-1}.pos-product-grid{grid-template-columns:repeat(3,minmax(100px,1fr))}.pos-product{min-height:92px}.pos-toolbar{align-items:stretch;flex-direction:column}.pos-toolbar label{display:grid}.pos-toolbar select{max-width:none;width:100%}}@media(max-width:520px){.pos-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pos-topbar{padding:8px 10px}.pos-history-row{grid-template-columns:55px 1fr auto}.pos-history-row .pos-pill{display:none}}

/* V3 – iPad: keine seitlich abgeschnittene Kassenoberfläche */
html,body.pos-body{width:100%;max-width:100%;overflow-x:hidden}
.pos-layout,.pos-layout>*,.pos-toolbar>*{min-width:0}
.pos-toolbar label{max-width:100%}
.pos-toolbar select{min-width:0;width:min(360px,100%)}
.pos-layout{
  padding-right:max(14px,env(safe-area-inset-right));
  padding-bottom:max(14px,env(safe-area-inset-bottom));
  padding-left:max(14px,env(safe-area-inset-left));
}
.pos-event-notice{margin:-3px 0 14px;padding:12px 14px;border:1px solid #e3cbd5;border-radius:12px;background:#fff7fa;color:#621837;font-weight:750;line-height:1.4}
.pos-pill.REFUNDED{background:#edf0f2;color:#55606a}
@media(max-width:1100px){
  .pos-toolbar{align-items:stretch;flex-direction:column}
  .pos-toolbar label{display:grid}
  .pos-toolbar select{width:100%;max-width:none}
  .pos-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:700px) and (max-width:1100px),
       (min-width:1101px) and (max-width:1400px) and (hover:none) and (pointer:coarse){
  :root{--pos-ipad-cart-width:clamp(290px,38vw,340px)}
  .pos-layout{display:block;padding-right:calc(var(--pos-ipad-cart-width) + 28px + env(safe-area-inset-right))}
  .pos-cart{
    position:fixed!important;
    top:82px;
    right:max(14px,env(safe-area-inset-right));
    bottom:max(14px,env(safe-area-inset-bottom));
    z-index:40;
    width:var(--pos-ipad-cart-width);
    height:auto;
    max-height:none;
    order:initial;
  }
  .pos-history{margin-right:calc(var(--pos-ipad-cart-width) + 28px + env(safe-area-inset-right))}
}
