﻿:root {
    --b-divider-thickness: 1px;
    --b-bar-dark-background: var(--b-primary-color);
    --b-bar-dropdown-dark-background: var(--b-primary-color);
}

html {
    font-family: sans-serif;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
    display: block;
}

body {
    margin: 0;
    font-family: Poppins, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif;
    font-size: .825rem;
    font-weight: 400;
    line-height: 1.625;
    color: #6c757d;
    text-align: left;
    background-color: #FFFFFF;
}

b-bar-menu {
    background-color: var(--b-primary-color);
}

.main {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left .35s ease-in-out, left .35s ease-in-out, margin-right .35s ease-in-out, right .35s ease-in-out;
    flex-direction: column;
}

.content {
    padding: 1rem 1rem 1rem;
    flex: 1;
    direction: ltr;
}

.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.row-search-bar {
    margin-bottom: 5px !important;
    margin-top: 5px !important;
}


.badge {
    display: inline-block;
    padding: .3em .45em;
    font-size: 80%;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .2rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.btn {
    font-weight: 400;
    padding: .25rem .7rem;
    font-size: .825rem;
    line-height: 1.625;
    border-radius: .2rem;
}

.btn-group-sm > .btn, .btn-sm {
    padding: .15rem .5rem;
    font-size: .75rem;
    line-height: 1.625;
    border-radius: .1rem;
}

.btn-group-lg > .btn, .btn-lg {
    padding: .35rem 1rem;
    font-size: .95rem;
    line-height: 1.625;
    border-radius: .3rem;
}


.card .card-header {
    background: #f6fdff;
}

.card .card-header .card-title {
    font-size: 1rem;
    font-weight: 400;
    color: #414b54;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.card-subtitle {
    font-weight: 400;
    margin-top: -.5rem;
    font-size:12px !important;
}

.card-subtitle, .card-text:last-child {
    margin-bottom: 0;
    font-size:12px !important;
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.84062rem + 2px);
    padding: .25rem .7rem;
    font-size: .825rem;
    font-weight: 400;
    line-height: 1.625;
    color: #414b54;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: .2rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.custom-select {
    display: inline-block;
    width: 100%;
    height: calc(1.84062rem + 2px);
    padding: .25rem 1.7rem .25rem .7rem;
    font-size: .825rem;
    font-weight: 400;
    line-height: 1.625;
    color: #414b54;
    vertical-align: middle;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5'%3E%3Cpath fill='%23020202' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.7rem center/8px 10px;
    border: 1px solid #ced4da;
    border-radius: .2rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: .25rem .7rem;
    margin-bottom: 0;
    font-size: .825rem;
    font-weight: 400;
    line-height: 1.625;
    color: #414b54;
    text-align: center;
    white-space: nowrap;
    background-color: #e2e8ee;
    border: 1px solid #ced4da;
    border-radius: .2rem;
}

.input-group-lg > .custom-select, .input-group-lg > .form-control, .input-group-lg > .input-group-append > .btn, .input-group-lg > .input-group-append > .input-group-text, .input-group-lg > .input-group-prepend > .btn, .input-group-lg > .input-group-prepend > .input-group-text {
    padding: .35rem 1rem;
    font-size: .95rem;
    line-height: 1.625;
    border-radius: .3rem;
}

.input-group-sm > .custom-select, .input-group-sm > .form-control:not(textarea) {
    height: calc(1.51875rem + 2px);
}

.input-group-sm > .custom-select, .input-group-sm > .form-control, .input-group-sm > .input-group-append > .btn, .input-group-sm > .input-group-append > .input-group-text, .input-group-sm > .input-group-prepend > .btn, .input-group-sm > .input-group-prepend > .input-group-text {
    padding: .15rem .5rem;
    font-size: .75rem;
    line-height: 1.625;
    border-radius: .1rem;
}

.table.b-datagrid + .row {
    padding-left: 1rem;
    padding-right: 1rem;
}

.nav.nav-tabs .nav-item .nav-link.active {
    background: #fff;
    color: #020202;
}

.nav.nav-tabs .nav-item .nav-link {
    background: transparent;
    color: #020202 !important;
    padding: .75rem 1rem;
    border: 0;
}

.tab-content {
    background: #fff;
    padding: 1.25rem;
}

.nav.nav-tabs + .tab-content {
    box-shadow: 0 0.1rem 0.2rem RGB(0 0 0/5%);
    border-radius: 0 0 .2rem .2rem;
}

.tab-content h4 {
    font-size: .95rem;
}

.tab-vertical-left .col-auto {
    padding-right: 0;
}

.tab-vertical-left .col {
    padding-left: 0;
}

.tab-vertical-right .col-auto {
    padding-left: 0;
}

.tab-vertical-right .col {
    padding-right: 0;
}

h6 {
    font-size: .825rem;
}

.text-sm {
    font-size: .75rem;
}

.text-lg {
    font-size: .95rem;
}

.illustration {
    background: white;
    color: #497aca;
}

.stat {
    background: #e0eafc;
    border-radius: 50%;
    padding: .75rem;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
}

.stat i {
    color: #497aca !important;
    text-align: center !important;
}

.floating-button {
    position: fixed !important; /* fixed will keep it on top even when scrolling */
    top: 10px; /* adjust as needed */
    left: 10px; /* adjust as needed */
    z-index: 1000; /* a high z-index ensures the button is above other content */
}

/* ==================== Syncfusion Grid - Header Color ==================== */
/* Apply consistent header colour to ALL columns including frozen borders */
.e-grid .e-gridheader tr:first-child th.e-headercell,
.e-grid .e-gridheader tr th.e-headercell.e-leftfreeze,
.e-grid .e-gridheader tr th.e-headercell.e-rightfreeze,
.e-grid .e-gridheader tr th.e-headercell.e-freezeleftborder,
.e-grid .e-gridheader tr th.e-headercell.e-freezerightborder {
    background-color: rgba(var(--dl-primary-rgb), 0.15) !important;
    color: #5D5068 !important;
}

/* ==================== Mobile Slideout Content (Global - bypasses CSS isolation) ==================== */
/* These styles ensure sidebar content is visible in the mobile slideout panel */
.dl-slideout-body .sidebar-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    height: 100% !important;
    width: 100% !important;
    background: #ffffff !important;
}

.dl-slideout-body .sidebar-header {
    display: flex !important;
    align-items: center !important;
    padding: 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
}

.dl-slideout-body .sidebar-search {
    padding: 16px 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #fafafa !important;
    flex-shrink: 0 !important;
}

.dl-slideout-body .user-list,
.dl-slideout-body .group-list,
.dl-slideout-body .query-list,
.dl-slideout-body .report-list,
.dl-slideout-body .param-list {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 12px 0 !important;
}

/* ==================== DLTable Styles ==================== */
/* Container for scrollable table with fixed height */
.dl-table-container {
    width: 100%;
    overflow-x: auto;
}

/* Only apply scroll constraints when fixed height is set */
.dl-table-container.dl-table-fixed-height {
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Table with sticky header - ONLY for fixed height tables */
.dl-table-fixed-height .dl-table-sticky-header {
    border-collapse: separate;
    border-spacing: 0;
}

.dl-table-fixed-height .dl-table-sticky-header thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Fallback background - will be overridden by inline styles if custom header format is set */
.dl-table-fixed-height .dl-table-sticky-header thead th {
    background-color: #EDFAFF;
    border-bottom: 2px solid #dee2e6;
}

/* Pagination container */
.dl-table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #dee2e6;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Style the pagination buttons */
.dl-table-pagination .pagination .page-link {
    padding: 4px 10px;
    font-size: 0.85rem;
    border-radius: 4px;
    margin: 0 2px;
}

.dl-table-pagination .pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.dl-table-pagination .pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Responsive pagination */
@media screen and (max-width: 576px) {
    .dl-table-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .dl-table-pagination > div {
        flex-wrap: wrap;
    }
}

/* ==================== DLTable Flex Container Fix ==================== */
/* When DLTable is inside a flex parent (chart-card-body), ensure proper width */
.chart-card-body > .container-fluid {
    width: 100%;
    min-width: 0;
    flex: 1;
}

/* Ensure the row inside also takes full width */
.chart-card-body .container-fluid > .row {
    width: 100%;
}

/* Make dl-table-container fill available width in flex context */
.chart-card-body .dl-table-container {
    flex: 1;
    min-width: 0;
}

