﻿:root {
    --soft-shadow: 0 6px 22px rgba(18,38,63,.08);
    --chip-bg: #f5f7fb;
}

body {
    background: #f7f8fb
}

.card-elevated {
    box-shadow: var(--soft-shadow);
    border: 0
}

/* Header */
.entity-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg,#e9f2ff,#f5f8ff);
    border: 1px solid #e4ecff;
    color: #0d6efd
}

.meta-chip {
    background: var(--chip-bg);
    border: 1px solid #edf1f7;
    color: #445;
    padding: .4rem .6rem;
    border-radius: 10px;
    font-size: .9rem
}

.btn-kebab {
    border-radius: 12px
}


.alert,
#alert-failure,
#alert-success {
    position: fixed;
    top: 50px;
    left: calc((100vw - 400px) /2);
    width: 400px;
    z-index: 9999;
}

.modal-content {
    top: 48px;
}
/*--------------------------------------------
-------------------FORM-----------------------
--------------------------------------------*/
input.form-control,
.form-select {
    height: 36px;
    display: flex;
    align-items: center;
}

.form-control:focus,
.form-select:focus {
    box-shadow: none;
}

button, .btn {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
}

span.field-validation-error {
    color: red;
    font-size: 13px;
}

span.required {
    color: red;
}

a.btn.btn-filter {
    height: 28px;
    width: 28px;
    justify-content: center;
    background: #ddd;
    border-radius: 50%;
    color: #666666;
}

    a.btn.btn-filter:hover {
        background: #6e6e6e;
        color: #fff;
    }

.field-value.field-checkbox {
    display: flex;
    align-items: center;
    justify-content: start;
}

    .field-value.field-checkbox input {
        margin: 0;
    }

.select2-container--default .select2-selection--single {
    border-color: #dee2e6!important;
    border-radius: 6px;
}

button:focus {
    box-shadow: none !important;
}
/*--------------------------------------------
-------------------TABLE----------------------
--------------------------------------------*/
table {
    min-width: max-content;
    width: 100%;
}
.btn.btn-act-tb {
    width: 26px;
    height: 26px;
    justify-content: center;
    font-size: 14px;
    border-radius: 4px;
}

.app-pagination {
    border-radius: 0 0 8px 8px;
}

.btn-pagination {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-color: #efefef !important;
}

    .btn-pagination:hover {
        background: #e9e9e9;
    }

    .btn-pagination.disabled {
        opacity: .6;
    }

        .btn-pagination.disabled:hover {
            background: white;
        }
a.selected-asc:link,
a.selected-asc:visited,
a.selected-asc:hover,
a.selected-asc:active {
    padding-right: 20px;
    background: url(/img/arrow-down.png) no-repeat center right;
}

a.selected-desc:link,
a.selected-desc:visited,
a.selected-desc:hover,
a.selected-desc:active {
    padding-right: 20px;
    background: url(/img/arrow-up.png) no-repeat center right;
}

a.selected-none {
    padding-right: 20px;
    background: url(/img/arrow-none.png) no-repeat center right;
}

.column-value {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

th a,
td a{
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
tr.tr-filter input.form-control,
tr.tr-filter .btn {
    height: 32px;
}

td {
    max-width: 350px;
}

/* Cố định cột cuối cùng */
.table .sticky-last {
    position: sticky;
    right: 0;
    z-index: 5;
}
.app-pagination .page-link {
    padding: 3px 11px;
}
.app-pagination li.page-item.disabled a {
    background: #f5f5f5;
}
.tr-filter .select2-container .select2-selection--single {
    height: 32px !important;
}

.tr-filter .select2-container--default .select2-selection--single .select2-selection__rendered {
    height: 30px !important;
}

.tr-filter .select2-container {
    z-index: 1;
}
.tr-filter .mb-2 {
    margin-bottom: 0 !important;
}

.app-pagination span.select2-selection {
    height: 31px !important;
}
.app-pagination .select2-selection__rendered {
    height: 29px !important;
}
.app-line:last-child{
    display: none;
}
.btn-pagination:disabled {
    background: #e9e9e9;
}

.app-pagination {
    border-top: 0 !important;
}

@media (max-width: 768px) {
    .app-pagination {
        border-top: 1px solid #dee2e6 !important;
        border-radius: 4px;
    }
}
/*--------------------------------------------
-------------------TIEN ICH-------------------
--------------------------------------------*/
.min-h-32px {
    min-height: 32px;
}

.min-w-120px {
    min-width: 120px;
}

.w-40px {
    width: 40px;
}
.text-ellipsis {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.w-0 { width: 0!important; }
.h-0 { height: 0 !important; }
.h-36 { height: 36px; }

.cursor-pointer {
    cursor: pointer; 

}

/*--------------------------------------------
-------------------SELECT2--------------------
--------------------------------------------*/
.select2-container--open .select2-dropdown {
    left: 0;
    box-shadow: 0 2px 6px #00000052;
    border-color: #e2e4e9 !important;
    border-radius: 4px !important;
}

span.select2.select2-container {
    width: 100% !important;
}

span.selection {
    width: 100%;
}

span.select2-selection {
    height: 36px !important;
    border-color: #d3d3d3 !important;
    padding: 0;
}

span.select2-selection__arrow {
    display: none;
}

.select2-selection__rendered {
    height: 34px;
    padding: 0 38px 0 12px !important;
    display: flex !important;
    align-items: center;
    width: calc(100% - 48px);
}

input.select2-search__field {
    outline: none;
    border: none !important;
    padding: 0 12px !important;
}

span.select2-search.select2-search--dropdown {
    padding: 0 !important;
    border-bottom: 1px solid #d3d3d3;
}

li.select2-results__option {
    padding: 6px 12px;
    color: #212529;
    border-bottom: 1px dashed #e3e3e3;
}

    li.select2-results__option:last-child {
        border-bottom: none;
    }

input.select2-search__field {
    height: 36px;
}


.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    font-weight: 500 !important;
    font-size: 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    padding-bottom: 2px;
    right: 8px;
    top: 8px;
    border-radius: 50%;
    color: #565656;
}

tr.tr-filter .select2-container--default .select2-selection--single .select2-selection__clear {
    top: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    background: #0000001f;
}

.select-0 {
    width: 0;
    height: 0;
    padding: 0;
    border: 0;
}

/*--------------------------------------------
-------------------MODAL----------------------
--------------------------------------------*/
/* Shared dialog polish */
.modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: var(--shadow)
}

.modal-header {
    border: 0
}

.modal-footer {
    border: 0
}

/* === EFFECT: ZOOM === */
.modal.fx-zoom .modal-dialog {
    transform: scale(.92);
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease;
}

.modal.show.fx-zoom .modal-dialog {
    transform: scale(1);
    opacity: 1
}

/* === EFFECT: SLIDE-UP === */
.modal.fx-slide .modal-dialog {
    transform: translateY(16px);
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease;
}

.modal.show.fx-slide .modal-dialog {
    transform: translateY(0);
    opacity: 1
}

/* === EFFECT: FLIP === */
.modal.fx-flip .modal-dialog {
    transform: perspective(800px) rotateX(-12deg) translateY(6px);
    opacity: 0;
    transition: transform .32s cubic-bezier(.2,.75,.2,1), opacity .26s ease;
    transform-origin: 50% -10%;
}

.modal.show.fx-flip .modal-dialog {
    transform: perspective(800px) rotateX(0) translateY(0);
    opacity: 1
}

/* Little pulse on the primary button when modal shows */
.modal.show .btn-primary.pulse {
    animation: pulse .8s ease .25s 1
}

@keyframes pulse {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.035)
    }

    100% {
        transform: scale(1)
    }
}