﻿
:root {
    --theme-color-main: #C7A6A1;
    --theme-color-main-hover: #C7A6A1;
    --theme-color-main-2: #715C5D;
}

.validate-error {
    border: 1px solid red;
}
.color-main {
    color: var(--theme-color-main) !important;
}
.invalid-error {
    width: 100%;
    margin-top: .25rem;
    font-size: 80%;
    color: #dc3545;
}

.form-body {
    width: 100%;
    padding: 0px;
}

.form-body-edit {
    width: 80%;
    padding: 0px;
    margin: auto;
}

.form-head {
    display: flex;
    padding: 0px;
}

.btn-filter {
    width: 120px;
    float: right
}

.btn-custom i {
    padding-right: 5px;
}

.btn-custom {
    margin: 0px 5px
}

.modal-footer-custom {
    display: block
}

.card-body-modal {
    padding: 0px;
}

    .card-body-modal .card {
        box-shadow: none;
        margin-bottom: 0rem;
    }

.btn-main {
    background-color: var(--theme-color-main);
    border-color: var(--theme-color-main);
}

    .btn-main:hover, .btn-main:focus, .btn-main.btn-primary:not(:disabled):not(.disabled):active {
        background-color: var(--theme-color-main-hover);
        border-color: var(--theme-color-main-hover);
    }

.title-head {
    color: var(--theme-color-main-2);
}

ul.tree {
    padding: 0px;
    width: 100%;
}

    ul.tree ul {
        padding-left: 30px;
    }

    ul.tree li {
        width: 100%;
        float: left
    }

ul li {
    list-style-type: none;
    padding-bottom: 10px
}

ul.tree li .icheck-primary {
    width: 100%;
    /* padding-bottom: 11px; */
    float: left;
}

.form-group label.lb-normal, .icheck-custom label.lb-normal {
    font-weight: 400;
}

.table-custom.table td, .table-custom.table th {
    padding: .5rem;
}

.table-custom.table th {
    border-bottom: 0px
}

.btn-edit {
    padding: .2rem .5rem;
}

.main-header .navbar-nav .nav-item {
    padding-bottom: 0px;
}

/*.card-custom .card-body-form {
    min-height: calc(100vh - 200px);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 1rem;
}*/
/*.card-custom .card-body.full-height {
    height: calc(100vh - 150px);
    overflow-y: auto; 
}*/
a.disabled {
    pointer-events: none;
    color: #ccc;
}

.nav-sidebar-custom.nav-sidebar.nav-child-indent .nav-treeview {
    padding-left: 0px;
}

    .nav-sidebar-custom.nav-sidebar.nav-child-indent .nav-treeview li {
        padding: 3px 0px 3px 30px;
        position: relative;
    }

        .nav-sidebar-custom.nav-sidebar.nav-child-indent .nav-treeview li.active {
            background: rgba(255,255,255,18%);
        }

.sidebar-custom, .main-sidebardark-custom {
    background: #ffffff;
}

    .sidebar-custom [class*=sidebar-dark] .nav-legacy.nav-sidebar > .nav-item .nav-treeview, [class*=sidebar-dark] .nav-legacy.nav-sidebar > .nav-item > .nav-treeview {
        background-color: #f4f6f9;
    }

    .sidebar-custom .nav-sidebar.nav-legacy > .nav-item > .nav-link.active, .sidebar-light-primary .nav-sidebar.nav-legacy > .nav-item > .nav-link.active {
        border-left: 3px solid #ca7317;
        text-shadow: rgb(0 0 0 / 25%) 0 -1px 0;
        background: linear-gradient(var( --theme-color-main-2),var( --theme-color-main-2)),var( --theme-color-main-2);
        /*  box-shadow: rgb(0 0 0 / 2%) 0 1px 0, inset rgb(255 255 255 / 16%) 0 1px 0;*/
    }

[class*=sidebar-dark-] .nav-treeview > .nav-item > .nav-link {
    color: var( --theme-color-main-2);
}

[class*=sidebar-dark] .nav-legacy .nav-treeview > .nav-item > .nav-link.active {
    background-color: var( --theme-color-main-2) !important;
    color: #fff;
}

[class*=sidebar-dark-] .nav-treeview > .nav-item > .nav-link:focus, [class*=sidebar-dark-] .nav-treeview > .nav-item > .nav-link:hover {
    background-color: #ec82f929 !important;
    color: var( --theme-color-main-2) !important;
}

.title-head-menu {
    color: var( --theme-color-main-2);
    font-weight: bold !important;
    line-height: 35px;
    text-align: center;
}

[class*=sidebar-dark-] .nav-sidebar > .nav-item.menu-open > .nav-link, [class*=sidebar-dark-] .nav-sidebar > .nav-item:hover > .nav-link, [class*=sidebar-dark-] .nav-sidebar > .nav-item > .nav-link:focus {
    background-color: var( --theme-color-main-2);
}

[class*=sidebar-dark] .sidebar-custom {
    border-top: 1px solid var(--theme-color-main-2);
}

[class*=sidebar-dark-] .sidebar a {
    color: var( --theme-color-main-2);
}

.nav-treeview-child li:before {
    background: var( --theme-color-main-2);
    bottom: auto;
    content: "";
    height: 8px;
    left: 15px;
    margin-top: 15px;
    position: absolute;
    right: auto;
    width: 8px;
    z-index: 1;
    border-radius: 50%;
}

.nav-treeview-child li:after {
    border-left: 1px solid var( --theme-color-main-2);
    bottom: 0;
    content: "";
    left: 18px;
    position: absolute;
    top: 0;
}

.main-sidebardark-custom .brand-link {
    border-bottom: none
}

.main-sidebardark-custom .brand-link, [class*=sidebar-dark] .brand-link .pushmenu {
    height: 55.5px;
}

.brand-link .brand-image {
    max-height: 30px;
    margin-left: 0rem;
    margin-top: 0px;
    box-shadow: none !important
}

.title-menu-top {
    color: #007bff;
    font-weight: bold;
    font-size: 18px;
}

.btn-save {
    width: auto;
    float: right;
}

.label-file-form {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ced4da;
    color: #495057;
    border-radius: .25rem;
    width: 183px;
    aspect-ratio: 1;
}

    .label-file-form img {
        object-fit: cover;
        width: 100%;
        min-height: 100%;
        max-width: 100%;
    }

.margin-bot-5 {
    margin-bottom: 5px;
}

.no-padding {
    padding: 0px
}

.fl {
    width: 100%;
    float: left
}

.no-magrin {
    margin: 0px !important
}

.nav-sidebar-custom .nav-icon {
    margin-left: 0px !important
}

.bg-full {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.form-group-edit {
    width: 100%;
    float: left;
}

    .form-group-edit label {
        width: 100px;
        float: left
    }

    .form-group-edit .form-detail {
        width: calc(100% - 100px);
        float: left;
    }

.card-custom-vbqp .form-group-edit label {
    width: 150px;
    float: left
}

.card-custom-vbqp .form-group-edit .form-detail {
    width: calc(100% - 150px);
    float: left;
}

.mailbox-attachments-custome li {
    width: 23%;
    margin-right: 15px;
    padding-bottom: 0px;
}

    .mailbox-attachments-custome li .mailbox-attachment-info {
        padding: 0px;
        margin: 0px;
    }

    .mailbox-attachments-custome li .mailbox-attachment-icon {
        padding: 2px
    }

.select2-selection, .select2 .select2-selection {
    height: 38px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 0px;
}

.card-body-form .card-body {
    min-height: auto;
}
.card-body {
    padding: 1.5rem 1.5rem;
    border-radius: 10px;
}
.bg-image {
    background-size: cover; /* Cover the entire container */
    background-position: center; /* Center the background image */
    background-repeat: no-repeat; /* Do not repeat the background image */
}

.btn-main.disabled, .btn-main:disabled {
    color: #fff;
    background-color: var(--theme-color-main);
    border-color: var(--theme-color-main);
}

[v-cloak] {
    display: none;
}
/* ===== MODAL OPTIMIZATION ===== */

/* Tối ưu modal size */
.modal-dialog.modal-lg {
    max-width: 900px;
    margin: 1rem auto;
}

.modal-dialog.modal-md {
    max-width: 600px;
    margin: 1.5rem auto;
}

/* Modal header compact */
.modal-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-color-main);
    margin: 0;
}

.modal-header .close {
    padding: 0.5rem;
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

    .modal-header .close:hover {
        opacity: 1;
        color: #dc3545;
    }

/* Modal body optimization */
.modal-body {
    padding: 1rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.card-body-modal {
    padding: 0;
}

    .card-body-modal .card {
        box-shadow: none;
        border: none;
        margin-bottom: 0;
    }

/* Tab navigation compact */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1rem;
}

    .nav-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        font-weight: 500;
        border-radius: 0.25rem 0.25rem 0 0;
        transition: all 0.2s;
    }

        .nav-tabs .nav-link.active {
            background-color: var(--theme-color-main);
            color: white;
            border-color: var(--theme-color-main);
        }

        .nav-tabs .nav-link:hover:not(.active) {
            background-color: #f8f9fa;
            border-color: #dee2e6;
        }

/* Form groups compact */
.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        font-size: 1rem;
        font-weight: 500;
        margin-bottom: 0.25rem;
        color: #495057;
    }

.form-control {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    height: auto;
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .form-control:focus {
        border-color: var(--theme-color-main);
        box-shadow: 0 0 0 0.2rem rgba(122, 42, 132, 0.15);
    }

/* Input group optimization */
.input-group-text {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Modal footer compact */
.modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

    .modal-footer .btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        min-width: 80px;
    }

/* Role checkbox grid optimization */
.tree {
    padding: 0;
    margin: 0;
}

    .tree li {
        padding: 0.25rem 0;
        margin: 0;
    }

    .tree .col-md-4 {
        padding: 0.25rem 0.5rem;
    }

.icheck-primary {
    margin: 0;
}

.icheck-custom label {
    font-size: 1rem;
    margin-bottom: 0;
    padding-left: 0.25rem;
}

/* ===== TABLE OPTIMIZATION ===== */

/* Card optimization */
.card-custom {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
    border-radius: 0.5rem;
    margin-bottom:0px;
}

    .card-custom .card-header {
        background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
        border-bottom: 2px solid #e9ecef;
        padding: 0.55rem;
        border-radius: 0.5rem 0.5rem 0 0;
    }

/* Form head optimization */
.form-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.form-head_Left {
    flex: 1;
    padding: 0;
}

.form-head_right {
    padding: 0;
}

.form-head input[type="text"] {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

.btn-filter {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.badge {
    font-size: 90% !important;
}

/* Table optimization */
.table-custom {
    font-size: 0.9rem;
    margin-bottom: 0;
}

    .table-custom thead th {
        background-color: #8299ad;
        color: white;
        font-weight: 600;
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        text-align: center;
        vertical-align: middle;
    }

    .table-custom tbody td {
        padding: 0.6rem 0.5rem;
        vertical-align: middle;
        font-size: 0.95rem;
        border-bottom: 1px solid #e9ecef;
    }

    .table-custom tbody tr:hover {
        background-color: #f8f9fa;
        transition: background-color 0.2s;
    }

    .table-custom tbody tr:nth-child(even) {
        background-color: #fafbfc;
    }

/* Action buttons optimization */
.btn-edit {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin: 0 0.125rem;
    border-radius: 0.25rem;
    font-weight: 500;
    white-space: nowrap;
}

    .btn-edit i {
        margin-right: 0.25rem;
        font-size: 0.75rem;
    }

/* Status badges */
.table-custom .text-center {
    text-align: center;
}

/* Card body with optimized height */
.card-custom .card-body-form {
    min-height: calc(100vh - 195px);
    max-height: calc(100vh - 195px);
    overflow-y: auto;
    padding: 1rem;
}
/* Card footer */
.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Pagination optimization */
.pagination {
    margin: 0;
}

    .pagination .page-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.85rem;
    }

/* Menu active states */
.nav-sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.1) !important;
    color: var(--theme-color-main) !important;
}

.nav-sidebar .nav-link.active {
    background-color: var(--theme-color-main) !important;
    color: white !important;
}

.nav-treeview .nav-link:hover {
    background-color: rgba(255,255,255,0.1) !important;
}

.nav-treeview .nav-link.active {
    background-color: var(--theme-color-main) !important;
    color: white !important;
}

/* Group menu animation */
.nav-item.menu-open > .nav-link .fa-angle-left,
.nav-item.menu-is-opening > .nav-link .fa-angle-left {
    transform: rotate(-90deg);
    transition: transform 0.3s ease;
}

.nav-treeview {
    background-color: rgba(0,0,0,0.1);
}

    .nav-treeview .nav-link {
        padding-left: 2rem !important;
    }


/* ===== RESPONSIVE OPTIMIZATION ===== */

@media (max-width: 768px) {
    .modal-dialog.modal-lg {
        max-width: 95%;
        margin: 0.5rem;
    }

    .form-head {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-head_Left,
    .form-head_right {
        width: 100%;
    }

    .table-custom {
        font-size: 0.8rem;
    }

    .btn-edit {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
        margin: 0.1rem;
    }

        .btn-edit i {
            display: none;
        }

    .tree .col-md-4 {
        width: 100%;
        padding: 0.25rem;
    }

    .card-custom .card-body {
        padding: 0.75rem;
        min-height: calc(100vh - 200px);
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.75rem;
    }

    .table-responsive {
        border: none;
    }

    .table-custom thead {
        display: none;
    }

    .table-custom,
    .table-custom tbody,
    .table-custom tr,
    .table-custom td {
        display: block;
        width: 100%;
    }

        .table-custom tr {
            border: 1px solid #e9ecef;
            margin-bottom: 0.5rem;
            border-radius: 0.25rem;
            padding: 0.5rem;
            background: white;
        }

        .table-custom td {
            border: none;
            padding: 0.25rem 0;
            text-align: left !important;
        }

            .table-custom td:before {
                content: attr(data-label) ": ";
                font-weight: 600;
                color: var(--theme-color-main);
            }
}

/* ===== LOADING & ANIMATION ===== */

.modal.fade .modal-dialog {
    transform: translateY(-25px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

/* Form validation styling */
.validate-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.invalid-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Success/Error states */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

/* Button hover effects */
.btn-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

/* Checkbox styling */
.icheck-primary input[type="checkbox"]:checked + label::before {
    background-color: var(--theme-color-main);
    border-color: var(--theme-color-main);
}

/* No data state */
.table-custom .text-center[colspan] {
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.pagination-table li {
    padding-bottom: 0px;
}


/* Existing styles... */
/* ===== PAGINATION IMPROVEMENTS ===== */
/* Pagination container */
.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Page size selector */
.form-control-sm {
    font-size: 0.875rem;
    line-height: 1.25;
}

/* Pagination buttons */
.pagination-sm .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
    margin: 0 1px;
}

.pagination-sm .page-item.active .page-link {
    background-color: var(--theme-color-main, #007bff);
    border-color: var(--theme-color-main, #007bff);
}

.pagination-sm .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-footer .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

        .card-footer .d-flex > div {
            width: 100%;
            justify-content: center;
        }

    .pagination-sm .page-link {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }

    /* Hide first/last buttons on mobile */
    .pagination .page-item:first-child,
    .pagination .page-item:last-child {
        display: none;
    }
}

@media (max-width: 576px) {
    .card-footer span {
        font-size: 0.8rem;
    }

    .form-control-sm {
        font-size: 0.8rem;
    }
}


/* ===== CKEDITOR SUPERBUILD STYLING ===== */
.ck.ck-editor {
    max-width: 100% !important;
}

.ck.ck-toolbar {
    flex-wrap: wrap !important;
    border-radius: 8px 8px 0 0 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    padding: 5px !important;
}

    .ck.ck-toolbar .ck-button {
        margin: 1px !important;
        border-radius: 4px !important;
        transition: all 0.2s ease !important;
    }

        .ck.ck-toolbar .ck-button:hover {
            background: #e3f2fd !important;
            transform: translateY(-1px) !important;
        }

.ck.ck-editor__editable {
    min-height: 500px !important;
    max-height: 800px !important;
    border-radius: 0 0 8px 8px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    line-height: 1.6 !important;
    padding: 20px !important;
}

/* Highlight markers */
.marker-yellow {
    background-color: #ffff00;
}

.marker-green {
    background-color: #00ff00;
}

.marker-pink {
    background-color: #ff69b4;
}

.marker-blue {
    background-color: #add8e6;
}

.pen-red {
    color: #ff0000;
}

.pen-green {
    color: #008000;
}

/* Custom styles */
.info-box {
    background: #e3f2fd;
    padding: 15px;
    border-left: 4px solid #2196f3;
    margin: 15px 0;
}

.side-quote {
    border-left: 4px solid #ff9800;
    padding-left: 15px;
    margin: 15px 0;
    font-style: italic;
    color: #666;
}

.document-title {
    color: #2196f3;
    border-bottom: 2px solid #2196f3;
    padding-bottom: 10px;
}

.document-subtitle {
    color: #666;
    font-weight: 300;
}

.cke_notifications_area {
    display: none !important;
}
/* Custom CSS cho nội dung CKEditor */
.cke_editable {
    font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

    .cke_editable h1 {
        color: #2c3e50;
        font-size: 2em;
        margin: 20px 0 15px 0;
    }

    .cke_editable h2 {
        color: #34495e;
        font-size: 1.5em;
        margin: 18px 0 12px 0;
    }

    .cke_editable h3 {
        color: #7f8c8d;
        font-size: 1.2em;
        margin: 15px 0 10px 0;
    }

    .cke_editable p {
        margin: 10px 0;
    }

    .cke_editable ul, .cke_editable ol {
        margin: 10px 0 10px 20px;
    }

    /* Box styles */
    .cke_editable .info-box {
        padding: 15px;
        border: 1px solid #bdc3c7;
        background-color: #ecf0f1;
        border-radius: 4px;
        margin: 10px 0;
    }
.button-dropdown-toggle.dropdown-toggle::after {
    top: 20px;
    position: absolute;
    right: 10px;
}
.text-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.info-box-action {
    padding: 7px;
    margin:0px;
}
    .info-box-action .info-box-icon {
        width: 50px;
    }
/* ===== Notification Bell ===== */
#notificationBell .noti-item { padding: 8px 12px; white-space: normal; border-bottom: 1px solid #f1f3f6; }
#notificationBell .noti-item:last-of-type { border-bottom: none; }
#notificationBell .noti-item:hover { background: #f6f9fc; }
#notificationBell .noti-item.noti-unread { background: #fff8e6; }
#notificationBell .noti-item.noti-unread .noti-title { font-weight: 600; }
#notificationBell .noti-title { font-size: 13px; line-height: 1.3; margin-bottom: 2px; }
#notificationBell .noti-msg   { line-height: 1.3; }
#notificationBell .navbar-badge { font-size: 10px; padding: 2px 5px; }
