/* SB-Scaffolding additions on top of the shared kit (style.css) */
.top b { font-size: 1.05rem; }
.top .out { background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 8px; padding: 3px 8px; cursor: pointer; margin-inline-start: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.stat { background: #fff; border: 1px solid #e3e8ef; border-radius: 14px; padding: 10px; text-align: center; cursor: default; }
.stat .s-ico { font-size: 1.5rem; display: block; }
.stat b { display: block; font-size: 1.35rem; direction: ltr; }
.stat small { color: #667085; }
.stat.warn { background: #fff8ec; border-color: #fedf89; }
.tile-badge { background: #d92d20; color: #fff; border-radius: 999px; padding: 0 8px; font-size: .8rem; font-weight: 700; }
.search { margin-bottom: 8px; font-size: 1.05rem; padding: 12px; }
.pick { display: grid; gap: 8px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid #e3e8ef; background: #fff; font: inherit; text-align: right; cursor: pointer; width: 100%; }
.pick-row:hover, .pick-row:focus-visible { border-color: #0b3fa8; background: #f5f8ff; }
.pick-row.add { border-style: dashed; border-color: #0b3fa8; color: #0b3fa8; font-weight: 700; justify-content: center; }
.pick-ico { font-size: 1.7rem; flex: none; }
.pick-main { flex: 1; min-width: 0; }
.pick-main b { display: block; }
.pick-main small { color: #667085; }
.pick-end { flex: none; text-align: left; font-weight: 700; direction: ltr; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.money::after { content: " ج.م"; font-size: .8em; color: #667085; }
.itemrow { background: #fff; border: 1.5px solid #e3e8ef; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.itemrow.on { border-color: #12805c; background: #f1fbf4; }
.itemrow .ir-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.itemrow .ir-top small { color: #667085; }
.itemrow .ir-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.cnt { display: inline-flex; align-items: center; gap: 4px; }
.cnt button { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid #0b3fa8; background: #fff; color: #0b3fa8; font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.cnt input { width: 80px; text-align: center; font-size: 1.15rem; font-weight: 700; padding: 8px 4px; direction: ltr; }
.cnt-lbl { display: block; font-size: .8rem; color: #475467; text-align: center; }
.rate { display: inline-flex; align-items: center; gap: 4px; }
.rate input { width: 90px; direction: ltr; text-align: center; }
.seg { display: inline-flex; border: 1.5px solid #cfd8e3; border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 10px; cursor: pointer; font: inherit; }
.seg button.on { background: #0b3fa8; color: #fff; font-weight: 700; }
.cond { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.cond > div { background: #f8fafc; border-radius: 12px; padding: 6px 2px; text-align: center; }
.cond .cnt button { width: 34px; height: 34px; font-size: 1.1rem; }
.cond .cnt input { width: 48px; font-size: 1rem; padding: 6px 2px; }
.cond .c-ico { font-size: 1.3rem; }
@media (max-width: 480px) { .cond { grid-template-columns: 1fr 1fr; } }
.bigbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; margin-top: 14px; border: 0; border-radius: 14px; background: #0b3fa8; color: #fff; font: inherit; font-size: 1.15rem; font-weight: 800; cursor: pointer; }
.bigbtn.green { background: #067647; } .bigbtn.alt { background: #fff; color: #0b3fa8; border: 1.5px solid #0b3fa8; }
.bigbtn:disabled { opacity: .45; cursor: not-allowed; }
.bigbtn .b-ico { font-size: 1.5rem; }
.hint { background: #f2f6ff; border-radius: 12px; padding: 10px 12px; color: #1d3a7a; margin: 0 0 10px; }
.hint::before { content: "👈 "; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: 7px 6px; border-bottom: 1px solid #eef1f5; text-align: right; }
.tbl th { background: #f5f7fa; font-weight: 700; color: #344054; }
.tbl td.n, .tbl th.n { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
.tbl tr.tap { cursor: pointer; } .tbl tr.tap:hover { background: #f5f8ff; }
.scroll { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.actions .btn { width: auto; margin: 0; }
.pill.warn { background: #fff4e5; color: #93370d; } .pill.blue { background: #e8efff; color: #0b3fa8; }
.sum { display: flex; justify-content: space-between; padding: 6px 0; } .sum.big { font-size: 1.2rem; font-weight: 800; border-top: 2px solid #10203a; margin-top: 4px; padding-top: 8px; }
.login { max-width: 420px; margin: 30px auto; text-align: center; }
.login .logo { font-size: 3.5rem; }
.login input { text-align: center; font-size: 1.3rem; direction: ltr; }
/* ---- printable documents ---- */
.print-layer { position: fixed; inset: 0; background: #e9edf3; z-index: 80; overflow: auto; padding: 12px; }
.print-bar { position: sticky; top: 0; display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.print-bar .btn { width: auto; margin: 0; }
.doc { background: #fff; width: 210mm; max-width: 100%; min-height: 270mm; margin: 0 auto; padding: 14mm 12mm; box-shadow: 0 2px 10px rgba(0,0,0,.1); color: #111; font-size: 12.5px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #0b3fa8; padding-bottom: 8px; margin-bottom: 10px; }
.doc-head h1 { margin: 0; font-size: 20px; color: #0b3fa8; }
.doc-head .co small { display: block; color: #475467; }
.doc-title { text-align: left; }
.doc-title h2 { margin: 0; font-size: 22px; }
.doc-title .no { font-size: 15px; font-weight: 800; direction: ltr; }
.doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; background: #f5f7fa; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.doc-meta span { color: #475467; }
.doc .tbl { font-size: 12px; } .doc .tbl th { background: #0b3fa8; color: #fff; }
.doc-tot { width: 50%; margin-inline-start: auto; margin-top: 8px; }
.doc-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; text-align: center; }
.doc-sign div { border-top: 1px solid #98a2b3; padding-top: 4px; color: #475467; }
.doc-terms { margin-top: 14px; font-size: 11px; color: #475467; }
.doc-terms li { margin: 2px 0; }
.doc-foot { margin-top: 18px; text-align: center; font-size: 10px; color: #98a2b3; }
@media print {
  @page { size: A4; margin: 0; }
  body > *:not(.print-layer) { display: none !important; }
  .print-layer { position: static; padding: 0; background: #fff; overflow: visible; }
  .print-bar { display: none; }
  .doc { box-shadow: none; width: auto; min-height: 0; }
}
.pop-wide { width: min(640px, 100%); text-align: right; max-height: 90vh; overflow: auto; }
.capbar { display: flex; border-radius: 12px; overflow: hidden; margin: 6px 0; font-weight: 700; font-size: .85rem; }
.capbar span { padding: 8px 10px; white-space: nowrap; overflow: hidden; }
.cap-co { background: #0b3fa8; color: #fff; flex: 0 0 50%; } .cap-inv { background: #12b76a; color: #fff; flex: 1; }
.doc.letter { font-size: 15px; line-height: 2; } .doc.letter p { margin: 6px 0; } .doc .center { text-align: center; }
.actions .btn.sm { white-space: nowrap; }
.gap { height: 8px; } .login input { text-align: center; }
/* ---- quotation ---- */
.doc.quote { padding: 10mm 10mm 0; font-size: 11.5px; display: flex; flex-direction: column; }
.q-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.q-logo { height: 90px; width: auto; }
.q-co { font-size: 20px; font-weight: 800; color: #0b3fa8; }
.q-title { font-size: 16px; font-weight: 800; color: #0b3fa8; text-decoration: underline; flex: 1; text-align: center; }
.q-info { width: 100%; border-collapse: collapse; border: 1.5px solid #222; margin-bottom: 4px; }
.q-info td { padding: 3px 6px; border-bottom: 1px solid #ddd; }
.q-info .qk { font-weight: 700; width: 14%; white-space: nowrap; } .q-info .qv { width: 36%; }
.q-lead { font-weight: 700; margin: 4px 0; }
.q-tbl { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.q-tbl th { background: #d9e2f3; color: #111; border: 1px solid #333; padding: 4px; font-size: 10.5px; }
.q-tbl td { border: 1px solid #333; padding: 3px 5px; }
.q-tbl td.n { text-align: end; direction: ltr; font-variant-numeric: tabular-nums; } .q-tbl td.c { text-align: center; }
.q-sum td { font-weight: 700; text-align: center; } .q-sum td.n { text-align: end; }
.q-grand td { background: #eef2fb; font-size: 12.5px; }
.q-ch { width: 60%; }
.q-terms { columns: 1; }
.q-sec h4 { display: inline-block; margin: 8px 0 2px; padding: 1px 8px; background: #e7e7e7; text-decoration: underline; font-size: 11.5px; }
.q-sec ul { margin: 2px 0; padding-inline-start: 16px; } .q-sec li { margin: 1px 0; line-height: 1.45; }
.q-sign { display: flex; justify-content: space-between; align-items: flex-end; margin: 10px 0 8px; }
.q-sign p { margin: 2px 0; } .q-role { font-weight: 800; color: #0b3fa8; }
.q-blank { display: inline-block; min-width: 170px; border-bottom: 1px dotted #555; height: 14px; vertical-align: bottom; }
.q-stamp { width: 130px; height: 80px; border: 2px dashed #9aa7bd; border-radius: 10px; display: grid; place-items: center; color: #9aa7bd; font-weight: 700; }
.q-foot { margin: auto -10mm 0; background: #2f8fd1; color: #fff; display: flex; flex-wrap: wrap; gap: 6px 26px; padding: 8px 10mm; font-size: 10.5px; }
.q-foot div { display: flex; flex-direction: column; } .q-foot b { font-size: 11.5px; }
.doc.quote.en { font-family: Arial, sans-serif; }
@media print { .doc.quote { min-height: 297mm; } }
.termrow { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid #eef1f5; font-size: .92rem; } .termrow input { width: auto; margin-top: 4px; }
.grid3 { display: grid; grid-template-columns: 1fr 2fr 1.3fr; gap: 6px; margin: 4px 0; }
@media (max-width: 480px) { .grid3 { grid-template-columns: 1fr; } }
.logo-prev { max-height: 70px; display: block; margin-bottom: 6px; }
textarea { width: 100%; font: inherit; padding: 8px; border: 1.5px solid #cfd8e3; border-radius: 10px; }
