/* POSFOLD Wholesale (makhzony-v82): the buyer portal (wholesale.html) and the merchant's Wholesale screen (#screen-wholesale).
   POSFOLD's own identity — navy, white surfaces, the same spacing and type — with denser tables for professional ordering. */
:root {
  --wp-navy: #0b1f3a; --wp-ink: #0f172a; --wp-muted: #5b6b82; --wp-line: #d8dee8; --wp-surface: #ffffff; --wp-bg: #f4f6fa;
  --wp-primary: #1d4ed8; --wp-ok: #0b5f44; --wp-warn: #7a4a05; --wp-bad: #b42318;
}
html.wp-dark { --wp-ink: #e2e8f0; --wp-muted: #94a3b8; --wp-line: #2b3a52; --wp-surface: #13213a; --wp-bg: #0b1426; --wp-primary: #3b82f6; --wp-ok: #6ee7b7; --wp-warn: #fbbf24; --wp-bad: #f87171; }
.wp-header, .wp-main, .wp-status { box-sizing: border-box; }
body:has(.wp-main) { margin: 0; background: var(--wp-bg); color: var(--wp-ink); font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; }
.wp-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--wp-navy); color: #fff; }
.wp-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.wp-brand img { border-radius: 8px; background: #fff; }
.wp-store { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wp-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-user .wp-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.wp-main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.wp-status { max-width: 1100px; margin: 8px auto 0; padding: 0 16px; min-height: 1.6em; }
.wp-status.wp-error { color: var(--wp-bad); font-weight: 700; }
.wp-card { background: var(--wp-surface); border: 1px solid var(--wp-line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.wp-card label, .wp-main label { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-weight: 700; font-size: 13px; }
.wp-main input, .wp-main select, .wp-main textarea { min-height: 42px; padding: 8px 10px; border: 1px solid var(--wp-line); border-radius: 10px; background: var(--wp-surface); color: inherit; font: inherit; font-size: 16px; max-width: 100%; box-sizing: border-box; }
.wp-btn { min-height: 42px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--wp-line); background: var(--wp-surface); color: var(--wp-ink); font: inherit; font-weight: 800; cursor: pointer; }
.wp-btn.wp-primary { background: var(--wp-primary); border-color: var(--wp-primary); color: #fff; }
.wp-btn:disabled { opacity: .55; cursor: not-allowed; }
.wp-btn:focus-visible, .wp-main input:focus-visible, .wp-main select:focus-visible, .wp-tabs button:focus-visible { outline: 2px solid var(--wp-primary); outline-offset: 2px; }
.wp-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.wp-tabs button { flex: none; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--wp-line); background: var(--wp-surface); color: var(--wp-ink); font: inherit; font-weight: 700; cursor: pointer; }
.wp-tabs button[aria-selected="true"] { background: var(--wp-navy); color: #fff; border-color: var(--wp-navy); }
.wp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wp-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--wp-surface); border: 1px solid var(--wp-line); border-radius: 12px; padding: 10px 12px; }
.wp-item-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; flex: 1; }
.wp-item-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wp-item-add input { width: 72px; }
.wp-muted { color: var(--wp-muted); font-size: 13px; }
.wp-price { font-weight: 800; }
.wp-badge { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--wp-line); }
.wp-in_stock, .wp-paid { color: var(--wp-ok); } .wp-backorder, .wp-partial { color: var(--wp-warn); } .wp-out_of_stock, .wp-overdue { color: var(--wp-bad); }
.wp-table { width: 100%; border-collapse: collapse; background: var(--wp-surface); border: 1px solid var(--wp-line); border-radius: 12px; overflow: hidden; }
.wp-table td { padding: 8px; border-bottom: 1px solid var(--wp-line); vertical-align: middle; }
.wp-table input { width: 100%; min-width: 60px; }
.wp-bad td { color: var(--wp-bad); }
.wp-total { font-size: 18px; font-weight: 800; }
.wp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.wp-hint { color: var(--wp-muted); font-size: 13px; }
.wp-hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 480px) { .wp-table, .wp-table tbody, .wp-table tr, .wp-table td { display: block; width: 100%; box-sizing: border-box; } .wp-table tr { border-bottom: 2px solid var(--wp-line); } .wp-table td { border: 0; } }

/* the merchant's screen inside the application */
#screen-wholesale .ws-head { margin-bottom: 12px; }
#screen-wholesale .ws-title { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
#screen-wholesale .ws-lead, #screen-wholesale .ws-note, #screen-wholesale .ws-muted, #screen-wholesale .ws-plan { color: var(--pf-muted, #5b6b82); font-size: 13px; }
#screen-wholesale .ws-note-error { color: #b42318; font-weight: 700; }
#screen-wholesale .ws-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
#screen-wholesale .ws-tabs button { flex: none; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--pf-line, #d8dee8); background: var(--pf-surface, #fff); color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
#screen-wholesale .ws-tabs button[aria-selected="true"] { background: var(--pf-navy, #0b1f3a); color: #fff; }
#screen-wholesale .ws-card { background: var(--pf-surface, #fff); border: 1px solid var(--pf-line, #d8dee8); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
#screen-wholesale .ws-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-weight: 700; font-size: 13px; }
#screen-wholesale input, #screen-wholesale select, #screen-wholesale textarea { min-height: 42px; padding: 8px 10px; border: 1px solid var(--pf-line-strong, #b8c2d3); border-radius: 10px; font: inherit; font-size: 16px; background: var(--pf-surface, #fff); color: inherit; max-width: 100%; box-sizing: border-box; }
#screen-wholesale input[type=checkbox] { min-height: 0; width: 20px; height: 20px; }
#screen-wholesale .ws-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
#screen-wholesale .ws-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
#screen-wholesale .ws-tile { background: var(--pf-surface, #fff); border: 1px solid var(--pf-line, #d8dee8); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
#screen-wholesale .ws-tile-value { font-size: 20px; }
#screen-wholesale .ws-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#screen-wholesale .ws-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--pf-line, #d8dee8); border-radius: 12px; padding: 10px 12px; background: var(--pf-surface, #fff); }
#screen-wholesale .ws-row-main { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; min-width: 0; flex: 1; }
#screen-wholesale .ws-actions, #screen-wholesale .ws-toolbar, #screen-wholesale .ws-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
#screen-wholesale .ws-badge { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--pf-line, #d8dee8); }
#screen-wholesale .ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 10px; }
#screen-wholesale .ws-tier, #screen-wholesale .ws-qline { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
#screen-wholesale .ws-table { width: 100%; border-collapse: collapse; }
#screen-wholesale .ws-table td { padding: 6px; border-bottom: 1px solid var(--pf-line, #d8dee8); }
body.dark-mode #screen-wholesale .ws-card, body.dark-mode #screen-wholesale .ws-row, body.dark-mode #screen-wholesale .ws-tile, body.dark-mode #screen-wholesale input, body.dark-mode #screen-wholesale select, body.dark-mode #screen-wholesale textarea { background: var(--pf-surface-2, #1e293b); color: var(--pf-ink, #e2e8f0); }
