/* ---- Cards ---- */
.card {
    background: var(--card);
    border: 1px solid rgba(16,32,24,.08);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(16,32,24,.07);
}
.card-title { font-weight: 600; margin: 0 0 6px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    min-height: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: var(--fill);
    color: var(--text);
    width: 100%;
    letter-spacing: -.1px;
    transition: opacity .12s, transform .12s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { opacity: 0.72; transform: scale(0.97); }
.btn-primary { background: var(--green); color: #fff; }
.btn-amber { background: var(--amber); color: #1a1a1a; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: var(--fill); border: none; color: var(--green-dark); }
.btn-sm { width: auto; min-height: 36px; padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); letter-spacing: .01em; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    background: var(--fill);
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    background: var(--card);
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-tint);
}
.field textarea { min-height: 90px; resize: vertical; }
.field .error-text { color: var(--danger); font-size: 12px; margin-top: 5px; }
form .form-error { background: #fdecea; color: var(--danger); padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--line);
    color: #374151;
}
.badge-success { background: #e6f4ea; color: var(--green-dark); }
.badge-warn { background: #fff4d6; color: #8a6d00; }
.badge-danger { background: #fdecea; color: var(--danger); }
.badge-info { background: #e7f0fd; color: #1558b0; }
.badge-verified { background: var(--green); color: #fff; }

/* ---- Toasts ---- */
#toasts {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
    transform: translateX(-50%);
    z-index: 120;
    width: calc(100% - 28px);
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 14px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    animation: toastIn .2s ease;
}
.toast-info { background: #333; }
.toast-success { background: var(--green); }
.toast-error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    display: flex; align-items: flex-end; justify-content: center;
    z-index: 110;
    padding: 0;
}
.modal {
    background: var(--card);
    border-radius: 20px 20px 0 0;
    padding: 6px 18px 32px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
}
.modal::before {
    content: '';
    display: block;
    width: 36px; height: 4px;
    background: var(--line);
    border-radius: 2px;
    margin: 10px auto 16px;
}

/* ---- Notification / cart badge dot ---- */
.badge-count {
    background: var(--amber);
    color: #1a1a1a;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    margin-left: 4px;
}
.badge-count-green {
    background: var(--green, #1F7A4D);
    color: #fff;
}
/* Cart icon button in header */
.header-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* ---- Empty / state blocks ---- */
.state {
    text-align: center;
    color: var(--muted);
    padding: 40px 16px;
}
.state .state-icon { font-size: 40px; margin-bottom: 10px; }

/* ---- Lists ---- */
.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }

/* ---- Listing cards ---- */
.listing-card {
    display: block;
    background: var(--card);
    border: 1px solid rgba(16,32,24,.08);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 4px 16px rgba(16,32,24,.07);
    transition: opacity .1s, transform .1s;
}
.listing-card:active { opacity: 0.82; transform: scale(0.98); }
.lc-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    background: #eef1ee;
}
.lc-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}
.lc-body { padding: 10px; }
.lc-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lc-price { color: var(--green-dark); font-weight: 700; margin-bottom: 4px; }
.lc-dist { color: var(--green-dark); font-weight: 600; }

/* ---- Category cards ---- */
.cat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}
.cat-icon { font-size: 28px; }

/* ---- Store card ---- */
.store-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.sc-logo { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.sc-nologo { display: flex; align-items: center; justify-content: center; background: #eef1ee; font-size: 24px; }

/* ---- Public store page ---- */
.store-cover {
    height: 130px;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    margin-bottom: -34px;
}
.store-cover-blank { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.store-head { display: flex; align-items: flex-end; gap: 12px; padding: 0 6px; }
.store-logo {
    width: 70px; height: 70px;
    border-radius: 12px;
    border: 3px solid #fff;
    object-fit: cover;
    background: #eef1ee;
    flex: 0 0 auto;
}
.seller-reply {
    background: #f1f5f1;
    border-left: 3px solid var(--green);
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 8px;
}

/* ---- Listing detail ---- */
.gallery { display: flex; gap: 8px; overflow-x: auto; border-radius: var(--radius); }
.gallery img { height: 200px; border-radius: var(--radius); object-fit: cover; flex: 0 0 auto; }
.gallery-empty {
    height: 180px;
    background: #eef1ee;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
}
.badge-row { margin: 12px 0 4px; }
.store-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); margin: 14px 0; }

/* ---- Checkboxes ---- */
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.check input { width: auto; }

/* ---- Image management ---- */
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.img-thumb { position: relative; width: 96px; height: 96px; }
.img-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.img-del {
    position: absolute; top: 4px; right: 4px;
    background: rgba(0,0,0,.6); color: #fff;
    border: none; border-radius: 6px; padding: 3px; cursor: pointer;
    display: flex; width: auto;
}
.img-primary {
    position: absolute; bottom: 4px; left: 4px;
    background: var(--green); color: #fff;
    font-size: 10px; padding: 1px 6px; border-radius: 4px;
}

/* ---- Enquiry thread ---- */
.thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.reply {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    max-width: 85%;
}
.reply-mine {
    align-self: flex-end;
    background: #e6f4ea;
    border-color: #cde9d4;
}
.q-item { align-items: end; }

/* ---- Line-item tables (quotations / invoices) ---- */
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines th, .lines td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.lines th.num, .lines td.num { text-align: right; }
.lines thead th { font-size: 12px; color: var(--muted); }
.totals-box { margin-top: 12px; }
.tot { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.tot-grand { font-weight: 700; font-size: 16px; border-top: 2px solid #333; margin-top: 4px; padding-top: 8px; }

/* ---- Admin ---- */
.adm-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.adm-stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 12px;
    text-align: center;
}
.adm-stat-alert { border-color: var(--amber); background: #fff9ec; }
.adm-stat-value { font-size: 22px; font-weight: 800; color: var(--green-dark); line-height: 1.1; }
.adm-stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.adm-nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.adm-nav-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    padding: 14px 12px;
}
.adm-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.adm-reason-input { flex: 1; min-width: 0; }
.adm-bar-label { width: 100px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.adm-bar-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }

/* ---- Notifications ---- */
.notif-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    background: var(--card);
}
.notif-row:last-child { border-bottom: none; }
.notif-row:active { background: #f5f7f5; }
.notif-unread { background: #f0f8f0; }
.notif-icon { flex: 0 0 auto; padding-top: 2px; color: var(--green-dark); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.notif-dot {
    flex: 0 0 auto;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--green);
    margin-top: 6px;
}

/* ---- Reviews ---- */
.star-picker { display: flex; gap: 6px; cursor: pointer; color: var(--amber); margin: 6px 0; }
.sp-star { cursor: pointer; transition: transform 0.1s; }
.sp-star:hover { transform: scale(1.15); }

.rv-header-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.rv-summary { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 80px; }
.rv-avg { font-size: 40px; font-weight: 800; line-height: 1; color: var(--green-dark); }
.rv-dist { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.rv-dist-row { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.rv-dist-label { width: 54px; display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.rv-dist-bar { flex: 1; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.rv-dist-fill { height: 100%; background: var(--amber); border-radius: 4px; }
.rv-dist-count { width: 20px; text-align: right; color: var(--muted); }
.rv-comment { margin: 8px 0 4px; }

/* ---- Payment screens ---- */
.pay-amount-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.pay-amount { font-size: 32px; font-weight: 800; color: var(--green-dark); }
.pay-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 16px;
    gap: 10px;
}
.pay-result-ok { color: var(--green-dark); }
.pay-result-warn { color: var(--amber); }
.pay-result-fail { color: var(--danger); }
.pay-result-title { font-size: 20px; font-weight: 700; }
.pay-result-msg { font-size: 18px; font-weight: 600; }
.pay-result-ref { font-size: 12px; color: var(--muted); word-break: break-all; }

/* ---- Dashboard tiles ---- */
.dash-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    padding: 22px 12px;
    text-align: center;
}
.dash-icon { font-size: 30px; }

/* ── Extra button sizes ──────────────────────────────────────────── */
.btn-xs {
    min-height: 30px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 8px;
    gap: 4px;
}

/* ── Store-empty screen ──────────────────────────────────────────── */
.sm-empty {
    text-align: center;
    padding: 48px 20px;
    max-width: 480px;
    margin: 0 auto;
}
.sm-empty-icon {
    width: 88px; height: 88px; border-radius: 50%;
    background: var(--green-tint);
    color: var(--green);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.sm-empty h1 { margin-bottom: 8px; }
.sm-empty p { margin-bottom: 20px; }

/* ── Store manage: cover header ──────────────────────────────────── */
.sm-cover {
    height: 220px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}
.sm-cover-fade {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,25,15,.72) 0%, transparent 55%);
}
.sm-cover-body {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 10px 14px 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.sm-cover-top {
    display: flex; align-items: center; gap: 10px;
}
.sm-logo {
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255,255,255,.18); border: 2.5px solid rgba(255,255,255,.55);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0; color: #fff;
}
.sm-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sm-cover-info { flex: 1; min-width: 0; }
.sm-store-name {
    color: #fff; font-size: 17px; font-weight: 800;
    letter-spacing: -.2px; margin: 0 0 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sm-cover-sub { color: rgba(255,255,255,.72); font-size: 12px; }
.sm-cover-actions {
    display: flex; gap: 8px;
}
.sm-cover-upload-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.35);
    color: #fff; border-radius: 10px;
    padding: 6px 12px; font-size: 13px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    transition: background .15s;
}
.sm-cover-upload-btn:hover { background: rgba(255,255,255,.3); }

/* ── Tabs ────────────────────────────────────────────────────────── */
.sm-tabs {
    display: flex;
    border-bottom: 2px solid var(--line);
    margin: 0 0 18px;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.sm-tabs::-webkit-scrollbar { display: none; }
.sm-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 16px;
    font-size: 14px; font-weight: 700;
    color: var(--muted); text-decoration: none;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s;
}
.sm-tab.active { color: var(--green); border-bottom-color: var(--green); }
.sm-tab:hover { color: var(--text); }

/* ── Store manage tab content ────────────────────────────────────── */
.sm-tab-content { padding-bottom: 24px; }

/* ── Overview stat grid ──────────────────────────────────────────── */
.sm-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 4px;
}
.sm-stat-tile {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; padding: 16px 8px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 16px; text-decoration: none; color: var(--text);
    font-size: 12px; font-weight: 700; text-align: center;
    box-shadow: 0 2px 8px rgba(16,32,24,.05);
    transition: opacity .1s;
}
.sm-stat-tile:active { opacity: 0.75; }
.sm-stat-icon { color: var(--green); }
.sm-stat-label { color: var(--muted); font-size: 11px; }

/* ── Seller listing rows (in manage tab) ─────────────────────────── */
.sm-listings-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.slm-row {
    display: flex; gap: 12px;
    background: var(--card); border: 1px solid rgba(16,32,24,.08);
    border-radius: 16px; padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(16,32,24,.05);
}
.slm-img-wrap { flex-shrink: 0; }
.slm-img {
    width: 72px; height: 72px;
    border-radius: 12px; object-fit: cover;
    display: block; background: var(--fill);
}
.slm-noimg {
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
}
.slm-body { flex: 1; min-width: 0; }
.slm-title {
    font-weight: 700; font-size: 14px; margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slm-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.slm-price { color: var(--green); font-weight: 700; }
.slm-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 3px; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.badge-success { background: #d4f5e2; color: #0d6e3b; }
.badge-muted   { background: var(--fill); color: var(--muted); }
.badge-amber   { background: #fff3d0; color: #a06800; }
.badge-danger  { background: #fde8e6; color: var(--danger); }
.badge-dark    { background: #1c1c1e; color: #fff; }
.badge-verified { background: var(--green-tint); color: var(--green); }

/* ── Marketplace page ────────────────────────────────────────────── */
.mp-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 0 48px; /* no side padding — content goes edge-to-edge on mobile */
}

.mp-header { margin: 0 12px 14px; }
.mp-title { font-size: clamp(22px, 2.4vw, 32px); margin: 0; letter-spacing: -.03em; }

/* Filter area — no card wrapper, native-style inputs on page background */
.mp-filters {
    margin: 0 0 14px;
    padding: 0;
}

/* On mobile make the category dropdown full-width (same row as keyword on desktop) */
@media (max-width: 679px) {
    .mp-filter-cat { flex: 1 1 100%; }
}

/* Primary row: search box + category + buttons */
.mp-filter-row { display: flex; flex-direction: column; gap: 10px; }

.mp-filter-main {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.mp-filter-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--fill);
    border-radius: 12px;
    padding: 0 14px;
    border: 1.5px solid transparent;
    transition: border-color .15s, box-shadow .15s;
    min-height: 50px;
}
.mp-filter-field:focus-within {
    border-color: var(--green);
    background: var(--card);
    box-shadow: 0 0 0 3px var(--green-tint);
}
.mp-filter-field .icon { color: var(--muted); flex-shrink: 0; }
.mp-filter-field input,
.mp-filter-field select {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    height: 48px;
    min-width: 0;
    flex: 1;
    font-size: 15px;
}

.mp-filter-keyword { flex: 1 1 220px; }
.mp-filter-cat     { flex: 0 1 200px; }

.mp-filter-apply { flex-shrink: 0; width: auto; min-height: 50px; padding: 0 22px; }
.mp-filter-near  { flex-shrink: 0; width: auto; min-height: 50px; padding: 0 16px; }

/* "More filters" collapsible row */
.mp-filter-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.mp-filter-summary::-webkit-details-marker { display: none; }

.mp-filter-extras {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.mp-ef { margin-bottom: 0; }

.mp-results { margin-bottom: 0; }

/* Infinite-scroll sentinel + spinner */
.mp-sentinel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    height: 68px;
}
.mp-sentinel-spin {
    width: 26px;
    height: 26px;
    border: 3px solid var(--line);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: mp-spin .65s linear infinite;
}
@keyframes mp-spin { to { transform: rotate(360deg); } }

@media (min-width: 680px) {
    .mp-filter-extras {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 900px) {
    .mp-page { padding: 40px 32px 64px; }
    .mp-header { margin: 0 0 18px; }
    .mp-filters { margin: 0 0 20px; }

    /* On desktop: always show the extra filters inline */
    .mp-filter-extra[open],
    .mp-filter-extra { display: contents; }
    .mp-filter-summary { display: none; }

    .mp-filter-main {
        flex-wrap: nowrap;
    }

    .mp-filter-extras {
        grid-template-columns: repeat(4, 1fr);
        margin-top: 12px;
    }

    /* Results: 3 column grid */
    .mp-results .grid,
    .mp-results .grid-2 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ── Owner bar on public store page ─────────────────────────────── */
.spub-owner-bar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: #fffbec; border: 1px solid #F4B23B40;
    border-radius: 12px; padding: 10px 16px; margin-bottom: 12px;
    font-size: 13px; font-weight: 600; color: var(--text);
}
.spub-owner-bar a { color: var(--green); }

/* ── Document action bar (invoice / quotation detail) ───────────── */
.doc-action-bar {
    display: flex;
    gap: 8px;
    margin: 16px 0 12px;
    flex-wrap: wrap;
}
.doc-action {
    flex: 1 1 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: var(--card);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    width: auto;
    min-height: 0;
}
.doc-action:hover { background: var(--fill); border-color: var(--green); color: var(--green); }
.doc-action-primary {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.doc-action-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

/* ── Listing detail: engagement row (views · like · share) ──────── */
.ld-eng-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 10px;
    flex-wrap: wrap;
}
.ld-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
}
.ld-like-btn, .ld-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--fill);
    border: 1.5px solid var(--line);
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    width: auto;
    min-height: 0;
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
    -webkit-tap-highlight-color: transparent;
}
.ld-like-btn:active, .ld-share-btn:active { opacity: 0.72; }
.ld-like-btn.liked {
    background: #fde8e8;
    color: #c0392b;
    border-color: #f5b8b8;
}
.ld-like-btn.liked svg { stroke: #c0392b; }

/* ── Public store page: engagement row ──────────────────────────── */
.spub-eng-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    flex-wrap: wrap;
}
.spub-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
}
.spub-sep { color: var(--line); }
.spub-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--fill);
    border: 1.5px solid var(--line);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    width: auto;
    min-height: 0;
    transition: background .12s, color .12s, border-color .12s;
}
.spub-like-btn.liked {
    background: #fde8e8;
    color: #c0392b;
    border-color: #f5b8b8;
}
.spub-like-btn.liked svg { stroke: #c0392b; }

/* ── Saved screen ───────────────────────────────────────────────── */
.saved-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 16px;
}

/* ── Search history chips ───────────────────────────────────────── */
.mp-history {
    margin: 0 0 4px;
    padding: 10px 14px 12px;
    background: var(--card);
    border: 1px solid rgba(16,32,24,.07);
    border-radius: 16px;
}
.mp-history-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.mp-history-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    transition: color .12s;
}
.mp-history-clear:hover { color: var(--danger); }
.mp-history-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mp-history-chip {
    display: inline-flex;
    align-items: center;
    background: var(--fill);
    border: 1.5px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
}
.mp-hchip-apply {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 5px 10px 5px 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background .1s;
}
.mp-hchip-apply:hover { background: var(--green-light, rgba(0,160,80,.08)); }
.mp-hchip-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-left: 1px solid var(--line);
    padding: 5px 8px;
    font-size: 11px;
    color: var(--muted);
    cursor: pointer;
    transition: color .1s;
}
.mp-hchip-del:hover { color: var(--danger); }

/* ── Seller dashboard 4-column tile grid ────────────────────────────── */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
@media (max-width: 359px) {
    .dash-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
.dash-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 6px 10px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
    border: 1.5px solid var(--line);
    gap: 6px;
    transition: background .15s, border-color .15s;
}
.dash-tile:active { background: var(--fill); }
.dash-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--green-light, rgba(0,160,80,.1));
    color: var(--green);
    display: flex; align-items: center; justify-content: center;
}
.dash-label {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
    line-height: 1.2;
}

/* ── Dashboard promo / ad banner ────────────────────────────────────── */
.dash-promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(135deg, var(--green) 0%, #00b864 100%);
    border-radius: 16px;
    padding: 14px 14px 14px 16px;
    margin-bottom: 14px;
    color: #fff;
}
.dash-promo-body { flex: 1; min-width: 0; }
.dash-promo-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.dash-promo-sub {
    font-size: 12px;
    opacity: .85;
    line-height: 1.35;
}
.dash-promo-cta {
    flex-shrink: 0;
    background: rgba(255,255,255,.22);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.5);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    transition: background .15s;
}
.dash-promo-cta:active { background: rgba(255,255,255,.35); }

/* ── Profile / Account screen ───────────────────────────────────────── */
.prof-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0 12px;
}
.prof-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    letter-spacing: .5px;
}
.prof-meta { flex: 1; min-width: 0; }
.prof-name { font-size: 17px; font-weight: 700; line-height: 1.2; }
.prof-email { font-size: 13px; color: var(--muted); margin-top: 2px; }
.prof-roles { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.badge-muted {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    background: var(--fill);
    color: var(--muted);
    border-radius: 6px;
    padding: 2px 7px;
    letter-spacing: .3px;
}

.prof-links {
    padding: 0;
    overflow: hidden;
}
.prof-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: background .12s;
}
.prof-link:last-child { border-bottom: none; }
.prof-link:active { background: var(--fill); }
.prof-link > span { flex: 1; }
.prof-link svg:last-child { color: var(--muted); opacity: .45; }

/* ── Bottom nav compact mode (labels hidden, icons only) ────────────── */
#bottomNav.nav-compact a {
    padding: 8px 0 6px;
}
#bottomNav.nav-compact .nav-label {
    display: none;
}
#bottomNav .nav-label {
    font-size: 10px;
    line-height: 1;
}

/* ── Network offline toast ───────────────────────────────────────────── */
.net-toast {
    position: sticky;
    bottom: 0;
    left: 0; right: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    animation: slideUpIn .25s ease;
}
@keyframes slideUpIn {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ───────────────────────────────────────────────────────────
   Modal (bottom-sheet on mobile, centred dialog on desktop)
   ─────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.modal-box {
    background: var(--card, #fff);
    border-radius: 24px 24px 0 0;
    padding: 20px 18px 36px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpIn .22s ease;
}
@media (min-width: 600px) {
    .modal-overlay { align-items: center; }
    .modal-box { border-radius: 20px; padding: 24px 24px 28px; }
}
body.modal-open { overflow: hidden; }

/* ───────────────────────────────────────────────────────────
   POS — Point of Sale
   ─────────────────────────────────────────────────────────── */

/* Session banner */
.pos-session-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 13px;
}
.pos-session-open  { background: #edfaf3; color: var(--success, #1F7A4D); border: 1px solid #b2e8cc; }
.pos-session-none  { background: #fff8e1; color: #856404; border: 1px solid #ffe082; }

/* Tab bar — shown on mobile, hidden on wide screens */
.pos-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.pos-tab {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 0;
    border: 1.5px solid var(--border, #e0e0e0);
    border-radius: 14px;
    background: var(--card);
    font-size: 14px; font-weight: 500;
    cursor: pointer; transition: border-color .15s, background .15s;
}
.pos-tab.active {
    border-color: var(--primary, #1F7A4D);
    background: #edfaf3;
    color: var(--primary, #1F7A4D);
    font-weight: 700;
}
.pos-cart-badge {
    background: var(--primary, #1F7A4D);
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
}

/* Mobile: full-width stacked layout, one pane at a time */
.pos-layout {
    display: block;
}
.pos-products {
    display: flex;
    flex-direction: column;
}
.pos-cart {
    display: none;           /* hidden until Cart tab tapped */
    flex-direction: column;
    background: var(--card);
    border: 1px solid rgba(16,32,24,.08);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(16,32,24,.07);
    height: calc(100vh - 220px);
    min-height: 320px;
}

/* Wide screens: side-by-side, tabs hidden */
@media (min-width: 600px) {
    .pos-tabs { display: none; }
    .pos-layout {
        display: flex;
        gap: 12px;
        height: calc(100vh - 200px);
        min-height: 360px;
    }
    .pos-products {
        flex: 1 1 0;
        overflow: hidden;
    }
    .pos-cart {
        display: flex !important;  /* always visible on desktop */
        width: 280px;
        flex-shrink: 0;
        height: auto;
    }
}

/* Search */
.pos-search-row { margin-bottom: 8px; }
.pos-search {
    width: 100%; box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid var(--border, #e0e0e0);
    border-radius: 12px;
    font-size: 14px;
}
.pos-search:focus { outline: none; border-color: var(--primary, #1F7A4D); }

/* Product grid */
.pos-product-grid {
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-content: start;
    padding-bottom: 4px;
    /* Mobile: fixed height so it doesn't push page */
    height: calc(100vh - 310px);
    min-height: 240px;
}
@media (max-width: 380px) { .pos-product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 600px) { .pos-product-grid { flex: 1; height: auto; } }

.pos-stock-link { margin: 8px 0; }

.pos-product-tile {
    background: var(--card);
    border: 1.5px solid rgba(16,32,24,.1);
    border-radius: 14px;
    padding: 10px 8px;
    cursor: pointer;
    transition: transform .12s, border-color .12s;
    text-align: center;
    user-select: none;
}
.pos-product-tile:active, .pos-product-tile.pos-tile-added {
    transform: scale(.94);
    border-color: var(--primary, #1F7A4D);
}
.pos-tile-oos  { opacity: .45; pointer-events: none; }
.pos-tile-low  { border-color: #e68a00; }
.pos-tile-name { font-size: 12px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.pos-tile-price { font-size: 13px; font-weight: 700; color: var(--primary, #1F7A4D); }
.pos-tile-stock { font-size: 10px; margin-top: 3px; }

/* Cart panel */
.pos-cart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pos-cart-header h2 { margin: 0; font-size: 15px; }
.pos-cart-items { flex: 1; overflow-y: auto; }
.pos-cart-empty { text-align: center; color: var(--muted, #888); padding: 24px 8px; }

.pos-cart-item { padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.pos-cart-desc {
    width: 100%; box-sizing: border-box;
    border: none; border-bottom: 1px solid var(--border, #e0e0e0);
    background: transparent; font-size: 13px; font-weight: 500;
    padding: 2px 0; margin-bottom: 4px;
}
.pos-cart-desc:focus { outline: none; border-color: var(--primary, #1F7A4D); }
.pos-cart-row2 {
    display: flex; align-items: center; gap: 4px; font-size: 12px;
}
.pos-cart-qty, .pos-cart-price {
    width: 52px; border: 1px solid var(--border, #e0e0e0);
    border-radius: 6px; padding: 3px 5px; font-size: 12px;
    text-align: right;
}
.pos-cart-linetotal { margin-left: auto; font-weight: 600; font-size: 13px; }
.pos-cart-remove {
    background: none; border: none; cursor: pointer; color: var(--muted, #888);
    padding: 2px; display: flex; align-items: center;
}

/* Cart totals */
.pos-cart-totals { margin-top: 8px; border-top: 1px solid rgba(0,0,0,.08); padding-top: 8px; }
.pos-total-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }

/* Charge button */
.pos-pay-btn {
    margin-top: 10px;
    background: var(--primary, #1F7A4D);
    color: #fff;
    border: none; border-radius: 14px;
    padding: 14px;
    font-size: 16px; font-weight: 700;
    cursor: pointer; width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: opacity .15s;
}
.pos-pay-btn:disabled { opacity: .45; cursor: default; }
.pos-pay-btn:not(:disabled):active { opacity: .8; }

/* Payment method selector */
.pos-method-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.pos-method-btn {
    padding: 7px 14px; border-radius: 20px;
    border: 1.5px solid var(--border, #e0e0e0);
    background: var(--card); cursor: pointer; font-size: 13px;
    transition: border-color .15s, background .15s;
}
.pos-method-btn.active {
    border-color: var(--primary, #1F7A4D);
    background: #edfaf3; color: var(--primary, #1F7A4D); font-weight: 600;
}

/* Payment summary */
.pos-pay-summary { text-align: center; margin: 8px 0 16px; }
.pos-pay-amount { font-size: 32px; font-weight: 800; color: var(--primary, #1F7A4D); }

/* Change row */
.pos-change-row {
    display: flex; align-items: center; gap: 8px;
    background: #edfaf3; border-radius: 10px;
    padding: 8px 12px; margin-top: 4px; font-size: 14px;
}
.pos-change-row strong { margin-left: auto; font-size: 16px; }

/* Receipt screen */
.receipt-screen { max-width: 400px; margin: 0 auto; }
.receipt-success {
    text-align: center; padding: 20px 0 8px;
    color: var(--primary, #1F7A4D);
}
.receipt-title { text-align: center; margin: 0 0 16px; }
.receipt-card { }
.receipt-meta {
    display: flex; justify-content: space-between;
    font-size: 12px; margin-bottom: 6px;
}

/* ───────────────────────────────────────────────────────────
   Stock management
   ─────────────────────────────────────────────────────────── */
.stock-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stock-header h1 { margin: 0; }

.stock-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
}
.stock-item-left { flex: 1; }
.stock-item-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.stock-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.stock-qty { font-size: 20px; font-weight: 700; }
.stock-low  { color: #e68a00; }
.stock-zero { color: var(--danger, #c0392b); }
.stock-actions { display: flex; gap: 4px; }

.btn-xs {
    padding: 4px 8px; font-size: 11px; border-radius: 8px;
}

/* Stock movement rows */
.movement-row {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
}
.movement-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mov-in  { background: #edfaf3; color: var(--success, #1F7A4D); }
.mov-out { background: #fdecea; color: var(--danger, #c0392b); }
.movement-body { flex: 1; }
.movement-qty {
    font-size: 16px; font-weight: 700;
    white-space: nowrap;
}

/* ───────────────────────────────────────────────────────────
   Online shop — product grid
   ─────────────────────────────────────────────────────────── */

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 4px;
}
@media (min-width: 480px) { .shop-product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .shop-product-grid { grid-template-columns: repeat(4, 1fr); } }

.shop-product-card {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(16,32,24,.07);
    display: flex;
    flex-direction: column;
    border: 1.5px solid var(--line, rgba(16,32,24,.08));
}
.shop-product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--fill);
    display: block;
}
.shop-product-img-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--fill);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}
.shop-product-body {
    padding: 8px 10px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.shop-product-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand, #1F7A4D);
    margin-bottom: 2px;
}
.shop-product-unit { font-size: 11px; color: var(--muted); }
.shop-product-stock { font-size: 11px; margin: 3px 0 6px; min-height: 16px; }
.shop-add-btn {
    margin-top: auto;
    width: 100%;
    padding: 8px 0;
    border: none;
    border-radius: 10px;
    background: var(--green, #1F7A4D);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: opacity .12s;
}
.shop-add-btn:active { opacity: .8; }
.shop-add-btn:disabled {
    background: var(--fill);
    color: var(--muted);
    cursor: not-allowed;
}

/* ───────────────────────────────────────────────────────────
   Cart bar (sticky above bottom nav)
   ─────────────────────────────────────────────────────────── */
.cart-bar {
    position: sticky;
    bottom: 0;
    left: 0; right: 0;
    z-index: 90;
    background: var(--green, #1F7A4D);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    box-shadow: 0 -2px 12px rgba(16,32,24,.18);
}
.cart-bar-left { flex: 1; font-size: 14px; }
.cart-bar-right { font-size: 14px; font-weight: 700; }
.cart-bar-btn {
    background: rgba(255,255,255,.22);
    border: 1.5px solid rgba(255,255,255,.5);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}
.cart-bar-btn:active { background: rgba(255,255,255,.38); }

/* ───────────────────────────────────────────────────────────
   Cart screen
   ─────────────────────────────────────────────────────────── */
.cart-store-group { margin-bottom: 16px; }
.cart-store-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cart-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    align-items: center;
}
.cart-item-img {
    width: 52px; height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--fill);
    flex-shrink: 0;
}
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name {
    font-size: 14px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-price { font-size: 13px; color: var(--brand, #1F7A4D); font-weight: 600; }
.cart-qty-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cart-qty-btn {
    width: 28px; height: 28px;
    border: 1.5px solid var(--border, #e0e0e0);
    border-radius: 8px;
    background: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    padding: 0;
}
.cart-qty-num { font-size: 14px; font-weight: 700; min-width: 24px; text-align: center; }
.cart-item-remove {
    background: none; border: none;
    color: var(--muted); cursor: pointer;
    font-size: 22px; padding: 4px;
    line-height: 1; flex-shrink: 0;
    transition: color .12s;
}
.cart-item-remove:active { color: var(--danger, #c0392b); }
.cart-total-row {
    display: flex; justify-content: space-between;
    padding: 12px 0; font-size: 17px; font-weight: 700;
    border-top: 2px solid var(--border, #e0e0e0);
    margin-top: 4px;
}

/* ───────────────────────────────────────────────────────────
   Checkout
   ─────────────────────────────────────────────────────────── */
.checkout-order-summary {
    background: var(--fill);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}
.checkout-summary-title {
    font-size: 13px; font-weight: 700; margin-bottom: 8px;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: .4px;
}
.checkout-summary-row {
    display: flex; justify-content: space-between;
    font-size: 13px; padding: 3px 0;
}
.checkout-summary-total {
    font-weight: 700; font-size: 16px;
    border-top: 1px solid var(--border, #e0e0e0);
    margin-top: 6px; padding-top: 8px;
}

/* ───────────────────────────────────────────────────────────
   Online order cards
   ─────────────────────────────────────────────────────────── */
.order-card {
    background: var(--card);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(16,32,24,.07);
    border: 1.5px solid var(--line, rgba(16,32,24,.08));
}
a.order-card:hover { border-color: var(--green, #1F7A4D); }
.order-header {
    display: flex; justify-content: space-between;
    align-items: flex-start; margin-bottom: 6px;
}
.order-number { font-size: 14px; font-weight: 700; }
.order-store  { font-size: 13px; color: var(--muted); margin-top: 1px; }
.order-meta   { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.order-items-preview { font-size: 13px; margin-bottom: 4px; }
.order-total  { font-size: 16px; font-weight: 700; color: var(--brand, #1F7A4D); }
.order-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ───────────────────────────────────────────────────────────
   Online badge (stock list)
   ─────────────────────────────────────────────────────────── */
.badge-online {
    background: #e8f5e9;
    color: #1F7A4D;
    border: 1px solid #a5d6a7;
    font-size: 10px;
    border-radius: 4px;
    padding: 1px 5px;
    font-weight: 600;
    vertical-align: middle;
}

/* ───────────────────────────────────────────────────────────
   Toggle switch (sell online)
   ─────────────────────────────────────────────────────────── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border, #ccc);
    border-radius: 24px;
    transition: background .2s;
}
.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green, #1F7A4D); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ───────────────────────────────────────────────────────────
   Marketplace tabs (Listings | Products)
   ─────────────────────────────────────────────────────────── */
.mp-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 12px;
}
.mp-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 12px;
    border: 1.5px solid var(--line, #e0e0e0);
    border-radius: 14px;
    background: var(--card, #fff);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted, #888);
    cursor: pointer;
    transition: background .13s, border-color .13s, color .13s;
    white-space: nowrap;
}
.mp-tab.active {
    background: var(--green-light, rgba(0,160,80,.1));
    border-color: var(--green, #1F7A4D);
    color: var(--green, #1F7A4D);
    font-weight: 700;
}
.mp-tab-sub {
    font-size: 10px;
    font-weight: 500;
    opacity: .65;
    margin-left: 1px;
}

/* ───────────────────────────────────────────────────────────
   Marketplace product card — store attribution row
   ─────────────────────────────────────────────────────────── */
.mp-prod-store {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted, #888);
    text-decoration: none;
    margin-bottom: 5px;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.mp-prod-store:active { color: var(--green, #1F7A4D); }
.mp-prod-store-logo {
    width: 18px; height: 18px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.06);
}
.mp-prod-store-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 4px;
    background: var(--fill, #f5f5f5);
    flex-shrink: 0;
    color: var(--muted);
}
.mp-prod-place { font-weight: 400; color: var(--muted); }

/* Print: hide app chrome, show only the document content */
@media print {
    #appShell > *:not(#app) { display: none !important; }
    #app { overflow: visible !important; height: auto !important; }
    .doc-action-bar, .btn-row, [data-act] { display: none !important; }
    body { background: #fff !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}
