/* ==========================================================================
   圆梦鸿途 · 管理后台  ·  List Paradigm
   Page header + card + filter bar + bulk bar + bootstrap-table + pager
   Loaded after base.css on every admin page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page scaffold / card
   -------------------------------------------------------------------------- */
.list-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: none;
}

.list-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: none;
    min-width: 0;
    overflow: hidden;
}

/* neutralize legacy panel chrome that may still be around */
.list-card > .panel-heading,
.list-card > .panel-body {
    padding: 0;
    border: 0;
    background: transparent;
}

/* card header with tabs (attachment / category / addon) */
.list-card > .card-h,
.list-card > .card-h.panel-heading {
    background: transparent;
    color: var(--ink);
    border: 0;
    border-bottom: 1px solid var(--line-2);
    border-radius: 0;
    padding: 10px 18px 0;
    border-bottom: 1px solid var(--line-2);
    gap: 12px;
    flex-wrap: wrap;
}
.list-card > .card-h .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    border-bottom: 0;
    min-width: 0;
}
.list-card > .card-h .nav-tabs > li {
    float: none;
    margin: 0;
}
.list-card > .card-h .nav-tabs > li > a {
    border: 0;
    border-radius: var(--r) var(--r) 0 0;
    color: var(--ink-3);
    font-size: 12.5px;
    padding: 8px 14px;
    margin: 0;
    background: transparent;
}
.list-card > .card-h .nav-tabs > li > a:hover,
.list-card > .card-h .nav-tabs > li > a:focus {
    background: var(--bg);
    color: var(--ink);
    border: 0;
}
.list-card > .card-h .nav-tabs > li.active > a,
.list-card > .card-h .nav-tabs > li.active > a:hover,
.list-card > .card-h .nav-tabs > li.active > a:focus {
    background: var(--bg);
    border: 1px solid var(--line);
    border-bottom-color: transparent;
    color: var(--ink);
    font-weight: 500;
}
.list-card > .card-h .nav-tabs > li.pull-right,
.list-card > .card-h .nav-tabs > li.dropdown {
    margin-left: auto;
}
.list-card > .card-h .nav-tabs > li.pull-right > a {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    color: var(--ink-2);
    padding: 5px 12px;
    margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   2. bootstrap-table shell
   -------------------------------------------------------------------------- */
.list-card .bootstrap-table {
    margin: 0;
    border: 0;
}
.list-card .fixed-table-container {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}
.list-card .fixed-table-body {
    overflow-x: auto;
    overflow-y: visible;
}
.list-card .fixed-table-body > .table {
    margin: 0;
}
.list-card .fixed-table-header {
    background: #FAFBFC;
}
.list-card .fixed-table-loading {
    top: 0;
    background: rgba(255, 255, 255, .82);
}
.list-card .fixed-table-loading .loading-wrap {
    padding: 40px 0;
    color: var(--ink-3);
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   3. toolbar (bs-bars) + default chrome hidden / restyled
   -------------------------------------------------------------------------- */
.list-card .fixed-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-2);
    background: var(--panel);
}
.list-card .fixed-table-toolbar .bs-bars {
    flex: 1 1 auto;
    min-width: 0;
    float: none !important;
    margin: 0;
}
.list-card .fixed-table-toolbar .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    border: 0;
}
.list-card .fixed-table-toolbar .toolbar > .btn,
.list-card .fixed-table-toolbar .toolbar > .btn-group,
.list-card .fixed-table-toolbar .toolbar > .dropdown {
    margin: 0;
}
.list-card .fixed-table-toolbar .toolbar .btn {
    margin: 0;
}

/* default bootstrap-table chrome: hide icon buttons / column picker / export */
.list-card .fixed-table-toolbar .columns,
.list-card .fixed-table-toolbar .columns-right {
    display: none !important;
}

/* default quick search box (kept on pages without their own filter bar) */
.list-card .fixed-table-toolbar .search {
    float: none !important;
    margin: 0 0 0 auto;
    order: 2;
}
.list-card .fixed-table-toolbar .search .search-input {
    width: 220px;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: none;
}
.list-card .fixed-table-toolbar .search .search-input:focus {
    border-color: var(--pri);
    box-shadow: 0 0 0 3px var(--pri-2);
    outline: none;
}
.list-card .fixed-table-toolbar .search .search-input::placeholder {
    color: #A6AFBD;
}
.list-card .fixed-table-toolbar .search .input-group-btn .btn {
    height: 32px;
    margin-left: 8px;
    border-radius: var(--r);
}

/* hidden selection helper injected by require-table */
.list-card .fixed-table-toolbar .btn-selected-tips {
    height: 28px;
    line-height: 26px;
    font-size: 12.5px;
    border-radius: var(--r);
}

/* --------------------------------------------------------------------------
   4. filter bar (member list and any future list)
   -------------------------------------------------------------------------- */
.list-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-2);
    background: var(--panel);
}
.list-filters .form-control {
    height: 32px;
    font-size: 13px;
}
.list-filters .field-ico > .form-control {
    padding-left: 30px;
}
.list-filters .filter-keyword {
    width: 240px;
}
.list-filters .filter-select {
    width: 140px;
}
.list-filters .filter-select-wide {
    width: 168px;
}
.list-filters .filter-date {
    width: 220px;
}
.list-filters .filter-date > .form-control {
    width: 220px;
    padding-left: 30px;
    background: #fff;
    color: var(--ink-2);
    cursor: pointer;
}
.list-filters .filter-date > .form-control[readonly] {
    background: #fff;
    color: var(--ink-2);
    border-color: var(--line);
}
.list-filters .sp {
    flex: 1;
}
.list-filters .btn {
    height: 32px;
}
.list-filters .btn-ghost {
    color: var(--pri);
    border-color: transparent;
    background: transparent;
}
.list-filters .btn-ghost:hover {
    background: var(--pri-2);
    color: var(--pri-ink);
}
.list-filters .btn-apply {
    background: #fff;
    border-color: var(--line);
    color: var(--ink-2);
}
.list-filters .btn-apply:hover {
    background: #FCFDFE;
    border-color: #C9D1DD;
    color: var(--ink);
}

/* On pages using the filter bar the whole toolbar is flush with the card */
.list-toolbar-plain .fixed-table-toolbar {
    display: block;
    padding: 0;
    border-bottom: 0;
}
.list-toolbar-plain .fixed-table-toolbar .bs-bars {
    display: block;
    width: 100%;
}
.list-toolbar-plain .fixed-table-toolbar .search {
    display: none !important;
}
.list-card .toolbar-plain,
.list-card .fixed-table-toolbar .toolbar.toolbar-plain {
    display: block;
    padding: 0;
    border: 0;
}

/* --------------------------------------------------------------------------
   5. bulk operation bar
   -------------------------------------------------------------------------- */
.list-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: var(--pri-2);
    color: var(--pri-ink);
    font-size: 12.5px;
    border-bottom: 1px solid #D6E2FA;
    line-height: 20px;
}
.list-bulk .sp {
    flex: 1;
}
.list-bulk b {
    font-weight: 600;
}
.list-bulk .bulk-act {
    color: var(--pri);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-size: 12.5px;
}
.list-bulk .bulk-act:hover {
    color: var(--pri-ink);
    text-decoration: underline;
}
.list-bulk .bulk-act.danger {
    color: var(--err);
}
.list-bulk .bulk-act.danger:hover {
    color: #9E2A22;
}

/* --------------------------------------------------------------------------
   6. table
   -------------------------------------------------------------------------- */
.list-card .table {
    width: 100%;
    min-width: 880px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--ink-2);
    font-size: 13px;
}
.list-card .table > thead > tr > th {
    padding: 10px 14px;
    background: #FAFBFC;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-top: 0;
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}
.list-card .table > tbody > tr > td {
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink-2);
    font-size: 13px;
    vertical-align: middle;
    white-space: nowrap;
}
.list-card .table > tbody > tr:last-child > td {
    border-bottom: 0;
}
.list-card .table > tbody > tr:hover > td {
    background: #FAFBFD;
}
.list-card .table > tbody > tr.selected > td,
.list-card .table > tbody > tr.selected:hover > td {
    background: #F5F8FE;
}
.list-card .table > tbody > tr.no-records-found > td {
    padding: 44px 14px;
    color: var(--ink-3);
    font-size: 13px;
    text-align: center;
    border-bottom: 0;
}
/* remove legacy vertical zebra borders */
.list-card .table-bordered,
.list-card .table-bordered > thead > tr > th,
.list-card .table-bordered > tbody > tr > td {
    border-left: 0;
    border-right: 0;
}
.list-card .table-striped > tbody > tr:nth-of-type(odd) {
    background: transparent;
}
.list-card .table-striped > tbody > tr:nth-of-type(odd):hover > td {
    background: #FAFBFD;
}

/* header cell vertical alignment helpers (bootstrap-table wraps th content) */
.list-card .table > thead > tr > th .th-inner {
    padding: 0;
    line-height: 20px;
}
.list-card .table > thead > tr > th .fht-cell {
    display: none;
}
.list-card .table > thead > tr > th .sortable {
    color: #B9C1CE;
    padding-right: 14px;
}

/* checkbox column */
.list-card .table > thead > tr > th.bs-checkbox,
.list-card .table > tbody > tr > td.bs-checkbox {
    width: 40px;
    padding: 0 0 0 18px;
    text-align: left;
}
.list-card .table input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    vertical-align: middle;
    accent-color: var(--pri);
    cursor: pointer;
}

/* fixed-column clones (auth/adminlog etc.) */
.list-card .fixed-columns,
.list-card .fixed-columns-right {
    background: var(--panel);
}
.list-card .fixed-columns .table,
.list-card .fixed-columns-right .table {
    min-width: 0;
}

/* --------------------------------------------------------------------------
   7. cell components
   -------------------------------------------------------------------------- */
/* member cell: avatar + name + @username */
.list-card .u {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-align: left;
}
.list-card .u .av {
    width: 28px;
    height: 28px;
    font-size: 11px;
    background: #D9E3F5;
    color: var(--pri-ink);
}
.list-card .u b {
    display: block;
    color: var(--ink);
    font-weight: 500;
    font-size: 13px;
    line-height: 1.35;
}
.list-card .u small {
    display: block;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.35;
}

/* status pill / level badge fallbacks live in base.css (.st / .lv) */

/* operation text links */
.list-card .acts {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}
.list-card .acts a {
    color: var(--pri);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
    line-height: 1.5;
}
.list-card .acts a:hover,
.list-card .acts a:focus {
    color: var(--pri-ink);
    text-decoration: none;
}
.list-card .acts a.danger,
.list-card .acts a.d {
    color: var(--err);
}
.list-card .acts a.danger:hover,
.list-card .acts a.d:hover {
    color: #9E2A22;
}
.list-card .acts a.disabled {
    color: var(--ink-3);
    pointer-events: none;
}
.list-card .acts .op-sub {
    color: var(--ink-3);
}

/* keep legacy micro buttons inside cells tidy */
.list-card .table .btn-xs {
    height: 24px;
    line-height: 22px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* tree "sub node" toggle link (auth/rule, user/rule) */
.list-card .table a.btn-node-sub {
    color: var(--ink-3);
}
.list-card .table a.btn-node-sub:hover {
    color: var(--pri);
}

/* --------------------------------------------------------------------------
   8. pagination
   -------------------------------------------------------------------------- */
.list-card .fixed-table-pagination {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    color: var(--ink-3);
    font-size: 12.5px;
    line-height: 1.5;
    border-top: 0;
}
/* one row: [共 N 条] ......... [page size] [pager] */
.list-card .fixed-table-pagination .pagination-detail {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    float: none;
}
.list-card .fixed-table-pagination .pagination-info {
    color: var(--ink-3);
    font-size: 12.5px;
    line-height: 20px;
    white-space: nowrap;
}
.list-card .fixed-table-pagination .page-list {
    display: flex;
    align-items: center;
    margin-left: auto;
    font-size: 0;
    color: var(--ink-3);
    white-space: nowrap;
}
.list-card .fixed-table-pagination .page-list .btn-group {
    display: inline-flex;
    vertical-align: middle;
}
.list-card .fixed-table-pagination .page-list .btn {
    position: relative;
    height: 30px;
    padding: 0 28px 0 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 28px;
    min-width: 96px;
    text-align: left;
}
.list-card .fixed-table-pagination .page-list .btn .caret {
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: 0;
    border-top: 0;
    border-bottom: 4px solid #8590A2;
}
.list-card .fixed-table-pagination .page-list .page-size::after {
    content: " 条/页";
    font-family: var(--sans);
    font-weight: 400;
    color: var(--ink-3);
}
.list-card .fixed-table-pagination .page-list .dropdown-menu {
    min-width: 96px;
}
.list-card .fixed-table-pagination .pagination {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    margin: 0;
    padding: 0;
    float: none;
}
.list-card .fixed-table-pagination .pagination > li {
    display: inline-flex;
    margin: 0;
}
.list-card .fixed-table-pagination .pagination > li > a,
.list-card .fixed-table-pagination .pagination > li > span {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 28px;
    margin: 0;
    text-decoration: none;
}
.list-card .fixed-table-pagination .pagination > li > a:hover,
.list-card .fixed-table-pagination .pagination > li > a:focus {
    background: var(--pri-2);
    border-color: #D6E2FA;
    color: var(--pri-ink);
    text-decoration: none;
}
.list-card .fixed-table-pagination .pagination > .active > a,
.list-card .fixed-table-pagination .pagination > .active > a:hover,
.list-card .fixed-table-pagination .pagination > .active > a:focus,
.list-card .fixed-table-pagination .pagination > .active > span {
    background: var(--pri);
    border-color: var(--pri);
    color: #fff;
}
.list-card .fixed-table-pagination .pagination > .disabled > a,
.list-card .fixed-table-pagination .pagination > .disabled > a:hover,
.list-card .fixed-table-pagination .pagination > .disabled > span {
    background: #FAFBFC;
    border-color: var(--line-2);
    color: #C9D1DD;
    cursor: default;
}
/* prev / next rendered as chevrons like the design */
.list-card .fixed-table-pagination .pagination > .page-pre > a,
.list-card .fixed-table-pagination .pagination > .page-next > a {
    font-size: 0;
    line-height: 1;
}
.list-card .fixed-table-pagination .pagination > .page-pre > a::before {
    content: "\2039";
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1;
    margin-top: -1px;
}
.list-card .fixed-table-pagination .pagination > .page-next > a::before {
    content: "\203A";
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1;
    margin-top: -1px;
}
.list-card .fixed-table-pagination .pagination > .page-first-separator > a,
.list-card .fixed-table-pagination .pagination > .page-last-separator > a {
    color: var(--ink-3);
}
/* hide jumpto input, design has no jump box */
.list-card .fixed-table-pagination .pagination > .jumpto {
    display: none;
}

/* --------------------------------------------------------------------------
   9. empty / loading aux
   -------------------------------------------------------------------------- */
.list-card .fixed-table-pagination:empty {
    display: none !important;
}
/* bootstrap-table shows/hides the pager inline on empty data */
.list-card .fixed-table-pagination[style*="display: none"] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   10. page header actions inside list pages
   -------------------------------------------------------------------------- */
.ph-actions .btn {
    height: 32px;
}
.ph-actions .btn-export i,
.ph-actions .btn-add i {
    font-size: 13px;
}
.ph-actions .btn-primary,
.ph-actions .btn.btn-add {
    color: #fff;
}

/* --------------------------------------------------------------------------
   10.1 member detail dialog (user page)
   -------------------------------------------------------------------------- */
/* FastAdmin 的 .layui-layer-fast 皮肤优先级高于 base.css 的 layer 规则，这里按设计稿覆盖 */
.layui-layer.list-detail-layer .layui-layer-title {
    height: 48px !important;
    line-height: 48px !important;
    padding: 0 20px !important;
    background: #fff !important;
    color: var(--ink) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-bottom: 1px solid var(--line-2) !important;
    border-radius: 8px 8px 0 0 !important;
}
.layui-layer.list-detail-layer .layui-layer-setwin { top: 16px !important; right: 16px !important; }
.layui-layer.list-detail-layer .layui-layer-setwin a { color: var(--ink-3); }
.layui-layer.list-detail-layer .layui-layer-content { background: #fff !important; }

.user-detail {
    padding: 20px 22px 22px;
    background: #fff;
    border-radius: 0 0 8px 8px;
}
.user-detail-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-2);
}
.user-detail-head .av-lg {
    width: 44px;
    height: 44px;
    font-size: 15px;
}
.user-detail-name b {
    display: block;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}
.user-detail-name small {
    display: block;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.35;
}
.user-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    padding-top: 4px;
}
.user-detail-item {
    padding: 10px 0 9px;
    border-bottom: 1px dashed var(--line-2);
    min-width: 0;
}
.user-detail-item label {
    display: block;
    margin: 0 0 2px;
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 400;
}
.user-detail-item > span {
    display: block;
    color: var(--ink);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-detail-item .lv {
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   11. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .list-filters .filter-keyword {
        width: 200px;
    }
    .list-card .fixed-table-toolbar {
        padding: 12px 14px;
    }
    .list-filters {
        padding: 12px 14px;
    }
}

@media (max-width: 640px) {
    .list-filters {
        padding: 12px 14px;
        gap: 8px;
    }
    .list-filters .field-ico,
    .list-filters .filter-select,
    .list-filters .filter-select-wide,
    .list-filters .sp {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
    .list-filters .field-ico > .form-control,
    .list-filters .filter-date > .form-control,
    .list-filters .filter-select {
        width: 100%;
    }
    .list-filters .btn-ghost,
    .list-filters .btn-apply {
        flex: 1 1 auto;
    }
    .list-bulk {
        padding: 8px 14px;
    }
    .list-card .fixed-table-toolbar {
        padding: 12px 14px;
        gap: 8px;
    }
    .list-card .fixed-table-toolbar .search {
        width: 100%;
        margin: 0;
    }
    .list-card .fixed-table-toolbar .search .search-input {
        width: 100%;
    }
    .list-card .fixed-table-pagination {
        padding: 12px 14px;
    }
    .list-card .fixed-table-pagination .page-list {
        margin-left: 0;
    }
    .list-card .table > thead > tr > th {
        padding: 10px 12px;
    }
    .list-card .table > tbody > tr > td {
        padding: 10px 12px;
    }
}
