/**
 * Admin tables — Figma mksb design system
 * Scoped to .page-main — no Blade/PHP changes required.
 */

.page-main:has(.dashboard-h) {
    background: #f9f9fb;
}

/* ── Breadcrumb / page title ── */
.page-main .widjet.--filters {
    margin-bottom: 0;
    background: transparent;
}

.page-main .widjet.--filters .widjet__head {
    margin-bottom: 0;
    padding: 0;
}

.page-main .widjet.--filters .uk-text-lead {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #252f4a !important;
    margin-bottom: 6px !important;
}

.page-main .widjet.--filters .widjet__head ul li a,
.page-main .widjet.--filters .widjet__head ul li span {
    font-size: 13px;
    color: #99a1b7;
}

.page-main .widjet.--filters .widjet__head ul li a::after {
    content: "/";
    margin: 0 8px;
}

.page-main .dashboard-h > [class*="uk-width"] {
    width: 100% !important;
    max-width: 100%;
}

.page-main .uk-grid:has(.dashboard-h) {
    margin: 0;
}

.page-main .uk-grid:has(.dashboard-h) > .dashboard-h {
    width: 100%;
}

/* ── Dashboard card ── */
.page-main .dashboard-h {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "intro actions"
        "filters filters"
        "content content";
    gap: 20px 24px;
    /* border: 1px solid #eaeaea; */
    border-radius: 25px;
    background: transparent;
    padding: 0 !important;
    /* box-shadow: 0 1px 3px rgba(82, 63, 105, 0.04); */
}

.page-main .dashboard-h > .dashboard-page__intro,
.page-main .dashboard-h > .widjet.--filters.dashboard-page__intro {
    grid-area: intro;
}

.page-main .dashboard-h > .flex-h {
    display: contents;
}

.page-main .dashboard-h .flex-h > .creat-list-btn,
.page-main .dashboard-h .flex-h > button.creat-list-btn {
    grid-area: actions;
    align-self: start;
    justify-self: end;
    width: auto;
    height: auto;
    margin: 0;
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 10px;
    background: var(--sec-color) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.page-main .dashboard-h .flex-h > .creat-list-btn:hover,
.page-main .dashboard-h .flex-h > button.creat-list-btn:hover {
    background: #e8925f !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.page-main .dashboard-h .flex-h > form,
.page-main .dashboard-h .flex-h > .dashboard-filter-form {
    grid-area: filters;
    width: 100%;
    min-width: 0;
}

.page-main .dashboard-h > [class*="uk-width"] {
    grid-area: content;
    width: 100% !important;
    max-width: 100%;
}

/* ── Filter bar (Figma) ── */
.page-main .dashboard-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
}

.page-main .dashboard-filter-search {
    display: flex;
    flex-direction: row;
    direction: ltr;
    align-items: stretch;
    flex: 1 1 280px;
    max-width: 420px;
    min-width: 220px;
    border: 1px solid #e8e8ee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.page-main .dashboard-filter-search__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: var(--main-color);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.page-main .dashboard-filter-search__btn:hover {
    background: #3d0f4f;
}

.page-main .dashboard-filter-search__input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: none;
    background: #fff;
    color: #252f4a;
    font-size: 14px;
    text-align: start;
    outline: none;
}

.page-main .dashboard-filter-search__input::placeholder {
    color: #99a1b7;
}

.page-main .dashboard-filter-search__input:focus {
    background: #fafafa;
}

.page-main .dashboard-filter-bar__select {
    flex: 0 1 auto;
    min-width: 160px;
}

.page-main .dashboard-filter-bar__select .nice-select,
.page-main .dashboard-filter-bar .nice-select {
    float: none;
    width: 100%;
    height: 48px;
    line-height: 46px;
    border: 1px solid #e8e8ee;
    border-radius: 10px;
    background: #fff;
    padding-inline: 16px;
    font-size: 13px;
    color: #4b5675;
}

.page-main .dashboard-filter-bar__select .nice-select::after,
.page-main .dashboard-filter-bar .nice-select::after {
    border-color: #99a1b7;
}

.page-main .dashboard-filter-bar__field {
    flex: 0 1 auto;
    min-width: 140px;
}

.page-main .dashboard-filter-bar__field .form-control {
    height: 48px;
    border: 1px solid #e8e8ee;
    border-radius: 10px;
    font-size: 13px;
}

/* Legacy filter row (pages not migrated yet) */
.page-main .dashboard-h .flex-h form .uk-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.page-main .dashboard-h .flex-h form .widjet__body {
    padding: 0;
}

.page-main .dashboard-h .flex-h form .search__input {
    height: 48px;
    max-width: none;
    border: 1px solid #e8e8ee;
    border-radius: 10px;
    background: #fff !important;
}

.page-main .dashboard-h .flex-h form .search__input .ico_search {
    display: none;
}

.page-main .dashboard-h .flex-h .nice-select {
    height: 48px;
    line-height: 46px;
    border: 1px solid #e8e8ee;
    border-radius: 10px;
    background: #fff;
    min-width: 160px;
    padding-inline: 16px;
    font-size: 13px;
    color: #4b5675;
}

.page-main .dashboard-h .flex-h .friend-requests-item__action button.confirm {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex: 0 0 48px;
    border-radius: 10px !important;
    background: var(--main-color) !important;
    color: #fff !important;
}

.page-main .dashboard-h .flex-h .friend-requests-item__action button.confirm:hover {
    background: #3d0f4f !important;
    color: #fff !important;
}

/* ── Table container ── */
.page-main .dashboard-h .widjet.--friend-requests {
    margin: 0;
}

.page-main .dashboard-h .widjet.--friend-requests .widjet__body {
    padding: 0;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.page-main .dashboard-h .table-responsive {
    border: none;
    border-radius: 0;
}

/* ── Table ── */
.page-main .dashboard-h .table,
.page-main .dashboard-h .widjet.--friend-requests .table {
    margin-bottom: 0;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: #fafafa;
}

.page-main .dashboard-h .table thead th,
.page-main .dashboard-h .table thead td {
    background: #fff !important;
    border-bottom: 1px solid #E0E0E0;
    border-top: none;
    padding: 24px 12px;
    font-size: 16px;
    font-weight: 600;
    color: #2C2C34;
    white-space: nowrap;
    vertical-align: middle;
}

.page-main .dashboard-h .table tbody td {
    padding: 16px 14px;
    border-bottom: 1px solid #E0E0E0;
    color: #4b5675;
    font-size: 14px;
    vertical-align: middle;
}

.page-main .dashboard-h .table tbody tr:last-child td {
    border-bottom: none;
}

.page-main .dashboard-h .table-striped > tbody > tr:nth-of-type(odd) > *,
.page-main .dashboard-h .table-striped > tbody > tr:nth-of-type(even) > * {
    --bs-table-accent-bg: transparent;
    background-color: transparent;
}

.page-main .dashboard-h .table tbody tr:hover > * {
    background-color: #fafafa;
}

.page-main .dashboard-h .table tbody td a:not(.btn) {
    color: #252f4a;
    font-weight: 500;
}

.page-main .dashboard-h .table tbody td a:not(.btn):hover {
    color: var(--main-color);
}

.page-main .dashboard-h .table .img-thumbnail {
    width: 48px !important;
    height: 48px !important;
    padding: 2px;
    border: 1px solid #f1f1f4;
    border-radius: 8px;
    background: #fff;
}

/* ── Status badges ── */
.page-main .dashboard-h .badge {
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    min-width: auto;
    line-height: 1.2;
}

.page-main .dashboard-h .badge.bg-success {
    background: #e8f6ee !important;
    color: #1ea86c !important;
}

.page-main .dashboard-h .badge.bg-secondary {
    background: #f1f1f4 !important;
    color: #78829d !important;
}

.page-main .dashboard-h .badge.bg-warning {
    background: #fef3e8 !important;
    color: #d4843a !important;
}

.page-main .dashboard-h .badge.bg-danger {
    background: #fdeaea !important;
    color: #e74c3c !important;
}

/* ── Row action buttons ── */
.page-main .dashboard-h .table tbody td.text-center {
    text-align: center !important;
}

.page-main .dashboard-h .table tbody td:has(> .friend-requests-item__action),
.page-main .dashboard-h .table tbody td:has(> button),
.page-main .dashboard-h .table tbody td:has(> form) {
    text-align: center !important;
}

.page-main .dashboard-h .table tbody td:has(> .friend-requests-item__action),
.page-main .dashboard-h .table tbody td:has(> button),
.page-main .dashboard-h .table tbody td:has(> form),
.page-main .dashboard-h .table tbody td.text-center:has(button) {
    display: table-cell;
}

.page-main .dashboard-h .friend-requests-item__action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.page-main .dashboard-h .friend-requests-item__action button {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    margin: 0 !important;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.page-main .dashboard-h .friend-requests-item__action button + button {
    margin-inline-start: 0 !important;
}

.page-main .dashboard-h .friend-requests-item__action button:hover {
    transform: translateY(-1px);
}

.page-main .dashboard-h .friend-requests-item__action button.info,
.page-main .dashboard-h .friend-requests-item__action button.info.ico_home {
    background: hsl(284deg 71% 24% / 8%) !important;
    color: var(--main-color) !important;
}

.page-main .dashboard-h .friend-requests-item__action button.info:hover {
    background: var(--main-color) !important;
    color: #fff !important;
}

.page-main .dashboard-h .friend-requests-item__action button.show,
.page-main .dashboard-h .friend-requests-item__action button.view,
.page-main .dashboard-h .friend-requests-item__action button.ico_eye {
    background: #fef3e8 !important;
    color: var(--sec-color) !important;
}

.page-main .dashboard-h .friend-requests-item__action button.show:hover,
.page-main .dashboard-h .friend-requests-item__action button.view:hover {
    background: var(--sec-color) !important;
    color: #fff !important;
}

.page-main .dashboard-h .friend-requests-item__action button.modify,
.page-main .dashboard-h .friend-requests-item__action button.ico_edit {
    background: #f1f1f4 !important;
    color: #5e6278 !important;
}

.page-main .dashboard-h .friend-requests-item__action button.modify:hover {
    background: #5e6278 !important;
    color: #fff !important;
}

.page-main .dashboard-h .friend-requests-item__action button.reject,
.page-main .dashboard-h .friend-requests-item__action button.ico_trash {
    background: #fdeaea !important;
    color: #e74c3c !important;
}

.page-main .dashboard-h .friend-requests-item__action button.reject:hover {
    background: #e74c3c !important;
    color: #fff !important;
}

/* ── Pagination ── */
.page-main .dashboard-h .pagination,
.page-main .dashboard-h .pagination-h .pagination {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 6px;
    margin: 20px 0 0;
    padding: 0;
    justify-content: flex-end;
}

.page-main .dashboard-h .page-item {
    display: flex;
}

.page-main .dashboard-h .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ecebef;
    border-radius: 10px !important;
    color: #8a8ca8;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    box-shadow: none;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.page-main .dashboard-h .page-link--arrow {
    font-size: 16px;
    font-weight: 700;
}

.page-main .dashboard-h .page-link--dots {
    border-color: transparent;
    background: transparent;
    cursor: default;
}

.page-main .dashboard-h a.page-link:hover {
    background: rgba(82, 18, 106, .08);
    border-color: rgba(82, 18, 106, .25);
    color: var(--main-color);
    transform: translateY(-1px);
}

.page-main .dashboard-h a.page-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(82, 18, 106, .18);
}

.page-main .dashboard-h .page-item.active .page-link {
    background: linear-gradient(135deg, var(--main-color), #AD74C2);
    border-color: var(--main-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(82, 18, 106, .28);
}

.page-main .dashboard-h .page-item.disabled .page-link {
    background: #fafafa;
    border-color: #f1f1f4;
    color: #c4c9d6;
    cursor: not-allowed;
}

.page-main .dashboard-h .mt-3:has(.pagination),
.page-main .dashboard-h .pagination-h {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

/* ── Empty state ── */
.page-main .dashboard-h .empty-box {
    max-width: 120px;
    opacity: 0.6;
}

@media only screen and (max-width: 959px) {
    .page-main .dashboard-h {
        padding: 16px !important;
        border-radius: 12px;
    }

    .page-main .dashboard-h .flex-h {
        flex-direction: column;
        align-items: stretch;
    }

    .page-main .dashboard-h .flex-h > .creat-list-btn,
    .page-main .dashboard-h .flex-h > button.creat-list-btn {
        width: 100%;
        justify-content: center;
    }

    .page-main .dashboard-h .table-responsive {
        overflow-x: auto;
    }
}
