/* =========================================================
   AICRIMS SHARED PAGINATION
   One visual pattern for Admin, Adviser, Student and Repository.
========================================================= */

.shared-pagination {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    box-sizing: border-box;
    padding: 24px;
    border-top: 1px solid var(--border, rgba(148, 163, 184, .16));
    background: var(--surface, rgba(255, 255, 255, .03));
}

.shared-pagination-info {
    flex: 0 0 auto;
    font-size: 14px;
    text-align: center;
    color: var(--text-light, var(--text-muted, #94a3b8));
    white-space: nowrap;
}

.shared-pagination-info strong {
    color: var(--text, var(--text-primary, #e5e7eb));
    font-weight: 600;
}

.shared-pagination-separator {
    padding: 0 4px;
}

.shared-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex: 0 1 auto;
    min-width: 0;
}

.shared-pagination-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shared-page-item {
    min-width: 42px;
    height: 42px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    border: 1px solid var(--border, rgba(148, 163, 184, .22));
    border-radius: 11px;
    background: var(--surface, rgba(255, 255, 255, .03));
    color: var(--text, var(--text-primary, #e5e7eb));
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.shared-page-item:hover:not(.disabled):not(.active) {
    border-color: var(--primary, #4f7cff);
    background: var(--primary-light, rgba(79, 124, 255, .10));
    color: var(--primary, #4f7cff);
}

.shared-page-item.active {
    border-color: transparent;
    background: linear-gradient(135deg, #1677ff 0%, #2685e9 100%);
    color: #fff;
    box-shadow: 0 7px 18px rgba(30, 118, 235, .20);
}

.shared-page-item.disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.shared-page-nav {
    min-width: auto;
    padding-left: 12px;
    padding-right: 12px;
}

.shared-page-ellipsis {
    min-width: 42px;
    cursor: default;
    pointer-events: none;
}

.shared-go-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex: 0 0 auto;
    justify-content: center;
}

.shared-go-page-form label {
    color: var(--text-light, var(--text-muted, #94a3b8));
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.shared-go-page-form input[type="number"] {
    width: 76px;
    height: 42px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid var(--border, rgba(148, 163, 184, .22));
    border-radius: 11px;
    background: var(--surface, rgba(255, 255, 255, .03));
    color: var(--text, var(--text-primary, #e5e7eb));
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.shared-go-page-form input[type="number"]:focus {
    border-color: var(--primary, #4f7cff);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, .12);
}

.shared-page-go-btn {
    min-width: 55px;
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #22b8e9 0%, #1677ff 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(22, 119, 255, .20);
    transition: transform .18s ease, filter .18s ease;
}

.shared-page-go-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

@media (max-width: 1150px) {
    .shared-pagination {
        align-items: center;
        justify-content: center;
    }

    .shared-pagination-controls {
        justify-content: center;
        flex-basis: 100%;
    }
}

@media (max-width: 720px) {
    .shared-pagination {
        padding: 18px;
    }

    .shared-pagination-info,
    .shared-pagination-controls {
        width: 100%;
    }

    .shared-pagination-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .shared-pagination-list {
        justify-content: center;
    }

    .shared-go-page-form {
        justify-content: center;
    }
}
