/* ==========================================================================
 | LIST KIT — کیتِ مشترکِ صفحه‌های فهرستیِ پنلِ تأمین‌کننده   (پیشوند: il-)
 |==========================================================================
 | یک منبع برای ظاهرِ صفحه‌هایی مثلِ «استعلام‌های جاری/محدود/علاقه‌مندی/کارفرما»
 | و «پرداخت‌های انجام شده». صفحه‌ها استایل/اسکریپتِ اختصاصی نمی‌نویسند:
 |
 |   pageCSS : @include('partials.list-kit.styles')
 |   pageJS  : @include('partials.list-kit.scripts')
 |   هدر     : @include('partials.list-kit.header', [...])
 |   صفحه‌بندی: @include('partials.list-kit.pager', ['paginator' => $x, 'unit' => '...'])
 |
 | ساختار:
 |   <div class="il-page">
 |     هدر (il-header)  →  il-notice (اختیاری)
 |     <div class="il-card il-card-list">
 |       <div class="il-card-head"> <h2>…</h2> <div class="il-toolbar">…</div> </div>
 |       <div class="il-table-wrap"><table class="il-table">…</table></div>   یا .il-empty
 |       il-pager
 |     </div>
 |   </div>
 |
 | افزونه‌های مخصوصِ یک ماژول (مثلاً inquiry-list.css) بعد از این فایل لود می‌شوند
 | و فقط اجزای خاصِ خودشان را اضافه/بازنویسی می‌کنند.
 |========================================================================= */

.il-page {
    padding: 4px 2px 20px;
}

.il-page [hidden],
.il-modal [hidden] { display: none !important; }

/* ---------------------------------------------------------------- هدر */
.il-header {
    background: rgba(0, 181, 255, .089);
    border-radius: 20px;
    padding: 22px 26px;
    color: #000;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.il-header h1 {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 700;
    color: #000;
}
.il-header p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
}
.il-today {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dbf2fb;
    border-radius: 10px;
    padding: 3px 12px;
}
.il-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.il-stat {
    background: #fff;
    border: 1px solid #e1eef5;
    border-radius: 14px;
    padding: 10px 16px;
    min-width: 108px;
    text-align: center;
    color: #000;
}
.il-stat b {
    display: block;
    font-size: 20px;
    line-height: 1.3;
}
.il-stat span {
    font-size: 12px;
}
a.il-stat-link {
    color: #000;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
a.il-stat-link:hover,
a.il-stat-link:focus {
    color: #000;
    text-decoration: none;
    border-color: #9fd9f2;
    transform: translateY(-2px);
}

/* کادرِ برجسته (زرد) — il-stat-limited در صفحه‌های استعلام، il-stat-highlight برای بقیه */
a.il-stat-limited,
a.il-stat-limited:hover,
a.il-stat-limited:focus,
a.il-stat-highlight,
a.il-stat-highlight:hover,
a.il-stat-highlight:focus {
    color: #000;
    background: #efbf25;
    border-color: #efbf25;
}
a.il-stat-limited span,
a.il-stat-highlight span { font-weight: 600; }

.il-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff8e6;
    border: 1px solid #ffe2a8;
    border-right: 4px solid #f0a500;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #5c4400;
    font-size: 13px;
    line-height: 1.8;
}
.il-notice i { color: #f0a500; font-size: 17px; margin-top: 3px; }
.il-notice a { font-weight: 700; }

/* ---------------------------------------------------------------- کارت */
.il-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
    margin-bottom: 18px;
    overflow: hidden;
}
.il-card-head {
    background: #f8f9ff;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.il-card-head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}
.il-card-head h2 i { color: #4365ff; }

.il-card-open { overflow: visible; }
.il-card-open > .il-card-head { border-radius: 18px 18px 0 0; }
.il-count {
    background: #e7ebff;
    color: #1d2b8f;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.il-card-body { padding: 16px 18px; }

/* ---------------------------------------------------------------- فرم */
.il-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px 14px;
    align-items: end;
}
.il-field-wide { grid-column: span 2; }
.il-field-full { grid-column: 1 / -1; }

.il-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.il-flags .il-toggle { width: auto; flex: 0 1 auto; }
.il-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 12.5px;
}
.il-label i { color: #8a96c9; }
.il-input,
.il-select {
    width: 100%;
    min-height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 7px 12px;
    font-size: 13px;
    background: #f8f9fa;
    color: #2c3e50;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.il-input:focus,
.il-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, .12);
    outline: none;
    background: #fff;
}
.il-range {
    display: grid;
    grid-template-columns: 124px 1fr 1fr;
    gap: 6px;
}
.il-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 14px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #2c3e50;
    width: 100%;
    margin: 0;
}
.il-toggle input { margin: 0; accent-color: #4365ff; width: 16px; height: 16px; }
.il-toggle i { color: #2196F3; }
.il-toggle.is-on { border-color: #4365ff; background: #eef2ff; }
.il-toolbar .il-toggle { width: auto; min-height: 34px; padding: 4px 12px; border-radius: 10px; font-size: 12.5px; }

/* ---------------------------------------------------------------- دکمه */
.il-btn {
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12.5px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.il-btn:hover,
.il-btn:focus { text-decoration: none; transform: translateY(-1px); }
.il-btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 9px; }
.il-btn-light { background: #fff; color: #6c757d; border: 2px solid #dee2e6; }
.il-btn-light:hover { background: #6c757d; color: #fff; }
.il-btn-primary { background: linear-gradient(135deg, #405fe9 0%, #0067ff 100%); color: #fff; box-shadow: 0 4px 12px rgba(67, 101, 255, .25); }
.il-btn-primary:hover { color: #fff; }
.il-btn-success { background: linear-gradient(135deg, #00b894 0%, #00a085 100%); color: #fff; }
.il-btn-success:hover { color: #fff; }
.il-btn-warning { background: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%); color: #fff; }
.il-btn-warning:hover { color: #fff; }
.il-btn-muted { background: #8d8d8d; color: #fff; }
.il-btn-muted:hover { color: #fff; }
.il-btn-block { width: 100%; }

.il-filters-toggle { display: none; }

.il-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.il-toolbar .il-select {
    width: auto;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12.5px;
}
.il-toolbar form { margin: 0; }

/* ---------------------------------------------------------------- جدول */
.il-card-list { overflow: visible; }
.il-card-list > .il-card-head { border-radius: 18px 18px 0 0; }
.il-card-list > .il-pager { border-radius: 0 0 18px 18px; }
.il-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
}
.il-table {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    font-size: 12.5px;
    margin: 0;
}

.il-page .il-table td { max-width: none; min-width: 0; overflow: visible; }
.il-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f1f4ff;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
    padding: 10px 8px;
    border-bottom: 2px solid #d9dffb;
    border-left: 1px solid #e9ecef;
    white-space: nowrap;
}
.il-table thead th:last-child { border-left: none; }
.il-table thead th.is-sortable { cursor: pointer; user-select: none; }
.il-table thead th.is-sortable:hover { background: #e6ebff; }
.il-table thead th .fa { margin-right: 4px; opacity: .45; }
.il-table thead th.is-sorted .fa { opacity: 1; color: #4365ff; }

.il-table tbody td {
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
    border-left: 1px solid #f1f3f4;
    background: #fff;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.il-table tbody td:last-child { border-left: none; }
.il-table tbody tr:nth-child(even) td { background: #fafbff; }
.il-table tbody tr:hover td { background: #eef3ff; }

.il-table thead th:first-child,
.il-table tbody td:first-child {
    position: sticky;
    right: 0;
    box-shadow: inset 2px 0 0 #dfe4f5;
}
.il-table tbody td:first-child { z-index: 1; }
.il-table thead th:first-child { z-index: 3; }

.il-desc {
    text-align: right !important;
    line-height: 1.8;
}
.il-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
/* شناسه/کد/عدد لاتین (شماره تراکنش، کد پیگیری و ...) داخلِ متنِ راست‌به‌چپ */
.il-ltr {
    direction: ltr;
    unicode-bidi: plaintext;
    font-size: 11.5px;
    color: #475569;
}
.il-amount { font-weight: 700; color: #1f2937; white-space: nowrap; }
.il-sub { display: block; margin-top: 2px; font-size: 11px; color: #8a94a6; font-weight: normal; }

/* ---------------------------------------------------------------- برچسب وضعیت */
.il-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.7;
    white-space: nowrap;
}
.il-badge-success { background: #dcfce7; color: #166534; }
.il-badge-danger  { background: #fee2e2; color: #b91c1c; }
.il-badge-warning { background: #fef3c7; color: #92400e; }
.il-badge-info    { background: #e0f2fe; color: #075985; }
.il-badge-muted   { background: #e5e7eb; color: #4b5563; }
.il-badge-lg { padding: 3px 12px; font-size: 12px; }

.il-muted { color: #8a94a6; }

.il-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
}
.il-empty i {
    display: block;
    font-size: 40px;
    color: #cbd3da;
    margin-bottom: 8px;
}
.il-empty .il-btn { margin-top: 12px; }

/* ---------------------------------------------------------------- صفحه‌بندی */
.il-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 18px;
    background: #f8f9ff;
    border-top: 1px solid #e9ecef;
    font-size: 12.5px;
}
.il-pager-info { color: #4a5568; }
.il-pager-info strong { color: #4365ff; }
.il-pages {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.il-pages li > a,
.il-pages li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background: #fff;
    color: #2c3e50;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all .2s ease;
}
.il-pages li > a:hover { background: #eef2ff; color: #4365ff; border-color: #c7d2fe; }
.il-pages li.active > span {
    background: linear-gradient(135deg, #405fe9 0%, #0067ff 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(67, 101, 255, .25);
}
.il-pages li.disabled > span { background: #f1f3f5; color: #adb5bd; border-color: #e9ecef; }

/* ---------------------------------------------------------------- واکنش‌گرا */
@media (max-width: 991px) {
    .il-field-wide { grid-column: auto; }
}

@media (max-width: 767px) {
    .il-header { padding: 18px; border-radius: 16px; }
    .il-header h1 { font-size: 18px; }
    .il-stats { width: 100%; }
    .il-stat { flex: 1 1 calc(33.33% - 10px); min-width: 0; padding: 8px 6px; }
    .il-stat b { font-size: 17px; }
    .il-card-body { padding: 12px; }
    .il-filters-toggle { display: inline-flex; }
    .il-filters-panel { display: none; }
    .il-filters-panel.is-open { display: block; }
    .il-filters { grid-template-columns: 1fr; }
    .il-range { grid-template-columns: 1fr 1fr; }
    .il-range select { grid-column: span 2; }
    .il-toolbar { width: 100%; }
    .il-toolbar .il-select { flex: 1 1 auto; }
    .il-pager { justify-content: center; padding: 12px; }
}
