/* =============================================================
   DOODLY — Dynamic B2B Pricing Management (b2b-pricing.css)
   Token-driven; matches the admin surface. Prefix: .bp-
   ============================================================= */
.bp { display: flex; flex-direction: column; gap: 4px; }

/* header: mini stats + run tests */
.bp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bp-mini { display: flex; gap: 10px; flex-wrap: wrap; }
.bp-ms { background: var(--surface, #fff); border: 1px solid var(--line, #e7ece9); border-radius: 12px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 96px; }
.bp-ms b { font-family: var(--font-display, "Fraunces", serif); font-size: 1.35rem; color: var(--forest, #0F3D2E); line-height: 1.1; }
.bp-ms span { font-size: .72rem; color: var(--ink-3, #6b7b73); }
.bp-headbtns { display: flex; align-items: center; gap: 8px; }

/* picker row */
.bp-pickrow { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.bp-pf { display: flex; flex-direction: column; gap: 4px; }
.bp-pf > span { font-size: .74rem; font-weight: 600; color: var(--ink-3, #6b7b73); }
.bp-pf .input { min-width: 220px; }
.bp-pickactions { margin-left: auto; display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

/* pricing table */
.bp-tbl td { vertical-align: top; }
.bp-cust { color: var(--leaf-600, #178a52); }
.bp-save-pct { color: var(--leaf-600, #178a52); font-weight: 600; }
.bp-slabhint { font-size: .7rem; color: var(--leaf-600, #178a52); margin-top: 2px; }
.bp-editrow td { background: var(--mint-soft, #E4F6EC); }
.bp-ip { font-weight: 600; }

.bp-warn { background: #fff7e6; border: 1px solid #f0d28a; color: #7a5b00; border-radius: 12px; padding: 10px 14px; font-size: .85rem; margin-bottom: 12px; }
.bp-restrict { max-width: 460px; }

/* slab editor */
.bp-slabbox { background: var(--mint-soft, #E4F6EC); border: 1px solid var(--line, #e7ece9); border-radius: 12px; padding: 14px; }
.bp-slabh { font-size: .85rem; margin: 0 0 10px; color: var(--ink-2, #3c4a43); }
.bp-slabrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bp-slabrow span { color: var(--ink-3, #6b7b73); font-size: .85rem; }
.bp-slabactions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }

/* bulk checkboxes */
.bp-chkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 8px; }
.bp-chk { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.bp-f { display: flex; flex-direction: column; gap: 4px; }
.bp-f > span { font-size: .74rem; font-weight: 600; color: var(--ink-3, #6b7b73); }

.bp-schedlist { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.bp-srow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface, #fff); border: 1px solid var(--line, #e7ece9); border-radius: 10px; font-size: .85rem; }

.bp-impok, .bp-impmsg .bp-impok { margin-top: 10px; background: var(--mint-soft, #E4F6EC); border: 1px solid var(--leaf, #1FAE66); border-radius: 10px; padding: 8px 12px; font-size: .85rem; }

/* toggle labels (settings) */
.bp-toggle-l { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 10px; cursor: pointer; }

/* customer preview card */
.bp-custcard { margin-top: 14px; border: 1px solid var(--leaf, #1FAE66); border-radius: 14px; overflow: hidden; }
.bp-custhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--mint-soft, #E4F6EC); }

/* reuse exp-* helpers from expenses.css where present; provide fallbacks */
.bp .exp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 820px) { .bp .exp-grid2 { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .bp-pickactions { margin-left: 0; width: 100%; }
  .bp-pf .input { min-width: 0; width: 100%; }
  .bp-pf { width: 100%; }
}
@media print {
  .bp-head, .exp-tabs, .bp-pickrow, .exp-rephead button, .bp-headbtns { display: none !important; }
}

/* ---- B2B create-order pricing add-ons (rendered by b2b.js) ---- */
.b2-pricenote { background: var(--mint-soft, #E4F6EC); border: 1px solid var(--line, #e7ece9); border-radius: 10px; padding: 8px 12px; font-size: .8rem; color: var(--ink-2, #3c4a43); margin-bottom: 12px; }
.b2-basep { font-size: .74rem; color: var(--ink-3, #6b7b73); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.b2-reason { flex: 1 1 100%; display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.b2-reason > span, .b2-reason { font-size: .72rem; }
.b2-creditwarn { color: var(--danger, #c0392b); font-size: .8rem; font-weight: 600; margin-top: 6px; }
.b2-priceprev { display: flex; flex-direction: column; gap: 4px; }
.b2-pprow { display: flex; align-items: center; gap: 8px; font-size: .85rem; padding: 4px 0; border-bottom: 1px dashed var(--line, #e7ece9); }
.b2-pprow span:first-child { flex: 1; }
