/* ========== CRM Pagination ========== */
.crm-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
    padding: 10px 0;
}

.crm-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}

.crm-page-btn:hover {
    background: #eef4ff;
    border-color: #b6cdfb;
    color: #1a56db;
}

/* 🔹 Активная страница — синяя заливка */
.crm-page-btn.is-active {
    background: #1a56db;
    border-color: #1a56db;
    color: #fff;
    box-shadow: 0 2px 6px rgba(26, 86, 219, .35);
    cursor: default;
}

/* 🔹 Недоступные кнопки — серые */
.crm-page-btn.is-disabled {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #b0b6bf;
    cursor: not-allowed;
}

.crm-page-ellipsis {
    min-width: 24px;
    text-align: center;
    color: #9aa2ad;
    font-weight: 600;
}

/* 🔹 Переход к странице */
.crm-page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.crm-pagination input {
    width: 78px;
    height: 38px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 0 8px;
    font-size: 14px;
    text-align: center;
}

.crm-pagination input:focus {
    outline: none;
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .15);
}

.crm-page-btn--go {
    background: #eaf1ff;
    border-color: #b6cdfb;
    color: #1a56db;
}

.crm-page-info {
    margin-left: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
}

/* ========== Fallback: если где-то отрисуется штатная bootstrap-пагинация ========== */
.pagination { gap: 4px; }

.pagination .page-link {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1px solid #dfe3e8;
    color: #1f2937;
    font-weight: 600;
}

.pagination .page-link:hover {
    background: #eef4ff;
    border-color: #b6cdfb;
    color: #1a56db;
}

.pagination .page-item.active .page-link {
    background: #1a56db;
    border-color: #1a56db;
    color: #fff;
    box-shadow: 0 2px 6px rgba(26, 86, 219, .35);
}

.pagination .page-item.disabled .page-link {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #b0b6bf;
}

/* ========== Мини-пагинация в тулбаре заявок ========== */
.crm-pagination--toolbar {
    padding: 0;
    flex: 0 0 auto;
    gap: 4px;
}

.crm-pagination--toolbar .crm-page-btn {
    height: 31px;          /* вровень с input-group-sm */
    min-width: 34px;
    padding: 0 9px;
    font-size: 15px;
    border-radius: 8px;
}

/* ========== Счётчик страниц в тулбаре ========== */
.crm-page-info--toolbar {
    margin-left: 0;
    margin-right: 6px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 600;
    color: #374151;
}

.crm-page-info--toolbar .crm-page-info-total {
    color: #9ca3af;
    font-weight: 500;
    font-size: 11px;
}

/* На узких экранах прячем слово "записей", оставляем только "X / Y" */
@media (max-width: 1400px) {
    .crm-page-info--toolbar .crm-page-info-total {
        display: none;
    }
}
