html {
    font-size: 12px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 14px;
    }
}

body {
    margin-bottom: 60px;
}

body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}


main {
    display: flex;
    flex-wrap: nowrap;
    height: 100vh;
    height: -webkit-fill-available;
    max-height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
}

.b-example-divider {
    flex-shrink: 0;
    width: 1.5rem;
    height: 100vh;
    background-color: rgba(0, 0, 0, .1);
    border: solid rgba(0, 0, 0, .15);
    border-width: 1px 0;
    box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

.bi {
    vertical-align: -.125em;
    pointer-events: none;
    fill: currentColor;
}

.dropdown-toggle {
    outline: 0;
}

.nav-flush .nav-link {
    border-radius: 0;
}

.btn-toggle {
    display: inline-flex;
    align-items: center;
    padding: .25rem .5rem;
    font-weight: 600;
    color: rgba(0, 0, 0, .65);
    background-color: transparent;
    border: 0;
}

    .btn-toggle:hover,
    .btn-toggle:focus {
        color: rgba(0, 0, 0, .85);
        background-color: #f1f3f5;
    }

    .btn-toggle::before {
        width: 1.25em;
        line-height: 0;
        content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
        transition: transform .35s ease;
        transform-origin: .5em 50%;
    }

    .btn-toggle[aria-expanded="true"] {
        color: rgba(0, 0, 0, .85);
    }

        .btn-toggle[aria-expanded="true"]::before {
            transform: rotate(90deg);
        }

.btn-toggle-nav a {
    display: inline-flex;
    padding: .1875rem .5rem;
    margin-top: .125rem;
    margin-left: 1.25rem;
    text-decoration: none;
}

    .btn-toggle-nav a:hover,
    .btn-toggle-nav a:focus {
        background-color: #f1f3f5;
    }

.scrollarea {
    overflow-y: auto;
}

.fw-semibold {
    font-weight: 600;
}

.lh-tight {
    line-height: 1.25;
}

/**************
 Loader
*/
/* Loader */
.loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/* Loading indicator (reuses the @keyframes spin defined above) */
.stage {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 2.5rem 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.loading {
    width: 1rem;
    height: 1rem;
    border: 2px solid #dee2e6;
    border-top-color: #475569;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.custom-tooltip .tooltip-inner {
    background-color: rgba(0, 0, 0, .1); /* Replace with your desired background color */
}


.description-list {
    border-bottom: 1px solid #ced4da;
    padding-bottom: 0.5rem;
}

div.tablebuttontop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

div.tablebuttonbottom {
    margin-top: 10px;
}

/* Custom CSS to align modal to the right */
.modal-dialog.modal-dialog-right {
    position: absolute;
    margin: 0;
    right: 0;
    top: 0;
    /* Optional: Adjust width as needed */
    max-width: 400px;
    height: 100%;
}

/* ── System Notification body (rendered inside the confirmDialog modal) ── */
.swal-notif-msg {
    font-size: 1rem;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.5;
    white-space: pre-wrap; /* keep the sender's line breaks in the popup */
}
.swal-notif-time {
    font-size: 0.78rem;
    color: #888;
    letter-spacing: 0.02em;
}

.modal.fade .modal-dialog.modal-dialog-right {
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog.modal-dialog-right {
    transform: translateX(0);
}

@media (max-width: 576px) {
    .modal-dialog.modal-dialog-right {
        max-width: 100%;
        height: 100%;
    }
}

/* DataTables (bs5 integration) toolbar buttons: render as small outlined
 * buttons to match the app's other toolbar controls. The bs5 bundle styles
 * them as solid btn-secondary at regular size; overriding the Bootstrap
 * button CSS vars mirrors btn-outline-secondary + btn-sm. The colvis
 * dropdown menu is already a native Bootstrap dropdown and needs nothing. */
.dt-buttons .btn-secondary {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-bg: transparent;
    --bs-btn-color: #212529;
    --bs-btn-border-color: #dee2e6;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #6c757d;
    --bs-btn-hover-border-color: #6c757d;
    --bs-btn-focus-shadow-rgb: 108, 117, 125;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #5c636a;
    --bs-btn-active-border-color: #565e64;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #212529;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #dee2e6;
}

/* ─────────────────────────────────────────────────────────────
   Industrial instrument pass — data grid + chrome polish.
   Desktop-first: dense, neutral, color reserved for status.
   ───────────────────────────────────────────────────────────── */

/* Data grid: tabular figures so numeric columns optically align,
   and right-align DT3's auto-detected numeric columns */
div.dt-container table.dataTable {
    font-variant-numeric: tabular-nums;
}

div.dt-container table.dataTable td.dt-type-numeric,
div.dt-container table.dataTable th.dt-type-numeric {
    text-align: right;
}

/* Header treatment: micro-caption style (uppercase, tracked, quiet) */
div.dt-container table.dataTable > thead > tr > th {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

/* Row separators. DT3 renders its tables with border-collapse: separate,
 * in which borders declared on <tr> (where Bootstrap's .table-bordered
 * puts them) are never painted — so the rules must live on the cells. */
div.dt-container table.dataTable > tbody > tr > td,
div.dt-container table.dataTable > tbody > tr > th {
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

/* DT3's integration CSS then re-zeroes two edges with higher specificity:
 * its `tr:last-child` rule matches the sole header row (thead) as well as
 * the final body row, killing the header underline and the last row's
 * bottom border. Repeat those edges with .table-bordered in the selector
 * to tie or beat that rule's specificity. */
div.dt-container table.dataTable.table-bordered > thead > tr > th {
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

div.dt-container table.dataTable.table-bordered > tbody > tr:last-child > td {
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

/* Row rhythm: tighter cells, clear hover, no zebra under borders */
div.dt-container table.dataTable > thead > tr > th {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

div.dt-container table.dataTable > tbody > tr > td {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

div.dt-container table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: transparent;
}

div.dt-container table.dataTable > tbody > tr:hover > * {
    background-color: #f1f3f5;
    /* keep status badge cells readable on hover */
    --bs-table-accent-bg: #f1f3f5;
}

/* Sidebar: same size as main body text (app root is 14px), density via padding/weight */
#sidebar {
    font-size: 1rem;
}

#sidebar .btn-toggle {
    border-radius: 2px;
    padding: 0.2rem 0.4rem;
    font-size: 1rem;
}

#sidebar .btn-toggle-nav a {
    border-radius: 2px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Brand mark: small gradient tile, matches the login page brand mark */
/* Navbar: dark slate instead of Bootstrap near-black */
.navbar.app-navbar {
    background-color: #1e293b;
}

/* Keyboard focus: one consistent ring app-wide */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}

/* Sidebar: active page reads as a light blue pill — visible but not heavy */
#sidebar .btn-toggle-nav a.active {
    background-color: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

#sidebar .btn-toggle-nav a.active:hover,
#sidebar .btn-toggle-nav a.active:focus {
    background-color: #dbeafe;
    color: #1d4ed8;
}

/* Corners: squarer than stock Bootstrap — instrument-panel feel */
:root {
    --bs-border-radius: 4px;
    --bs-border-radius-sm: 2px;
    --bs-border-radius-lg: 6px;
    --bs-border-radius-xl: 8px;
    --bs-border-radius-2xl: 12px;
}

/* Card chrome: tighter header, smaller title, quiet footer */
.card-header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.card-header h5 {
    font-size: 1rem;
}

.card-footer {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Navbar title: page context, not a headline */
.app-navbar .page-title {
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* Underline tabs (Bootstrap 5.3 styling; app is on 5.2.3 which lacks
 * .nav-underline). View-switching tabs read as a quiet index into the
 * content rather than a row of boxed controls. */
.nav-underline .nav-link {
    border: 0;
    border-bottom: 0.25rem solid transparent;
    border-radius: 0;
    color: #495057;
}

.nav-underline .nav-link:hover {
    color: #212529;
    border-bottom-color: #adb5bd;
}

.nav-underline .nav-link.active,
.nav-underline .nav-link.show {
    border-bottom-color: currentColor;
    font-weight: 600;
}





