/* سمین — ظاهر بخش‌های جدید (گردش کار، خودرو، بودجه، گزارش‌ها) */
@font-face {
    font-family: 'VazirFD';
    src: url('../fonts/vazir/Vazir-Regular-FD.woff2') format('woff2'), url('../fonts/vazir/Vazir-Regular-FD.woff') format('woff');
    font-weight: 400;
}
@font-face {
    font-family: 'VazirFD';
    src: url('../fonts/vazir/Vazir-Medium-FD.woff2') format('woff2'), url('../fonts/vazir/Vazir-Medium-FD.woff') format('woff');
    font-weight: 500;
}
@font-face {
    font-family: 'VazirFD';
    src: url('../fonts/vazir/Vazir-Bold-FD.woff2') format('woff2'), url('../fonts/vazir/Vazir-Bold-FD.woff') format('woff');
    font-weight: 700;
}

:root {
    --s-bg: #f3f5f9;
    --s-card: #ffffff;
    --s-ink: #1f2937;
    --s-muted: #6b7280;
    --s-line: #e5e7eb;
    --s-primary: #1d4ed8;
    --s-primary-soft: #e8efff;
    --s-ok: #059669;
    --s-ok-soft: #e7f7f0;
    --s-warn: #d97706;
    --s-warn-soft: #fff6e6;
    --s-bad: #dc2626;
    --s-bad-soft: #fdecec;
    --s-radius: 14px;
    --s-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .06);
}

.samin {
    font-family: 'VazirFD', 'Vazir', Tahoma, sans-serif;
    font-size: 13.5px;
    color: var(--s-ink);
    padding: 10px 0 40px;
}
.samin input, .samin select, .samin textarea, .samin button { font-family: inherit; }
.samin .num-sep, .samin [dir=ltr] { font-family: 'VazirFD', Tahoma, sans-serif; }

/* --- سربرگ صفحه --- */
.s-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin: 6px 0 18px;
}
.s-head h1 { font-size: 20px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.s-head h1 .ic {
    width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center;
    background: var(--s-primary-soft); color: var(--s-primary); font-size: 18px;
}
.s-head .sub { color: var(--s-muted); font-size: 12.5px; margin-top: 2px; }

/* --- کارت --- */
.s-card {
    background: var(--s-card); border: 1px solid var(--s-line); border-radius: var(--s-radius);
    box-shadow: var(--s-shadow); padding: 18px; margin-bottom: 16px;
}
.s-card > h3, .s-card .s-card-title {
    font-size: 15px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px;
}
.s-card .s-card-title i { color: var(--s-primary); }

/* --- کارت موضوع‌ها (انتخاب نوع درخواست) --- */
.s-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.s-type {
    display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--s-radius);
    background: #fff; border: 1px solid var(--s-line); box-shadow: var(--s-shadow); color: var(--s-ink);
    text-decoration: none !important; transition: transform .15s, box-shadow .15s, border-color .15s;
    position: relative; overflow: hidden;
}
.s-type:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16, 24, 40, .12); border-color: var(--tc, #1d4ed8); color: var(--s-ink); }
.s-type .ic {
    width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
    color: var(--tc, #1d4ed8); background: color-mix(in srgb, var(--tc, #1d4ed8) 12%, white);
}
.s-type b { font-size: 15px; }
.s-type small { color: var(--s-muted); line-height: 1.7; }
.s-type::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--tc, #1d4ed8); opacity: .8;
}

/* --- انتخاب کالا --- */
.s-search { position: relative; }
.s-search input { padding-right: 38px; border-radius: 12px; height: 42px; }
.s-search i { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--s-muted); }
.s-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.s-chip {
    border: 1px solid var(--s-line); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12.5px;
    cursor: pointer; color: var(--s-ink); transition: all .15s;
}
.s-chip.active, .s-chip:hover { background: var(--s-primary); border-color: var(--s-primary); color: #fff; }
.s-materials { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; max-height: 470px; overflow: auto; padding: 2px; }
.s-mat {
    border: 1px solid var(--s-line); border-radius: 12px; padding: 12px; background: #fff; cursor: pointer;
    display: flex; flex-direction: column; gap: 4px; transition: all .15s; user-select: none; position: relative;
}
.s-mat:hover { border-color: var(--s-primary); background: var(--s-primary-soft); }
.s-mat b { font-size: 13.5px; }
.s-mat small { color: var(--s-muted); font-size: 11.5px; }
.s-mat .stock { font-size: 11px; }
.s-mat.in-cart { border-color: var(--s-ok); background: var(--s-ok-soft); }
.s-mat .badge-qty {
    position: absolute; top: 8px; left: 8px; background: var(--s-ok); color: #fff; border-radius: 999px;
    min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 11.5px; padding: 0 6px;
}

/* --- سبد --- */
.s-cart-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--s-line); }
.s-cart-row:last-child { border-bottom: 0; }
.s-cart-row .name { flex: 1; font-weight: 500; }
.s-step { display: inline-flex; align-items: center; border: 1px solid var(--s-line); border-radius: 10px; overflow: hidden; }
.s-step button { border: 0; background: #f8fafc; width: 30px; height: 32px; font-size: 15px; }
.s-step button:hover { background: var(--s-primary-soft); }
.s-step input { width: 58px; border: 0; text-align: center; height: 32px; outline: 0; }
.s-empty { text-align: center; color: var(--s-muted); padding: 28px 10px; }
.s-empty i { font-size: 34px; opacity: .35; display: block; margin-bottom: 8px; }

/* --- فرم --- */
.samin .form-control, .samin .form-select { border-radius: 10px; min-height: 40px; }
.samin .form-control-sm, .samin .form-select-sm { min-height: 32px; border-radius: 8px; font-size: 12.5px; }
.samin .form-label { font-weight: 500; font-size: 12.5px; color: #374151; margin-bottom: 5px; }
.samin .btn { border-radius: 10px; padding: 8px 16px; font-weight: 500; }
.samin .btn-lg { padding: 11px 22px; font-size: 15px; }

/* --- وضعیت و مراحل --- */
.s-steps { display: flex; gap: 0; margin: 4px 0 6px; overflow-x: auto; padding-bottom: 4px; }
.s-stp { flex: 1; min-width: 120px; text-align: center; position: relative; padding-top: 34px; font-size: 12px; }
.s-stp::before {
    content: ''; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--s-line); z-index: 0;
}
.s-stp:first-child::before { display: none; }
.s-stp .dot {
    position: absolute; top: 2px; right: calc(50% - 14px); width: 28px; height: 28px; border-radius: 50%;
    background: #fff; border: 3px solid var(--s-line); z-index: 1; display: grid; place-items: center; font-size: 11px; color: var(--s-muted);
}
.s-stp.done .dot { background: var(--s-ok); border-color: var(--s-ok); color: #fff; }
.s-stp.done::before { background: var(--s-ok); }
.s-stp.now .dot { border-color: var(--s-warn); color: var(--s-warn); box-shadow: 0 0 0 5px var(--s-warn-soft); }
.s-stp.bad .dot { background: var(--s-bad); border-color: var(--s-bad); color: #fff; }
.s-stp b { display: block; font-weight: 500; }
.s-stp small { color: var(--s-muted); display: block; line-height: 1.6; }

.s-timeline { list-style: none; padding: 0; margin: 0; }
.s-timeline li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f2f4; }
.s-timeline li:last-child { border-bottom: 0; }
.s-timeline .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.s-timeline .meta { color: var(--s-muted); font-size: 12px; }

/* --- جدول --- */
.s-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.s-table th { background: #f8fafc; font-weight: 500; color: #4b5563; font-size: 12.5px; padding: 10px; border-bottom: 1px solid var(--s-line); white-space: nowrap; }
.s-table td { padding: 10px; border-bottom: 1px solid #f1f2f4; vertical-align: middle; }
.s-table tr:hover td { background: #fafbff; }
.s-table .num { text-align: left; direction: ltr; white-space: nowrap; }
.s-table tfoot td { font-weight: 700; background: #f8fafc; }
.s-row-link { cursor: pointer; }

/* --- آمار --- */
.s-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.s-stat { background: #fff; border: 1px solid var(--s-line); border-radius: var(--s-radius); padding: 14px 16px; box-shadow: var(--s-shadow); }
.s-stat .lbl { color: var(--s-muted); font-size: 12px; }
.s-stat .val { font-size: 20px; font-weight: 700; margin-top: 4px; direction: ltr; text-align: right; }
.s-stat .val small { font-size: 12px; font-weight: 400; color: var(--s-muted); }
.s-stat.ok .val { color: var(--s-ok); }
.s-stat.bad .val { color: var(--s-bad); }
.s-stat.warn .val { color: var(--s-warn); }

.s-bar { height: 8px; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.s-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--s-ok); }
.s-bar.warn > span { background: var(--s-warn); }
.s-bar.bad > span { background: var(--s-bad); }

/* --- خودرو: انتخاب --- */
.s-vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.s-veh {
    border: 2px solid var(--s-line); border-radius: 12px; padding: 12px; cursor: pointer; background: #fff;
    display: flex; gap: 10px; align-items: flex-start; transition: all .15s;
}
.s-veh .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.s-veh.free:hover { border-color: var(--s-ok); }
.s-veh.info { cursor: default; }
.s-veh.info.free:hover { border-color: var(--s-line); }
.s-veh.selected { border-color: var(--s-ok); background: var(--s-ok-soft); }
.s-veh.busy { opacity: .55; cursor: not-allowed; background: #fafafa; }
.s-veh .st { font-size: 11.5px; }

/* --- خودرو: جدول زمانی --- */
.s-gantt { border: 1px solid var(--s-line); border-radius: 12px; overflow: hidden; background: #fff; }
.s-gantt-scroll { overflow-x: auto; }
.s-gantt-inner { min-width: 900px; }
.s-g-head, .s-g-row { display: flex; }
.s-g-head { background: #f8fafc; border-bottom: 1px solid var(--s-line); font-size: 11.5px; color: var(--s-muted); }
.s-g-label { width: 190px; flex-shrink: 0; padding: 10px 12px; border-left: 1px solid var(--s-line); background: #fff; position: sticky; right: 0; z-index: 2; }
.s-g-head .s-g-label { background: #f8fafc; }
.s-g-track { flex: 1; position: relative; min-height: 54px; }
.s-g-hours { flex: 1; display: flex; }
.s-g-hours span { flex: 1; text-align: center; padding: 8px 0; border-left: 1px dashed #e9ecf1; }
.s-g-row { border-bottom: 1px solid #f1f2f4; }
.s-g-row:last-child { border-bottom: 0; }
.s-g-grid { position: absolute; inset: 0; display: flex; pointer-events: none; }
.s-g-grid span { flex: 1; border-left: 1px dashed #f0f2f5; }
.s-g-block {
    position: absolute; top: 8px; bottom: 8px; border-radius: 8px; padding: 3px 8px; font-size: 11px; color: #fff;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); cursor: pointer; z-index: 1;
}
.s-g-block.pending {
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .25) 0 6px, transparent 6px 12px);
    opacity: .75; border: 1px dashed rgba(0, 0, 0, .25);
}
.s-g-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--s-bad); z-index: 3; }
.s-g-now::before { content: ''; position: absolute; top: -3px; right: -4px; width: 10px; height: 10px; background: var(--s-bad); border-radius: 50%; }
.s-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--s-muted); }
.s-legend span::before { content: ''; display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-left: 5px; vertical-align: middle; background: var(--c, #999); }

/* --- اعلان --- */
.samin-toasts { position: fixed; bottom: 22px; left: 22px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.samin-toast {
    font-family: 'VazirFD', Tahoma; min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: 12px; color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2); transform: translateY(20px); opacity: 0; transition: all .25s; font-size: 13px; line-height: 1.8;
}
.samin-toast.show { transform: none; opacity: 1; }
.samin-toast-success { background: #047857; }
.samin-toast-error { background: #b91c1c; }
.samin-toast-info { background: #1e40af; }

/* --- گزارش --- */
.s-crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; }
.s-crumbs a { cursor: pointer; color: var(--s-primary); }
.s-crumbs .sep { color: var(--s-muted); }
.s-chart-box { position: relative; height: 340px; }
.s-chart-box.tall { height: 420px; }
.s-hint { color: var(--s-muted); font-size: 12px; }

.s-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.s-tabs a { padding: 7px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--s-line); color: var(--s-ink); text-decoration: none; font-size: 13px; }
.s-tabs a.active { background: var(--s-primary); color: #fff; border-color: var(--s-primary); }

@media print {
    #header, #footer, .no-print { display: none !important; }
    .s-card { box-shadow: none; border: 1px solid #ccc; }
}

/* --- گفتگوی تیکت --- */
.s-chat { display: flex; flex-direction: column; gap: 12px; }
.s-msg { max-width: 82%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--s-line); }
.s-msg.user { align-self: flex-start; background: #fff; border-top-right-radius: 4px; }
.s-msg.admin { align-self: flex-end; background: var(--s-primary-soft); border-color: #cddcff; border-top-left-radius: 4px; }
.s-msg .meta { font-size: 11.5px; color: var(--s-muted); margin-bottom: 6px; }
.s-msg .body { line-height: 1.9; }

/* ===================================================================
   پوسته عمومی سامانه (سربرگ، منوی کناری، فوتر) — روی همه صفحات
   =================================================================== */
body:has(> #header), body:has(#header) { background: var(--s-bg) !important; }
#header { box-shadow: 0 2px 10px rgba(15, 23, 42, .18); }
.custom-navbar {
    background: linear-gradient(100deg, #0f1f45 0%, #1e3a8a 55%, #1d4ed8 100%) !important;
    border-bottom: 0 !important;
    padding-top: 6px; padding-bottom: 6px;
}
.custom-navbar .navbar-nav .nav-link { font-size: 14px !important; opacity: .95; }
.custom-navbar .navbar-nav .nav-link:hover { color: #fff !important; opacity: 1; transform: none !important; }
.custom-navbar .brand-title { font-size: 17px; letter-spacing: -.2px; }
.custom-navbar .brand-version { font-size: 11px; opacity: .7; }
.custom-navbar2 { background: #fff !important; border-bottom: 1px solid var(--s-line) !important; }
.custom-navbar2 .navbar-nav .nav-link { font-size: 14px !important; color: #1e3a8a !important; border-radius: 8px; }
.custom-navbar2 .navbar-nav .nav-link:hover { background: var(--s-primary-soft); transform: none !important; }
.custom-dropdown { border: 1px solid var(--s-line) !important; border-radius: 12px !important; box-shadow: 0 12px 30px rgba(15, 23, 42, .15) !important; padding: 6px !important; }
.custom-dropdown .dropdown-item { border-radius: 8px; padding: 7px 12px; font-family: 'VazirFD', Vazir, Tahoma; font-size: 13px; }
.custom-dropdown .dropdown-item:hover { background: var(--s-primary-soft); }
#footer {
    background: #0f1f45 !important; border-top: 0 !important; padding: 10px 0 !important; font-size: 12.5px !important;
}
#footer div { font-weight: 500 !important; }

/* فاصله محتوا از سربرگ ثابت (مقدار دقیق با JS تنظیم می‌شود) */
main > .s-container { padding: 120px 16px 24px; }

/* ---------- منوی کناری ---------- */
.s-layout-row { flex-wrap: nowrap; }
.s-side-col { padding: 0; }
.s-main-col { min-width: 0; }
.s-side {
    position: sticky; top: var(--s-header-h, 80px); width: 228px; max-height: calc(100vh - var(--s-header-h, 80px) - 16px);
    overflow-y: auto; background: #fff; border: 1px solid var(--s-line); border-radius: 16px; box-shadow: var(--s-shadow);
    padding: 8px; margin-left: 14px; transition: width .2s; font-family: 'VazirFD', Vazir, Tahoma;
    scrollbar-width: thin;
}
.s-side-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.s-side-home {
    flex: 1; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: #1f2937 !important;
    text-decoration: none !important; font-weight: 700; font-size: 13.5px;
}
.s-side-home:hover, .s-side-home.active { background: var(--s-primary-soft); color: var(--s-primary) !important; }
.s-side-toggle { border: 0; background: #f1f5f9; width: 34px; height: 34px; border-radius: 10px; color: #475569; flex-shrink: 0; }
.s-side-toggle:hover { background: var(--s-primary-soft); color: var(--s-primary); }
.s-side-group { margin-bottom: 2px; }
.s-side-head {
    width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 9px 12px;
    border-radius: 10px; color: #334155; font-size: 13.5px; font-weight: 600; text-align: right; font-family: inherit;
}
.s-side-head:hover { background: #f8fafc; }
.s-side-head .ic { width: 22px; text-align: center; color: #64748b; font-size: 15px; }
.s-side-head .lbl { flex: 1; }
.s-side-head .caret { font-size: 10px; color: #94a3b8; transition: transform .2s; }
.s-side-head:not(.collapsed) .caret { transform: rotate(180deg); }
.s-side-group.is-active > .s-side-head { color: var(--s-primary); }
.s-side-group.is-active > .s-side-head .ic { color: var(--s-primary); }
.s-side-links { padding: 2px 8px 6px 0; margin-right: 22px; border-right: 2px solid #eef2f7; }
.s-side-link {
    display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: #475569 !important;
    text-decoration: none !important; font-size: 13px; margin: 1px 0;
}
.s-side-link i { width: 18px; text-align: center; color: #94a3b8; font-size: 12.5px; }
.s-side-link:hover { background: #f1f5f9; color: #0f172a !important; }
.s-side-link.active { background: var(--s-primary); color: #fff !important; box-shadow: 0 4px 12px rgba(29, 78, 216, .25); }
.s-side-link.active i { color: #fff; }
/* حالت جمع‌شده: فقط آیکن */
body.s-side-mini .s-side { width: 64px; padding: 8px 6px; }
body.s-side-mini .s-side .lbl, body.s-side-mini .s-side .caret, body.s-side-mini .s-side .collapse { display: none !important; }
body.s-side-mini .s-side-top { flex-direction: column; }
body.s-side-mini .s-side-home, body.s-side-mini .s-side-head { justify-content: center; padding: 10px 0; }
body.s-side-mini .s-side-toggle i { transform: rotate(180deg); }

/* کارت‌ها و جدول‌های صفحات قدیمی کمی هماهنگ‌تر */
.card.shadow, .card.p-1.shadow { border-radius: 14px !important; border: 1px solid var(--s-line) !important; box-shadow: var(--s-shadow) !important; }
.page-title { font-family: 'VazirFD', Vazir; font-weight: 700; color: #1e293b; }

/* --- کارتابل: روشن وقتی پر است --- */
@keyframes s-pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .55); } 70% { box-shadow: 0 0 0 14px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
@keyframes s-pulse-red { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .6); } 70% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } }
.s-inbox-card { position: relative; overflow: hidden; transition: transform .15s; }
.s-inbox-card .state { font-size: 12px; margin-top: 6px; }
.s-inbox-card.off { background: #f8fafc; border-style: dashed; }
.s-inbox-card.off .val, .s-inbox-card.off .lbl, .s-inbox-card.off .state { color: #94a3b8 !important; }
.s-inbox-card.on {
    background: linear-gradient(135deg, #fff7e6, #ffe4b3); border-color: #f59e0b; animation: s-pulse 2s infinite;
}
.s-inbox-card.on .val { color: #b45309 !important; font-size: 26px; }
.s-inbox-card.on .lbl, .s-inbox-card.on .state { color: #92400e !important; font-weight: 600; }
.s-inbox-card.on:hover { transform: translateY(-2px); }
.s-bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .55); font-size: 16px; }
.s-bell.on { background: #f59e0b; color: #fff; animation: s-pulse 2s infinite; }
.s-bell b { position: absolute; top: -6px; left: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: #dc2626; color: #fff; font-size: 11px; display: grid; place-items: center; border: 2px solid #1e3a8a; }
.s-side-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #dc2626; color: #fff; font-size: 11px; display: inline-grid; place-items: center; margin-right: auto; }
.s-side-badge.pulse { animation: s-pulse-red 1.8s infinite; }
.s-side-link .s-side-badge { margin-right: auto; }
.s-side-link.active .s-side-badge { background: #fff; color: var(--s-primary); }
body.s-side-mini .s-side-head { position: relative; }
body.s-side-mini .s-side-head .s-side-badge { position: absolute; top: 2px; left: 4px; }

/* --- نمایش رمز --- */
.s-pw-wrap { position: relative; }
.s-pw-wrap input { padding-left: 44px !important; }
.s-pw-btn {
    position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 8px;
    background: transparent; color: #94a3b8; display: grid; place-items: center; font-size: 15px; transition: all .15s;
}
.s-pw-btn:hover { background: #f1f5f9; color: #334155; }
.s-pw-btn.on { color: var(--s-primary); background: var(--s-primary-soft); }
.s-pw-rules { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #94a3b8; }
.s-pw-rules li i { font-size: 7px; vertical-align: middle; margin-left: 4px; }
.s-pw-rules li.ok { color: var(--s-ok); }
.s-pw-rules li.ok i::before { content: '\f00c'; font-size: 10px; }

/* ===================================================================
   جدول‌ها (GridView قدیمی و kartik) — یکدست و خواناتر
   =================================================================== */
.grid-view, .kv-grid-container { font-family: 'VazirFD', Vazir, Tahoma; }
.kv-grid-container, .grid-view .table-responsive {
    border: 1px solid var(--s-line); border-radius: 14px; overflow: auto; background: #fff;
}
.kv-grid-table, .grid-view table.table { margin-bottom: 0 !important; border-collapse: separate !important; border-spacing: 0; font-size: 13px; }
.kv-grid-table.table-bordered, .grid-view .table-bordered { border: 0 !important; }
.kv-grid-table thead th, .grid-view table.table thead th {
    background: #f1f5fd !important; color: #1e3a8a !important; font-weight: 700; font-size: 12.5px;
    border: 0 !important; border-bottom: 2px solid #dbe4f5 !important; padding: 11px 10px !important;
    position: sticky; top: 0; z-index: 2; white-space: nowrap; vertical-align: middle;
}
.kv-grid-table thead th a, .grid-view table.table thead th a { color: #1e3a8a !important; }
.kv-grid-table thead th:hover, .grid-view table.table thead th:hover { background: #e6edfb !important; color: #1e3a8a !important; }
.kv-grid-table thead th a:hover { color: var(--s-primary) !important; }
.fixed-width-btns-header { background: #f1f5fd !important; color: #1e3a8a !important; }
.kv-grid-table td, .grid-view table.table td {
    border: 0 !important; border-bottom: 1px solid #eef1f6 !important; padding: 9px 10px !important; vertical-align: middle !important;
}
tr.custom-odd-row td { background-color: #fbfcfe !important; }
tr.custom-white-row td { background-color: #ffffff !important; }
.kv-grid-table tbody tr:hover td, .grid-view table.table tbody tr:hover td { background-color: #f3f7ff !important; }
.kv-grid-table tbody tr:last-child td { border-bottom: 0 !important; }
.kv-page-summary td, .kv-grid-table tfoot td { background: #fff8e6 !important; font-weight: 700; border-top: 2px solid #fde3a7 !important; }
.grid-view .summary, .kv-grid-container + .summary, .summary { font-size: 12px; color: var(--s-muted); margin: 6px 4px; }
.grid-view .pagination, .pagination { gap: 4px; }
.pagination .page-link { border-radius: 8px !important; border-color: var(--s-line); color: #334155; min-width: 34px; text-align: center; }
.pagination .page-item.active .page-link { background: var(--s-primary); border-color: var(--s-primary); color: #fff; }

/* دکمه‌های عملیات ردیف (نمایش / ویرایش / حذف / ...) */
.pjxbtn {
    width: 32px !important; height: 32px !important; margin: 0 2px !important; padding: 0 !important; border-radius: 9px !important;
    border: 1px solid transparent !important; background: #f4f6fa !important; display: inline-grid !important; place-items: center;
    transition: all .15s; vertical-align: middle;
}
.pjxbtn:hover { background: #fff !important; border-color: var(--s-line) !important; box-shadow: 0 3px 10px rgba(15, 23, 42, .1); transform: translateY(-1px); }
.pjxbtn i, .pjxbtn span { font-size: 14px !important; }
.pjxView, .pjxView span { color: #475569 !important; }
.pjxUpdate span, .pjxUpdate i { color: #2563eb !important; }
.pjxDelete span, .pjxDelete i { color: #dc2626 !important; }
.pjxDelete:hover { background: #fdecec !important; }
.pjxReset i { color: #b45309 !important; }
.pjxReset:hover { background: #fff6e6 !important; }
.fixed-width-btns { white-space: nowrap; }

/* سربرگ صفحه‌ها و پنل جستجو */
.page-title {
    font-size: 16px; padding: 4px 2px 10px; display: flex; align-items: center; gap: 8px;
}
.page-title::before { content: ''; width: 4px; height: 18px; border-radius: 4px; background: var(--s-primary); display: inline-block; }
.card.p-1.shadow { padding: 14px !important; }
.card.p-1.shadow .form-control, .card.p-1.shadow .form-select, .grid-view .form-control { border-radius: 10px; }
.iconabtnsrch, .iconabtnadd {
    border-radius: 12px !important; border: 1px solid var(--s-line) !important; background: #fff !important;
    box-shadow: var(--s-shadow); transition: all .15s;
}
.iconabtnsrch:hover, .iconabtnadd:hover { border-color: var(--s-primary) !important; transform: translateY(-1px); }

/* پنل kartik (گزارش‌ها) */
.kv-panel-before, .kv-panel-after { background: #fff; border: 0 !important; padding: 10px 12px !important; }
.card.border-primary { border-color: var(--s-line) !important; border-radius: 16px !important; overflow: hidden; box-shadow: var(--s-shadow); }
.card.border-primary > .card-header.bg-primary, .card > .card-header.text-bg-primary {
    background: linear-gradient(100deg, #1e3a8a, #1d4ed8) !important; border: 0; padding: 12px 16px;
}

/* ===================================================================
   گزارش‌ساز
   =================================================================== */
.s-rhead {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    background: linear-gradient(100deg, #0f1f45, #1e3a8a 60%, #1d4ed8); color: #fff; border-radius: 18px; padding: 18px 20px; margin-bottom: 16px;
    box-shadow: 0 10px 30px rgba(30, 58, 138, .25);
}
.s-rhead-main { display: flex; align-items: center; gap: 14px; }
.s-rhead-ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; font-size: 22px; }
.s-rhead h1 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.s-rhead-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; opacity: .85; }
.s-rhead-meta i { margin-left: 4px; }
.s-rhead-actions .btn-light { background: rgba(255, 255, 255, .14); border: 0; color: #fff; }
.s-rhead-actions .btn-light:hover { background: rgba(255, 255, 255, .25); color: #fff; }
.s-rtool { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.s-rtool-filter { position: relative; }
.s-rtool-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--s-line); border-radius: 12px; background: #fafbfd; }
.s-rtool-group .form-select-sm { width: auto; min-height: 32px; }
.s-rtool-lbl { font-size: 12px; color: var(--s-muted); font-weight: 600; }
.s-rtool-end { display: flex; gap: 8px; margin-right: auto; }
.s-rchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.s-rchip { background: var(--s-primary-soft); color: #1e3a8a; border-radius: 999px; padding: 4px 12px; font-size: 12px; text-decoration: none; }
.s-rchip.clear { background: #fdecec; color: #b91c1c; }
.report-run .kv-panel-before { display: flex; justify-content: flex-end; }
.report-run .card.border-primary { border: 0 !important; box-shadow: none; border-radius: 0 !important; }
.s-rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.s-rcard { background: #fff; border: 1px solid var(--s-line); border-radius: 16px; box-shadow: var(--s-shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; border-top: 4px solid var(--rc); }
.s-rcard:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15, 23, 42, .12); }
.s-rcard-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; color: var(--s-ink) !important; text-decoration: none !important; flex: 1; }
.s-rcard-body .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--rc); background: color-mix(in srgb, var(--rc) 12%, white); font-size: 18px; margin-bottom: 4px; }
.s-rcard-body b { font-size: 15px; }
.s-rcard-body small { color: var(--s-muted); font-size: 12px; }
.s-rcard-body small i { margin-left: 4px; }
.s-rcard-actions { display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid #f1f2f4; background: #fafbfd; }
.s-rcard-actions .btn-primary { margin-left: auto; }
/* فرم گزارش‌ساز */
.report-form .card { border-radius: 16px !important; border: 1px solid var(--s-line) !important; box-shadow: var(--s-shadow) !important; overflow: hidden; }
.report-form .card-header.bg-primary, .report-form .card-header.bg-info { background: linear-gradient(100deg, #1e3a8a, #1d4ed8) !important; border: 0; padding: 12px 16px; }
.report-form #fields-body tr:hover td { background: #f6f9ff; }
.report-form #fields-body code { color: #7c3aed; background: #f5f3ff; padding: 2px 6px; border-radius: 6px; }
.report-form thead th { background: #f1f5fd !important; color: #1e3a8a; font-size: 12.5px; position: sticky; top: 0; }
#filterModal .modal-content, #fullScreenModal .modal-content { border-radius: 16px; overflow: hidden; border: 0; }
#filterModal .modal-header { background: linear-gradient(100deg, #1e3a8a, #1d4ed8) !important; color: #fff; }
#filterModal .filter-label { font-size: 12.5px; color: #334155; }

/* --- فاکتور ورودی --- */
.s-inv-total { background: linear-gradient(135deg, #0d9488, #0f766e); color: #fff; border-radius: 14px; padding: 10px 14px; text-align: center; }
.s-inv-total small { display: block; opacity: .85; font-size: 12px; }
.s-inv-total b { font-size: 22px; direction: ltr; display: inline-block; }
.s-inv-total span { font-size: 12px; opacity: .85; }
.s-inv-table td { vertical-align: middle; }
.s-inv-table .r-price { text-align: center; }
@keyframes s-flash { from { background: #fff4c2; } to { background: transparent; } }
.s-inv-table tr.s-flash td { animation: s-flash 1.2s ease-out; }

/* --- رفع بریده شدن منوی «دریافت خروجی» و منوهای داخل جدول --- */
.s-report-gridcard, .report-run .card.border-primary, .report-run .kv-panel-before, .report-run .grid-view { overflow: visible !important; }
.kv-panel-before .dropdown-menu, .grid-view .dropdown-menu, .btn-group .dropdown-menu { z-index: 1080 !important; max-height: 70vh; overflow-y: auto; }
.kv-panel-before .dropdown-menu .dropdown-item, .kv-panel-before .dropdown-menu li a { font-family: 'VazirFD', Vazir, Tahoma; font-size: 13px; padding: 7px 14px; }

/* --- نوار ابزار kartik (همه موارد، ستون‌ها، خروجی) --- */
.kv-panel-before .btn, .kv-grid-toolbar .btn, .grid-view .btn-toolbar .btn {
    border-radius: 10px !important; font-size: 13px; padding: 6px 12px; border: 1px solid var(--s-line) !important; background: #fff; color: #334155;
}
.kv-panel-before .btn:hover, .kv-grid-toolbar .btn:hover { background: var(--s-primary-soft); color: var(--s-primary); }
.kv-panel-before .btn-warning { background: #f59e0b !important; border-color: #f59e0b !important; color: #fff !important; }
.kv-panel-before .btn-default.dropdown-toggle, .kv-panel-before .btn-secondary { background: #fff !important; }

/* --- برچسب وضعیت (فعال / غیرفعال / محبوب / عادی) به‌صورت قرص --- */
.kv-grid-table td span.fa-circle, .kv-grid-table td span.fas.fa-circle, .grid-view td span.fa-circle {
    font-family: 'VazirFD', Vazir, Tahoma !important; font-weight: 600 !important; font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px 3px 9px; border-radius: 99px; background: #eef2f7; white-space: nowrap;
}
.kv-grid-table td span.fa-circle::before, .grid-view td span.fa-circle::before { font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 7px; }
.kv-grid-table td span.fa-circle[style*="green"], .grid-view td span.fa-circle[style*="green"] { background: #e7f7f0; color: #047857 !important; }
.kv-grid-table td span.fa-circle[style*="red"], .grid-view td span.fa-circle[style*="red"] { background: #fdecec; color: #b91c1c !important; }

/* ستون ردیف و کد کم‌رنگ‌تر */
.kv-grid-table td.kv-align-center:first-child, .kv-grid-table td:first-child { color: #94a3b8; font-size: 12px; }
.kv-grid-table tbody td { color: #1f2937; }

/* دکمه‌های عملیات کاربر: رنگ مخصوص هر کار */
.pjxCreateUser i { color: #059669 !important; }
.pjxCreateUser:hover { background: #e7f7f0 !important; }
.pjxResetPass i { color: #b45309 !important; }
.pjxResetPass:hover { background: #fff6e6 !important; }
.pjxDeleteUser { background: #fdf2f2 !important; }
.pjxDeleteUser i { color: #dc2626 !important; }
.pjxDeleteUser:hover { background: #fdecec !important; }
.pjxRoles i, .pjxRoles { color: #7c3aed !important; }
.pjxbtn[disabled], .pjxbtn.disabled { opacity: .35; }
