/* 后台：字号、按钮、筛选、列表随电脑和手机宽度变化 */

html {
    font-size: 16px;
}

.content-wrapper,
.content-body,
.content-header,
.dcat-box,
.card {
    max-width: 100%;
    min-width: 0;
}

.content-body .card,
.dcat-box {
    border-radius: 16px;
}

.dcat-box .table-responsive,
.content-body .table-responsive,
.table-responsive.table-scrollbar-x {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dcat-box .table td,
.dcat-box .table th {
    vertical-align: middle;
}

.dcat-box .table td {
    word-break: break-word;
}

.custom-data-table-header .top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.custom-data-table-header .pull-left,
.custom-data-table-header .pull-right {
    float: none !important;
}

.custom-data-table-header .pull-right {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.custom-data-table-header .btn,
.custom-data-table-header .btn-group > .btn,
.content-header .btn,
.box-footer .btn,
.form-footer .btn {
    min-height: 38px;
    margin: 0 !important;
    padding: 0 14px;
    border-radius: 10px !important;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.custom-data-table-header .d-none.d-sm-inline,
.custom-data-table-header .d-none.d-sm-inline-block,
.box-footer > .d-none.d-sm-inline {
    display: inline !important;
}

.custom-data-table-header .btn-group {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0;
}

.box-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.box-footer .pagination {
    margin-left: auto !important;
    float: none !important;
}

.pagination .page-link {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-size: 14px;
}

.impersonate-bar {
    max-width: calc(100vw - 120px);
    white-space: normal;
}

.content-body .form-control,
.content-body .custom-select {
    min-height: 40px;
    border-radius: 10px;
}

.content-body .select2-container .select2-selection--single {
    min-height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

.slider-panel {
    width: min(440px, 100vw);
    right: calc(min(440px, 100vw) * -1);
}

.slider-panel.open {
    right: 0;
}

.slider-panel .slider-content {
    width: 100% !important;
    padding: 52px 0 88px !important;
    box-sizing: border-box;
}

.admin-filter-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 8;
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #f4f7fb;
    color: #526074;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.right-side-filter-container {
    padding: 0 !important;
}

.right-side-filter-container form {
    padding-bottom: 8px;
}

.right-side-filter-container .mb-1 {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto !important;
    margin: 0 !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #eef1f6;
    z-index: 6;
    box-shadow: 0 -8px 18px rgba(22, 28, 45, .05);
}

.right-side-filter-container .header {
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    display: flex !important;
    gap: 8px;
    background: transparent !important;
}

.right-side-filter-container .header > div {
    display: flex;
    gap: 8px;
    width: 100%;
}

.right-side-filter-container .submit,
.right-side-filter-container .reset {
    flex: 1;
    min-height: 44px;
    margin: 0 !important;
    border-radius: 12px !important;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.right-side-filter-container .filter-input,
.right-side-filter-container .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100% !important;
    padding-left: 16px;
    padding-right: 16px;
}

.right-side-filter-container .form-group {
    margin-bottom: 14px;
}

.right-side-filter-container .input-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.right-side-filter-container .input-group-prepend,
.right-side-filter-container .input-group-append {
    width: 100%;
    margin: 0 0 6px;
}

.right-side-filter-container .input-group-text {
    display: block;
    width: 100%;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #526074;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    white-space: normal;
}

.right-side-filter-container .form-control,
.right-side-filter-container select,
.right-side-filter-container .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

.right-side-filter-container .form-control,
.right-side-filter-container select {
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
}

.right-side-filter-container .select2-container .select2-selection--single {
    min-height: 42px;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
}

.admin-filter-mask {
    position: fixed;
    inset: 0;
    background: rgba(18, 24, 38, .38);
    z-index: 997;
}

@media (min-width: 992px) {
    .content-body {
        padding: 8px 4px 24px;
    }

    .dcat-box .table-wrapper,
    .dcat-box .table-responsive {
        overflow-x: auto !important;
        max-width: 100%;
    }

    .dcat-box table.custom-data-table {
        width: max-content !important;
        min-width: 100%;
    }

    .dcat-box table.custom-data-table th,
    .dcat-box table.custom-data-table td {
        white-space: nowrap;
    }

    .content-header h1 {
        font-size: 22px;
        font-weight: 700;
    }

    .dcat-box .table thead th {
        position: sticky;
        top: 3.6rem;
        z-index: 3;
        background: #f8fafc;
    }

    .dcat-box .table th,
    .dcat-box .table td {
        padding: 12px 14px;
        font-size: 14px;
    }

    .dcat-box .table th:last-child,
    .dcat-box .table td.grid__actions__ {
        position: sticky;
        right: 0;
        background: #fff;
        z-index: 2;
        box-shadow: -8px 0 12px rgba(22, 28, 45, .04);
    }

    .dcat-box .table thead th:last-child {
        z-index: 4;
        background: #f8fafc;
    }
}

@media (max-width: 991.98px) {
    .content-wrapper {
        min-height: auto !important;
        padding-top: 0 !important;
        margin-left: 0 !important;
    }

    .main-header .nav-link,
    .main-sidebar .nav-sidebar .nav-link {
        min-height: 44px;
    }

    .content-header {
        padding: 12px 12px 0 !important;
    }

    .content-header h1 {
        font-size: 18px;
        margin-bottom: 0;
        font-weight: 700;
    }

    .content-header .breadcrumb {
        flex-wrap: wrap;
        padding-left: 0;
    }

    .content-body {
        padding: 12px !important;
    }

    .content-body > .card > .card-body,
    .content-body .card .card-body {
        padding: 12px;
    }

    .custom-data-table-header .top,
    .custom-data-table-header .pull-right,
    .custom-data-table-header .pull-left {
        width: 100%;
        margin-left: 0;
    }

    .custom-data-table-header .btn,
    .custom-data-table-header .btn-group > .btn {
        min-height: 42px;
        padding: 0 12px;
        font-size: 14px;
    }

    .box-footer {
        flex-direction: column;
        align-items: stretch;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .box-footer > .d-none.d-sm-inline {
        display: block !important;
        text-align: center;
        line-height: 1.5 !important;
    }

    .box-footer .pagination {
        margin-left: 0 !important;
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination .page-item.admin-page-hide {
        display: none;
    }

    .form-horizontal .control-label {
        text-align: left !important;
        padding-bottom: 4px;
    }

    .form-horizontal .form-group > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .content-body .form-control,
    .content-body textarea.form-control,
    .content-body .custom-select,
    .content-body .select2-container .select2-selection--single {
        min-height: 44px;
        font-size: 16px;
    }

    .content-body textarea.form-control {
        min-height: 120px;
    }

    .form-footer .btn,
    .box-footer .btn-primary,
    .content-body .submit,
    .content-body button[type="submit"] {
        min-height: 46px;
        width: 100%;
    }

    .modal-dialog {
        margin: 12px auto;
        max-width: calc(100vw - 24px);
        width: calc(100vw - 24px);
    }

    .main-footer {
        padding: 12px;
        text-align: center;
    }

    .impersonate-bar {
        margin: 8px 0 0 8px !important;
        max-width: calc(100vw - 108px);
    }

    .impersonate-bar span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .impersonate-bar a {
        white-space: nowrap;
        flex: none;
    }

    .slider-panel,
    .slider-panel.open {
        width: 100vw;
        max-width: 100vw;
    }

    .slider-panel {
        right: -100vw;
    }

    .slider-panel.open {
        right: 0;
    }

    .right-side-filter-container .form-control,
    .right-side-filter-container select {
        height: 44px;
        min-height: 44px;
        font-size: 16px;
    }

    table.admin-stack-ready {
        min-width: 0 !important;
        width: 100% !important;
        border: 0;
    }

    table.admin-stack-ready thead {
        display: none;
    }

    table.admin-stack-ready,
    table.admin-stack-ready tbody,
    table.admin-stack-ready tr,
    table.admin-stack-ready td {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
    }

    table.admin-stack-ready tbody tr {
        margin: 0 0 12px;
        border: 1px solid #e7ebf3;
        border-radius: 16px;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 8px 20px rgba(22, 28, 45, .04);
    }

    table.admin-stack-ready tbody td {
        display: grid;
        grid-template-columns: 5.5rem minmax(0, 1fr);
        gap: 8px 10px;
        align-items: center;
        padding: 11px 14px;
        border: 0 !important;
        border-bottom: 1px solid #f2f4f8 !important;
        text-align: left;
        white-space: normal !important;
        overflow-wrap: break-word;
        font-size: 14px;
        color: #172033;
    }

    table.admin-stack-ready tbody td:last-child {
        border-bottom: 0 !important;
    }

    table.admin-stack-ready tbody td::before {
        content: attr(data-label);
        color: #8b93a7;
        font-size: 12px;
        line-height: 1.4;
        font-weight: 700;
    }

    table.admin-stack-ready tbody td .select2-container,
    table.admin-stack-ready tbody td select,
    table.admin-stack-ready tbody td input,
    table.admin-stack-ready tbody td img,
    table.admin-stack-ready tbody td .switch {
        max-width: 100%;
    }

    table.admin-stack-ready tbody td .select2-container {
        width: 100% !important;
    }

    table.admin-stack-ready tbody td.admin-fold {
        display: none !important;
    }

    table.admin-stack-ready tbody tr.is-open td.admin-fold {
        display: grid !important;
    }

    table.admin-stack-ready tbody td[data-label=""]::before,
    table.admin-stack-ready tbody td[colspan]::before,
    table.admin-stack-ready tbody td.admin-fold-bar::before {
        display: none;
    }

    table.admin-stack-ready tbody td[data-label=""],
    table.admin-stack-ready tbody td.grid__actions__,
    table.admin-stack-ready tbody td.admin-fold-bar {
        grid-template-columns: 1fr;
    }

    table.admin-stack-ready tbody td[colspan] {
        display: block;
        text-align: center;
    }

    table.admin-stack-ready .grid-dropdown-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    table.admin-stack-ready .grid-dropdown-actions > a[data-toggle="dropdown"] {
        display: none;
    }

    table.admin-stack-ready .grid-dropdown-actions .dropdown-menu {
        display: flex !important;
        position: static !important;
        transform: none !important;
        float: none;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        flex-wrap: wrap;
        gap: 8px;
    }

    table.admin-stack-ready .grid-dropdown-actions .dropdown-item {
        width: auto;
        padding: 0;
        background: transparent;
    }

    table.admin-stack-ready .grid-dropdown-actions .dropdown-item a {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
        padding: 0 12px;
        border-radius: 999px;
        background: #eef3ff;
        color: #2f6bff;
        font-weight: 700;
        white-space: nowrap;
    }

    .admin-fold-toggle {
        width: 100%;
        min-height: 38px;
        border: 0;
        border-radius: 10px;
        background: #f4f7fb;
        color: #526074;
        font-size: 13px;
        font-weight: 700;
    }
}
