/* KRIP admin and vendor portals. Uses the tokens, buttons and fields from styles.css. */
body.staff { background: var(--canvas); }
.staff-row { gap: 24px; }
.staff-nav { display: flex; align-self: stretch; align-items: flex-end; gap: 4px; flex: 1; }
.staff-nav .tab { height: 68px; }
.staff-user { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.staff-main { padding-top: 24px; padding-bottom: 64px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.login-panel { max-width: 400px; margin: 48px auto; padding: 28px; display: grid; gap: 6px; }
.login-panel h1 { font-size: 22px; }
.login-panel .form { margin-top: 16px; }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.seg button { height: 34px; padding: 0 14px; border-radius: 6px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.seg button:hover { background: var(--canvas); }
.seg button.on { background: var(--brand-tint); color: var(--brand); }
.staff-search { flex: 0 1 320px; background: var(--surface); }
#refreshedAt { margin-left: auto; }

/* Orders table */
.orders { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.orders-head, .orow-main {
  display: grid; grid-template-columns: 130px minmax(160px, 1.4fr) 90px 150px 170px 190px 36px; gap: 16px; align-items: center; padding: 0 16px;
}
.orders-head { height: 40px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--canvas); }
.orow { border-bottom: 1px solid var(--line); }
.orow:last-child { border-bottom: 0; }
.orow-main { min-height: 64px; padding-top: 10px; padding-bottom: 10px; cursor: pointer; }
.orow-main:hover { background: #f5faf7; }
.orow.open .orow-main { background: #f5faf7; }
.cell-strong { font-weight: 600; }
.cell-sub { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-num { font-variant-numeric: tabular-nums; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.state.s-placed { color: var(--brand); }
.state.s-packed { color: #8a5a00; }
.state.s-dispatched, .state.s-rider_assigned, .state.s-picked_up { color: #1d5fbf; }
.state.s-delivered { color: var(--success); }
.state.s-cancelled, .state.s-issue { color: var(--danger); }
.state.s-awaiting_payment { color: var(--muted); }
.pay-due { color: var(--warn); }
.pay-ok { color: var(--success); }
.pay-bad { color: var(--danger); }
.row-action { justify-self: start; }
.expand { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); }
.expand .ic { transition: transform .15s; }
.orow.open .expand .ic { transform: rotate(180deg); }

/* Expanded order */
.odetail { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 24px; padding: 4px 16px 20px; background: #f5faf7; }
.odetail h3 { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.odetail p { margin-bottom: 4px; }
.odetail .link-row { display: flex; gap: 14px; margin-top: 8px; font-size: 13.5px; }
.odetail .link-row a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.items-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.items-table td { padding: 4px 0; vertical-align: top; }
.items-table td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.items-table tr.tot td { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }
.courier-line { display: grid; gap: 4px; font-size: 13.5px; }
.courier-line a { font-weight: 600; }
.econ { margin-top: 12px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.econ div { display: flex; justify-content: space-between; gap: 12px; }
.econ b { font-variant-numeric: tabular-nums; }
.econ .neg { color: var(--danger); }
.econ .pos { color: var(--success); }
.riders { display: grid; gap: 8px; margin-top: 4px; }
.rider-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-size: 13.5px; }
.rider-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.rider-opt input { accent-color: var(--brand); margin: 0; }
.rider-opt span { flex: 1; }
.rider-opt b { font-variant-numeric: tabular-nums; }
.detail-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 16px; }
.detail-actions .spacer { flex: 1; }
.empty-state { padding: 48px 16px; text-align: center; color: var(--muted); }

/* Settings */
.settings { margin-bottom: 16px; }
.set-section { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding: 24px; border-bottom: 1px solid var(--line); }
.set-intro h2 { font-size: 16px; margin-bottom: 6px; }
.set-intro p { font-size: 13.5px; line-height: 1.5; }
.set-fields { display: grid; gap: 16px; max-width: 560px; }
.set-fields.two { grid-template-columns: 1fr 1fr; max-width: none; }
.span-2 { grid-column: span 2; }
.hint-text { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 13.5px; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.set-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 16px 24px; }
.set-foot p:first-child { margin-right: auto; }

/* Report */
.report { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 20px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.stat b { display: block; margin-top: 6px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat p { margin-top: 4px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 1180px) {
  .orders-head { display: none; }
  .orow-main { grid-template-columns: 1fr auto 36px; grid-template-areas: 'id state expand' 'cust total total' 'items action action'; row-gap: 6px; }
  .c-id { grid-area: id; } .c-cust { grid-area: cust; } .c-items { grid-area: items; } .c-total { grid-area: total; justify-self: end; text-align: right; }
  .c-state { grid-area: state; } .c-action { grid-area: action; justify-self: end; } .expand { grid-area: expand; }
  .odetail { grid-template-columns: 1fr 1fr; }
  .report { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .staff-row { flex-wrap: wrap; height: auto; gap: 0 12px; padding-top: 10px; }
  .staff-nav { order: 5; flex-basis: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
  .staff-nav::-webkit-scrollbar { display: none; }
  .staff-nav .tab { height: 44px; flex: none; }
  .staff-search { flex: 1 1 100%; order: 3; }
  #refreshedAt { margin-left: 0; }
  .odetail { grid-template-columns: 1fr; }
  .set-section { grid-template-columns: 1fr; gap: 16px; padding: 20px 16px; }
  .set-fields.two { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .report { grid-template-columns: 1fr; }
}

/* Portal headers: the admin portal is dark so it is never mistaken for the vendor portal (green). */
.portal-admin .topbar { background: linear-gradient(180deg, #0b2418, #12301f); }
.portal-admin .tab.on { border-bottom-color: var(--brand-bright); }
.portal-admin .brand-sub { color: #7ee0a8; opacity: 1; }
.login-badge {
  justify-self: start; display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand);
  font-size: 12px; font-weight: 800; letter-spacing: .02em; margin-bottom: 4px;
}
.portal-admin .login-badge { background: #0b2418; color: #7ee0a8; }
.login-help { margin-top: 10px; }

/* Stock */
.stock-search { flex: 1 1 420px; max-width: 560px; }
.stock-panel { padding: 18px 20px; margin-bottom: 16px; }
.stock-panel h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.stock-panel > .muted { margin-top: 2px; }
.count-pill { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--canvas); font-size: 12.5px; font-weight: 800; }
.stock-list { margin-top: 10px; border-top: 1px solid var(--line); }
.stock-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stock-row:last-child { border-bottom: 0; }
.stock-name { min-width: 0; display: grid; }
.stock-name b { font-weight: 700; font-size: 14px; }
.stock-state { font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.stock-row.is-out .stock-name b { color: var(--ink-2); }

/* Vendors */
.share-panel { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding: 24px; margin-bottom: 16px; }
.links { display: grid; gap: 10px; align-content: start; }
.link-box { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); }
.link-box span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.link-box code { font-size: 13.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.panel-head { padding: 16px 20px 8px; }
.panel-head h2 { font-size: 16px; }
.user-row { display: grid; grid-template-columns: minmax(120px, 1fr) 110px 170px 250px; align-items: center; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--line); min-height: 52px; }
.user-head { font-size: 12.5px; font-weight: 600; color: var(--muted); border-top: 0; padding-top: 4px; }
.user-actions { display: flex; gap: 8px; justify-content: flex-end; }
.portal-tag { justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.portal-tag.admin { background: #0b2418; color: #7ee0a8; }
.portal-tag.vendor { background: var(--brand-tint); color: var(--brand); }

@media (max-width: 760px) {
  .share-panel { grid-template-columns: 1fr; gap: 16px; padding: 20px 16px; }
  .link-box { grid-template-columns: 1fr auto; }
  .link-box span { grid-column: 1 / -1; }
  .user-row { grid-template-columns: 1fr auto; padding: 12px 16px; }
  .user-head { display: none; }
  .user-row .muted.small { display: none; }
  .user-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .stock-row { grid-template-columns: 48px 1fr auto; }
  .stock-state { display: none; }
}

/* Customer's delivery preferences in an order */
.prefs { list-style: none; margin: 10px 0 0; padding: 10px 12px; display: grid; gap: 6px; border-radius: 10px; background: var(--warn-tint); color: var(--ink); font-size: 13px; }
.prefs li { display: flex; gap: 8px; align-items: flex-start; }
.prefs .ic { margin-top: 1px; color: var(--warn); }

/* Changing item quantities on a new order */
.item-edit { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item-name { min-width: 0; }
.item-name .was { display: block; font-size: 11.5px; color: var(--warn); font-weight: 600; }
.qstep { display: inline-flex; align-items: center; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; flex: none; }
.qstep b { min-width: 34px; padding: 0 2px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.qstep button { width: 28px; height: 100%; display: grid; place-items: center; color: #fff; border-radius: 8px; }
.qstep button:hover:not(:disabled) { background: var(--brand-hover); }
.qstep button:disabled { opacity: .4; cursor: not-allowed; }
.items-table tr.gone td { color: var(--muted); }
.items-table tr.gone .item-name { text-decoration: line-through; }
.items-table tr.gone .qstep { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.items-table tr.gone .qstep button { color: var(--brand); }
.items-table tr.gone .qstep button:hover:not(:disabled) { background: var(--brand-soft, #e8f5ee); }
.items-table .tot s { color: var(--muted); font-weight: 500; }
.items-table tr.refund td { color: var(--danger); font-weight: 700; }

/* ---------- Product photos ---------- */
.stock-photo { width: 48px; height: 48px; display: grid; place-items: center; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stock-photo img { width: 100%; height: 100%; object-fit: contain; }
.stock-photo .ic { width: 22px; height: 22px; color: var(--line-2); }
.stock-photo.none { border-style: dashed; border-color: var(--line-2); }
.stock-photo:hover { border-color: var(--brand); box-shadow: var(--focus); }
.more-btn { margin-top: 12px; }
dialog.photo-dlg { width: min(520px, calc(100% - 24px)); }
.ph-name { font-weight: 600; margin-bottom: 14px; }
.ph-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ph-compare figure { margin: 0; display: grid; gap: 6px; }
.ph-compare figcaption { font-size: 12.5px; color: var(--ink-2); text-align: center; }
.ph-tile { aspect-ratio: 1; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ph-tile img { width: 100%; height: 100%; object-fit: contain; }
.ph-new { border: 1.5px dashed var(--line-2); }
.ph-new:has(img) { border: 1.5px solid var(--brand); }
.ph-empty { padding: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.ph-notes { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fdf6e3; color: #6b4e00; font-size: 13px; }
.ph-tips { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.ph-tips summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.ph-tips ul { margin: 8px 0 0 18px; display: grid; gap: 4px; }
.ph-actions { display: flex; gap: 10px; margin-top: 16px; }
.ph-actions .btn { flex: 1; }
.ph-pick { cursor: pointer; }
.ph-more { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 12px; }
.link-btn { font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--brand); }

/* ---------- Seller portal ---------- */
.staff-nav .tab[hidden] { display: none; }
.signup-cta { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; justify-items: start; }
.signup-cta p { font-size: 14px; }
.free-badge { display: inline-flex; gap: .3em; flex-wrap: wrap; padding: 4px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-size: 12.5px; font-weight: 700; }
.signup-panel { max-width: 480px; }
.free-points { margin: 4px 0 18px; display: grid; gap: 8px; list-style: none; padding: 0; }
.free-points li { position: relative; padding-left: 24px; font-size: 14px; color: var(--ink-2); }
.free-points li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 9px; height: 5px; border: 2px solid var(--brand); border-top: 0; border-right: 0; transform: rotate(-45deg); }
.login-help .link-btn { font-size: inherit; }
.view-title { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-right: auto; }
.my-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mp-card { display: grid; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.mp-card.is-out { opacity: .7; }
.mp-photo { aspect-ratio: 1; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mp-photo img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.mp-photo .ic { width: 36%; height: 36%; color: var(--line-2); }
.mp-info { display: grid; gap: 2px; min-width: 0; }
.mp-info b { font-size: 14px; font-weight: 700; line-height: 1.3; }
.mp-price { font-weight: 800; font-size: 15px; margin-top: 4px; }
.mp-price s { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.mp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-actions .btn:first-child { flex-basis: 100%; }
.mp-actions .btn { flex: 1; }
.mp-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 56px 20px; text-align: center; background: var(--surface); border: 1.5px dashed var(--line-2); border-radius: 18px; }
.mp-empty-ic { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-tint); color: var(--brand); }
.mp-empty-ic .ic { width: 30px; height: 30px; }
.mp-empty h2 { font-size: 18px; font-weight: 800; }
.mp-empty p { max-width: 380px; }
.pd-form { display: grid; gap: 12px; }
.pd-photo-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; }
.pd-photo { cursor: pointer; }
.pd-photo .ph-empty .ic { width: 26px; height: 26px; color: var(--brand); }
.pd-photo-help { display: grid; gap: 4px; }
.pd-photo-help .ph-tips { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.seller-orders { display: grid; gap: 12px; }
.so-card { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 10px; }
.so-card header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.so-status { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--brand); }
.so-card ul { list-style: none; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.so-card li { display: flex; justify-content: space-between; gap: 12px; }
.so-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.so-card footer .pay-ok { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; }
.row-btns { display: flex; gap: 6px; }
.seller-row { grid-template-columns: minmax(0, 1.4fr) auto auto auto; }
.seller-by { display: block; font-size: 11.5px; color: var(--brand); font-weight: 600; }
@media (max-width: 560px) {
  .pd-photo-row { grid-template-columns: 110px 1fr; }
  .my-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mp-actions .btn { flex-basis: 100%; }
  .seller-row { grid-template-columns: 1fr; }
}

/* Stock left on product cards; admin product search */
.mp-left { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--green-700, #1a7f37); background: var(--green-50, #eef8f0); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.mp-left.low { color: #8a5a00; background: #fff6e0; }
.mp-left.out { color: #b42318; background: #fdecea; }
.mp-search { flex: 1 1 220px; max-width: 360px; }
.more-wrap { display: flex; justify-content: center; margin: 16px 0; }

/* ---------- Seller account: registration, home, earnings, account ---------- */
.su-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 4px 0 14px; counter-reset: su; flex-wrap: wrap; }
.su-steps li { counter-increment: su; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--canvas, #f6faf8); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 6px; }
.su-steps li::before { content: counter(su); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: 11px; margin-right: 6px; }
.su-steps li.on { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.su-steps li.on::before { background: var(--brand); color: #fff; }
.su-agree { align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.fee-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 20px 22px; margin-bottom: 16px;
  border-radius: 18px; background: #161a18; color: #dfe6e2; }
.fee-card h2 { color: #fff; font-size: 19px; margin: 0 0 4px; }
.fee-card p { margin: 0; max-width: 560px; }
.fee-card b { color: #5fe39a; }
.fee-card .btn-primary { background: #19b35d; color: #06210f; border-color: #19b35d; font-weight: 800; }
.my-products .fee-card { grid-column: 1 / -1; }
.sh-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sh-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.sh-stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sh-stat b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.sh-stat small { font-size: 12px; color: var(--muted); }
.sh-stat.hot { border-color: var(--brand); background: var(--brand-tint); }
.sh-stat.hot b { color: var(--brand); }
.sh-stat.warn b { color: #b42318; }
.sh-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.sh-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sh-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sh-check li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sh-check li > span:nth-child(2) { flex: 1; }
.sh-check li.done > span:nth-child(2) { color: var(--muted); text-decoration: line-through; }
.sh-tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2, #d3d9de); display: grid; place-items: center; flex: none; }
.sh-check li.done .sh-tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.sh-order { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sh-order:last-child { border-bottom: 0; }
.sh-order > div { display: grid; min-width: 0; }
.so-status.ok { color: var(--brand); background: var(--brand-tint); }
.so-status.bad { color: #b42318; background: #fdecea; }
.zero-pill { font-size: 12.5px; font-weight: 700; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 4px 12px; }
.earn-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr .8fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.earn-row > :last-child { text-align: right; }
.earn-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.earn-row.is-cancelled { opacity: .55; }
.earn-row.is-cancelled > :last-child { text-decoration: line-through; }
.acct-grid { display: grid; gap: 16px; }
.acct-grid .panel { margin: 0; }
.acct-grid form .btn { margin-top: 4px; }
.pay-bad { color: #b42318; font-weight: 600; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; align-self: flex-start; }
.tag.ok { color: var(--brand); background: var(--brand-tint); }
.tag.bad { color: #8a5a00; background: #fff6e0; }
.seller-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; background: #fff; display: grid; gap: 10px; }
.sc-top { display: flex; justify-content: space-between; gap: 12px; }
.sc-money { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sc-money span { display: grid; background: var(--canvas, #f6faf8); border-radius: 10px; padding: 8px 10px; }
.sc-money small { font-size: 11.5px; color: var(--muted); }
.sc-money b { font-size: 15px; }
.sc-money b.due { color: var(--brand); }
.sc-pay { margin: 0; }
@media (max-width: 640px) {
  .sc-money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .earn-row { grid-template-columns: 1fr 1fr; }
  .earn-head { display: none; }
}
@media (min-width: 760px) {
  .sh-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #earnStats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.sh-panel, .acct-grid .panel, #earnView .panel { padding: 0 20px 18px; }
.sh-panel .panel-head, .acct-grid .panel-head, #earnView .panel-head { padding: 16px 0 10px; }
#earnView > .panel { margin-top: 0; }

/* Product form: optional details for the shop's product page */
.pd-more { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 4px 0 8px; }
.pd-more summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.pd-more[open] summary { margin-bottom: 8px; }
.pd-more textarea.input { height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; resize: vertical; font: inherit; }
#productDlg .modal-body { max-height: calc(100dvh - 90px); overflow-y: auto; }
