html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.app-main,
.app-content,
.app-content .container-fluid {
    min-width: 0;
}

.app-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    align-items: stretch;
}

.layout-fixed .app-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.layout-fixed .app-sidebar .sidebar-brand {
    flex: 0 0 auto;
}

.layout-fixed .app-sidebar .sidebar-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 992px) {
    .sidebar-expand-lg.layout-fixed .app-sidebar {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        align-self: stretch;
        min-height: 100%;
        height: auto !important;
        max-height: none !important;
    }

    .sidebar-expand-lg.layout-fixed .app-sidebar .sidebar-wrapper {
        height: auto !important;
        max-height: none !important;
    }
}

@media (max-width: 991.98px) {
    .sidebar-expand-lg .app-sidebar {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
    }

    .sidebar-expand-lg .app-sidebar .sidebar-wrapper {
        height: calc(100vh - 3.5rem) !important;
        height: calc(100dvh - 3.5rem) !important;
    }
}

.app-content .container-fluid {
    padding-left: clamp(0.75rem, 2vw, 1.5rem);
    padding-right: clamp(0.75rem, 2vw, 1.5rem);
}

.card,
.card-body,
.card-footer {
    min-width: 0;
}

.card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table,
.dataTable {
    width: 100% !important;
}

.table-responsive,
.dt-container,
.dt-scroll,
.dt-scroll-body {
    max-width: 100%;
}

.dt-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dt-scroll-body {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
}

.table-scroll-y {
    max-height: 60vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.dt-layout-row {
    gap: 0.75rem;
}

.dt-layout-cell {
    min-width: 0;
}

.dt-length,
.dt-search,
.dt-info,
.dt-paging {
    width: 100%;
}

.dt-search input,
.dt-length select {
    max-width: 100%;
}

.preview-container {
    max-width: 100%;
}

.preview-image img,
.table img,
.dataTable img {
    max-width: min(100px, 28vw);
    height: auto;
}

.thumb-picker {
    max-height: 55vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.thumb-picker .preview-container {
    display: inline-grid;
    grid-template-columns: minmax(72px, 120px) auto;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.75rem 0.75rem 0;
    vertical-align: top;
}

@media (max-width: 767.98px) {
    .app-content-header {
        padding-top: 0.75rem;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .dt-layout-row {
        display: block !important;
    }

    .dt-layout-cell {
        display: block !important;
        margin-bottom: 0.75rem;
        text-align: left !important;
    }

    .dt-search label,
    .dt-length label {
        width: 100%;
    }

    .dt-search input {
        display: block;
        width: 100%;
        margin: 0.35rem 0 0;
    }

    .dt-paging nav,
    .pagination {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .table th,
    .table td,
    .dataTable th,
    .dataTable td {
        white-space: nowrap;
        vertical-align: middle;
    }

    .table td:nth-child(2),
    .table td:nth-child(3),
    .dataTable td:nth-child(2),
    .dataTable td:nth-child(3) {
        max-width: 240px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
