.pos-shell{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,0.9fr);gap:16px;align-items:start}
.pos-scan{display:flex;gap:8px;margin-bottom:12px}
.pos-scan input{flex:1;min-height:44px;font-size:16px}
.pos-catalog{height:clamp(120px,25vh,220px);max-height:220px;overflow:auto;border:1px solid var(--border,#d7dde7);border-radius:10px;margin-bottom:12px}
.pos-catalog button{display:flex;justify-content:space-between;width:100%;background:none;border:0;border-bottom:1px solid var(--border,#edf0f5);padding:10px 12px;text-align:left;cursor:pointer}
.pos-catalog button:hover{background:rgba(37,99,235,.06)}
.pos-catalog small{color:#667085}
.pos-cart table td,.pos-cart table th{vertical-align:middle}
.pos-qty{width:72px}
.pos-pay{display:grid;gap:10px}
#pos-today tr[data-pos-open]{cursor:pointer}
.pos-tender-row{display:grid;grid-template-columns:130px 1fr auto;gap:8px;align-items:center}
.pos-totals{background:var(--panel-muted,#f4f6fa);border-radius:12px;padding:12px 14px}
.pos-totals div{display:flex;justify-content:space-between;margin:4px 0}
.pos-totals .grand{font-size:1.25rem;font-weight:700}
.pos-shift-banner{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px;padding:10px 12px;border-radius:10px;background:#f4f6f8;color:#16365c}
.pos-shift-banner.warn{background:#fff7ed;color:#9a3412}
.pos-enable{max-width:560px;margin:24px auto;text-align:center}
@media (max-width:980px){.pos-shell{grid-template-columns:1fr}}

/* Keep all payment figures inside their grid track. */
html body #app .pos-shell > .panel{min-width:0!important;max-width:100%!important;box-sizing:border-box}
html body #app .pos-pay{min-width:0!important;overflow:visible}
html body #app .pos-pay > label{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px;align-items:center;min-width:0}
html body #app .pos-pay :is(input,select){width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box}
html body #app .pos-tender-row{grid-template-columns:70px minmax(0,1fr) minmax(0,1fr);min-width:0}
html body #app .pos-tender-row > span{min-width:0}
html body #app .pos-totals{min-width:0;max-width:100%;box-sizing:border-box}
html body #app .pos-totals > div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}
html body #app .pos-totals b{text-align:right;white-space:nowrap}
html body #app .pos-scan{flex-wrap:wrap;min-width:0}
html body #app .pos-scan input{flex:1 1 220px;min-width:0!important;max-width:100%;box-sizing:border-box}
@media(max-width:1280px){html body #app .pos-shell{grid-template-columns:minmax(0,1fr)!important}}

html body #app .pos-settings-only{grid-template-columns:minmax(0,1fr)!important}
html body #app .pos-settings-only > .panel:first-child{display:none!important}
html body #app .pos-settings-only > .panel:last-child{width:100%;min-width:0;box-sizing:border-box}
html body #app .pos-settings-only .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
html body #app .pos-settings-only .field{min-width:0}
html body #app .pos-settings-only :is(input:not([type=checkbox]),select){width:100%;min-width:0;box-sizing:border-box}
html body #app .pos-settings-only .span-2{grid-column:1/-1}
@media(max-width:640px){html body #app .pos-settings-only .form-grid{grid-template-columns:minmax(0,1fr)}}

.pos-integration-status{margin-top:20px;padding-top:12px;border-top:1px solid var(--border,#d7dde7);min-width:0}
html body #app .pos-integration-status table{width:100%;min-width:0;table-layout:fixed}
html body #app .pos-integration-status :is(th,td){white-space:normal;overflow-wrap:anywhere}

/* Tax line switch (sell with or without sales tax for this sale) */
html body #app .pos-totals .pos-tax-row > span{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html body #app .pos-tax-toggle{display:inline-flex;align-items:center;gap:6px;min-height:0;padding:2px 8px 2px 3px;border:1px solid var(--line,#c5d4e6);border-radius:999px;background:transparent;color:inherit;font-size:12px;font-weight:600;cursor:pointer;line-height:1.6}
html body #app .pos-tax-toggle i{position:relative;width:28px;height:16px;border-radius:999px;background:#94a3b8;transition:background .15s}
html body #app .pos-tax-toggle i::after{content:'';position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:transform .15s}
html body #app .pos-tax-toggle[aria-checked="true"] i{background:#0f7b6c}
html body #app .pos-tax-toggle[aria-checked="true"] i::after{transform:translateX(12px)}
html body #app .pos-tax-toggle:disabled{opacity:.7;cursor:not-allowed}

/* Keep POS cart table columns stable and horizontally scrollable on narrow viewports */
html body #app .pos-cart .table-wrap,
html body[data-auth-state] #app .pos-cart .table-wrap { width: 100% !important; max-width: 100% !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
html body #app .pos-cart table,
html body[data-auth-state] #app .pos-cart table { display: table !important; width: 100% !important; min-width: 560px !important; max-width: none !important; table-layout: fixed !important; border-collapse: collapse !important; }
html body #app .pos-cart table > thead,
html body[data-auth-state] #app .pos-cart table > thead { display: table-header-group !important; }
html body #app .pos-cart table > tbody,
html body[data-auth-state] #app .pos-cart table > tbody { display: table-row-group !important; }
html body #app .pos-cart table > thead > tr,
html body #app .pos-cart table > tbody > tr,
html body[data-auth-state] #app .pos-cart table > thead > tr,
html body[data-auth-state] #app .pos-cart table > tbody > tr { display: table-row !important; }
html body #app .pos-cart table :is(th, td),
html body[data-auth-state] #app .pos-cart table :is(th, td) { display: table-cell !important; position: static !important; min-width: 0 !important; padding: 8px 6px !important; vertical-align: middle !important; box-sizing: border-box !important; }
html body #app .pos-cart table :is(th, td):nth-child(1) { width: 16% !important; min-width: 86px !important; }
html body #app .pos-cart table :is(th, td):nth-child(2) { width: 30% !important; min-width: 150px !important; white-space: normal !important; }
html body #app .pos-cart table :is(th, td):nth-child(3) { width: 13% !important; min-width: 72px !important; }
html body #app .pos-cart table :is(th, td):nth-child(4) { width: 16% !important; min-width: 88px !important; }
html body #app .pos-cart table :is(th, td):nth-child(5) { width: 18% !important; min-width: 96px !important; }
html body #app .pos-cart table :is(th, td):nth-child(6) { width: 7% !important; min-width: 40px !important; text-align: center !important; }
html body #app .pos-cart .pos-qty { width: 100% !important; min-width: 60px !important; max-width: 100% !important; box-sizing: border-box !important; }
html body #app .pos-cart table :is(th, td)::before,
html body[data-auth-state] #app .pos-cart table :is(th, td)::before { content: none !important; display: none !important; }
