/* ==========================================================================
   Business pages — page-specific styles on top of the app skin (pages-m2.css).
   Every rule is scoped to its page: body[data-app-page="x"] or a page class.

   Pages: storefront (violet) · coupons (pink) · customer-carts (amber) ·
   invoices (cyan) · quotations (indigo) · recurring (teal) · products
   (emerald) · inventory (amber) + batches (rose) · daily-reports (indigo) ·
   deliveries (teal) · pos (register).
   Primary text is true black; secondary no lighter than #475569.
   ========================================================================== */

/* ---- Shared by the business list pages ----------------------------------- */

/* room under the last card for the floating menu button on phones */
@media (max-width: 767px) {
    body[data-app-page="storefront"] .sx-wrap.lp2,
    body[data-app-page="coupons"] .sx-wrap.lp2,
    body[data-app-page="customer-carts"] .sx-wrap.lp2,
    body[data-app-page="invoices"] .sx-wrap.lp2,
    body[data-app-page="quotations"] .sx-wrap.lp2,
    body[data-app-page="recurring"] .sx-wrap.lp2,
    body[data-app-page="products"] .sx-wrap.lp2,
    body[data-app-page="inventory"] .sx-wrap.lp2,
    body[data-app-page="batches"] .sx-wrap.lp2,
    body[data-app-page="daily-reports"] .sx-wrap.lp2,
    body[data-app-page="deliveries"] .sx-wrap.lp2 { padding-bottom: 72px; }
}

/* a row of filter pills that scrolls sideways on phones */
.lp2 .lp2-pills { margin: 0 0 14px; }
@media (max-width: 719px) {
    .lp2 .lp2-pills { margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; }
}

/* "N issued" under a schedule's badge */
.lp2 .lp2-issued { font-size: .66rem; font-weight: 700; color: #475569; white-space: nowrap; }

/* ---- Action sheet (one record, every action) ------------------------------- */

body.lp2-app .lp2-sheet { gap: 12px; }
body.lp2-app .lp2-sheet-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 14px 16px; border-radius: 16px;
    background: linear-gradient(135deg, #f0f9ff, #fff 70%); border: 1px solid #e0eaf3;
}
body.lp2-app .lp2-sheet-lbl { font-size: .74rem; font-weight: 750; color: #334155; overflow-wrap: anywhere; }
body.lp2-app .lp2-sheet-amt {
    margin-top: 2px; font-size: 1.45rem; font-weight: 800; color: #000;
    letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
body.lp2-app .lp2-sheet-sub { margin-top: 2px; font-size: .74rem; font-weight: 600; color: #475569; overflow-wrap: anywhere; }
body.lp2-app .lp2-sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.lp2-app .lp2-sheet-act .btn {
    width: 100%; min-height: 46px; justify-content: flex-start; gap: 8px;
    padding: 10px 12px; font-size: .82rem; text-align: left; white-space: normal; line-height: 1.2;
}
body.lp2-app .lp2-sheet-act .btn i { font-size: 1rem; color: #0e7490; }
body.lp2-app .lp2-sheet-act .btn.lp2-danger { color: #b91c1c; border-color: #fecaca; }
body.lp2-app .lp2-sheet-act .btn.lp2-danger i { color: #b91c1c; }
body.lp2-app .lp2-sheet-foot { font-size: .74rem; font-weight: 600; color: #475569; text-align: center; }

/* ---- Quotations / recurring: detail pop-ups -------------------------------- */

body[data-app-page="quotations"] .modal .stmt-head,
body[data-app-page="recurring"] .modal .stmt-head {
    padding: 14px 16px; border-radius: 16px; border: 1px solid #e3e7f5;
    background: linear-gradient(135deg, #eef2ff, #fff 70%);
}
body[data-app-page="recurring"] .modal .stmt-head { border-color: #d5efeb; background: linear-gradient(135deg, #f0fdfa, #fff 70%); }
body[data-app-page="quotations"] .modal .stmt-total,
body[data-app-page="recurring"] .modal .stmt-total { color: #000; }

/* coloured variants of the sheet head */
body.lp2-app .lp2-sheet-head.lp2-sheet-amber { background: linear-gradient(135deg, #fffbeb, #fff 70%); border-color: #f5e6c4; }
body.lp2-app .lp2-sheet-head.lp2-sheet-teal { background: linear-gradient(135deg, #f0fdfa, #fff 70%); border-color: #cdebe6; }
body.lp2-app .lp2-sheet-ic { font-size: 1.6rem; color: #b45309; }
body.lp2-app .btn.lp2-danger-outline { color: #b91c1c; border-color: #fecaca; }
body.lp2-app .btn.lp2-danger-outline:hover { background: #fef2f2; }
body.lp2-app .lp2-field-note { display: block; font-size: .74rem; font-weight: 600; color: #475569; line-height: 1.45; }
body.lp2-app .lp2-switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border-radius: 12px; background: #f6f8fb; border: 1px solid #e7ebf1;
}
body.lp2-app .lp2-switch-row b { color: #000; font-size: .86rem; }

/* upgrade note with a progress bar (carts limit) */
.lp2 .lp2-upsell { align-items: center; flex-wrap: wrap; border-color: #ddd6fe; background: #f5f3ff; }
.lp2 .lp2-upsell > i { color: #6d28d9; }
.lp2 .lp2-upsell-bar { height: 6px; margin-top: 8px; border-radius: 99px; background: #e9e5fb; overflow: hidden; }
.lp2 .lp2-upsell-bar > i { display: block; height: 100%; border-radius: 99px; background: #7c3aed; }

/* folded section (archived products, request history, closed deliveries) */
.lp2 details.lp2-arch {
    margin: 16px 0 0; border: 1px solid var(--lp2-line); border-radius: 18px; background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); overflow: hidden;
}
.lp2 details.lp2-arch > summary {
    display: flex; align-items: center; gap: 8px; padding: 13px 16px; cursor: pointer; list-style: none;
    font-size: .88rem; font-weight: 800; color: #000;
}
.lp2 details.lp2-arch > summary::-webkit-details-marker { display: none; }
.lp2 details.lp2-arch > summary > i:first-child { color: var(--lp2-h3); }
.lp2 .lp2-arch-caret { margin-left: auto; color: #475569; transition: transform .18s ease; }
.lp2 details.lp2-arch[open] .lp2-arch-caret { transform: rotate(180deg); }
.lp2 .lp2-arch-body { padding: 0 12px 12px; }
.lp2 .lp2-arch-body > .sx-list { box-shadow: none; }
.lp2 .lp2-cap-gap { margin-top: 18px; }
.lp2 .lp2-icon-btn { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 14px; flex-shrink: 0; }
.lp2 .lp2-skel-list { display: flex; flex-direction: column; gap: 8px; }
.lp2 .lp2-skel-list .skeleton { height: 64px; border-radius: 14px; }
.lp2 .lp2-unit { font-size: .66rem; font-weight: 700; color: #475569; }

/* ==========================================================================
   Storefront (violet)
   ========================================================================== */

.lp2-sf .lp2-sf-hero .sx-hero-chip { gap: 7px; }
.lp2-sf .lp2-sf-live {
    width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .28);
}
.lp2-sf .lp2-sf-id { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; }
.lp2-sf .lp2-sf-logo {
    width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; overflow: hidden;
    display: grid; place-items: center; background: rgba(255, 255, 255, .16);
    border: 2px solid rgba(255, 255, 255, .35); color: #fff; font-size: 1.5rem;
}
.lp2-sf .lp2-sf-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp2-sf .lp2-sf-name {
    font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: #fff;
    letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere;
}
.lp2-sf .lp2-sf-name .bi { color: #86efac; font-size: .95rem; }
.lp2-sf .lp2-sf-url {
    margin-top: 3px; font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
    color: rgba(255, 255, 255, .85); overflow-wrap: anywhere;
}
.lp2-sf .lp2-sf-cta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.lp2-sf .lp2-sf-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 13px;
    border-radius: 11px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12);
    color: #fff; font: inherit; font-size: .8rem; font-weight: 750; text-decoration: none; cursor: pointer;
    transition: background .15s ease;
}
.lp2-sf .lp2-sf-btn:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.lp2-sf .lp2-sf-btn.is-solid { background: #fff; color: #5b21b6; border-color: #fff; }
.lp2-sf .lp2-sf-btn.is-solid:hover { background: #f5f3ff; color: #4c1d95; }

.lp2-sf .lp2-sf-links {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin: 0 0 16px; padding-bottom: 2px;
}
.lp2-sf .lp2-sf-links::-webkit-scrollbar { display: none; }
@media (max-width: 719px) { .lp2-sf .lp2-sf-links { margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; } }
.lp2-sf .lp2-sf-link {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 13px; border-radius: 999px; border: 1px solid var(--lp2-line); background: #fff;
    font: inherit; font-size: .8rem; font-weight: 750; color: #1e293b; cursor: pointer;
}
.lp2-sf .lp2-sf-link i { color: var(--lp2-h3); }
.lp2-sf .lp2-sf-link:hover { border-color: #94a3b8; color: #000; }

.lp2-sf .lp2-sf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.lp2-sf .lp2-sf-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 1100px) {
    .lp2-sf .lp2-sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
body.lp2-app #page-content .lp2-sf .lp2-sf-card { padding: 16px; margin: 0; }
.lp2-sf .lp2-sf-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.lp2-sf .lp2-sf-ic {
    width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
    color: #fff; font-size: .95rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--sf-c) 88%, #fff), color-mix(in srgb, var(--sf-c) 78%, #000));
    box-shadow: 0 8px 16px -10px var(--sf-c);
}
.lp2-sf .lp2-sf-card-title { font-size: .98rem; font-weight: 800; color: #000; }
.lp2-sf .lp2-sf-card-head .lp2-sf-add { margin-left: auto; }
.lp2-sf .lp2-sf-scope { margin-left: auto; font-size: .7rem; font-weight: 750; color: #475569; }
.lp2-sf .lp2-sf-card-head .lp2-sf-scope + .lp2-sf-add { margin-left: 0; }
.lp2-sf .lp2-sf-sub { font-size: .78rem; font-weight: 600; color: #475569; line-height: 1.45; margin: 0 0 12px; }
.lp2-sf .lp2-sf-slug {
    display: flex; align-items: center; gap: 0; min-width: 0;
    border: 1px solid #dbe2ea; border-radius: 12px; background: #fff; overflow: hidden;
}
.lp2-sf .lp2-sf-prefix {
    flex: 0 1 auto; min-width: 0; padding: 0 4px 0 12px; font-family: var(--font-mono); font-size: .72rem;
    color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.lp2-app .lp2-sf .lp2-sf-slug input {
    flex: 1 1 90px; min-width: 70px; border: 0 !important; box-shadow: none !important; border-radius: 0;
    padding: 11px 6px; font-weight: 700; color: #000; background: transparent;
}
.lp2-sf .lp2-sf-slug .btn { margin: 4px; flex-shrink: 0; }
@media (max-width: 400px) {
    .lp2-sf .lp2-sf-prefix { max-width: 44%; }
}

.lp2-sf .lp2-sf-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 0; border-top: 1px solid #eef1f5;
}
.lp2-sf .lp2-sf-card-head + .lp2-sf-row { border-top: 0; }
.lp2-sf .lp2-sf-row-title { font-size: .88rem; font-weight: 800; color: #000; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.lp2-sf .lp2-sf-row-sub { margin-top: 2px; font-size: .74rem; font-weight: 600; color: #475569; line-height: 1.45; }
.lp2-sf .lp2-sf-vac { margin-top: 4px; padding: 12px; border-radius: 14px; background: #f6f8fb; border: 1px solid #e7ebf1; }
.lp2-sf .lp2-sf-vac.is-on { background: #fef2f2; border-color: #fecaca; }
.lp2-sf .lp2-sf-vac-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.lp2-sf .lp2-sf-vac-form input { flex: 1 1 180px; min-width: 0; }
.lp2-sf .lp2-sf-look { display: flex; align-items: stretch; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.lp2-sf .lp2-sf-color {
    display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
    padding: 8px 10px; border: 1px solid #e7ebf1; border-radius: 14px; background: #fff;
    font-size: .72rem; font-weight: 750; color: #334155;
}
.lp2-sf .lp2-sf-color input[type="color"] {
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
}
.lp2-sf .lp2-sf-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.lp2-sf .lp2-sf-color input[type="color"]::-webkit-color-swatch { border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #cbd5e1; }
.lp2-sf .lp2-sf-banner {
    flex: 1 1 120px; min-width: 110px; min-height: 76px; border-radius: 14px; overflow: hidden;
    display: grid; place-items: center; background: #f6f8fb; border: 1px dashed #cbd5e1; color: #475569; font-size: 1.4rem;
}
.lp2-sf .lp2-sf-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp2-sf .lp2-sf-upload { cursor: pointer; display: inline-flex; }
.lp2-sf .lp2-sf-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.lp2-sf .lp2-sf-status { font-size: .8rem; font-weight: 700; color: #475569; line-height: 1.45; }
.lp2-sf .lp2-sf-divider { height: 1px; background: #eef1f5; margin: 14px 0; }
.lp2-sf .lp2-sf-zones .data-item { gap: 10px; cursor: pointer; }
.lp2-sf .lp2-sf-zones .data-item-right { margin-left: auto; }
.lp2-sf .lp2-sf-del { color: #b91c1c; padding: 6px; flex-shrink: 0; }
.lp2-sf textarea { resize: vertical; }

/* the one save for the page: follows you down the settings */
.lp2-sf .lp2-sf-savebar {
    position: static; bottom: 12px; z-index: 30; margin: 16px 0 0;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 10px 10px 16px; border-radius: 18px;
    background: rgba(255, 255, 255, .96); border: 1px solid var(--lp2-line);
    box-shadow: 0 12px 30px -16px rgba(15, 23, 42, .45);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lp2-sf .lp2-sf-save-txt { min-width: 0; display: flex; flex-direction: column; }
.lp2-sf .lp2-sf-save-txt b { font-size: .86rem; font-weight: 800; color: #000; }
.lp2-sf .lp2-sf-save-txt span { font-size: .72rem; font-weight: 650; color: #475569; }
/* it sits at the foot of the page until something changes, then follows you */
.lp2-sf .lp2-sf-savebar.is-dirty { position: sticky; border-color: #c4b5fd; box-shadow: 0 14px 34px -14px rgba(91, 33, 182, .55); }
.lp2-sf .lp2-sf-savebar.is-dirty .lp2-sf-save-txt span { color: #5b21b6; }
@media (max-width: 767px) {
    /* above the bottom navigation bar */
    .lp2-sf .lp2-sf-savebar { bottom: calc(var(--bnav-h, 64px) + max(var(--safe-b, 0px), env(safe-area-inset-bottom, 0px)) + 10px); }
}

/* ---- Storefront: delivery areas (list rows + the add/edit pop-up) --------------- */

/* list: a map snippet for an area on the map, an icon tile for a region / country */
.lp2-sf .lp2-dz-thumb {
    position: relative; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; overflow: hidden;
    display: grid; place-items: center; font-size: 1.1rem;
    background-color: #eef2f7; background-repeat: no-repeat; background-size: 256px 256px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}
.lp2-sf .lp2-dz-thumb.is-area { background-color: #fff7ed; color: #b45309; }
.lp2-sf .lp2-dz-thumb.is-region { background-color: #eef2ff; color: #4338ca; }
.lp2-sf .lp2-dz-thumb.is-country { background-color: #ecfdf5; color: #047857; }
.lp2-sf .lp2-dz-thumb .lp2-dz-ring {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%;
    border: 2px solid #d97706; background: rgba(245, 158, 11, .16);
}
.lp2-sf .lp2-dz-thumb .lp2-dz-dot {
    position: relative; width: 10px; height: 10px; border-radius: 50%;
    background: #b45309; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.lp2-sf .lp2-sf-zones .data-item-left { min-width: 0; flex: 1 1 auto; }
/* long place names wrap rather than being cut off beside the map snippet */
.lp2-sf .lp2-sf-zones .data-item-title { white-space: normal; overflow-wrap: anywhere; }
.lp2-sf .lp2-dz-kind { color: #000; font-weight: 750; }
.lp2-sf .lp2-dz-nopin { color: #92400e; font-weight: 700; }
.lp2-sf .lp2-sf-zone-note { margin: 12px 0 0; }

/* pop-up (it sits outside .lp2, so everything is scoped to .lp2-dz) */
.lp2-dz.form-stack { gap: 12px; }
.lp2-dz .lp2-dz-lbl { font-size: .76rem; font-weight: 750; color: #334155; margin-bottom: -4px; }
.lp2-dz .lp2-dz-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lp2-dz .lp2-dz-seg button {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0;
    padding: 10px 10px 9px; border-radius: 14px; border: 1.5px solid #e2e8f0; background: #fff;
    font: inherit; text-align: left; color: #000; cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.lp2-dz .lp2-dz-seg button:hover { border-color: #cbd5e1; }
.lp2-dz .lp2-dz-seg button i { font-size: 1.1rem; color: #b45309; margin-bottom: 3px; }
.lp2-dz .lp2-dz-seg button b { font-size: .84rem; font-weight: 800; line-height: 1.2; }
.lp2-dz .lp2-dz-seg button small { font-size: .7rem; font-weight: 650; color: #475569; line-height: 1.25; overflow-wrap: anywhere; }
.lp2-dz .lp2-dz-seg button.is-on { border-color: #d97706; background: #fffbeb; box-shadow: 0 0 0 3px rgba(217, 119, 6, .14); }
.lp2-dz .lp2-dz-seg button:focus-visible,
.lp2-dz .lp2-dz-chips button:focus-visible,
.lp2-dz .lp2-dz-map-empty:focus-visible { outline: 2px solid #b45309; outline-offset: 2px; }

.lp2-dz [data-dz-pane] { display: none; }
.lp2-dz[data-cov="area"] [data-dz-pane="area"] { display: flex; flex-direction: column; gap: 10px; }
.lp2-dz[data-cov="region"] [data-dz-pane="place"],
.lp2-dz[data-cov="country"] [data-dz-pane="place"] { display: flex; flex-direction: column; gap: 12px; }
.lp2-dz[data-cov="country"] .lp2-dz-region { display: none; }

.lp2-dz .lp2-dz-map {
    position: relative; height: 188px; border-radius: 16px; overflow: hidden;
    border: 1px solid #e2e8f0; background: #f1f5f9;
}
.lp2-dz #dz-map { position: absolute; inset: 0; cursor: pointer; z-index: 0; }
.lp2-dz .lp2-dz-map .leaflet-control-attribution { font-size: 9px; }
.lp2-dz .lp2-dz-map-empty {
    position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px;
    font: inherit; color: #000; text-align: center;
    background: radial-gradient(circle at 50% 42%, #fff7ed 0 30%, transparent 31%), repeating-linear-gradient(45deg, #f1f5f9 0 10px, #eef2f7 10px 20px);
}
.lp2-dz .lp2-dz-map-empty i { font-size: 1.6rem; color: #b45309; }
.lp2-dz .lp2-dz-map-empty b { font-size: .9rem; font-weight: 800; }
.lp2-dz .lp2-dz-map-empty span { font-size: .74rem; font-weight: 650; color: #475569; }
.lp2-dz .lp2-dz-map.has-pin .lp2-dz-map-empty { display: none; }

.lp2-dz .lp2-dz-place {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px;
    background: #fffbeb; border: 1px solid #fde68a;
}
.lp2-dz .lp2-dz-place.is-empty { display: none; }
.lp2-dz .lp2-dz-place > i { color: #b45309; font-size: 1.05rem; margin-top: 1px; }
.lp2-dz .lp2-dz-place > div { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lp2-dz .lp2-dz-place b { font-size: .92rem; font-weight: 800; color: #000; overflow-wrap: anywhere; }
.lp2-dz .lp2-dz-place span { font-size: .76rem; font-weight: 650; color: #475569; }
.lp2-dz .lp2-dz-place em { font-style: normal; font-size: .74rem; font-weight: 700; color: #92400e; margin-top: 3px; }
.lp2-dz .lp2-dz-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.lp2-dz .lp2-dz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lp2-dz .lp2-dz-chips button {
    min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid #dbe2ea; background: #fff;
    font: inherit; font-size: .8rem; font-weight: 750; color: #1e293b; cursor: pointer; font-variant-numeric: tabular-nums;
}
.lp2-dz .lp2-dz-chips button:hover:not(:disabled) { border-color: #94a3b8; color: #000; }
.lp2-dz .lp2-dz-chips button.is-on { background: #b45309; border-color: #b45309; color: #fff; }
.lp2-dz .lp2-dz-chips button:disabled { opacity: .45; cursor: not-allowed; }
.lp2-dz .lp2-dz-hint { font-size: .76rem; font-weight: 600; color: #475569; line-height: 1.45; }
.lp2-dz .lp2-dz-foot { display: flex; gap: 6px; align-items: flex-start; }
.lp2-dz .lp2-dz-foot i { margin-top: 1px; }
.lp2-dz .lp2-dz-sum { display: none; }
.lp2-dz .lp2-dz-sum.is-on {
    display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 14px;
    background: #ecfdf5; border: 1px solid #a7f3d0; font-size: .8rem; font-weight: 650; color: #064e3b; line-height: 1.45;
}
.lp2-dz .lp2-dz-sum.is-on i { color: #047857; font-size: 1rem; }
.lp2-dz .lp2-dz-sum.is-off { background: #f8fafc; border-color: #e2e8f0; color: #334155; }
.lp2-dz .lp2-dz-sum.is-off i { color: #475569; }
.lp2-dz .lp2-dz-sum b { color: #000; font-weight: 800; white-space: nowrap; }
@media (max-width: 359px) {
    .lp2-dz .lp2-dz-seg { gap: 6px; }
    .lp2-dz .lp2-dz-seg button { padding: 9px 7px 8px; }
    .lp2-dz .lp2-dz-seg button small { display: none; }
}

/* ==========================================================================
   Coupons (pink)
   ========================================================================== */

.lp2-cps .lp2-cp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) { .lp2-cps .lp2-cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp2-cps .lp2-cp {
    --cp: #db2777;
    position: relative; display: flex; align-items: stretch; min-height: 104px; cursor: pointer;
    background: #fff; border: 1px solid var(--lp2-line); border-radius: 18px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: box-shadow .15s ease, border-color .15s ease;
}
.lp2-cps .lp2-cp:hover { border-color: color-mix(in srgb, var(--cp) 40%, #fff); box-shadow: 0 12px 26px -18px color-mix(in srgb, var(--cp) 70%, #000); }
.lp2-cps .lp2-cp-stub {
    position: relative; flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 10px 6px; color: #fff; text-align: center;
    background: linear-gradient(150deg, color-mix(in srgb, var(--cp) 92%, #fff), color-mix(in srgb, var(--cp) 76%, #000));
}
/* the perforation between stub and body */
.lp2-cps .lp2-cp-stub::after {
    content: ""; position: absolute; right: -1px; top: 8px; bottom: 8px; width: 2px;
    background: repeating-linear-gradient(180deg, #fff 0 5px, transparent 5px 10px);
}
.lp2-cps .lp2-cp-stub b { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.lp2-cps .lp2-cp-stub small { font-size: .62rem; font-weight: 800; letter-spacing: .06em; opacity: .9; }
.lp2-cps .lp2-cp-stub span { margin-top: 4px; font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.lp2-cps .lp2-cp-body { flex: 1; min-width: 0; padding: 12px 8px 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.lp2-cps .lp2-cp-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp2-cps .lp2-cp-code {
    font-family: var(--font-mono); font-size: .92rem; font-weight: 800; color: #000; letter-spacing: .04em;
    padding: 2px 8px; border-radius: 8px; border: 1.5px dashed color-mix(in srgb, var(--cp) 55%, #fff);
    background: color-mix(in srgb, var(--cp) 6%, #fff); overflow-wrap: anywhere;
}
.lp2-cps .lp2-cp-meta { font-size: .74rem; font-weight: 600; color: #475569; line-height: 1.4; }
.lp2-cps .lp2-cp-use { display: flex; align-items: center; gap: 8px; font-size: .7rem; font-weight: 700; color: #334155; }
.lp2-cps .lp2-cp-bar { flex: 1; max-width: 140px; height: 6px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.lp2-cps .lp2-cp-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--cp); }
.lp2-cps .lp2-cp-acts { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px 10px 8px 0; }
.lp2-cps .lp2-cp-act {
    width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--lp2-line); background: #fff;
    color: #334155; display: grid; place-items: center; cursor: pointer;
}
.lp2-cps .lp2-cp-act:hover { border-color: #94a3b8; color: #000; }
.lp2-cps .lp2-cp-act.is-del { color: #b91c1c; }
.lp2-cps .lp2-cp-act.is-del:hover { border-color: #fecaca; background: #fef2f2; }
.lp2-cps .lp2-cp.is-dim .lp2-cp-stub { filter: grayscale(.55); opacity: .85; }
.lp2-cps .lp2-cp .badge { font-size: .62rem; padding: 2px 8px; border-radius: 999px; }

/* ==========================================================================
   Products (emerald)
   ========================================================================== */

.lp2-prod .lp2-prod-tools { display: flex; align-items: stretch; gap: 8px; margin: 4px 0 12px; }
.lp2-prod .lp2-prod-tools .txn-search { flex: 1 1 auto; min-width: 0; }
.lp2-prod .lp2-prod-tools .txn-filter-select { min-width: 0; width: 170px; }
.lp2-prod .view-toggle { flex-shrink: 0; border-radius: 14px; border-color: var(--lp2-line); background: #fff; }
.lp2-prod .view-toggle-btn { width: 42px; padding: 0; font-size: 1rem; color: #334155; }
.lp2-prod .view-toggle-btn.active { background: var(--lp2-deep); color: #fff; }
@media (max-width: 719px) {
    .lp2-prod .lp2-prod-tools { flex-wrap: wrap; }
    .lp2-prod .lp2-prod-tools .txn-search { flex: 1 0 100%; }
    .lp2-prod .lp2-prod-tools .txn-filter-wrap { flex: 1 1 0; min-width: 0; }
    .lp2-prod .lp2-prod-tools .txn-filter-select { width: 100%; max-width: none; }
}
.lp2-prod .lp2-chips {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -4px 0 14px; padding-bottom: 2px;
}
.lp2-prod .lp2-chips::-webkit-scrollbar { display: none; }
@media (max-width: 719px) { .lp2-prod .lp2-chips { margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; } }
.lp2-prod .cat-chip {
    flex: 0 0 auto; padding: 5px 12px; border-radius: 999px; border: 1px solid transparent;
    background: #eef2f6; color: #334155; font-size: .76rem; font-weight: 750; white-space: nowrap; cursor: pointer;
}
.lp2-prod .cat-chip:hover { color: #000; background: #e2e8f0; }
.lp2-prod .cat-chip.active { background: color-mix(in srgb, var(--lp2-h3) 12%, #fff); border-color: color-mix(in srgb, var(--lp2-h3) 40%, #fff); color: var(--lp2-deep); }

/* list view */
.lp2-prod .lp2-thumb { overflow: hidden; background: color-mix(in srgb, var(--sx-c) 12%, #fff); }
.lp2-prod .lp2-thumb.has-img { background: #f6f8fb; border-color: #e7ebf1; }
.lp2-prod .lp2-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp2 .lp2-prod-list .sx-ico:has(.lp2-ini) { background: color-mix(in srgb, var(--sx-c) 14%, #fff); color: color-mix(in srgb, var(--sx-c) 78%, #000); border-color: transparent; }
.lp2-prod .lp2-star { color: #d97706; font-size: .72rem; }
.lp2-prod .lp2-was { font-size: .72rem; font-weight: 650; color: #64748b; margin-right: 4px; }
.lp2-prod .lp2-prod-row.is-out .sx-ref { color: #475569; }
.lp2-prod .lp2-prod-star {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--lp2-line);
    background: #fff; color: #475569; display: grid; place-items: center; cursor: pointer;
}
.lp2-prod .lp2-prod-star .bi-star-fill { color: #d97706; }
.lp2-prod .lp2-prod-social { color: #d62976; margin-left: 6px; }

/* grid view */
.lp2-prod .lp2-prod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .lp2-prod .lp2-prod-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; } }
.lp2-prod .prod-card-v2 {
    position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
    border: 1px solid var(--lp2-line); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease;
}
.lp2-prod .prod-card-v2:hover { transform: none; border-color: #cbd5e1; box-shadow: 0 14px 28px -20px rgba(15, 23, 42, .45); }
.lp2-prod .prod-card-v2 .pcv-img { aspect-ratio: 4 / 3; height: auto; background: #f6f8fb; }
.lp2-prod .prod-card-v2 .pcv-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp2-prod .lp2-prod-ph {
    width: 100%; height: 100%; display: grid; place-items: center;
    background: linear-gradient(140deg, color-mix(in srgb, var(--ph) 16%, #fff), color-mix(in srgb, var(--ph) 6%, #fff));
    color: color-mix(in srgb, var(--ph) 75%, #000); font-family: var(--font-display); font-size: 1.6rem; font-weight: 800;
}
.lp2-prod .prod-card-v2 .pcv-body { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.lp2-prod .lp2-prod-cat { font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-prod .prod-card-v2 .pcv-name {
    font-size: .86rem; font-weight: 750; color: #000; line-height: 1.3; white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.lp2-prod .prod-card-v2 .pcv-price { font-size: .95rem; font-weight: 800; color: var(--lp2-deep); font-variant-numeric: tabular-nums; }
.lp2-prod .prod-card-v2 .pcv-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.lp2-prod .prod-card-v2 .pcv-meta .badge { font-size: .62rem; padding: 2px 7px; border-radius: 999px; }
.lp2-prod .prod-card-v2 .pcv-promote { margin: 8px 12px 12px; justify-content: center; font-size: .76rem; min-height: 32px; }
/* Feature + "Post on social" side by side (Growth Hub → Social). */
.prod-card-v2 .pcv-acts { display: flex; gap: 6px; margin: 8px 12px 12px; }
.lp2-prod .prod-card-v2 .pcv-acts .pcv-promote { margin: 0; flex: 1; }
.prod-card-v2 .pcv-acts .pcv-social { flex: 0 0 36px; min-height: 32px; padding: 0; justify-content: center; color: #d62976; }
.lp2-prod .prod-card-v2 .pcv-promote .bi-star-fill { color: #d97706; }
.lp2-prod .prod-card-v2 .pcv-feat {
    position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 8px; border-radius: 999px;
    font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    background: #fef3c7; color: #92400e; box-shadow: 0 2px 6px rgba(15, 23, 42, .12);
}
.lp2-prod .lp2-prod-flag {
    position: absolute; top: 8px; right: 8px; z-index: 2; padding: 2px 8px; border-radius: 999px;
    font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff;
}
.lp2-prod .lp2-prod-flag.is-out { background: #b91c1c; }
.lp2-prod .lp2-prod-flag.is-low { background: #b45309; }
.lp2-prod .prod-card-v2.is-out .pcv-img { filter: grayscale(.6); opacity: .8; }

/* pagers and archived */
.lp2-prod .prod-pager { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.lp2-prod .prod-pager-btn { min-width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--lp2-line); background: #fff; color: #1e293b; font-weight: 750; }
.lp2-prod .prod-pager-btn.active { background: var(--lp2-deep); border-color: var(--lp2-deep); color: #fff; }
.lp2-prod .archived-table td, .lp2-prod .archived-table th { white-space: nowrap; }

/* ==========================================================================
   Inventory stock (amber) · batches (rose)
   ========================================================================== */

.lp2-stock .lp2-req-list { margin-bottom: 16px; border-color: #fcd34d; box-shadow: 0 10px 24px -18px rgba(180, 83, 9, .6); }
.lp2-stock .lp2-req-list .sx-end .btn { min-height: 32px; }
.lp2-stock .lp2-inv-list {
    display: flex; flex-direction: column; gap: 0; background: #fff; border: 1px solid var(--lp2-line);
    border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.lp2-stock .inv-row {
    display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px;
    border: 0; border-top: 1px solid #eef1f5; border-radius: 0; box-shadow: none; background: transparent; cursor: pointer;
}
.lp2-stock .inv-row:first-child { border-top: 0; }
.lp2-stock .inv-row:hover { background: #fafbfd; transform: none; box-shadow: none; }
.lp2-stock .inv-row-indicator {
    position: static; width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--inv-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--inv-color) 16%, #fff);
}
.lp2-stock .inv-row-info { flex: 1; min-width: 0; }
.lp2-stock .inv-row-name { font-size: .9rem; font-weight: 750; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-stock .inv-row-name .badge { font-size: .6rem; padding: 1px 6px; vertical-align: 1px; }
.lp2-stock .inv-row-cat { margin-top: 2px; font-size: .72rem; font-weight: 600; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-stock .inv-row-bar { height: 5px; margin-top: 7px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.lp2-stock .inv-row-bar-fill { height: 100%; border-radius: 99px; background: var(--inv-color); }
.lp2-stock .inv-row-end { flex-shrink: 0; min-width: 58px; text-align: right; }
.lp2-stock .inv-row-qty { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lp2-stock .inv-row-state { font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--inv-color) 78%, #000); }
.lp2-stock .lp2-inv-none { margin-top: 10px; }

/* ==========================================================================
   Order Reports (indigo)
   ========================================================================== */

.lp2-orpt .lp2-export span { font-weight: 750; }
.lp2-orpt .page-header .btn-outline.btn-sm.lp2-export { width: auto; padding: 0 12px; gap: 6px; }
@media (max-width: 520px) {
    .lp2-orpt .page-header .lp2-export { width: 38px; padding: 0; justify-content: center; }
    .lp2-orpt .page-header .lp2-export span { display: none; }
}
body.lp2-app #page-content .lp2-orpt .card.dsb-widget { margin-bottom: 12px; }
.lp2-orpt .rpt-2col { gap: 12px; }
.lp2-orpt .dsb-widget-title { color: #000; font-weight: 800; }
.lp2-orpt .dsb-widget-sub { color: #475569; }
.lp2-orpt .lp2-cap { margin-top: 6px; }
.lp2-orpt .sx-pm-grid .sx-pm-val { font-size: 1.12rem; }

/* ==========================================================================
   Deliveries (teal)
   ========================================================================== */

.lp2-dlv .lp2-riders {
    display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; padding: 2px 0 6px;
    scroll-snap-type: x proximity;
}
.lp2-dlv .lp2-riders::-webkit-scrollbar { display: none; }
@media (max-width: 719px) { .lp2-dlv .lp2-riders { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; } }
.lp2-dlv .lp2-rider {
    flex: 0 0 168px; width: 168px; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 12px; border-radius: 16px; border: 1px solid var(--lp2-line); background: #fff; text-align: left;
    font: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.lp2-dlv .lp2-rider:hover { border-color: #94a3b8; }
.lp2-dlv .lp2-rider-av {
    position: relative; width: 40px; height: 40px; border-radius: 13px; margin-bottom: 6px;
    display: grid; place-items: center; background: var(--sx-c, #0d9488); color: #fff; font-size: .8rem; font-weight: 800;
}
.lp2-dlv .lp2-rider-av i { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; }
.lp2-dlv .lp2-rider-name { font-size: .86rem; font-weight: 800; color: #000; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-dlv .lp2-rider-sub { font-size: .72rem; font-weight: 600; color: #475569; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-dlv .lp2-rider-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.lp2-dlv .lp2-rider-badges .badge { font-size: .6rem; padding: 2px 7px; border-radius: 999px; text-transform: capitalize; }
.lp2-dlv .lp2-rider-add { border-style: dashed; justify-content: center; }
.lp2-dlv .lp2-rider-add .lp2-rider-av { background: color-mix(in srgb, var(--lp2-h3) 12%, #fff); color: var(--lp2-deep); font-size: 1rem; }

/* assign pop-up */
body.lp2-app .lp2-assign { display: flex; flex-direction: column; gap: 12px; }
body.lp2-app .lp2-assign .delivery-card-list { display: flex; flex-direction: column; gap: 0; border: 1px solid #e7ebf1; border-radius: 16px; overflow: hidden; }
body.lp2-app .lp2-assign .lp2-assign-row {
    display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px;
    border: 0; border-top: 1px solid #eef1f5; border-radius: 0; box-shadow: none;
}
body.lp2-app .lp2-assign .lp2-assign-row:first-child { border-top: 0; }
body.lp2-app .lp2-assign .lp2-assign-row.is-off { background: #fafbfd; }
body.lp2-app .lp2-assign .delivery-card-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
body.lp2-app .lp2-assign-why { margin-top: 4px; font-size: .72rem; font-weight: 700; color: #92400e; }

/* product rows: the name may take two lines; the old price sits under the new */
.lp2-prod .lp2-prod-row .sx-ref {
    white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lp2-prod .lp2-prod-row .lp2-badges .lp2-was { margin: 0; }

/* ==========================================================================
   POS register (moved here from the inline <style> blocks in pos.js)
   Everything is scoped to body[data-app-page="pos"]; the checkout pop-up
   lives in <body>, so it is covered by the same scope.
   ========================================================================== */

/* ---- Fullscreen register ------------------------------------------------ */
body.pos-fullscreen[data-app-page="pos"] #sidebar { display: none !important; }
body.pos-fullscreen[data-app-page="pos"] header.topbar { display: none !important; }
body.pos-fullscreen[data-app-page="pos"] .menu-toggle { display: none !important; }
body.pos-fullscreen[data-app-page="pos"] .page-content { margin: 0 !important; padding: 12px 14px !important; width: 100vw !important; max-width: none !important; box-sizing: border-box !important; background: #f6f8fb; }
body.pos-fullscreen[data-app-page="pos"] .page-content > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }

body[data-app-page="pos"] .pos-shell { display: grid; gap: 12px; }

/* ---- Register header: the brand card --------------------------------------- */
body[data-app-page="pos"] .pos-register-top {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px;
    padding: 14px 16px; border-radius: 20px; color: #fff;
    background: linear-gradient(135deg, var(--pu-card1, #047857) 0%, var(--pu-card3, #036148) 55%, var(--pu-card2, #059669) 100%);
    box-shadow: 0 20px 40px -26px rgba(7, 92, 59, .7), inset 0 1px 0 rgba(255, 255, 255, .14);
}
body[data-app-page="pos"] .pos-register-top::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(112deg, transparent 0 60%, rgba(255, 255, 255, .07) 60% 72%, transparent 72%),
        radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%);
}
body[data-app-page="pos"] .pos-kicker {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px;
    color: rgba(255, 255, 255, .88); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}
body[data-app-page="pos"] .pos-register-title {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: -.02em;
}
body[data-app-page="pos"] .pos-register-business { font-family: inherit; font-size: .82rem; font-weight: 700; color: rgba(255, 255, 255, .82); letter-spacing: 0; }
body[data-app-page="pos"] .pos-register-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
body[data-app-page="pos"] .pos-meta-pill {
    display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .12);
    color: #fff; font-size: .74rem; font-weight: 700;
}
body[data-app-page="pos"] .pos-meta-pill i { color: rgba(255, 255, 255, .85); }
body[data-app-page="pos"] .pos-register-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-start; }
body[data-app-page="pos"] .pos-register-actions .branch-selector { min-width: 180px; }
/* action buttons on the card: glass, not coloured tints */
body[data-app-page="pos"] .pos-register-top .pos-cbtn {
    min-height: 36px; border-radius: 11px !important;
    border: 1px solid rgba(255, 255, 255, .26) !important; background: rgba(255, 255, 255, .13) !important; color: #fff !important;
}
body[data-app-page="pos"] .pos-register-top .pos-cbtn:hover { background: rgba(255, 255, 255, .26) !important; border-color: rgba(255, 255, 255, .4) !important; box-shadow: none; }
@media (max-width: 759px) {
    body[data-app-page="pos"] .pos-register-meta .pos-meta-pill:nth-child(3) { display: none; }
    body[data-app-page="pos"] .pos-register-top { padding: 12px 14px; }
}
@media (min-width: 760px) {
    body[data-app-page="pos"] .pos-register-top { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    body[data-app-page="pos"] .pos-register-actions { justify-content: flex-end; }
}

/* ---- Shift bar (pos-shifts.js) ---------------------------------------------- */
body[data-app-page="pos"] #pos-shift-bar:empty { display: none; }
body[data-app-page="pos"] .pos-shift {
    border-radius: 16px; border: 1px solid #e7ebf1; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 10px 12px; gap: 10px;
}
body[data-app-page="pos"] .pos-shift.open { border-color: #bbf7d0; background: linear-gradient(135deg, #f0fdf4, #fff 65%); }
body[data-app-page="pos"] .pos-shift-title { color: #000; font-weight: 800; }
body[data-app-page="pos"] .pos-shift-sub { color: #475569; }
body[data-app-page="pos"] .pos-shift-fig span { color: #475569; }
body[data-app-page="pos"] .pos-shift-fig b { color: #000; }

/* ---- Layout ---------------------------------------------------------------------- */
body[data-app-page="pos"] .pos-wrap { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
body[data-app-page="pos"] .pos-wrap > * { min-width: 0; }
@media (min-width: 900px) { body[data-app-page="pos"] .pos-wrap { grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; } }
@media (min-width: 1180px) { body[data-app-page="pos"] .pos-wrap { grid-template-columns: minmax(0, 1.45fr) 370px; } }
@media (min-width: 1480px) { body[data-app-page="pos"] .pos-wrap { grid-template-columns: minmax(0, 1.6fr) 400px; } }
body.pos-fullscreen[data-app-page="pos"] .pos-wrap { grid-template-columns: minmax(0, 1fr) 380px; }
@media (min-width: 1400px) { body.pos-fullscreen[data-app-page="pos"] .pos-wrap { grid-template-columns: minmax(0, 1fr) 410px; } }
body[data-app-page="pos"] #pos-history-panel { display: none; }
@media (min-width: 1200px) {
    body.pos-fullscreen[data-app-page="pos"] .pos-wrap.pos-show-history { grid-template-columns: 250px minmax(0, 1fr) 390px; }
    body.pos-fullscreen[data-app-page="pos"] .pos-wrap.pos-show-history #pos-history-panel {
        display: flex; flex-direction: column; border: 1px solid #e7ebf1; border-radius: 16px; background: #fff; padding: 12px;
        position: sticky; top: 14px; height: calc(100vh - 80px); overflow: hidden; box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
    }
}
@media (min-width: 1500px) { body.pos-fullscreen[data-app-page="pos"] .pos-wrap.pos-show-history { grid-template-columns: 280px minmax(0, 1fr) 420px; } }
body[data-app-page="pos"] .pos-ihist-head { font-size: .78rem; font-weight: 800; color: #000; padding-bottom: 10px; border-bottom: 1px solid #eef1f5; margin-bottom: 8px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
body[data-app-page="pos"] .pos-ihist-body { flex: 1; overflow-y: auto; scrollbar-width: thin; min-height: 0; }
body[data-app-page="pos"] .pos-ihist-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(15, 23, 42, .05); }
body[data-app-page="pos"] .pos-ihist-row:last-child { border-bottom: 0; }
body[data-app-page="pos"] .pos-ihist-pager { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; margin-top: 4px; border-top: 1px solid #eef1f5; }

/* ---- Toolbar: search, quick actions, categories ----------------------------- */
body[data-app-page="pos"] .pos-workspace { display: grid; gap: 12px; min-width: 0; }
body[data-app-page="pos"] .pos-toolbar {
    display: grid; gap: 10px; padding: 10px; border: 1px solid #e7ebf1; border-radius: 18px;
    background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
body[data-app-page="pos"] .pos-toolbar-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body[data-app-page="pos"] .pos-search-bar {
    min-width: min(100%, 280px); flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px;
    background: #f6f8fb; border: 1px solid #e7ebf1; border-radius: 14px; transition: border-color .15s, box-shadow .15s, background .15s;
}
body[data-app-page="pos"] .pos-search-bar:focus-within { border-color: #059669; background: #fff; box-shadow: 0 0 0 3px rgba(5, 150, 105, .16); }
body[data-app-page="pos"] .pos-search-bar input { flex: 1; border: 0 !important; background: transparent; padding: 12px 0; font-size: .92rem; font-weight: 700; outline: none; color: #000; min-width: 0; box-shadow: none !important; }
body[data-app-page="pos"] .pos-search-bar input::placeholder { color: #64748b; font-weight: 600; }
body[data-app-page="pos"] .pos-search-bar > i { color: #475569; font-size: .95rem; }
body[data-app-page="pos"] .pos-scan-btn {
    border: 0; background: #ecfdf5; color: #047857; display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 11px; cursor: pointer; flex-shrink: 0; transition: background .15s;
}
body[data-app-page="pos"] .pos-scan-btn:hover { background: #d1fae5; }
body[data-app-page="pos"] .pos-quick-actions { display: flex; gap: 6px; flex-wrap: wrap; }
body[data-app-page="pos"] .pos-cbtn {
    border: 1px solid color-mix(in srgb, var(--c, #10b981) 30%, #e7ebf1) !important;
    color: color-mix(in srgb, var(--c, #10b981) 80%, #000) !important;
    background: color-mix(in srgb, var(--c, #10b981) 7%, #fff) !important;
    border-radius: 11px !important; font-weight: 750;
    transition: transform .13s, background .14s, color .14s, border-color .14s, box-shadow .14s;
}
body[data-app-page="pos"] .pos-cbtn i { color: inherit !important; }
body[data-app-page="pos"] .pos-cbtn:hover { background: var(--c, #10b981) !important; color: #fff !important; border-color: var(--c, #10b981) !important; }
body[data-app-page="pos"] .pos-cbtn:active { transform: scale(.98); }
body[data-app-page="pos"] .pos-cats { display: flex; gap: 6px; overflow: auto; scrollbar-width: none; padding-bottom: 2px; }
body[data-app-page="pos"] .pos-cats::-webkit-scrollbar { display: none; }
body[data-app-page="pos"] .pos-cat-chip {
    flex: 0 0 auto; border: 1px solid transparent; background: #eef2f6; color: #334155;
    border-radius: 999px; padding: 7px 14px; font-size: .78rem; font-weight: 750; white-space: nowrap; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
body[data-app-page="pos"] .pos-cat-chip:hover { background: #e2e8f0; color: #000; }
body[data-app-page="pos"] .pos-cat-chip.is-active { border-color: #047857; background: #047857; color: #fff; box-shadow: 0 8px 18px -10px rgba(4, 120, 87, .8); }

/* ---- Product tiles ----------------------------------------------------------- */
body[data-app-page="pos"] .pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
@media (max-width: 339px) { body[data-app-page="pos"] .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 640px) { body[data-app-page="pos"] .pos-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } }
@media (min-width: 1360px) { body[data-app-page="pos"] .pos-grid { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); } }
body[data-app-page="pos"] .pos-card {
    --pos-tint: #059669;
    position: relative; display: flex; flex-direction: column; gap: 6px; padding: 7px; cursor: pointer; overflow: hidden;
    border: 1px solid #e7ebf1; border-radius: 16px; background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: box-shadow .14s, transform .14s, border-color .14s; -webkit-tap-highlight-color: transparent;
}
body[data-app-page="pos"] .pos-card:hover { border-color: color-mix(in srgb, var(--pos-tint) 40%, #e7ebf1); box-shadow: 0 14px 28px -20px color-mix(in srgb, var(--pos-tint) 70%, #0f172a); transform: translateY(-2px); }
body[data-app-page="pos"] .pos-card:active { transform: scale(.98); }
body[data-app-page="pos"] .pos-card.is-in-cart { border-color: #34d399; box-shadow: 0 0 0 1px #34d399, 0 10px 22px -18px rgba(5, 150, 105, .6); }
body[data-app-page="pos"] .pos-card.pos-out-of-stock { pointer-events: none; opacity: .55; cursor: not-allowed; }
body[data-app-page="pos"] .pos-card.pos-low-stock:not(.is-in-cart) { border-color: #fcd34d; }
body[data-app-page="pos"] .pos-card-oos-banner {
    position: absolute; top: 12px; left: 12px; z-index: 1; background: #b91c1c; color: #fff;
    font-size: .58rem; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; text-transform: uppercase;
}
body[data-app-page="pos"] .pos-card-qty {
    position: absolute; top: 12px; right: 12px; z-index: 1; min-width: 24px; height: 24px; padding: 0 7px;
    display: grid; place-items: center; border-radius: 999px; background: #047857; color: #fff;
    font-size: .74rem; font-weight: 800; box-shadow: 0 6px 14px -6px rgba(4, 120, 87, .8);
}
body[data-app-page="pos"] .pos-card-low-badge {
    display: inline-flex; align-items: center; gap: 3px; background: #fef3c7; color: #92400e;
    font-size: .6rem; font-weight: 800; padding: 1px 6px; border-radius: 999px;
}
body[data-app-page="pos"] .pos-img {
    width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, color-mix(in srgb, var(--pos-tint) 16%, #fff), color-mix(in srgb, var(--pos-tint) 6%, #fff));
}
body[data-app-page="pos"] .pos-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
body[data-app-page="pos"] .pos-img-ini { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; color: color-mix(in srgb, var(--pos-tint) 75%, #000); }
@supports not (aspect-ratio: 1 / 1) { body[data-app-page="pos"] .pos-img { height: min(30vw, 120px); } }
body[data-app-page="pos"] .pos-meta { min-width: 0; padding: 0 2px; }
body[data-app-page="pos"] .pos-name {
    font-weight: 750; font-size: .78rem; line-height: 1.25; color: #000;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em;
}
body[data-app-page="pos"] .pos-sku { margin-top: 2px; font-size: .64rem; color: #475569; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-app-page="pos"] .pos-opt-tag { display: inline-block; padding: 0 5px; border-radius: 5px; background: #dbeafe; color: #1e40af; font-weight: 800; font-size: .58rem; }
body[data-app-page="pos"] .pos-price { font-weight: 800; color: #000; font-size: .9rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
body[data-app-page="pos"] .pos-stock { font-size: .64rem; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; margin-top: 1px; }
body[data-app-page="pos"] .pos-card-foot { display: block; min-width: 0; margin-top: auto; padding: 0 2px 2px; }
/* the add button sits on the picture's corner, so the price keeps the width */
body[data-app-page="pos"] .pos-img { position: relative; }
body[data-app-page="pos"] .pos-card-add {
    position: absolute; right: 6px; bottom: 6px;
    width: 32px; height: 32px; padding: 0 !important; border-radius: 10px !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    box-shadow: 0 6px 14px -6px rgba(4, 120, 87, .7);
}
body[data-app-page="pos"] .pos-card-add.btn-outline { background: #fff; box-shadow: none; }
@media (min-width: 640px) {
    body[data-app-page="pos"] .pos-card { padding: 8px; gap: 8px; }
    body[data-app-page="pos"] .pos-name { font-size: .82rem; }
    body[data-app-page="pos"] .pos-price { font-size: .96rem; }
    body[data-app-page="pos"] .pos-card-add { width: 36px; height: 36px; }
}

/* ---- Cart ------------------------------------------------------------------- */
body[data-app-page="pos"] .pos-cart {
    border: 1px solid #e7ebf1; border-radius: 20px; background: #fff; padding: 14px;
    position: sticky; top: 14px; max-height: calc(100vh - 80px); display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 14px 34px -24px rgba(15, 23, 42, .45);
}
@media (max-width: 859px) { body[data-app-page="pos"] .pos-cart { position: relative; top: auto; max-height: none; overflow: visible; } }
body[data-app-page="pos"] .pos-cart-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0;
    font-weight: 800; font-size: 1rem; color: #000; padding-bottom: 10px; border-bottom: 1px solid #eef1f5; margin-bottom: 10px;
}
body[data-app-page="pos"] .pos-cart-head i { margin-right: 6px; color: #059669; }
body[data-app-page="pos"] .pos-cart-count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 26px; padding: 0 8px;
    border-radius: 999px; background: #047857; color: #fff; font-size: .78rem; font-weight: 800;
    box-shadow: 0 6px 16px -8px rgba(4, 120, 87, .8);
}
body[data-app-page="pos"] .pos-cart-count.pos-bump { animation: pos-count-bump .34s cubic-bezier(.22, 1, .36, 1); }
@keyframes pos-count-bump { 0% { transform: scale(1); } 38% { transform: scale(1.28); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { body[data-app-page="pos"] .pos-cart-count.pos-bump { animation: none; } }
body[data-app-page="pos"] .pos-order-tools { flex-shrink: 0; display: grid; gap: 8px; margin-bottom: 10px; }
body[data-app-page="pos"] .pos-order-field input { font-size: .84rem; border-radius: 12px; }
body[data-app-page="pos"] .pos-drafts-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
body[data-app-page="pos"] .pos-drafts-bar select {
    flex: 1; min-width: 130px; height: 38px; padding: 0 10px; border: 1px solid #dbe2ea; border-radius: 11px;
    background: #fff; font-size: .82rem; font-weight: 700; color: #000;
}
body[data-app-page="pos"] .pos-drafts-bar .pos-cbtn { width: 38px; height: 38px; padding: 0; justify-content: center; }
body[data-app-page="pos"] .pos-cart-items { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
body[data-app-page="pos"] .pos-cart-item { display: flex; gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1f5; }
body[data-app-page="pos"] .pos-cart-item:last-child { border-bottom: 0; }
body[data-app-page="pos"] .pos-cart-title { font-weight: 750; font-size: .84rem; line-height: 1.25; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-app-page="pos"] .pos-cart-sub { font-size: .72rem; color: #475569; margin-top: 2px; font-weight: 600; }
body[data-app-page="pos"] .pos-cart-sub b { color: #000; }
body[data-app-page="pos"] .pos-stepper { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
body[data-app-page="pos"] .pos-stepper input { width: 44px; text-align: center; padding: 6px 3px; border: 1px solid #dbe2ea; border-radius: 10px; background: #fff; font-weight: 800; font-size: .84rem; color: #000; }
body[data-app-page="pos"] .pos-stepper .btn-outline { width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 10px; font-size: .95rem; font-weight: 800; }
body[data-app-page="pos"] .pos-cart-empty { text-align: center; padding: 26px 12px; color: #475569; }
body[data-app-page="pos"] .pos-cart-empty i { display: block; font-size: 1.9rem; margin-bottom: 8px; color: #94a3b8; }
body[data-app-page="pos"] .pos-cart-empty div { font-weight: 800; color: #000; }
body[data-app-page="pos"] .pos-cart-empty span { font-size: .76rem; font-weight: 600; }
body[data-app-page="pos"] .pos-bottom { flex-shrink: 0; padding-top: 10px; margin-top: 8px; border-top: 1px dashed #dbe2ea; }
body[data-app-page="pos"] .pos-totals-row { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: #475569; font-weight: 650; }
body[data-app-page="pos"] .pos-totals-row + .pos-totals-row { margin-top: 5px; }
body[data-app-page="pos"] .pos-totals-v { font-weight: 800; color: #000; font-variant-numeric: tabular-nums; }
body[data-app-page="pos"] .pos-grand { margin-top: 8px !important; font-size: 1rem; color: #000; font-weight: 800; }
body[data-app-page="pos"] .pos-grand #pos-total { font-family: var(--font-display); font-size: 1.35rem; color: #047857; font-variant-numeric: tabular-nums; }
body[data-app-page="pos"] .pos-checkout-btn { margin-top: 12px; min-height: 50px; border-radius: 14px; font-size: .95rem; font-weight: 800; }
body[data-app-page="pos"] .pos-btn-label { display: none; }
@media (min-width: 540px) { body[data-app-page="pos"] .pos-btn-label { display: inline; } }
body[data-app-page="pos"] .pos-fullscreen-btn { display: none; }
@media (min-width: 860px) { body[data-app-page="pos"] .pos-fullscreen-btn { display: inline-flex; } }

/* ---- The phone checkout bar ------------------------------------------------ */
body[data-app-page="pos"] .pos-mobile-checkout {
    position: fixed; left: 12px; right: 12px; z-index: 210;
    bottom: calc(var(--bnav-h) + max(var(--safe-b), env(safe-area-inset-bottom, 0px)) + 8px);
    display: none; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 16px;
    border-radius: 16px; border: none; color: #fff; font-size: clamp(.78rem, 2.7vw, .9rem); cursor: pointer;
    background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 16px 32px -12px rgba(4, 120, 87, .65);
}
body[data-app-page="pos"] .pos-mobile-checkout .pos-mc-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
body[data-app-page="pos"] .pos-mobile-checkout .pos-mc-sub { font-size: .72rem; font-weight: 700; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-app-page="pos"] .pos-mobile-checkout .pos-mc-amt { font-size: 1.08rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
body[data-app-page="pos"] .pos-mobile-checkout .pos-mc-cta {
    display: flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 800;
    padding: 9px 14px; border-radius: 12px; background: rgba(255, 255, 255, .18);
}
@media (min-width: 860px) { body[data-app-page="pos"] .pos-mobile-checkout { display: none !important; } }
/* room so the last tiles clear the checkout bar and the menu button */
@media (max-width: 859px) { body[data-app-page="pos"] .pos-shell { padding-bottom: 76px; } }

/* ---- Checkout pop-up ----------------------------------------------------------- */
body[data-app-page="pos"] .pos-checkout-overlay { align-items: stretch; padding: 0; }
body[data-app-page="pos"] .pos-checkout-modal { width: 100vw; max-width: none; height: 100dvh; max-height: 100dvh !important; border-radius: 0 !important; display: flex; flex-direction: column; overflow: hidden; }
body[data-app-page="pos"] .pos-checkout-modal .modal-body { flex: 1 1 auto; min-height: 0; max-height: none; height: auto; overflow: hidden; display: flex; flex-direction: column; padding: 0; }
body[data-app-page="pos"] .pos-checkout-modal .modal-body.modal-body-has-actions { padding: 0 !important; }
body[data-app-page="pos"] .pos-checkout-wrap {
    flex: 1 1 0; height: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 16px 24px;
    background: #f6f8fb; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
}
body[data-app-page="pos"] .pos-checkout-layout { width: min(1120px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 899px) { body[data-app-page="pos"] .pos-checkout-panel.is-pay { order: -1; } }
@media (min-width: 900px) { body[data-app-page="pos"] .pos-checkout-layout { grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr); gap: 14px; } }
body[data-app-page="pos"] .pos-checkout-panel { border: 1px solid #e7ebf1; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); overflow: hidden; }
body[data-app-page="pos"] .pos-checkout-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px;
    border-bottom: 1px solid #eef1f5; background: #fafbfd; font-weight: 800; color: #000; letter-spacing: -.01em;
}
body[data-app-page="pos"] .pos-checkout-panel-head i { color: #059669; margin-right: 6px; }
body[data-app-page="pos"] .pos-co-lines { font-size: .76rem; color: #475569; font-weight: 700; }
body[data-app-page="pos"] .pos-checkout-panel-body { padding: 14px 15px; }
body[data-app-page="pos"] .pos-checkout-items { max-height: 45vh; overflow: auto; padding-right: 4px; }
body[data-app-page="pos"] .pos-checkout-total { display: grid; gap: 7px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef1f5; }
body[data-app-page="pos"] .pos-total-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .88rem; color: #475569; font-weight: 700; }
body[data-app-page="pos"] .pos-total-row strong { font-weight: 800; color: #000; font-variant-numeric: tabular-nums; }
body[data-app-page="pos"] .pos-co-grand { padding-top: 8px; border-top: 1px solid #eef1f5; font-size: 1.02rem; color: #000; }
body[data-app-page="pos"] .pos-co-grand strong { font-size: 1.3rem; color: #047857; }
body[data-app-page="pos"] .pos-co-label { display: block; margin-bottom: 7px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: #334155; text-transform: uppercase; }
body[data-app-page="pos"] .pos-co-muted { color: #475569; font-size: .8rem; }
body[data-app-page="pos"] .pos-pay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 380px) { body[data-app-page="pos"] .pos-pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body[data-app-page="pos"] .pos-pay-tile {
    --pay-color: #059669; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px;
    justify-items: center; align-items: center; text-align: center; min-height: 80px; padding: 10px 7px;
    border: 1px solid #e7ebf1; border-radius: 14px; background: #fff; cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
body[data-app-page="pos"] .pos-pay-tile[data-method="momo"] { --pay-color: #7c3aed; }
body[data-app-page="pos"] .pos-pay-tile[data-method="card"] { --pay-color: #2563eb; }
body[data-app-page="pos"] .pos-pay-tile:hover { border-color: color-mix(in srgb, var(--pay-color) 46%, #e7ebf1); }
body[data-app-page="pos"] .pos-pay-tile.is-active { border-color: var(--pay-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pay-color) 16%, transparent); background: color-mix(in srgb, var(--pay-color) 7%, #fff); }
body[data-app-page="pos"] .pos-pay-tile input { position: absolute; opacity: 0; pointer-events: none; }
body[data-app-page="pos"] .pos-pay-icon { width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--pay-color) 13%, #fff); color: var(--pay-color); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
body[data-app-page="pos"] .pos-pay-copy { min-width: 0; width: 100%; display: grid; gap: 1px; justify-items: center; }
body[data-app-page="pos"] .pos-pay-label { max-width: 100%; font-weight: 800; color: #000; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-app-page="pos"] .pos-pay-sub { display: none; font-size: .72rem; color: #475569; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-app-page="pos"] .pos-pay-check { position: absolute; right: 7px; top: 7px; width: 18px; height: 18px; border-radius: 999px; border: 1px solid #cbd5e1; display: flex; align-items: center; justify-content: center; color: transparent; background: #fff; font-size: .75rem; }
body[data-app-page="pos"] .pos-pay-tile.is-active .pos-pay-check { background: var(--pay-color); border-color: var(--pay-color); color: #fff; }
@media (min-width: 620px) {
    body[data-app-page="pos"] .pos-pay-tile { grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; justify-items: stretch; text-align: left; min-height: 72px; padding: 11px; }
    body[data-app-page="pos"] .pos-pay-copy { justify-items: start; gap: 2px; }
    body[data-app-page="pos"] .pos-pay-label { font-size: .86rem; }
    body[data-app-page="pos"] .pos-pay-sub { display: block; }
    body[data-app-page="pos"] .pos-pay-check { position: static; width: 22px; height: 22px; font-size: .86rem; }
}
body[data-app-page="pos"] .pos-cash-panel { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid #e7ebf1; border-radius: 16px; background: #f6f8fb; }
@media (min-width: 620px) { body[data-app-page="pos"] .pos-cash-panel { grid-template-columns: minmax(0, 1fr) minmax(180px, .7fr); align-items: end; } }
body[data-app-page="pos"] #pos-cash-paid { font-size: 1.1rem; font-weight: 800; }
body[data-app-page="pos"] .pos-quick-cash { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
body[data-app-page="pos"] .pos-quick-cash:empty { display: none; }
body[data-app-page="pos"] .pos-qc-btn {
    padding: 7px 11px; border-radius: 999px; border: 1px solid #dbe2ea; background: #fff; cursor: pointer;
    font: inherit; font-size: .76rem; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums;
}
body[data-app-page="pos"] .pos-qc-btn:hover { border-color: #059669; color: #047857; }
body[data-app-page="pos"] .pos-qc-btn.is-exact { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
body[data-app-page="pos"] .pos-cash-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body[data-app-page="pos"] .pos-cash-metric { padding: 10px; border: 1px solid #e7ebf1; border-radius: 12px; background: #fff; }
body[data-app-page="pos"] .pos-cash-metric.is-change { border-color: #a7f3d0; background: #f0fdf4; }
body[data-app-page="pos"] .pos-cash-metric span { display: block; font-size: .68rem; color: #475569; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
body[data-app-page="pos"] .pos-cash-metric strong { display: block; margin-top: 4px; font-size: 1rem; color: #000; font-weight: 800; font-variant-numeric: tabular-nums; }
body[data-app-page="pos"] .pos-cust-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 400; margin-top: 3px; max-height: 210px; overflow-y: auto;
    background: #fff; border: 1px solid #dbe2ea; border-radius: 12px; box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}
body[data-app-page="pos"] .pos-checkout-modal > .pos-checkout-footer,
body[data-app-page="pos"] .pos-checkout-modal .modal-body > .pos-checkout-footer {
    position: relative; z-index: 20; flex: 0 0 auto; display: grid; grid-template-columns: minmax(76px, .6fr) minmax(0, 1.4fr);
    gap: 8px; margin: 0 !important; padding: 10px 12px calc(10px + var(--safe-b)) !important; min-height: 0 !important; overflow: visible !important;
    border-top: 1px solid #e7ebf1; background: #fff; box-shadow: 0 -10px 24px -12px rgba(15, 23, 42, .16); touch-action: auto;
}
body[data-app-page="pos"] .pos-co-due { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px 2px; }
body[data-app-page="pos"] .pos-co-due span { font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #334155; }
body[data-app-page="pos"] .pos-co-due b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: #047857; font-variant-numeric: tabular-nums; }
body[data-app-page="pos"] .pos-checkout-footer .btn {
    width: 100% !important; min-width: 0 !important; min-height: 48px !important; height: 48px; padding: 7px 10px !important;
    border-radius: 14px !important; font-size: .86rem; font-weight: 800; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center;
}
body[data-app-page="pos"] .pos-checkout-footer .btn-primary { box-shadow: 0 12px 26px -12px rgba(5, 150, 105, .8); }
body[data-app-page="pos"] .pos-checkout-footer .btn .btn-text { min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
    body[data-app-page="pos"] .pos-checkout-modal > .pos-checkout-footer { grid-template-columns: 1fr 160px 260px; align-items: center; padding-left: max(16px, calc((100vw - 1120px) / 2)) !important; padding-right: max(16px, calc((100vw - 1120px) / 2)) !important; }
    body[data-app-page="pos"] .pos-co-due { grid-column: auto; justify-content: flex-start; }
}

/* shift bar: a little tighter on phones */
body[data-app-page="pos"] .pos-shift { margin-bottom: 0; }
@media (max-width: 640px) {
    body[data-app-page="pos"] .pos-shift { padding: 10px 12px; gap: 8px; }
    body[data-app-page="pos"] .pos-shift-acts .btn { min-height: 36px; }
    body[data-app-page="pos"] .pos-shift-fig b { font-size: .9rem; }
}

/* batch rows read "Expired 12 days ago", not Title Case */
.lp2-batch .sx-meta .sx-method { text-transform: none; }


/* ---- Orders: refunds and returns (order pop-up, refund pop-up) ------------- */

.modal .ord-rfs { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.modal .ord-rf { padding: 12px 14px; border-radius: 14px; border: 1px solid #e7ebf1; background: #f8fafc; font-size: .8rem; line-height: 1.45; color: #334155; }
.modal .ord-rf-requested { border-color: #fcd9a8; background: #fffbf3; }
.modal .ord-rf-approved { border-color: #fcd9a8; background: #fffbf3; }
.modal .ord-rf-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal .ord-rf-h b { font-size: 1rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; }
.modal .ord-rf-meta { margin-top: 2px; font-size: .72rem; font-weight: 600; color: #64748b; }
.modal .ord-rf-items { margin-top: 8px; font-weight: 650; color: #000; }
.modal .ord-rf-why { margin-top: 6px; }
.modal .ord-rf-why b { color: #000; }
.modal .ord-rf-reply { display: flex; gap: 6px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: #fff; color: #000; }
.modal .ord-rf-st { margin-top: 6px; font-weight: 600; color: #475569; }
.modal .ord-rf-acts { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-top: 10px; }
.modal .ord-rf-acts .btn { width: 100%; margin: 0 !important; justify-content: center; min-height: 40px; }
.modal .ord-rf-acts .btn:only-child { grid-column: 1 / -1; }
.modal .ord-rf-back { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: #e0f2fe; color: #075985; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.modal .ord-rf-note-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: #fef2f2; color: #7f1d1d; font-size: .8rem; line-height: 1.4; }
.modal .ord-rf-note-line b { color: inherit; }
.modal .ord-rf-note-line.ok { background: #ecfdf5; color: #065f46; }
.modal .ord-rf-asked { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fffbf3; border: 1px solid #fcd9a8; font-size: .8rem; line-height: 1.45; color: #000; }
.modal .ord-rf-asked span { color: #475569; font-weight: 600; }
.modal .ord-rf-link { border: 0; background: none; padding: 0; margin-left: 2px; font: inherit; font-weight: 750; color: #0f766e; text-decoration: underline; cursor: pointer; }
.modal .ord-rf-opt { font-weight: 500; color: #64748b; }
.modal .ord-rf-note { margin-top: 2px; }
.modal .ord-rff-lines { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.modal .ord-rff-line {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center;
    padding: 10px 12px; border-radius: 14px; border: 1px solid #e7ebf1; background: #fff;
}
.modal .ord-rff-line.on { border-color: #99d5cc; background: #f0fdfa; }
.modal .ord-rff-txt { min-width: 0; }
.modal .ord-rff-txt b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .86rem; color: #000; }
.modal .ord-rff-txt span { font-size: .72rem; font-weight: 600; color: #64748b; }
.modal .ord-rff-qty { display: inline-flex; align-items: center; height: 36px; border: 1px solid #d5dbe3; border-radius: 99px; overflow: hidden; background: #fff; }
.modal .ord-rff-qty button { width: 34px; height: 100%; border: 0; background: none; font-size: 1rem; font-weight: 700; color: #000; cursor: pointer; }
.modal .ord-rff-qty button:active { background: #f1f5f9; }
.modal .ord-rff-qty input {
    width: 40px !important; min-height: 0 !important; height: 100% !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; background: transparent !important; text-align: center; font-weight: 750; -moz-appearance: textfield;
}
.modal .ord-rff-qty input::-webkit-outer-spin-button,
.modal .ord-rff-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.modal .ord-rff-back { grid-column: 1 / -1; display: none; align-items: center; gap: 6px; font-size: .76rem; font-weight: 650; color: #334155; cursor: pointer; }
.modal .ord-rff-line.on .ord-rff-back { display: inline-flex; }
.modal .ord-rff-back input { width: 16px; height: 16px; accent-color: #0f766e; }
.modal .ord-rff .form-stack .input-group input,
.modal .ord-rff .form-stack .input-group select { width: 100%; }
.modal .ord-rff .form-stack .input-group #ord-rf-amt { max-width: 220px; font-weight: 750; }
@media (max-width: 599px) {
    /* phones: one field per row, so the amount and its note have room */
    .modal .ord-rff .form-stack > .input-group { grid-column: 1 / -1; }
}

/* ── Products sold by weight or length (products.unit) ─────────────── */
body[data-app-page="pos"] .pos-per-unit { font-size: .72rem; font-weight: 700; color: var(--text-2); margin-left: 2px; }
.pos-measure-price { font-size: .92rem; color: var(--text-2); padding: 2px 2px 0; }
.pos-measure-price b { color: #000; font-weight: 800; }
.pos-measure input { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
body[data-app-page="pos"] .pos-measure-btn { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; min-height: 36px; }
.lp2-per-unit { font-size: .74em; font-weight: 700; color: var(--text-2); margin-left: 1px; }
.qty-unit { text-transform: none; }

/* ---- Update stock: why is it changing? (reports.js showStockModal) ---------------- */
.modal .stk-sheet .section-label { margin: 2px 0 -4px; }
.modal .stk-choices { display: flex; flex-direction: column; gap: 8px; }
.modal .stk-choice {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer;
    font: inherit; color: #000; background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.modal .stk-choice:hover { border-color: #94a3b8; }
.modal .stk-choice.on { border-color: #059669; background: #f0fdf4; box-shadow: 0 0 0 3px rgba(16, 185, 129, .14); }
.modal .stk-choice-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; color: #047857; background: #ecfdf5; }
.modal .stk-choice[data-k="count"] .stk-choice-ic { color: #b45309; background: #fffbeb; }
.modal .stk-choice-txt { flex: 1; min-width: 0; }
.modal .stk-choice-txt b { display: block; font-size: .92rem; font-weight: 800; color: #000; }
.modal .stk-choice-txt small { display: block; margin-top: 1px; font-size: .76rem; font-weight: 600; color: #475569; line-height: 1.4; }
.modal .stk-choice-go { flex: none; color: #94a3b8; }
.modal .stk-choice.on .stk-choice-go { color: #059669; transform: rotate(90deg); }
.modal .stk-panel { display: flex; flex-direction: column; gap: 12px; padding-top: 2px; }
.modal .stk-explain { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #eff6ff; border: 1px solid #bfdbfe; font-size: .84rem; line-height: 1.5; color: #1e293b; }
.modal .stk-explain > i { color: #1d4ed8; font-size: 1.05rem; margin-top: 1px; }
.modal .stk-already { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; font-weight: 600; color: #334155; line-height: 1.45; }
.modal .stk-already > i { color: #059669; margin-top: 1px; }
.modal .stk-change { font-size: .8rem; font-weight: 700; color: #475569; margin-top: -4px; }
.modal .stk-change.up { color: #047857; }
.modal .stk-change.down { color: #b45309; }
.modal .stk-opt { font-weight: 600; color: #64748b; }

/* Edit product: stock is shown, and changed through Update stock (ui-kit.js) */
.modal .prod-stock-ro { display: flex; gap: 8px; align-items: stretch; }
.modal .prod-stock-ro input { flex: 1; min-width: 0; background: #f8fafc !important; color: #000; font-weight: 700; cursor: default; }
.modal .prod-stock-ro .btn { flex: none; white-space: nowrap; }

/* Product form: Make your photos look better (assets/js/app/product-photos.js). */
.pp-tools { margin-top: 10px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.pp-head { display: flex; flex-direction: column; gap: 2px; }
.pp-head b { color: #000; font-size: .9rem; }
.pp-head b i { color: #7c3aed; margin-right: 4px; }
.pp-head span { color: #475569; font-size: .78rem; }
.pp-item { display: flex; align-items: center; gap: 10px; }
.pp-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid #e2e8f0; background: #f8fafc; flex: 0 0 auto; }
.pp-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { border: 1px solid #cbd5e1; background: #fff; color: #000; border-radius: 999px; padding: 6px 12px; font-size: .78rem; font-weight: 600; cursor: pointer; line-height: 1.2; }
.pp-chip i { margin-right: 2px; }
.pp-chip.is-on { background: #0B8A55; border-color: #0B8A55; color: #fff; }
.pp-chip:disabled { opacity: .6; cursor: progress; }
.pp-note { margin: 0; font-size: .78rem; color: #334155; line-height: 1.45; }
.pp-note i { color: #7c3aed; margin-right: 3px; }
.pp-note b { color: #000; }
.pp-note a { color: #0B8A55; font-weight: 700; }
.pp-note.is-out, .pp-note.is-out i { color: #991b1b; }

/* The hint before any photo is chosen, the wand on saved photos, and the save row. */
.pp-hint { margin: 8px 2px 0; font-size: .78rem; color: #334155; line-height: 1.45; }
.pp-hint i { color: #7c3aed; margin-right: 4px; }
.pp-hint[hidden] { display: none; }
.pp-wand { position: absolute; left: 4px; bottom: 4px; width: 24px; height: 24px; border: 0; border-radius: 999px; background: rgba(124, 58, 237, .92); color: #fff; display: grid; place-items: center; font-size: .72rem; cursor: pointer; padding: 0; }
.pp-wand:hover { background: #6d28d9; }
#prod-photo-existing:empty { display: none; }
#prod-photo-existing .pp-tools { margin-top: 10px; }
.pp-x-acts { display: flex; gap: 8px; flex-wrap: wrap; }
