/* Global DataTables sort-arrow sizing for all current and future tables */
table.dataTable thead > tr > th[class*="sorting"]::before,
table.dataTable thead > tr > th[class*="sorting"]::after,
table.dataTable thead > tr > td[class*="sorting"]::before,
table.dataTable thead > tr > td[class*="sorting"]::after {
    font-size: 0.65em !important;
    line-height: 7px !important;
    right: 8px !important;
}

table.dataTable thead > tr > th[class*="sorting"],
table.dataTable thead > tr > td[class*="sorting"] {
    padding-right: 18px !important;
}

.card-body .table-responsive {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
}

.card-body .table-responsive .table-responsive {
    margin-left: 0;
    margin-right: 0;
}

.card-body .table-responsive > .table > :not(caption) > * > *:first-child {
    padding-left: 1.5rem;
}

.card-body .table-responsive > .table > :not(caption) > * > *:last-child {
    padding-right: 1.5rem;
}

.form-label {
    color: #1f2937 !important;
}

.form-control {
    color: #111827 !important;
    font-weight: 500;
}

.form-select {
    color: #111827 !important;
    font-weight: 400;
}

/* Sidebar active item with Bootstrap secondary */
.sidebar .iq-main-menu .nav-link.active {
    background-color: var(--bs-secondary) !important;
    color: #fff !important;
    border-radius: 8px; /* optional for nicer UI */
}

/* Icon inside active */
.sidebar .iq-main-menu .nav-link.active svg {
    color: #fff !important;
}

/* Smooth hover */
.sidebar .iq-main-menu .nav-link {
    transition: all 0.2s ease;
}

.sidebar .iq-main-menu .nav-link:hover {
    background-color: rgba(108, 117, 125, 0.15); /* soft secondary hover */
}

.sidebar .iq-main-menu .nav-link.sidebar-menu-toggle[aria-expanded="true"] {
    background: transparent !important;
    color: #6c757d !important;
    box-shadow: none !important;
}

.global-search {
    position: relative;
}

.global-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1050;
    display: none;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid rgba(17, 24, 39, 0.1);
    border-radius: 8px;
    background: #fff;
}

.global-search-results.is-visible {
    display: block;
}

.global-search-group {
    padding: 10px;
}

.global-search-group + .global-search-group {
    border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.global-search-category {
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.global-search-item {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: #111827;
    text-decoration: none;
}

.global-search-item:hover,
.global-search-item:focus {
    background: rgba(108, 117, 125, 0.12);
    color: #111827;
    outline: none;
}

.global-search-title,
.global-search-description {
    display: block;
}

.global-search-title {
    font-weight: 700;
}

.global-search-description {
    margin-top: 2px;
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.35;
}

.global-search-empty {
    padding: 14px;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Neutral gray scrollbars for page, tables, and template custom scroll areas */
* {
    scrollbar-color: #7d7d7d #f1f5f9;
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: #7d7d7d;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b6b6b;
}

.scrollbar-thumb,
.scrollbar-track .scrollbar-thumb {
    background: #7d7d7d !important;
}

.scrollbar-thumb:hover,
.scrollbar-track .scrollbar-thumb:hover {
    background: #6b6b6b !important;
}
