:root {
    --border-radius: 10px;
}

.border-rounded {
    border-radius: var(--border-radius);
    -webkit-border-radius: var(--border-radius);
    -moz-border-radius: var(--border-radius);
    -ms-border-radius: var(--border-radius);
    -o-border-radius: var(--border-radius);
}

.border-rounded-1rem {
    border-radius: 1rem !important;
    -webkit-border-radius: 1rem !important;
    -moz-border-radius: 1rem !important;
    -ms-border-radius: 1rem !important;
    -o-border-radius: 1rem !important;
}

.border.border-dashed {
    border-style: dashed !important;
}

.gap-1 {
    gap: 0.25rem !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.flex-1 {
    flex: 1 1 auto !important;
}

.w-6rem {
    width: 6rem !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

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

img,
iframe,
embed,
object,
video {
    max-width: 100%;
}

iframe {
    display: block;
}

.main-content-wrap,
.main-content,
.card,
.card-body,
.modal-content,
.tab-content,
.table-responsive,
.dataTables_wrapper,
.select2-container,
.nav-tabs,
.custom-file,
.custom-file-label,
.custom-file-input,
.form-control,
.input-group,
.row > [class*="col-"] {
    min-width: 0;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table,
.dataTables_wrapper table,
table.table {
    width: 100%;
}

.custom-file,
.custom-file-label,
.form-control-file {
    max-width: 100%;
}

.custom-file-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-file-preview {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.75rem;
    background: #f8fafc;
}

.mobile-file-preview.is-empty {
    display: none;
}

.mobile-file-preview__title {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.mobile-file-preview__frame,
.mobile-file-preview__image {
    width: 100%;
    border: 0;
    border-radius: 0.75rem;
    background: #fff;
}

.mobile-file-preview__frame {
    min-height: 240px;
}

.mobile-file-preview__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
}

.nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.nav-tabs .nav-item {
    flex: 0 0 auto;
}

.nav-tabs .nav-link {
    white-space: nowrap;
}

.modal .modal-body {
    overflow-wrap: anywhere;
}

.modal-preview-frame,
#previewPdfFrameSk,
#previewPdfFrameLhp {
    width: 100%;
    min-height: min(70vh, 720px);
    border: 0;
}

.preview-pdf-actions {
    display: flex;
    width: 100%;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.preview-pdf-download-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.page-link,
.nav-link,
.custom-file-label,
.select2-selection,
.close {
    touch-action: manipulation;
}

button:focus,
.btn:focus,
.form-control:focus,
.select2-container--bootstrap4.select2-container--focus .select2-selection,
.nav-link:focus {
    outline: 0;
}

@media (max-width: 991.98px) {
    .app-admin-wrap.layout-sidebar-large .main-content-wrap {
        width: 100%;
    }

    .main-header {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .main-content {
        padding-left: 0;
        padding-right: 0;
    }

    .breadcrumb,
    .separator-breadcrumb,
    .main-content > .row,
    .main-content > .card,
    .main-content > .container-fluid {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    .main-content {
        padding-bottom: 5rem;
    }

    .card-body,
    .modal-body,
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }

    .modal-dialog {
        width: auto;
        margin: 0.5rem;
    }

    .modal-lg,
    .modal-xl {
        max-width: calc(100vw - 1rem);
    }

    .modal .modal-body {
        max-height: calc(100vh - 9rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal .modal-footer {
        gap: 0.75rem;
    }

    .modal .modal-footer > * {
        width: 100%;
    }

    .table-responsive {
        margin-bottom: 0.5rem;
        border-radius: 0.75rem;
    }

    table.table,
    .dataTables_wrapper table {
        font-size: 0.875rem;
    }

    table.table th,
    table.table td,
    .dataTables_wrapper table th,
    .dataTables_wrapper table td {
        white-space: nowrap;
        vertical-align: top;
    }

    div.dataTables_wrapper div.dataTables_length,
    div.dataTables_wrapper div.dataTables_filter,
    div.dataTables_wrapper div.dataTables_info,
    div.dataTables_wrapper div.dataTables_paginate {
        text-align: left;
    }

    div.dataTables_wrapper div.dataTables_filter label,
    div.dataTables_wrapper div.dataTables_length label {
        display: block;
        width: 100%;
    }

    div.dataTables_wrapper div.dataTables_filter input,
    div.dataTables_wrapper div.dataTables_length select {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-top: 0.35rem;
    }

    div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .btn,
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .page-link,
    .nav-link,
    .custom-file-label,
    .form-control,
    .select2-container--bootstrap4 .select2-selection--single,
    .select2-container--bootstrap4 .select2-selection--multiple {
        min-height: 44px;
    }

    .form-control,
    .custom-file-label,
    .select2-container--bootstrap4 .select2-selection,
    .btn,
    .page-link {
        font-size: 0.95rem;
    }

    .select2-container--bootstrap4 .select2-selection--single {
        height: 44px !important;
        padding-top: 0.2rem;
    }

    .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
        line-height: 2.45rem;
        padding-left: 0.9rem;
        padding-right: 2rem;
    }

    .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
        height: 42px;
        top: 50%;
        right: 0.45rem;
        transform: translateY(-50%);
    }

    .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
        top: 50%;
        left: 50%;
        margin-top: 0;
        margin-left: 0;
        transform: translate(-50%, -50%);
    }

    .select2-container--bootstrap4 .select2-selection--multiple {
        min-height: 44px !important;
        padding-bottom: 0.25rem;
    }

    .select2-container--bootstrap4 .select2-results > .select2-results__options {
        max-height: 45vh;
    }

    .close {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-header .header-part-right {
        gap: 0.25rem;
    }

    .main-header .user img {
        width: 36px;
        height: 36px;
        object-fit: cover;
    }

    .preview-pdf-actions,
    .preview-pdf-download-group {
        width: 100%;
    }

    .preview-pdf-actions .btn,
    .preview-pdf-download-group .btn {
        flex: 1 1 100%;
    }

    .modal-preview-frame,
    #previewPdfFrameSk,
    #previewPdfFrameLhp {
        min-height: 55vh;
    }

    .toast,
    .swal2-container .swal2-popup {
        width: calc(100vw - 1rem) !important;
    }
}