/* لیست قیمت‌ها و پیش‌فاکتور */
body.pl main.w { max-width: 1500px; }
.pl .lcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pl .lcard { background: #fff; border: 0; border-radius: 20px; padding: 22px; color: inherit; display: block; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.05); transition: transform .2s, box-shadow .2s; }
.pl .lcard:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,.12); text-decoration: none; }
.pl .lcard b { font-size: 18px; display: block; margin-bottom: 6px; color: #1d1d1f; }
.pl .lock { background: #fff8e6; border: 0; color: #8a5a00; padding: 12px 18px; border-radius: 14px; margin-bottom: 14px; }

/* خود لیست */
#lst .pg { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
#lst .tx { flex: 0 0 100%; font-size: 20px; font-weight: bold; margin: 4px 0; }
#lst .unit { display: flex; flex-direction: column; gap: 3px; max-width: 100%; }
#lst .unit > .cap { font-weight: bold; }
#lst .tw { overflow-x: auto; max-width: 100%; }
#lst table.sheet { width: auto; border-collapse: collapse; table-layout: fixed; background: #fff; }
#lst table.sheet td { border: 1px solid #6b7280; padding: 3px 6px; font-size: 14px; line-height: 1.5; text-align: center; overflow: hidden; word-break: break-word; }
#lst table.sheet td.v { border: none; background: transparent; }
#lst table.sheet td.g { border: none; background: transparent; }
#lst table.sheet td.rd { background: #bbf7d0; }
#lst table.sheet td.rs { background: #fecaca; }
#lst table.sheet td.pk { cursor: pointer; }
#lst table.sheet td.pk:hover { outline: 2px solid #0071e3; outline-offset: -2px; background: #eaf3ff; }
#lst table.sheet td.picked { background: #a8d0ff !important; font-weight: bold; }
#lst.locked table.sheet td.pk { cursor: not-allowed; }
#lst.locked table.sheet td.pk:hover { outline: none; background: inherit; }
#lst .hint { color: #6b7a8c; font-size: 13px; margin-bottom: 8px; }
#lst table.sheet.lk { border-collapse: separate; border-spacing: 0; border: 0 solid var(--lc, #6b7280); border-radius: var(--lr, 0px); overflow: hidden; }
#lst table.sheet.lk td { border: 0 solid var(--lc, #6b7280); }
#lst table.sheet.lk td.v { border: none; }
#lst table.sheet.lk-all { border-top-width: var(--lw, 1px); border-left-width: var(--lw, 1px); }
#lst table.sheet.lk-all td { border-right-width: var(--lw, 1px); border-bottom-width: var(--lw, 1px); }
#lst table.sheet.lk-h { border-top-width: var(--lw, 1px); }
#lst table.sheet.lk-h td { border-bottom-width: var(--lw, 1px); }
#lst table.sheet.lk-v { border-left-width: var(--lw, 1px); }
#lst table.sheet.lk-v td { border-right-width: var(--lw, 1px); }
#lst table.sheet.lk-frame { border-width: var(--lw, 1px); }
#lst table.sheet.lk-none td { border-width: 0; }

/* دکمه‌ی شناور پیش‌فاکتور */
#mlFab { position: fixed; left: 16px; bottom: 16px; z-index: 50; background: #0071e3; color: #fff; border: 0; border-radius: 980px; padding: 13px 22px; font: inherit; font-weight: 600; box-shadow: 0 8px 28px rgba(0,113,227,.4); cursor: pointer; }
#mlFab b { background: #fff; color: #0071e3; border-radius: 12px; padding: 0 8px; margin-right: 6px; }
#mlToast { position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); background: rgba(29,29,31,.92); color: #fff; padding: 10px 18px; border-radius: 14px; z-index: 100; font-size: 14px; display: none; max-width: 90vw; text-align: center; }

/* پنجره‌ی پیش‌فاکتور */
#mlInv { display: none; position: fixed; inset: 0; z-index: 70; background: #f5f5f7; overflow: auto; }
#mlInv.open { display: block; }
#mlInv .bar2 { position: sticky; top: 0; z-index: 3; background: rgba(255,255,255,.8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,.08); padding: 10px 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#mlInv .bar2 b { margin-left: auto; font-size: 16px; }
#mlInv .bar2 button { padding: 7px 12px; font-size: 14px; }
#mlInv .bar2 button.sec { background: rgba(0,0,0,.06); color: #1d1d1f; }
#mlInv .bar2 button.gr { background: #248a3d; }
#mlInv .bar2 button.rd { background: #ff3b30; }
#mlInv .paper { max-width: 980px; margin: 14px auto; background: #fff; border: 0; border-radius: 20px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.06); }
#mlInv input, #mlInv textarea { width: auto; font: inherit; }
#mlInv .top { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 8px; align-items: center; }
#mlHead { width: 100% !important; text-align: center; font-size: 26px; font-weight: bold; border: 1px dashed transparent; background: transparent; padding: 4px; }
#mlHead:hover, #mlHead:focus { border-color: #9ca3af; }
#mlInv .nobox { justify-self: start; border: 1px solid #9ca3af; border-radius: 6px; padding: 4px 8px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
#mlInv .nobox div { display: flex; gap: 4px; align-items: center; }
#mlInv .nobox label { margin: 0; font-weight: bold; white-space: nowrap; font-size: 13px; }
#mlInv .nobox input { width: 105px; text-align: center; padding: 2px; border: none; border-bottom: 1px solid #c5d2e3; border-radius: 0; background: transparent; }
#mlInv .nobox button { padding: 0 6px; font-size: 12px; }
#mlInv .party { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
#mlInv .party label { margin: 0; font-weight: bold; white-space: nowrap; }
#mlInv .party input { flex: 1; width: auto; }
#mlInv .twrap { overflow-x: auto; margin-top: 10px; }
#mlInv table.mlt { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; }
#mlInv table.mlt th, #mlInv table.mlt td { border: 1px solid #6b7280; padding: 3px 4px; font-size: 14px; text-align: center; }
#mlInv table.mlt th { background: #e5e7eb; }
#mlInv table.mlt td.d { text-align: right; }
#mlInv table.mlt td input, #mlInv table.mlt td textarea { width: 100%; border: 1px solid transparent; background: transparent; padding: 2px; text-align: center; border-radius: 4px; }
#mlInv table.mlt td textarea { text-align: right; resize: none; min-height: 24px; overflow: hidden; field-sizing: content; }
#mlInv table.mlt td input:focus, #mlInv table.mlt td textarea:focus { outline: 2px solid #0071e3; background: #fef9c3; }
#mlInv table.mlt td button.x { background: #fee2e2; color: #b91c1c; padding: 0 7px; border-radius: 4px; }
#mlInv table.mlt tfoot td { font-weight: bold; background: #f9fafb; }
#mlInv table.mlt tfoot td.l { text-align: left; }
#mlInv table.mlt tr.fin td { background: #dbeafe; }
#mlInv td.notes { vertical-align: top; background: #fff !important; font-weight: normal !important; text-align: right; }
#mlInv td.notes textarea { width: 100%; min-height: 110px; border: 1px solid #d1d5db; border-radius: 6px; font-weight: normal; text-align: right; }
#mlInv .ftw { display: flex; align-items: center; gap: 4px; }
#mlInv .ftw .sg { font-size: 18px; width: 14px; text-align: center; }
#mlInv .ftw input.pc { width: 38px !important; flex: none; text-align: center; border: 1px solid #9ca3af; background: #fff; border-radius: 4px; }
#mlInv .ftw input.lb { flex: 1; min-width: 0; width: auto !important; border: 1px solid #d1d5db; background: #fff; border-radius: 4px; padding: 1px 4px; text-align: right; font-weight: normal; font-size: 12px; }
#mlInv td.v input { font-weight: bold; }
#mlInv td.v input[readonly] { background: transparent; }
#mlInv td.v input:not([readonly]) { border: 1px solid #9ca3af !important; background: #fff !important; }
#mlInv .dAll { display: flex; gap: 2px; justify-content: center; margin-top: 2px; }
#mlInv .dAll input { width: 34px !important; padding: 1px; font-size: 12px; border: 1px solid #9ca3af; background: #fff; text-align: center; }
#mlInv .dAll button { padding: 0 5px; font-size: 12px; }
#mlInv .empty { padding: 26px; text-align: center; color: #6b7a8c; }
/* پیش‌نمایش چاپ */
#mlPrev { display: none; position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.5); }
#mlPrev.open { display: flex; flex-direction: column; padding: 10px; }
#mlPrev .pbar { background: #fff; border-radius: 8px 8px 0 0; padding: 8px 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#mlPrev .pbar button { padding: 6px 12px; font-size: 14px; }
#mlPrev .pbar button.on { background: #0071e3; }
#mlPrev .pbar button.sec { background: rgba(0,0,0,.06); color: #1d1d1f; }
#mlPrev .pbar button.gr { background: #248a3d; }
#mlPrev .pinfo { background: #fff; padding: 0 12px 6px; font-size: 13px; color: #374151; }
#mlPrev .pstage { flex: 1; overflow: auto; background: #9ca3af; padding: 14px; border-radius: 0 0 8px 8px; }
#mlPrev .pwrap { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.4); direction: ltr; }
#mlPrev iframe { position: absolute; left: 0; top: 0; border: none; transform-origin: 0 0; background: #fff; }

/* ورودی‌ها: قاعده‌ی عمومی سایت (td input {min-width:90px}) کادرها را بزرگ‌تر از ستون می‌کرد */
#mlInv input, #mlInv textarea { min-width: 0 !important; }
#mlInv .ftw input.pc { width: 44px !important; }

/* فونت جدول لیست‌ها ثابت می‌ماند تا عرض ستون‌ها و ظاهر لیست‌ها تغییر نکند */
#lst table.sheet { font-family: Tahoma, "Segoe UI", sans-serif; }

/* صفحه‌ی ویرایش قیمت مسئول */
.ed { background: #fff; border-radius: 14px; overflow: hidden; }
.ed td, .ed th { padding: 8px 12px; border-bottom: 1px solid #ececf0; }
.ed input { box-sizing: border-box; width: 150px; max-width: 100%; text-align: center; border-radius: 10px; padding: 8px; }
.ed input.ch { background: #fff8d6; border-color: #e0b100; }
.ed tr.cap td { background: #f5f5f7; font-weight: 700; }
.ed td.cur { white-space: nowrap; text-align: center; color: #6e6e73; }
#q { width: 100%; max-width: 380px; }
.sbar { position: sticky; bottom: 0; background: rgba(245,245,247,.85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid rgba(0,0,0,.08); padding: 12px 0; margin-top: 12px; }

/* صفحه‌ی اصلی: عنوان، تب‌های لیست و بخش لیست مازاد */
.pl .hero { text-align: center; padding: 26px 0 6px; }
.pl .hero h1 { font-size: 44px; letter-spacing: -.03em; margin: 0 0 10px; }
.pl .hero p { font-size: 18px; color: #6e6e73; max-width: 640px; margin: 0 auto; }
.pl .lsearch { display: block; max-width: 420px; margin: 22px auto 0; text-align: center; border-radius: 980px; background: rgba(0,0,0,.05); border-color: transparent; }
.pl .tabs { display: flex; flex-wrap: wrap; gap: 8px 6px; margin: 22px 0 28px; border-bottom: 1px solid #d2d2d7; }
.pl .tab { position: relative; display: inline-block; padding: 11px 26px 10px; background: #e8e8ed; color: #1d1d1f; border: 1px solid transparent; border-bottom: 0; border-radius: 14px 14px 0 0; font-weight: 500; margin-bottom: -1px; transition: background .15s; }
.pl .tab:hover { background: #fff; border-color: #d2d2d7; text-decoration: none; }
.pl .tab.on { background: #f5f5f7; border-color: #d2d2d7; font-weight: 700; padding-bottom: 11px; }
.pl .tab.off { opacity: .5; }
.pl .tab::after { content: attr(data-tip); position: absolute; top: calc(100% + 10px); right: 50%; transform: translateX(50%); white-space: pre-line; background: rgba(29,29,31,.94); color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.8; padding: 8px 16px; border-radius: 12px; min-width: 160px; text-align: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s; z-index: 30; }
.pl .tab:hover::after { opacity: 1; visibility: visible; }
@media (max-width: 600px) { .pl .hero h1 { font-size: 32px; } .pl .hero p { font-size: 16px; } }
body.pl.home main.w { max-width: 1000px; }
.pl .mfoot { margin-top: 64px; padding-top: 16px; border-top: 1px solid #d2d2d7; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: #6e6e73; font-size: 14px; }
.pl .mfoot b { color: #1d1d1f; font-weight: 600; }
