:root {
    --sidebar-bg: #F4F4F4;
    --sidebar-primary: #F5A623;
    --sidebar-primary-hover: #E89A1C;
    --sidebar-active-bg: rgba(243, 208, 154, 0.71);
    --sidebar-text: #3A3A3A;
    --sidebar-text-muted: #7A7A7A;
    --sidebar-width-expanded: 280px;
    --sidebar-width-collapsed: 80px;
    --table-th-bg: color-mix(in srgb, var(--sidebar-primary) 8%, white);
    --table-bg: color-mix(in srgb, var(--sidebar-primary) 3%, white);
    --bs-success: #18BD4F;
    --bs-danger: #F82424;
    --bs-success-rgb: 24, 189, 79;
    --bs-danger-rgb: 248, 36, 36;
    --bs-pink: #FF34D3;
    --bs-pink-rgb: 255, 52, 211;
}

body {
    background-color: #F9F8F8;
}

html {
    font-size: 12px;
}

.main-card {
    border-radius: 2em;
}

.page-content .card-header .actions {
    color: black !important;
    width: 42px;
    height: 42px;
    transition: all .2s ease-in-out;
}

.page-content .card-header .actions:hover {
    transform: scale(1.1);
    transition: all .1s ease-in-out;
}

.page-content .card-header .actions:active {
    background-color: var(--sidebar-primary-hover);
}

.badge.bg-success[href]:focus, .badge.bg-success[href]:hover {
    background-color: #13ae46 !important;
}

.badge.bg-danger[href]:focus, .badge.bg-danger[href]:hover {
    background-color: #e41e1e !important;
}

.border-pink {
  border-color: var(--bs-pink) !important;
}

@keyframes pulseScale {
    0% {
        scale: 1;
    }

    50% {
        scale: 1.007;
    }

    100% {
        scale: 1;
    }
}

a.nav-link {
    transition: transform 0.2s cubic-bezier(0.64, 0.06, 0.38, 1.04) !important;
}

a.nav-link:hover {
    transform: translateX(+2px);
    transition: transform 0.1s cubic-bezier(0.64, 0.06, 0.38, 1.04) .05s !important;
    animation: pulseScale 100ms cubic-bezier(.4, 0, .2, 1);
}

ul > li > ul > li:hover  {
    background: var(--sidebar-primary-hover) !important;
    color: var(--sidebar-text) !important;
    transition: all 0.15s ease-in-out;
}

@media (max-width: 991.98px) {

    /* Force all internal items of the sidebar to render in expanded modern state on mobile */

    /* Force layouts not to shift globally on mobile */
    #layout-wrapper {
        padding-left: 0 !important;
    }

    .main-card table:where(:not(.rk-table__table, .rk-calendar__grid, .rk-chart *)) thead, thead th:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)) {
        border-top-color: transparent !important;
        border-bottom-color: transparent !important;
    }

    thead th:first-child:where(:not(.rk-table *, .rk-calendar *, .rk-chart *))::before, thead th:last-child:where(:not(.rk-table *, .rk-calendar *, .rk-chart *))::after {
        content: '';
        position: absolute;
        top: 0;
        width: 19px;
        height: 100%;
        background: var(--table-th-bg);
        box-shadow: inset 0 -1px 0 0  color-mix(in srgb, var(--sidebar-primary) 25%, white) !important;
    }

    thead th:first-child:where(:not(.rk-table *, .rk-calendar *, .rk-chart *))::before {
        left: -18px;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

    thead th:last-child:where(:not(.rk-table *, .rk-calendar *, .rk-chart *))::after {
        right: -18px;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    thead th:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)) {
        position: sticky;
        top: -18px !important;
        z-index: 1;
        border-top-color: transparent !important;
        border-bottom-color: transparent !important;
        background-color: var(--table-th-bg) !important;
        box-shadow: inset 0 -1px 0 0  color-mix(in srgb, var(--sidebar-primary) 30%, white) !important;
    }
}

@media (min-width: 992px) {

    .vertical-menu {
        display: none;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* ==========================================
   Modern Content Area & Tables Layout Styling
   ========================================== */
.main-card .table-responsive {
    border-radius: 12px;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-primary) transparent;
    background: var(--table-bg);
    border: 1px solid color-mix(in srgb, var(--sidebar-primary) 40%, white) !important;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-primary) transparent;
}

.table-responsive {
    overflow-x: auto;
    max-height: 92dvh; /* obrigatório para o sticky funcionar */
    overflow-y: auto;
}

/* As regras de tabela deste arquivo valem só para as tabelas legadas. As do Rock UI ficam com os tokens do design
   system: .rk-table (Table e DataTable), a grade do Calendar (.rk-calendar) e a tabela acessível do ChartContainer
   (.rk-chart), que também são <table>. Um componente novo do Rock UI que renderize <table> entra nesta lista.
   :where() mantém a especificidade original dos seletores. */
.main-card table:where(:not(.rk-table__table, .rk-calendar__grid, .rk-chart *)) thead, thead th:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)) {
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
    white-space: nowrap;
}

thead th:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)) {
    position: sticky;
    top: -21px;
    z-index: 1;
    /*background-color: var(--table-th-bg) !important;*/
    box-shadow: inset 0 -1px 0 0  color-mix(in srgb, var(--sidebar-primary) 25%, white) !important;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--sidebar-primary);
    border-radius: 999px;
}

.main-card table:where(:not(.rk-table__table, .rk-calendar__grid, .rk-chart *)) {
    background: var(--table-bg);
    transition: all .2s ease-in-out;
}

.table th {
    font-size: .9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    color: var(--sidebar-primary) !important;
    background-color: var(--table-bg);
    padding: 1rem 0.875rem !important;
    border-bottom-width: 2px !important;
}

.table td {
    padding: 1rem 0.875rem !important;
    color: #8d8d8d;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.table td b, .table td strong, .table td i {
    color: #767676;
}

.table td, .table th {
    opacity: 1;
    transition:
        filter 60ms ease,
        opacity 100ms ease-in-out 50ms;
}

.main-card tbody tr:first-child td:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)) {
    border-top-color: transparent !important;
}

.main-card tbody tr:last-child td:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)) {
    border-bottom-color: transparent !important;
}

.main-card table #actions-menu {
    font-size: 1.2rem !important;
    border: none !important;
}

.main-card table #actions-menu:hover, .main-card table #customize-columns:hover {
    background-color: var(--sidebar-primary-hover);
    color: color-mix(in srgb, var(--sidebar-primary) 75%, black) !important;
    transform: scale(1.2);
    transition: all 0.15s ease;
}

#customize-columns-hidden-count {
    background-color: var(--sidebar-primary);
}

.main-card .hidden-column {
    display: none;
}

.main-card thead:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)) {
    border-bottom-width: 0 !important;
}

.main-card tbody:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)), .main-card td:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)), .main-card tfoot:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)), .main-card tbody th:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)), .main-card tr:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)) {
    border-bottom-color: color-mix(in srgb, var(--sidebar-primary) 40%, white) !important;
    border-top-color: color-mix(in srgb, var(--sidebar-primary) 40%, white) !important;
    border-width: 1px 0 1px 0 !important;
}

.main-card thead:where(:not(.rk-table *, .rk-calendar *, .rk-chart *)), .main-card table:where(:not(.rk-table__table, .rk-calendar__grid, .rk-chart *)) thead tr {
    border-top-color: unset !important;
    border-width: 0 !important;
}

input[type="checkbox"] {
    height: 1.5em;
    width: 1.5em;
}

input[type="checkbox"]:checked {
    accent-color: var(--sidebar-primary);
    background-color: var(--sidebar-primary) !important;
    border-color: var(--sidebar-primary-hover) !important;
}

/* Actions styling in tables */
.table .btn, .table a.btn {
    border-radius: 10px !important;
    font-size: 0.825rem !important;
    padding: 0.4rem 0.75rem !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.15s ease;
}

i.copy-to-clipboard {
    color: var(--sidebar-primary) !important;
}

/* Filter Modal Card resets */
#filterModal .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

#filterModal .card-body {
    padding: 0 !important;
}

/* Hide old inside form search/clear buttons */
#filterModal .btn-search,
#filterModal .btn-clear {
    display: none !important;
}

#filterModal .d-filter-reduce,
#filterModal .d-per-page {
    margin-bottom: 1rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "❯") !important;
    font-weight: 100;
}

/* Modernized paginator pagination links styling */
.pagination-modern {
    display: inline-block;
}

.pagination-modern .pagination {
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}

.pagination-modern .page-item .page-link {
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--sidebar-text-muted);
    border-radius: 10px !important;
    padding: 0.5rem 0.875rem;
    font-weight: 600;
    background-color: #fff;
    transition: all 0.15s ease;
    font-size: 0.825rem;
}

.pagination-modern .page-item.active .page-link {
    background-color: var(--sidebar-primary) !important;
    border-color: var(--sidebar-primary) !important;
    color: #fff !important;
}

.pagination-modern .page-item.disabled .page-link:hover {
    background-color: #fcfcfc;
    border-color: rgba(0, 0, 0, 0.03);
    color: #ccc;
}

.pagination-modern .page-item:not(.active) .page-link {
    background-color: color-mix(in srgb, var(--sidebar-primary-hover) 50%, white) !important;
    border-color: var(--sidebar-primary);
    color: var(--sidebar-primary);
}

.pagination-modern .page-item:not(.active) .page-link:hover {
    background-color: color-mix(in srgb, var(--sidebar-primary-hover) 40%, white) !important;
    border-color: color-mix(in srgb, var(--sidebar-primary) 40%, black) !important;
    color: color-mix(in srgb, var(--sidebar-primary) 40%, black) !important;
}

.pagination-modern .page-item.disabled .page-link {
    background-color: color-mix(in srgb, var(--sidebar-primary-hover) 20%, white) !important;
    border-color: color-mix(in srgb, var(--sidebar-primary-hover) 20%, white) !important;
}

footer.footer {
    z-index: 3;
    left: 0;
    height: 20px !important;
    padding: 0 !important;
    background-color: var(--bs-body-bg);
    transition: all .2s ease;
}

.footer i.mdi-heart:hover {
    position: absolute;
    transform: translateX(-50%) translateY(-30%);
    font-size: 2rem;
    color: red !important;
    transition: font-size .2s ease;
}

.table .badge-rounded {
    border-radius: 1.667rem !important;
    border: 1px solid transparent !important;
    font-size: 0.825rem !important;
    padding: 0.4rem 0.75rem !important;
    font-weight: 600 !important;
}

#customizeColumns .modal-dialog .modal-content,
#customizeColumns .modal-dialog .modal-content .modal-header {
    border-top-right-radius: 12px !important;
    border-top-left-radius: 12px !important;
}

#customizeColumns .modal-dialog .modal-content,
#customizeColumns .modal-dialog .modal-content .modal-footer {
    border-bottom-right-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

.table-actions {
    border-width: 0.083rem !important;
    border-style: solid !important;
    border-color: color-mix(in srgb, var(--sidebar-primary) 40%, white) !important;
    border-radius: 1rem;
    overflow: hidden;
}

.table-actions .dropdown-header {
    color: #3e3e3e;
    font-size: .8125rem;
    font-weight: bold;
}

.table-actions .dropdown-item {
    border-top-width: 0.067rem;
    border-top-style: solid;
    border-top-color: color-mix(in srgb, var(--sidebar-primary) 40%, white);
}

.table-actions .text-danger:hover {
    color: var(--bs-danger);
}

 /* HOME DASHBOARD */
.bg-opacity-5 {
    --bs-bg-opacity: 0.05 !important;
}

.text-gray {
    color: #3b3b3b;
}

/* Canva Customer Service Request */
.canva-support-header {
    background-color: color-mix(in srgb, var(--sidebar-primary) 3%, white);
    border-bottom: none;
    padding-top: 2rem;
}
.canva-support-header-close {
    filter: invert(68%) sepia(85%) saturate(1554%) hue-rotate(345deg) brightness(101%) contrast(93%);
}
.canva-support-breadcrumb {
    --bs-breadcrumb-divider: '>';
    font-size: 0.95rem;
}
.canva-support-title {
    color: #888;
    font-size: 0.95rem;
}
.btn-canva-action {
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
}
.btn-canva-action-primary {
    background-color: var(--sidebar-primary);
    color: white;
}
.btn-canva-action-secondary {
    background-color: #EFEFEF;
    color: #888;
}
.btn-canva-action-outline {
    background-color: white;
    border: 1px solid var(--sidebar-primary);
    color: var(--sidebar-primary);
}
.canva-search-icon {
    color: var(--sidebar-primary);
    position: absolute;
    left: 10px;
    top: 40%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.canva-search-input {
    border: 1px solid var(--sidebar-primary);
    border-radius: 8px;
    padding-left: 2.5rem;
    height: 50px;
    font-size: 0.9rem;
}

.canva-body-bg {
    background-color: color-mix(in srgb, var(--sidebar-primary) 2%, white);
}
.canva-empty-alert {
    background-color: color-mix(in srgb, var(--sidebar-primary) 5%, white);
    border: 1px solid var(--sidebar-primary);
    color: #888;
    border-radius: 12px;
}
.canva-list-card {
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--sidebar-primary) 40%, white) !important;
    background-color: #FFFFFF;
}
.canva-list-card.unread {
    border: 1px solid color-mix(in srgb, var(--sidebar-primary) 50%, white) !important;
    background-color: color-mix(in srgb, var(--sidebar-primary) 3%, white) !important;
}
.canva-status-badge {
    font-size: 0.75rem;
}
.canva-unread-indicator {
    font-size: 0.75rem;
    color: var(--sidebar-primary);
}
.canva-unread-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--sidebar-primary);
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.canva-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.canva-card-label {
    font-size: 0.85rem;
}
.canva-card-date {
    font-size: 0.8rem;
}
.canva-badge-saf {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
    font-size: 0.7rem;
}
.canva-badge-sac {
    background-color: #E3F2FD;
    color: #1565C0;
    border: 1px solid #90CAF9;
    font-size: 0.7rem;
}
.canva-badge-sector {
    background-color: #F5F5F5;
    color: #616161;
    border: 1px solid #E0E0E0;
    font-size: 0.7rem;
}
.btn-canva-card-action {
    border-radius: 8px;
    width: 34px;
    height: 34px;
}

/* CHAT POPUP - FIDELITY MOCKUP */
.chat-fidelity-popup {
    background-color: transparent !important;
}
.chat-fidelity-header {
    background-color: #FFFFFF !important;
    border-bottom: none !important;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    padding-bottom: 0.5rem !important;
}
.chat-fidelity-avatar {
    background-color: #EAEAEA !important;
    color: #444 !important;
    font-weight: 600;
    width: 48px;
    height: 48px;
}
.chat-fidelity-name {
    color: var(--sidebar-primary) !important;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0px;
}
.chat-fidelity-close i {
    color: var(--sidebar-primary) !important;
    font-size: 1.4rem;
}
.chat-fidelity-info-bar {
    background-color: #FFFFFF !important;
    border-bottom: 1px solid var(--sidebar-primary) !important;
    margin-bottom: 0;
}
.chat-fidelity-info-icon {
    color: var(--sidebar-primary) !important;
}
.chat-fidelity-messages {
    background-color: color-mix(in srgb, var(--sidebar-primary) 4%, #FFF) !important;
}
.chat-fidelity-date {
    color: #888 !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}
.chat-fidelity-bubble-received {
    background-color: #FFFFFF !important;
    border: 1px solid #EAEAEA !important;
    border-radius: 16px !important;
    color: #333 !important;
}
.chat-fidelity-bubble-sent {
    background-color: #EEFBEA !important;
    border: 1px solid #5ED66B !important;
    border-radius: 16px !important;
    color: #333 !important;
}
.chat-fidelity-avatar-sent {
    background-color: #E7FCE5 !important;
    color: #1FC938 !important;
    font-weight: 600 !important;
    width: 32px !important;
    height: 32px !important;
}
.chat-fidelity-avatar-received {
    background-color: #EAEAEA !important;
    color: #555 !important;
    font-weight: 600 !important;
    width: 32px !important;
    height: 32px !important;
}
.chat-fidelity-typing-area {
    background-color: #FFFFFF !important;
    border-top: 1px solid var(--sidebar-primary) !important;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}
.chat-fidelity-btn-send {
    background-color: var(--sidebar-primary) !important;
    color: #FFFFFF !important;
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    transition: transform 0.15s ease !important;
}
.chat-fidelity-btn-send:hover {
    transform: scale(1.05) !important;
}

.btn-send-message {
    width: 44px;
    height: 44px;
    background-color: var(--sidebar-primary);
    color: white;
    border: none;
}

#modal-chageUserTypeNew .modal-dialog .modal-content {
    border: 1px solid color-mix(in srgb, var(--sidebar-primary) 40%, white) !important;
    border-radius: 1.25rem !important;
}

#modal-chageUserTypeNew .modal-dialog .modal-footer {
    border-bottom-left-radius: 1.25rem !important;
    border-bottom-right-radius: 1.25rem !important;
    border-top-color: color-mix(in srgb, var(--sidebar-primary) 40%, white);
}

.step-badge {
    color: var(--sidebar-primary);
    background-color: color-mix(in srgb, var(--sidebar-primary) 20%, white);
    border-radius: 1.667rem !important;
    border: 1px solid transparent !important;
    font-size: 0.825rem !important;
    padding: 0.4rem 0.75rem !important;
    font-weight: 600 !important;
    margin-bottom: 1.5rem;
}

.franchise-access-level-card {
    width: 180px;
    border: 1px solid #DFDFDF;
    border-radius: 8px;
    padding: 16px;
}

.franchise-access-level-card .icons .unit-icon {
    border-radius: 12px;
    width: 54px;
    height: 54px;
    background-color: #F6F6F6;
}

.franchise-access-level-card .icons .unit-icon i {
    color: #9A9A9A;
}

.franchise-access-level-card .icons .check-icon .icon-tabler-circle-check {
    display: none;
}

.selected-card {
    border: 1px solid var(--sidebar-primary);
    background-color: color-mix(in srgb, var(--sidebar-primary) 10%, transparent);
}

.selected-card .icons .unit-icon {
    background-color: var(--sidebar-primary)10;
}

.selected-card .icons .unit-icon i {
    color: var(--sidebar-primary);
}

.selected-card .icons .check-icon .icon-tabler-circle-check {
    display: block;
}

.custom-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-primary) transparent;
}

.custom-scroll::-webkit-scrollbar {
    height: 8px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: var(--sidebar-primary);
    border-radius: 999px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-primary-hover);
}

.search-box {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.search-toggle {
    border-radius: 10px;
    border: 1px solid var(--sidebar-primary);
    background-color: color-mix(in srgb, var(--sidebar-primary) 10%, transparent);
}

.search-toggle i {
    color: var(--sidebar-primary);
}

.search-input {
    width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    transition: .25s;
}

.search-box.open .search-input {
    width: 250px;
    opacity: 1;
    margin-right: .5rem;
    padding: .375rem .75rem;
    border: 1px solid #ced4da;
    border-radius: 10px;
}
