﻿/* Main */
main#main {
    min-height: calc(100vh - 150px);
}

/* Table */
.dt-container {
    padding-top: 15px;
    position: relative;
}
.dt-container .dt-layout-row:not(.dt-layout-table) {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}
.dt-container table {
    max-width: 100%;
    width: 100%;
    border-spacing: 0;
    border-collapse: separate;
}
.dt-container table > thead > tr > th {
    vertical-align: middle;
    text-align: left;
    border-bottom: 2px solid #d0d7e3;
    border-top: none;
    padding: 8px 12px;
    background: linear-gradient(to bottom, #f0f4fb, #e8eef8);
    color: #4b5563;
    font-size: .63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
    user-select: none;
}
.dt-container table > tbody > tr > td  {
    padding: .45rem .75rem;
    color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));
    background-color: #fff;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    font-size: .8rem;
    transition: background-color .12s ease;
    box-shadow: none;
}
.dt-container table > tbody > tr:nth-child(odd) > td {
    background-color: #fafbfd;
}
.dt-container table tbody tr:hover > td:not(.dt-empty) {
    background-color: #eef2fb !important;
}
.dt-container table tbody tr.active > td {
    background-color: #dbeafe !important;
    border-left: 3px solid #3b82f6;
}
.dt-container table.dataTable.datatable-is-empty > thead {
    display: none;
}
.dt-container table.dataTable th[aria-label=Action] {
    text-align: right;
}

/*Temporary hidden */
.dt-container table.dataTable .dtrg-group {
    display: none;
}
.dt-container table.dataTable .dtrg-group > th {
    font-weight: normal !important;
    padding: 8px;
}

/*Hide thead in datatables */
thead.datatable-columns th:not([aria-label]) {
    display: none;
}

/*.dt-container .dt-scroll-head table > thead > tr > th:first-child,
.dt-container .dt-scroll-body table > tbody > tr > td:first-child,
.dt-container .dt-scroll-head table > thead > tr > th:last-child,
.dt-container .dt-scroll-body table > tbody > tr > td:last-child,
.dt-container .dt-scroll-head table[data-report-url] > thead > tr > th:nth-child(2),
.dt-container .dt-scroll-head table[data-report-modal-form] > thead > tr > th:nth-child(2),
.dt-container .dt-scroll-body table[data-report-url] > tbody > tr > td:nth-child(2),
.dt-container .dt-scroll-body table[data-report-modal-form] > tbody > tr > td:nth-child(2) {
    position: -webkit-sticky;
    position: sticky;
    z-index: 1;
}*/
/* Fixed first columns */
/*.dt-container .dt-scroll-head table > thead > tr > th:first-child,
.dt-container .dt-scroll-body table > tbody > tr > td:first-child {
    left: 0px;
}*/
/* Fixed last columns */
/*.dt-container .dt-scroll-head table > thead > tr > th:last-child,
.dt-container .dt-scroll-body table > tbody > tr > td:last-child {
    right: 0px;
}*/
/* Fixed column with print report buttons */
/*.dt-container .dt-scroll-head table[data-report-url] > thead > tr > th:nth-child(2),
.dt-container .dt-scroll-head table[data-report-modal-form] > thead > tr > th:nth-child(2),
.dt-container .dt-scroll-body table[data-report-url] > tbody > tr > td:nth-child(2),
.dt-container .dt-scroll-body table[data-report-modal-form] > tbody > tr > td:nth-child(2) {
    left: 48px;
}*/

/* FixedHeader 4.x floating header — appears when scrolling past the thead.
   Offset matches the topbar height (60px) set via fixedHeader: { headerOffset: 60 }. */
.dtfh-floatingparent {
    z-index: 100 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.dtfh-floatingparent table > thead > tr > th {
    background: linear-gradient(to bottom, #d4dced, #c4d0e5) !important;
    color: #374151 !important;
    padding: 8px 12px !important;
    font-size: .63rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .07em !important;
    white-space: nowrap !important;
    border-bottom: 2px solid #b0bcd4 !important;
}
.dtfh-floatingparent table > thead > tr > th.dt-ordering-asc,
.dtfh-floatingparent table > thead > tr > th.dt-ordering-desc {
    background: linear-gradient(to bottom, #b8ceee, #a5bfe6) !important;
    color: #1d4ed8 !important;
}

/* DataTable processing/loading overlay */
.dt-processing {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 20px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border-radius: .5rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10) !important;
    font-size: .75rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    letter-spacing: .04em !important;
    white-space: nowrap !important;
    border: 1px solid #e5e9f0 !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}
.dt-processing > div:first-child {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

/* Active column order */
.dt-container table > thead > tr > th.dt-ordering-asc,
.dt-container table > thead > tr > th.dt-ordering-desc {
    background: linear-gradient(to bottom, #dce8fb, #cfe0f8);
    color: #1d4ed8;
}
.dt-container table > tbody > tr > td.sorting_1 {
    background-color: #f0f6ff;
}

/* Pagination */
.dt-paging {
    display: flex;
    gap: .2rem;
    align-items: center;
    flex-wrap: wrap;
}
.dt-paging-button.disabled { display: none; }
.dt-paging-button button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .5rem;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: .375rem;
    font-size: .8rem;
    color: #374151;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1;
}
.dt-paging-button button:hover {
    background: #e8eff9;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.dt-paging-button.current button {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    font-weight: 600;
}

/* DT controls – search & length */
.dt-search > label { display: none; }
.dt-input {
    font-size: .875rem;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: .4rem .65rem;
    border-radius: .375rem;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    width: 100%;
    max-width: 240px;
}
.dt-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.dt-length > select {
    display: inline-block;
    width: auto;
    font-size: .875rem;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
    padding: .35rem .55rem;
    color: #374151;
    background: #fff;
    transition: border-color .2s;
    margin-right: 5px;
}
.dt-length > select:focus {
    outline: none;
    border-color: #93c5fd;
}
.dt-info {
    font-size: .8rem;
    color: #6b7280;
}
.dt-empty {
    text-align: center;
    padding: 0 !important;
}

/* Bootstrap custom */
.modal-backdrop,
.modal.show[data-bs-backdrop="false"] {
    background: rgba(0,0,0,0.5) !important;
}

.position-fixed.center {
    right: 50%;
    transform: translateX(50%);
}

/* ─────────────────────────────────────────────────────────────
   bootstrap-autocomplete dropdown
   The plugin pins coordinates at init time; SearchAutoCompleteFunc.js
   re-anchors them on every show. These styles give the panel a
   stable look, max-height with scrolling for long lists, and a
   z-index that floats correctly inside modals.
   ────────────────────────────────────────────────────────────*/
.bootstrap-autocomplete.dropdown-menu {
    position: fixed !important; /* viewport-anchored; JS sets exact coords via getBoundingClientRect */
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .25rem 0;
    border-radius: .5rem;
    box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.18);
    z-index: 1100; /* above Bootstrap modal (1055) and tooltips (1080) */
    scrollbar-width: thin;
}
.bootstrap-autocomplete .dropdown-item {
    cursor: pointer;
    padding: .45rem .85rem;
    font-size: .85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bootstrap-autocomplete .dropdown-item:hover {
    background-color: var(--bs-dropdown-link-hover-bg);
}
.bootstrap-autocomplete .dropdown-item.active,
.bootstrap-autocomplete .dropdown-item.active:hover {
    background-color: var(--bs-dropdown-link-active-bg) !important;
    color: var(--bs-dropdown-link-active-color) !important;
}
.bootstrap-autocomplete .dropdown-item b {
    color: var(--bs-primary);
    font-weight: 600;
}

.fs-small {
    font-size: .75rem;
}

.list-group.list-group-borderless > li {
    padding-inline: 0px;
    border: none;
    padding-bottom: 0px;
}
.list-group.list-group-borderless > li:first-child {
    padding-top: 0px;
}

.text-online {
    color: rgb(1,168,19);
}

.dt-tooltip > .tooltip-inner {
    font-size: 12px;
    text-align: left;
}
@media (min-width: 321px) {
    .dt-tooltip > .tooltip-inner {
        min-width: 320px;
    }
}

/* Image */
img.img-circle {
    border-radius: 999px;
}
.croppie-container img.cr-image:not([src]) {
    display: none;
}

/* Forms*/
span.form-control {
    min-height: 38px;
}
span.form-control.disabled {
    background-color: var(--bs-secondary-bg);
}
.form-group, .form-check {
    margin-bottom: .5rem;
}
.form-group > .form-check:last-child {
    margin-bottom: 0px;
}
label.form-check-label {
    cursor: pointer;
    user-select: none;
}
.input-daterange.input-group {
    align-items: center;
}
.input-daterange.input-group .input-group-addon {
    padding: 5px;
}
input:read-only {
    background-color: #f5f5f5;
}
btn.btn-light {
    border-color: var(--bs-primary);
}
fieldset {
    margin: .5rem 0px;
    padding: 0px 20px 20px;
    border-radius: var(--bs-border-radius);
    border: var(--bs-border-width) solid var(--bs-border-color);
}
fieldset > legend {
    float: none;
    width: auto;
    font-size: inherit;
}
input.loading[type="search"]::-webkit-search-cancel-button,
input.loading[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

/* =============================================================
   PDF Viewer – loading spinners  (PdfViewer.js)
   ============================================================= */

/* Full overlay inside the PDF viewer pane */
.pdf-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    background: rgba(248,250,252,.9);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 10;
    border-radius: inherit;
}
.pdf-loader__ring {
    width: 46px;
    height: 46px;
    border: 3.5px solid rgba(13,110,253,.15);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: pdf-spin .75s linear infinite;
    flex-shrink: 0;
}
@keyframes pdf-spin { to { transform: rotate(360deg); } }
.pdf-loader__text {
    font-size: .8rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: .02em;
}

/* Thin overlay on the filter form – prevents re-submission */
.pdf-form-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248,250,252,.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 10;
}
.pdf-form-overlay__ring {
    width: 26px;
    height: 26px;
    border: 2.5px solid rgba(13,110,253,.15);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: pdf-spin .75s linear infinite;
}

/* Legacy aliases (kept for any page that still references these classes) */
.loader-wrapper {
    position: absolute;
    top: 0; bottom: 0; right: 0; left: 0;
    background: rgba(255,255,255,.5);
    z-index: 2;
    display: none;
}
.loader-wrapper > .loader-content {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%,-50%);
}

/* ── Magnific Popup – modernized image viewer ────────────────────── */
.mfp-bg {
    background: rgba(5,7,12,.93) !important;
}

.mfp-wrap {
    z-index: 9999 !important;
}

.mfp-wrap .mfp-content {
    max-width: 900px !important;
}

/* Figure needs position:relative so the overlay bottom-bar works */
.mfp-wrap .mfp-figure {
    position: relative;
}

/* ── Close button ────────────────────────────────────────────────── */
.mfp-image-holder .mfp-close,
.mfp-iframe-holder .mfp-close {
    width: 38px !important;
    height: 38px !important;
    line-height: 1 !important;
    font-size: 0 !important;
    top: 10px !important;
    right: 10px !important;
    opacity: 1 !important;
    background: rgba(255,255,255,.14) !important;
    border-radius: 50% !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: background .15s !important;
    z-index: 100 !important;
    cursor: pointer !important;
}

.mfp-image-holder .mfp-close:hover,
.mfp-iframe-holder .mfp-close:hover {
    background: rgba(255,255,255,.40) !important;
}

.mfp-image-holder .mfp-close .bi,
.mfp-iframe-holder .mfp-close .bi {
    font-size: 1rem !important;
    line-height: 1;
}

/* ── Navigation arrows ───────────────────────────────────────────── */
.mfp-arrow {
    opacity: .75 !important;
    background: rgba(255,255,255,.1) !important;
    border-radius: 50% !important;
    width: 48px !important;
    height: 48px !important;
    margin-top: -24px !important;
    transition: background .15s, opacity .15s !important;
}

.mfp-arrow:hover {
    opacity: 1 !important;
    background: rgba(255,255,255,.2) !important;
}

.mfp-arrow-left  { left: 14px !important; }
.mfp-arrow-right { right: 14px !important; }

/* Re-center triangles for the new 48×48 circle (overrides default 90×110 offsets) */
.mfp-arrow:before,
.mfp-arrow:after {
    margin-top: 3px !important;
    margin-left: 10px !important;
}

.mfp-arrow-left:after  { margin-left: 15px !important; }
.mfp-arrow-right:after { margin-left: 16px !important; }

.mfp-arrow:active { margin-top: -24px !important; }

/* ── Bottom bar – gradient overlay at bottom of image ───────────── */
.mfp-wrap .mfp-figure .mfp-bottom-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    margin-top: 0 !important;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 55%, transparent 100%) !important;
    padding: 52px 20px 18px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.mfp-title {
    color: #e2e8f0 !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.mfp-counter {
    position: static !important;
    color: #8892a4 !important;
    font-size: .7rem !important;
    text-align: center;
    background: rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 1px 10px;
    margin-bottom: 6px;
}

/* ── Action buttons ──────────────────────────────────────────────── */
.mfp-wrap .mfp-figure .button-action {
    gap: 8px;
    position: static !important;
    padding: 0 !important;
    flex-wrap: wrap;
    justify-content: center !important;
}

.mfp-action-btn {
    border-radius: 8px !important;
    padding: 6px 18px !important;
    font-size: .8rem !important;
    font-weight: 500 !important;
    min-width: 0 !important;
    border: 1.5px solid transparent !important;
    transition: background .15s, border-color .15s, color .15s !important;
    line-height: 1.4 !important;
}

.mfp-action-btn--download {
    background: rgba(59,130,246,.18) !important;
    border-color: rgba(59,130,246,.45) !important;
    color: #93c5fd !important;
}

.mfp-action-btn--download:hover {
    background: rgba(59,130,246,.32) !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
}

.mfp-action-btn--delete {
    background: rgba(239,68,68,.14) !important;
    border-color: rgba(239,68,68,.4) !important;
    color: #fca5a5 !important;
}

.mfp-action-btn--delete:hover {
    background: rgba(239,68,68,.28) !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}

/* ── iframe variant – bottom bar sits below the frame ───────────── */
.mfp-wrap .mfp-iframe-scaler .mfp-bottom-bar--iframe {
    position: static !important;
    background: none !important;
    padding: 10px 0 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/*--------------- Custom Cards -------------*/
/* Warning box container */
.warning-box {
    border-left: 4px solid #dc3545;
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Warning title with icon */
.warning-box h6 {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

    /* Icon styling inside the warning title */
    .warning-box h6 i {
        font-size: 1.5rem;
        margin-right: 8px;
        color: #dc3545;
    }

/* Paragraph text inside the warning box */
.warning-box p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}


/* Search autocomplete – sticky footer hint */
.bootstrap-autocomplete:after {
    content: "Type specific words to show other results.";
    display: block;
    font-style: italic;
    padding: 8px 15px;
    margin-top: 4px;
    font-size: .75rem;
    text-align: center;
    color: #6c757d;
    border-top: 1px solid #ececec;
    background: #f8f9fa;
    position: sticky;
    bottom: 0;
}


/* =============================================================
   Shared UI Components
   Do NOT duplicate these rules with inline <style> blocks.
   ============================================================= */

/* MODAL – Gradient Headers
   Usage: class="modal-header modal-header-gradient modal-header-gradient--success"
   Variants: --success  --primary  --danger  --warning  --info          */
.modal-header-gradient {
    border-radius: .5rem .5rem 0 0;
    color: #fff;
    border-bottom: none;
}
.modal-header-gradient--success { background: linear-gradient(135deg, #198754, #20c997); }
.modal-header-gradient--primary { background: linear-gradient(135deg, #0d6efd, #0dcaf0); }
.modal-header-gradient--danger  { background: linear-gradient(135deg, #dc3545, #c0392b); }
.modal-header-gradient--warning { background: linear-gradient(135deg, #ffc107, #fd7e14); color: #212529; }
.modal-header-gradient--info    { background: linear-gradient(135deg, #0dcaf0, #0d6efd); }

/* MODAL – Header Title & Subtitle                              */
.modal-header-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: inherit;
}
.modal-header-subtitle {
    display: block;
    font-size: .75rem;
    opacity: .8;
    margin-top: .1rem;
    color: inherit;
}

/* MODAL – Footer
   Usage: class="modal-footer modal-footer-divided"            */
.modal-footer-divided {
    border-top: 1px solid #e9ecef;
    gap: .5rem;
}

/* MODAL / FORM – Loader
   Hidden by default; toggled via JS: loader.show() / .hide()
   Usage: class="loader"                                       */
.loader {
    display: none;
    text-align: center;
    padding: .75rem 0;
}

/* FORM – Small semibold label
   Usage: class="form-label form-label-sm"                     */
.form-label-sm {
    font-size: .8rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: .3rem;
}

/* HINT TEXT – Left-bordered description paragraph
   Usage: class="hint-text hint-text--success"
   Variants: --success  --primary  --danger  --warning  --info  --secondary */
.hint-text {
    border-left: 3px solid #6c757d;
    padding-left: .65rem;
    font-size: .82rem;
    color: #6c757d;
    margin-bottom: 1rem;
}
.hint-text--success   { border-left-color: #198754; }
.hint-text--primary   { border-left-color: #0d6efd; }
.hint-text--danger    { border-left-color: #dc3545; }
.hint-text--warning   { border-left-color: #ffc107; }
.hint-text--info      { border-left-color: #0dcaf0; }
.hint-text--secondary { border-left-color: #6c757d; }

/* CARD – Modern header bar
   Usage:
     <div class="card-header-modern">
         <i class="bi bi-gear fs-5 text-primary"></i>
         <div>
             <div class="card-title">Title</div>
             <div class="card-subtitle">Subtitle</div>
         </div>
     </div>                                                     */
.card-header-modern {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem 1.25rem .75rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: .75rem .75rem 0 0;
}
.card-header-modern .card-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
}
.card-header-modern .card-subtitle {
    margin: 0;
    font-size: .78rem;
    color: #6c757d;
}

/* CARD – Office access chips */
.prop-inv-office-access {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
}
.prop-inv-office-access__label {
    font-size: .63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    margin-right: .1rem;
}
.prop-inv-office-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .18rem .55rem;
    font-size: .67rem;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 99px;
    white-space: nowrap;
    line-height: 1.5;
}
.prop-inv-office-chip i { font-size: .65rem; }
.prop-inv-office-chip--all {
    color: #065f46;
    background: #ecfdf5;
    border-color: #6ee7b7;
}
.prop-inv-office-chip__remove {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0 0 0 2px;
    margin: 0;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    line-height: 1;
    font-size: .65rem;
}
.prop-inv-office-chip__remove:hover { opacity: 1; }
.prop-inv-office-access__empty {
    font-size: .68rem;
    color: #9ca3af;
    font-style: italic;
}

/* SETTINGS – Section divider label
   Usage: <div class="settings-section-label">Group Name</div> */
.settings-section-label {
    display: flex;
    align-items: center;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6c757d;
    padding: .25rem 0 .5rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

/* =============================================================
   Datatable – Action Buttons
   ============================================================= */

/* Tighter gap between action buttons in each row */
.action-buttons .btn {
    padding: .2rem .45rem;
    font-size: .8rem;
    line-height: 1.4;
}

/* =============================================================
   Datatable – Empty / Error State Boxes
   Usage: class="datatable-state-box datatable-state-box--error"
          class="datatable-state-box datatable-state-box--empty"
   ============================================================= */
.datatable-state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
    gap: .4rem;
}
.datatable-state-box__icon {
    font-size: 2.5rem;
}
.datatable-state-box__title {
    font-size: 1rem;
    font-weight: 600;
}
.datatable-state-box__sub {
    font-size: .85rem;
}
.datatable-state-box--error .datatable-state-box__icon,
.datatable-state-box--error .datatable-state-box__title {
    color: #dc3545;
}
.datatable-state-box--empty .datatable-state-box__icon {
    color: #adb5bd;
}

/* =============================================================
   Datatable – Status / Badge pills
   Usage: <span class="dt-badge dt-badge--success">Text</span>
   ============================================================= */
.dt-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
}
.dt-badge--primary   { background: #dbeafe; color: #1e40af; }
.dt-badge--success   { background: #dcfce7; color: #166534; }
.dt-badge--warning   { background: #fef9c3; color: #854d0e; }
.dt-badge--danger    { background: #fee2e2; color: #991b1b; }
.dt-badge--info      { background: #e0f2fe; color: #075985; }
.dt-badge--muted     { background: #f3f4f6; color: #6b7280; }

/* =============================================================
   Datatable – Action buttons (tighter, consistent)
   ============================================================= */
.action-buttons {
    justify-content: flex-end;
}
.action-buttons .btn {
    padding: .2rem .42rem;
    font-size: .78rem;
    line-height: 1.4;
    border-radius: .3rem;
}
.action-buttons .btn-success  { --bs-btn-bg: #198754; }
.action-buttons .btn-primary  { --bs-btn-bg: #0d6efd; }
.action-buttons .btn-danger   { --bs-btn-bg: #dc3545; }
.action-buttons .btn-info     { --bs-btn-bg: #0dcaf0; }

/* =============================================================
   Datatable – Table container card modernization
   ============================================================= */
.dt-card-wrapper {
    border-radius: .75rem;
    overflow: clip; /* clip (not hidden) so position:sticky on dt-scroll-head still works */
    border: 1px solid #e5e9f0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.dt-card-wrapper .dt-container {
    padding-top: 0;
}

/* Top control row (entries per page + search + buttons) */
.dt-card-wrapper .dt-container .dt-layout-row:not(.dt-layout-table) {
    margin: 0 !important;
    background: #fff;
}
.dt-card-wrapper .dt-container .dt-layout-row:first-child {
    border-bottom: 1px solid #f0f2f5;
}
.dt-card-wrapper .dt-container .dt-layout-row:last-child {
    border-top: 1px solid #f0f2f5;
}

/* Pad the individual control elements so Bootstrap .row negative margins don't eat the space */
.dt-card-wrapper .dt-length,
.dt-card-wrapper .dt-search,
.dt-card-wrapper .dt-buttons,
.dt-card-wrapper .dt-info,
.dt-card-wrapper .dt-paging {
    padding: 0.85rem 1.25rem !important;
}

.dt-card-wrapper .dt-container .dt-layout-row.dt-layout-table {
    /* No overflow-x here — DataTables' .dt-scroll-body handles horizontal scroll internally.
       Keeping this overflow-free lets position:sticky on .dt-scroll-head work against the page scroll. */
}

/* =============================================================
   Dashboard – Active Users Roster
   ============================================================= */

/* Pulsing ring on the card header icon */
.online-pulse-ring {
    position: absolute;
    top: -3px; right: -3px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,.6);
    animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
    70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Roster scroll container */
.user-roster {
    max-height: 360px;
    overflow-y: auto;
}
.user-roster::-webkit-scrollbar { width: 4px; }
.user-roster::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* Individual user row */
.user-roster__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.user-roster__item:hover {
    background: #f0f5ff;
}
.user-roster__item--highlight {
    background: #fffbeb;
}

/* Avatar circle */
.user-roster__avatar {
    position: relative;
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .02em;
}

/* Status dot on avatar */
.user-roster__dot {
    position: absolute;
    bottom: 1px; right: 1px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid #fff;
}
.user-roster__dot--online {
    background: #22c55e;
    animation: pulse-ring 2s ease-out infinite;
}

/* Text info */
.user-roster__info {
    flex: 1;
    min-width: 0;
}
.user-roster__name {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-roster__role {
    font-size: .68rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-roster__time {
    font-size: .65rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =============================================================
   Dashboard – Activity Feed (timeline)
   ============================================================= */
.activity-feed {
    position: relative;
}
.activity-feed__item {
    display: flex;
    gap: 12px;
    padding-bottom: 18px;
    position: relative;
}
/* Vertical connecting line */
.activity-feed__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    bottom: 0;
    width: 1px;
    background: #e5e9f0;
}
.activity-feed__dot {
    flex-shrink: 0;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: #0d6efd;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #bfdbfe;
    margin-top: 4px;
}
.activity-feed__body {
    flex: 1;
    min-width: 0;
}
.activity-feed__name {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
}
.activity-feed__time {
    font-size: .65rem;
    color: #9ca3af;
    white-space: nowrap;
}
.activity-feed__role {
    font-size: .68rem;
    color: #6b7280;
    margin-top: 1px;
}
.activity-feed__action {
    font-size: .75rem;
    color: #4b5563;
    margin-top: 3px;
    line-height: 1.4;
}

/* =============================================================
   Chat Popup
   ============================================================= */

.chat-popup {
    position: fixed;
    bottom: 16px;
    right: 16px;          /* overridden per-instance by JS */
    width: 320px;
    z-index: 1060;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.10);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.1);
    animation: chat-slide-up .22s ease-out;
}
@keyframes chat-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.chat-popup__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

/* Avatar in header */
.chat-popup__avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.3);
}

.chat-popup__hinfo {
    flex: 1;
    min-width: 0;
}
.chat-popup__hname {
    font-size: .84rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-popup__hstatus {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .68rem;
    color: rgba(255,255,255,.75);
}

/* Pulsing online dot in header */
.cp-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
}
.cp-status-dot--online {
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74,222,128,.6);
    animation: cp-pulse 2s ease-out infinite;
}
@keyframes cp-pulse {
    0%  { box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
    70% { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
    100%{ box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* Header icon buttons */
.chat-popup__hactions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}
.cp-tool {
    background: none;
    border: none;
    color: rgba(255,255,255,.75);
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s, color .15s;
    padding: 0;
}
.cp-tool:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}
.cp-tool .bi-telephone-x-fill {
    color: #fca5a5;
}
.cp-tool:hover .bi-telephone-x-fill {
    color: #f87171;
}

/* Collapsible body */
.chat-popup__body {
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* ── Minimized = compact avatar circle ── */
.chat-popup--minimized {
    width: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.chat-popup--minimized .chat-popup__body,
.chat-popup--minimized .chat-popup__hinfo,
.chat-popup--minimized .chat-popup__hactions {
    display: none !important;
}
.chat-popup--minimized .chat-popup__header {
    width: 50px;
    height: 50px;
    padding: 6px;
    border-radius: 50%;
    justify-content: center;
}
.chat-popup--minimized .chat-popup__avatar {
    width: 38px;
    height: 38px;
    border-color: rgba(255,255,255,.4);
}

/* Messages area */
.chat-popup__messages {
    height: 240px;
    overflow-y: auto;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-popup__messages::-webkit-scrollbar { width: 4px; }
.chat-popup__messages::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* Message bubbles */
.chat-msg {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
    max-width: 100%;
}
.chat-msg--sent  { align-items: flex-end; }
.chat-msg--recv  { align-items: flex-start; }

.chat-msg__bubble {
    padding: 7px 12px;
    border-radius: 16px;
    font-size: .8rem;
    line-height: 1.4;
    max-width: 82%;
    word-break: break-word;
}
.chat-msg--sent .chat-msg__bubble {
    background: #1d4ed8;
    color: #fff;
    border-radius: 16px 16px 4px 16px;
}
.chat-msg--recv .chat-msg__bubble {
    background: #f1f5f9;
    color: #1e293b;
    border-radius: 16px 16px 16px 4px;
}
.chat-msg__time {
    font-size: .6rem;
    color: #9ca3af;
    margin-top: 2px;
    padding: 0 4px;
}

/* System message */
.chat-msg--system {
    text-align: center;
    font-size: .68rem;
    color: #9ca3af;
    padding: 6px 12px;
    font-style: italic;
}

/* Transcript bar */
.chat-popup__transcript {
    border-top: 1px solid #f1f5f9;
    padding: 8px 12px;
    background: #f8fafc;
}

/* Footer input row */
.chat-popup__footer {
    border-top: 1px solid #f1f5f9;
    padding: 8px 10px;
    background: #fff;
}
.chat-send-form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-popup__input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: .8rem;
    outline: none;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s;
}
.chat-popup__input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    background: #fff;
}
.chat-popup__send-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: #1d4ed8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, transform .1s;
}
.chat-popup__send-btn:hover {
    background: #1e40af;
    transform: scale(1.08);
}
.chat-popup__send-btn:active {
    transform: scale(.95);
}

/* =============================================================
   Page header – IAR Transactions
   ============================================================= */
.page-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.page-header-bar .page-header-title h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.page-header-bar .page-header-title .page-subtitle {
    font-size: .8rem;
    color: #6b7280;
    margin-top: .15rem;
}
.page-header-bar .page-header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

/* =============================================================
   Modal – Two-column form layout
   ============================================================= */

/* Left column – subtle off-white tint */
.modal-form-col--left {
    background: #f8fafc;
    border-right: 1px solid #e9ecef;
}

/* Right column – clean white */
.modal-form-col--right {
    background: #fff;
}

/* Ensure the columns fill the full height of the modal body */
.modal-form-modern .row.g-0 {
    min-height: 100%;
}

/* Accordion trigger inside the modal */
.modal-accordion-btn {
    background: #f8fafc;
    font-size: .85rem;
    padding: .6rem 1rem;
    border-top: none;
}

/* Required fields legend strip inside modals */
.modal-required-legend {
    background: #fafafa;
    color: #6c757d;
}

/* =============================================================
   Form – Required field highlight
   Usage: add class="fg-required" to the .form-group wrapper of
          any required field. Pair with <span class="req-mark">*</span>
          inside the label for a consistent visual indicator.
   ============================================================= */

/* Red left accent border + blush background on editable inputs */
.fg-required .form-control:not(.disabled):not([disabled]),
.fg-required select.form-control:not([disabled]) {
    border-left: 3px solid #dc3545;
    background-color: #fffcfc;
}

/* Soft red focus ring on required fields */
.fg-required .form-control:not(.disabled):not([disabled]):focus {
    border-left-color: #dc3545;
    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .12);
}

/* Input-group: accent only the first input, not the appended button */
.fg-required .input-group > .form-control:first-child {
    border-left: 3px solid #dc3545;
    background-color: #fffcfc;
}

.modal-accordion-btn:not(.collapsed) {
    background: #eef2fb;
    color: #1d4ed8;
    box-shadow: none;
}
.modal-accordion-btn::after {
    flex-shrink: 0;
    margin-left: auto;
}

/* Tighter form-group spacing inside modal */
.modal-form-col .form-group {
    margin-bottom: .6rem;
}

/* form-label-sm inside modal – consistent */
.modal .form-label-sm {
    display: block;
    margin-bottom: .25rem;
}

/* =============================================================
   Print Modal Panel  (_ModalPrintParIcs)
   ============================================================= */

/* Anchor for the form overlay */
.print-panel { position: relative; }

/* Panel structure */
.print-panel__head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1.1rem .7rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8fafc;
    flex-shrink: 0;
}
.print-panel__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.1rem !important; /* override Bootstrap .card-body padding */
}
.print-panel__foot {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.1rem;
    border-top: 1px solid #e9ecef;
    background: #f8fafc;
    flex-shrink: 0;
}

/* Section separator with label */
.print-section {
    margin-bottom: 1.1rem;
}
.print-section__label {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6b7280;
    margin-bottom: .55rem;
}
.print-section__label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
    margin-left: .2rem;
}

/* Clickable radio option cards */
.print-opt-card {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: .5rem;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
    margin-bottom: .4rem;
    font-size: .85rem;
    font-weight: 500;
    user-select: none;
    color: #374151;
}
.print-opt-card:last-of-type { margin-bottom: 0; }
.print-opt-card:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
}
.print-opt-card input[type=radio] {
    accent-color: #0d6efd;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}
.print-opt-card:has(input:checked) {
    border-color: #0d6efd;
    background: #eff6ff;
    color: #1d4ed8;
}
.print-opt-card i {
    font-size: 1rem;
    color: #6b7280;
    flex-shrink: 0;
}
.print-opt-card:has(input:checked) i { color: #2563eb; }

/* Inline two-column layout radios (Format 1 / Format 2) */
.print-layout-radios {
    display: flex;
    gap: .45rem;
}
.print-layout-radios .print-opt-card {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    margin-bottom: 0;
    padding: .55rem .7rem;
}
.print-layout-radios .print-opt-card input[type=radio] { margin-bottom: .15rem; }

/* PDF viewer top bar */
.print-viewer-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8fafc;
    flex-shrink: 0;
    font-size: .82rem;
}

/* =====================================================
   AIR Info List — label/value stacked list in sidebar
   Usage: class="list-group air-info-list"
   ===================================================== */
.air-info-list .list-group-item {
    padding: .45rem .75rem;
    border-left: none;
    border-right: none;
}
.air-info-list .list-group-item:first-child {
    border-top: none;
}
.air-info-list .form-label-sm {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
    margin-bottom: .1rem;
}

/* =============================================================
   Modernized Sidebar
   ============================================================= */
.sidebar {
    background: #fff;
    border-right: 1px solid #e9ecef;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.04);
    padding: 16px 12px;
}

.sidebar-nav .nav-item {
    margin-bottom: 2px;
}

.sidebar-nav .nav-heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #adb5bd;
    margin: 16px 0 5px 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f2f5;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    font-size: 13.5px;
    font-weight: 500;
    color: #374151;
    background: transparent;
    border-radius: 7px;
    padding: 9px 12px;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}

.sidebar-nav .nav-link i {
    font-size: 15px;
    color: #9ca3af;
    transition: color .15s;
}

.sidebar-nav .nav-link.collapsed {
    color: #374151;
    background: transparent;
    border-left-color: transparent;
}

.sidebar-nav .nav-link.collapsed i {
    color: #9ca3af;
}

.sidebar-nav .nav-link.active {
    color: #0d6efd;
    background: #eff6ff;
    border-left-color: #0d6efd;
    font-weight: 600;
}

.sidebar-nav .nav-link.active i {
    color: #0d6efd;
}

.sidebar-nav .nav-link:not(.collapsed) {
    color: #0d6efd;
    background: #eff6ff;
    border-left-color: #0d6efd;
    font-weight: 600;
}

.sidebar-nav .nav-link:not(.collapsed) i {
    color: #0d6efd;
}

/* ── Sidebar nav notification badge ─────────────────────────── */
.nav-notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
    flex-shrink: 0;
    letter-spacing: 0;
    cursor: default;
}

.sidebar-nav .nav-link:hover {
    color: #0d6efd;
    background: #f0f7ff;
    border-left-color: #93c5fd;
}

.sidebar-nav .nav-link:hover i {
    color: #0d6efd;
}

.sidebar-nav .nav-content {
    padding: 3px 0 6px 0;
}

.sidebar-nav .nav-content a {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    padding: 7px 12px 7px 34px;
    border-radius: 6px;
    border-left: 3px solid transparent;
    margin: 1px 0;
    transition: all .15s;
}

.sidebar-nav .nav-content a i {
    font-size: 13px;
    color: #9ca3af;
    background-color: transparent;
    border-radius: 0;
    width: auto;
    height: auto;
    min-width: auto;
    margin-right: 8px;
    line-height: 1;
    transition: color .15s;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
    color: #0d6efd;
    background: #eff6ff;
    border-left-color: #0d6efd;
}

.sidebar-nav .nav-content a:hover i,
.sidebar-nav .nav-content a.active i {
    color: #0d6efd;
    background-color: transparent;
}

/* =============================================================
   Modernized Topbar
   ============================================================= */
.header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.logo span {
    font-size: 17px;
    font-weight: 700;
    color: #1e3a5f;
    letter-spacing: -.01em;
}

.header .toggle-sidebar-btn {
    color: #6b7280;
    font-size: 26px;
    transition: color .15s;
}

.header .toggle-sidebar-btn:hover {
    color: #0d6efd;
}

.header .search-form input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13.5px;
    color: #374151;
    background: #f8fafc;
    padding: 7px 14px;
    transition: border-color .2s, box-shadow .2s;
}

.header .search-form input:focus,
.header .search-form input:hover {
    border-color: #93c5fd;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
    outline: none;
}

.header .search-form button {
    background: none;
    border: none;
    padding: 6px 10px;
    margin-left: 0;
    border-radius: 6px;
    transition: background .15s;
}

.header .search-form button:hover {
    background: #f0f7ff;
}

.header .search-form button i {
    color: #6b7280;
    font-size: 15px;
}

.header-nav .nav-icon {
    color: #6b7280;
    font-size: 20px;
    margin-right: 14px;
    transition: color .15s;
}

.header-nav .nav-icon:hover {
    color: #0d6efd;
}

.header-nav .nav-profile {
    color: #374151;
}

.header-nav .nav-profile span {
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
}

.header-nav .profile .dropdown-header h6 {
    font-size: 14.5px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
}

.header-nav .profile .dropdown-header span {
    font-size: 12px;
    color: #6b7280;
}

.header-nav .profile .dropdown-item {
    font-size: 13.5px;
    padding: 9px 16px;
    color: #374151;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

.header-nav .profile .dropdown-item:hover {
    background: #eff6ff;
    color: #0d6efd;
}

.header-nav .profile .dropdown-item i {
    color: #6b7280;
    font-size: 16px;
    margin-right: 10px;
    transition: color .15s;
}

.header-nav .profile .dropdown-item:hover i {
    color: #0d6efd;
}

/* =============================================================
   Stat Cards  (reusable metric / KPI cards)
   ============================================================= */
.stat-card {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.14), 0 1px 4px rgba(0,0,0,.08);
    position: relative;
    transition: transform .22s ease, box-shadow .22s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,.2);
}

/* Full-bleed gradient backgrounds */
.stat-card--blue  { background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 55%, #818cf8 100%); }
.stat-card--amber { background: linear-gradient(135deg, #b45309 0%, #f59e0b 55%, #fb923c 100%); }
.stat-card--teal  { background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #22d3ee 100%); }

/* Remove the old 4px strip */
.stat-card::before { display: none; }

/* Decorative orb in bottom-right */
.stat-card::after {
    content: '';
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    pointer-events: none;
}

/* Second smaller orb top-right */
.stat-card__inner::before {
    content: '';
    position: absolute;
    top: -20px;
    right: 50px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}

.stat-card__inner {
    padding: 22px 22px 16px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.stat-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* Icon badge – frosted white */
.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.22);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* Unified icon color – all white on gradient */
.stat-card--blue  .stat-card__icon,
.stat-card--amber .stat-card__icon,
.stat-card--teal  .stat-card__icon {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

/* Override absolute positioning for the filter menu */
.stat-card .filter {
    position: static;
}
.stat-card .filter .icon i {
    color: rgba(255,255,255,0.75);
    font-size: 16px;
    transition: color .15s;
}
.stat-card .filter .icon:hover i {
    color: #fff;
}

.stat-card .dropdown-menu {
    font-size: 12px;
    min-width: 130px;
    padding: 4px 0;
}
.stat-card .dropdown-menu .dropdown-header {
    padding: 4px 10px;
    font-size: 10px;
}
.stat-card .dropdown-menu .dropdown-item {
    padding: 4px 10px;
}

/* Text – all white hierarchy */
.stat-card__label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1px;
}

.stat-card__sublabel {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
    margin-bottom: 10px;
}

.stat-card__value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    word-break: break-word;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* Remove per-variant value colors – all white now */
.stat-card--blue  .stat-card__value,
.stat-card--amber .stat-card__value,
.stat-card--teal  .stat-card__value { color: #fff; }

/* Footer – semi-transparent dark strip */
.stat-card__footer {
    padding: 10px 22px;
    background: rgba(0,0,0,0.18);
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.stat-card__footer i {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
}

.stat-card__period {
    font-size: 11px;
    color: rgba(255,255,255,0.65);
}

/* =============================================================
   Chart Wrap  (reusable chart canvas container)
   ============================================================= */
.chart-wrap {
    position: relative;
    min-height: 180px;
}

/* =============================================================
   Activity List  (reusable activity / log list items)
   ============================================================= */
.activity-item {
    padding: 12px 20px !important;
    border-left: none !important;
    border-right: none !important;
}

.activity-item__name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.activity-item__time {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-item__role {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0 6px;
}

.activity-item__action {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: #2563eb;
    background: #eff6ff;
    padding: 2px 10px;
    border-radius: 20px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =============================================================
   Back to Top Button
   ============================================================= */
.back-to-top {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow: 0 4px 16px rgba(99,102,241,.35);
    right: 22px;
    bottom: 22px;
    transition: opacity .3s ease, visibility .3s ease, transform .25s ease, box-shadow .25s ease;
}

.back-to-top i {
    font-size: 20px;
    line-height: 1;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 8px 24px rgba(99,102,241,.5);
    transform: translateY(-4px);
    color: #fff;
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}

/* =============================================================
   Modernized Footer
   ============================================================= */
.footer {
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    padding: 14px 24px;
    font-size: 13px;
}

.footer .copyright {
    color: #6b7280;
}

.footer .copyright strong span {
    color: #374151;
}

.footer .copyright a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.footer .copyright a:hover {
    text-decoration: underline;
}

/* =============================================================
   Login Page
   ============================================================= */
.login-page {
    min-height: 100vh;
    display: flex;
}

/* ── Left branding panel ─────────────────────────────────────── */
.login-brand {
    width: 44%;
    background: linear-gradient(145deg, #1e3a8a 0%, #3730a3 55%, #6d28d9 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    top: -160px;
    right: -160px;
}

.login-brand::after {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    bottom: -110px;
    left: -110px;
}

.login-brand__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    max-width: 340px;
}

.login-brand__logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin-bottom: 24px;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,.3));
}

.login-brand__title {
    font-size: 21px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.login-brand__tagline {
    font-size: 13px;
    color: rgba(255,255,255,.7);
    line-height: 1.7;
    margin-bottom: 36px;
}

.login-brand__features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.login-brand__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: rgba(255,255,255,.88);
    margin-bottom: 14px;
}

.login-brand__features li i {
    font-size: 14px;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,.13);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.1);
}

/* ── Right form panel ────────────────────────────────────────── */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #f1f5f9;
    position: relative; /* anchor for the theme toggle */
}

.login-form-inner {
    width: 100%;
    max-width: 400px;
}

/* Mobile logo */
.login-mobile-logo img {
    width: 48px;
    margin-bottom: 8px;
}

.login-mobile-logo .sys-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a8a;
}

/* ── Login card ──────────────────────────────────────────────── */
.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,.09), 0 2px 8px rgba(0,0,0,.04);
    padding: 36px 32px;
    border: 1px solid rgba(0,0,0,.05);
    transition: box-shadow .3s ease;
}

.login-card__header {
    text-align: center;
    margin-bottom: 28px;
}

/* Avatar icon above title */
.login-card__avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
}

.login-card__avatar i {
    font-size: 22px;
    color: #fff;
}

.login-card__header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.login-card__header p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* ── Input icon prefix ───────────────────────────────────────── */
.login-input-icon {
    background: #f9fafb;
    border-color: #e5e7eb;
    border-right: none;
    color: #9ca3af;
    font-size: 15px;
    padding: 0 11px;
    transition: border-color .2s, color .2s, background .2s;
}

.login-input-group .form-control {
    border-left: none;
}

.login-input-group .form-control:focus {
    border-left: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    border-color: #6366f1;
    background: #fff;
}

.login-input-group:focus-within .login-input-icon {
    border-color: #6366f1;
    color: #6366f1;
    background: #fff;
}

/* Absolute lock icon for password field */
.login-input-icon-abs {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    z-index: 5;
    pointer-events: none;
    line-height: 1;
    transition: color .2s;
}

.input-password-wrap.has-icon .form-control {
    padding-left: 36px;
}

.input-password-wrap.has-icon:focus-within .login-input-icon-abs {
    color: #6366f1;
}

/* ── Form controls ───────────────────────────────────────────── */
.login-card .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.login-card .form-control {
    border-radius: 8px;
    border-color: #e5e7eb;
    padding: 10px 12px;
    font-size: 14px;
    background: #f9fafb;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.login-card .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
    background: #fff;
}

/* ── Sign-in button ──────────────────────────────────────────── */
.login-card .btn-login {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    transition: opacity .2s, transform .15s, box-shadow .2s;
}

.login-card .btn-login:hover:not(:disabled) {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99,102,241,.45);
    color: #fff;
}

.login-card .btn-login:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.login-card .btn-login:disabled {
    opacity: .55;
}

/* ── Footer links ────────────────────────────────────────────── */
.login-card__links {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.9;
}

.login-card__links a {
    color: #4f46e5;
    font-weight: 500;
    text-decoration: none;
}

.login-card__links a:hover {
    text-decoration: underline;
}

/* ── Password show/hide toggle ───────────────────────────────── */
.input-password-wrap {
    position: relative;
}

.input-password-wrap .form-control {
    padding-right: 42px;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    font-size: 16px;
    z-index: 6;
    transition: color .2s;
}

.btn-toggle-password:hover {
    color: #6366f1;
}

/* ── Theme toggle (login page) ───────────────────────────────── */
.login-theme-btn {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    z-index: 20;
    padding: 0;
}

.login-theme-btn:hover {
    background: #f1f5f9;
    color: #4f46e5;
    border-color: #c7d2fe;
    box-shadow: 0 2px 10px rgba(99,102,241,.18);
}

/* ── Login credits ───────────────────────────────────────────── */
.login-credits {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    color: #9ca3af;
}

.login-credits a {
    color: #6b7280;
    text-decoration: none;
}

.login-credits a:hover {
    text-decoration: underline;
}

/* ── Shared with registration / forgot-password ──────────────── */
.login-form-inner--wide {
    max-width: 680px;
}

.login-form-panel--scroll {
    align-items: flex-start;
    padding-top: 48px;
    padding-bottom: 48px;
}

.reg-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #4f46e5;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eff6ff;
    display: flex;
    align-items: center;
}

.reg-section-title + .reg-section-title {
    margin-top: 20px;
}

.login-card .form-check-label {
    font-size: 13px;
    color: #374151;
}

.login-card .form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* =============================================================
   User Profile Page
   ============================================================= */
.profile-banner {
    height: 100px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 55%, #6d28d9 100%);
    flex-shrink: 0;
}

.profile-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-top: -48px;
    position: relative;
    z-index: 1;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.profile-card-body {
    padding: 10px 24px 24px;
    text-align: center;
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.profile-designation {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.profile-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    background: #eff6ff;
    color: #1d4ed8;
    margin-bottom: 16px;
}

.profile-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    text-align: left;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.profile-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    padding: 5px 0;
}

.profile-meta li i {
    font-size: 14px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Profile tabs */
.profile-tabs {
    gap: 2px;
    border-bottom: 2px solid #f1f5f9;
    flex-wrap: nowrap;
}

.profile-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s;
}

.profile-tabs .nav-link:hover {
    color: #4f46e5;
    background: #f8fafc;
}

.profile-tabs .nav-link.active {
    color: #4f46e5;
    background: none;
    border-bottom-color: #4f46e5;
    font-weight: 600;
}

/* Overview info rows */
.profile-info-row {
    display: flex;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 14px;
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-label {
    width: 150px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-info-label i {
    font-size: 13px;
}

.profile-info-value {
    color: #111827;
    font-size: 14px;
    font-weight: 500;
}

/* Forgot Password — step headers */
.fp-step-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.fp-step-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fp-step-header h5 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 3px;
}

.fp-step-header p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

@media (max-width: 991.98px) {
    .login-brand {
        display: none !important;
    }

    .login-form-panel {
        padding: 32px 16px;
    }

    .login-form-panel--scroll {
        padding: 28px 16px;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .login-theme-btn {
        top: 14px;
        right: 14px;
    }
}
}

/* =============================================================
   Theme Toggle – Transition Effects
   ============================================================= */

/*
 * View Transition API (Chrome 111+, Edge 111+)
 * Suppress the default cross-fade so our JS clip-path animation
 * takes full control of the snapshot layers.
 */
::view-transition-old(root),
::view-transition-new(root) {
    animation      : none;
    mix-blend-mode : normal;
}

/*
 * Fallback smooth transition for browsers without View Transition API.
 * The .theme-transitioning class is added by ThemeToggle.js for ~550ms.
 * Scoped to only the transition window so it doesn't affect other interactions.
 */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
    transition:
        background-color 0.45s ease,
        background       0.45s ease,
        color            0.35s ease,
        border-color     0.35s ease,
        box-shadow       0.35s ease,
        fill             0.35s ease,
        stroke           0.35s ease !important;
}

/*
 * Toggle button icon – needs transform-origin set so the
 * scale/rotate animation runs from the centre of the glyph.
 */
#btnThemeToggle #iconThemeToggle {
    display          : inline-block;
    transform-origin : center center;
    will-change      : transform, opacity;
}

/* Subtle active-press feedback on the toggle button */
#btnThemeToggle:active {
    opacity   : 0.7;
    transform : scale(0.9);
    transition: transform 0.1s ease, opacity 0.1s ease;
}

/* =============================================================
   QR Scanner Modal
   ============================================================= */
.qr-modal-dialog {
    max-width: 420px;
}

/* On mobile: fill the full screen */
@media (max-width: 575.98px) {
    .qr-modal-dialog {
        max-width: 100%;
        margin: 0;
    }

    .qr-modal-content {
        border-radius: 0 !important;
        height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .qr-modal-body {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .qr-viewport {
        flex: 1;
        min-height: 0;
    }

    .qr-viewport #qr-reader {
        height: 100%;
    }
}

.qr-modal-content {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.2);
}

/* Header extras */
.qr-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.18);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.qr-header-sub {
    font-size: .72rem;
    opacity: .75;
    margin-top: 1px;
    letter-spacing: .02em;
}

/* Camera viewport */
.qr-modal-body {
    background: #0c0f14;
}

.qr-viewport {
    position: relative;
    background: #000;
    overflow: hidden;
    min-height: 260px;
}

/* Corner bracket decorations */
.qr-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    z-index: 20;
    pointer-events: none;
    transition: opacity .3s;
}

.qr-corner--tl { top: 10px; left: 10px;  border-top:   3px solid #f87171; border-left:  3px solid #f87171; border-radius: 4px 0 0 0; }
.qr-corner--tr { top: 10px; right: 10px; border-top:   3px solid #f87171; border-right: 3px solid #f87171; border-radius: 0 4px 0 0; }
.qr-corner--bl { bottom: 10px; left: 10px;  border-bottom: 3px solid #f87171; border-left:  3px solid #f87171; border-radius: 0 0 0 4px; }
.qr-corner--br { bottom: 10px; right: 10px; border-bottom: 3px solid #f87171; border-right: 3px solid #f87171; border-radius: 0 0 4px 0; }

/* Sweeping scan line */
.qr-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #f87171 30%, #ef4444 50%, #f87171 70%, transparent 100%);
    box-shadow: 0 0 8px 1px rgba(239,68,68,.55);
    z-index: 15;
    pointer-events: none;
    animation: qrScan 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    top: 0;
}

@keyframes qrScan {
    0%   { top:  8%; opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { top: 92%; opacity: 0; }
}

/* Instruction strip */
.qr-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0c0f14;
    color: #6b7a99;
    font-size: .78rem;
    padding: 10px 16px;
    border-top: 1px solid #1a1f2e;
}

.qr-hint__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
    animation: qrPulse 1.8s ease-in-out infinite;
}

@keyframes qrPulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: .45; transform: scale(.75); }
}

/* Footer */
.qr-modal-footer {
    background: #0c0f14;
    border-top: 1px solid #1a1f2e;
    padding: 12px 20px;
}

.qr-cancel-btn {
    background: transparent;
    color: #f87171;
    border: 1.5px solid rgba(248,113,113,.45);
    border-radius: 8px;
    padding: 7px 28px;
    font-size: .85rem;
    font-weight: 500;
    transition: background .18s, border-color .18s, color .18s;
}

.qr-cancel-btn:hover,
.qr-cancel-btn:focus {
    background: rgba(239,68,68,.12);
    border-color: #f87171;
    color: #fca5a5;
}

.qr-cancel-btn:active {
    transform: scale(0.97);
}

/* ── Bulk Import AIR Items (ModalImportAirItems) ────────────────────── */

/* Shared Settings – collapsible card header */
.bulk-settings-card {
    border-color: #e0e5ec;
}
.bulk-settings-header {
    background-color: #f8f9fb;
    border-bottom-color: #e0e5ec;
    transition: background-color .18s ease, border-color .18s ease;
}
.bulk-settings-header:hover {
    background-color: #eef1f6;
}
.bulk-settings-header__icon {
    color: #0d6efd;
}
.bulk-settings-header__title {
    color: #344054;
}
.bulk-settings-header__chevron {
    color: #6c757d;
}

/* Bulk import table – thead (shared rule for both AIR and Insurance import) */
#bulkImportTable > thead.bulk-import-thead > tr > th,
#importPropertiesTable > thead.bulk-import-thead > tr > th {
    background: linear-gradient(to bottom, #f0f4fb, #e8eef8);
    color: #4b5563;
    border-bottom: 2px solid #d0d7e3;
    border-top: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
    user-select: none;
}

/* Breakdown column */
.bulk-bd-badge-imported {
    font-size: .65rem;
    background-color: #198754;
    color: #fff;
}
.bulk-bd-badge-split {
    background-color: #0dcaf0;
    color: #212529;
}
.bulk-bd-undo-btn {
    padding: 0 .25rem;
    border: 1px solid #ffc107;
    color: #ffc107;
    background: transparent;
}
.bulk-bd-undo-btn:hover {
    background-color: #ffc107;
    color: #212529;
}
.bulk-bd-undo-icon {
    font-size: .7rem;
}
.bulk-bd-index {
    color: #6c757d;
}

/* Required-field validation highlight for bulk import table */
#bulkImportTable td.bulk-cell-error {
    outline: 2px solid #dc3545;
    outline-offset: -2px;
}
#bulkImportTable td.bulk-cell-error .bulk-ac-wrapper input,
#bulkImportTable td.bulk-cell-error input.is-invalid,
#bulkImportTable td.bulk-cell-error select.is-invalid {
    border-color: #dc3545 !important;
    background-image: none !important;
}

/* Fully-imported rows: dimmed, inputs non-interactive */
#bulkImportTable tr.bulk-row-locked {
    background-color: #f8f9fa;
}
#bulkImportTable tr.bulk-row-locked td {
    color: #6c757d;
}
/* Block all interaction with locked row inputs/selects/buttons
   but keep the checkbox column accessible so users can see it's disabled */
#bulkImportTable tr.bulk-row-locked td:not(:first-child) {
    pointer-events: none;
    user-select: none;
}

/* Category-mismatch rows: soft warning tint, inputs non-interactive */
#bulkImportTable tr.bulk-row-mismatch {
    background-color: #fffbf0;
}
#bulkImportTable tr.bulk-row-mismatch td {
    color: #856404;
    opacity: .75;
}
#bulkImportTable tr.bulk-row-mismatch td:not(:first-child) {
    pointer-events: none;
    user-select: none;
}
.bulk-bd-badge-mismatch {
    font-size: .65rem;
    background-color: #ffc107;
    color: #000;
}

/* =============================================================
   Upload Limits Info Panel
   Uses Bootstrap 5 CSS variables so it adapts automatically to
   both light and dark themes via data-bs-theme — no separate
   dark-mode.css override needed.
   ============================================================= */
.upload-limits-panel {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-left: 3px solid var(--bs-primary);
    border-radius: .45rem;
    padding: .55rem .85rem;
    margin-bottom: .875rem;
    font-size: 12.5px;
    line-height: 1.55;
}

.upload-limits-panel .panel-icon {
    font-size: 14px;
    color: var(--bs-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.upload-limits-panel .panel-title {
    display: block;
    font-weight: 600;
    font-size: 12.5px;
    color: var(--bs-body-color);
    margin-bottom: 2px;
}

.upload-limits-panel .panel-body {
    font-size: 12px;
    color: var(--bs-secondary-color);
}

.upload-limits-panel .panel-body strong,
.upload-limits-panel .panel-body .js-max-size,
.upload-limits-panel .panel-body .js-max-count {
    color: var(--bs-body-color);
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════════
   Inventory Barcode/QR Tag Print Modal
   Views/PropertyInventory/ModalBarQRcodeTag.cshtml
   ═══════════════════════════════════════════════════════ */

/* Modal body — needs flex:1 1 0 so h-100 children resolve against a definite height */
.bc-modal-body {
    overflow: hidden;
    flex: 1 1 0;
    min-height: 0;
}

.bc-modal-body > .row { height: 100%; }

/* Preview column — give it a CSS height so h-100 children resolve */
.bc-modal-body > .row > .col-sm {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Left panel */
.bc-left-panel {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #fcfcfd;
}

/* Section heading */
.panel-section-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6c757d;
}

/* Tag count badge */
.bc-count-badge { font-size: .65rem; }

/* Show-more button */
.bc-more-btn { font-size: .75rem; }

/* ── Tag Input Slot ────────────────────────────────────── */
.bc-slot {
    transition: background .15s;
    border-radius: 6px;
}

.bc-slot:hover { background: #f8f9fa; }

.bc-slot-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: .65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.bc-slot-num.is-filled  { background: #198754 !important; color: #fff !important; }
.bc-slot .bc-check      { font-size: .75rem; color: #198754; display: none; }
.bc-slot.is-filled .bc-check { display: inline-block; }

/* Collapsed extra tag slots */
#bcMoreTagsRow { display: none; }

/* ── Layout Selection Cards ────────────────────────────── */
.layout-card-wrap { position: relative; }

.layout-card-wrap input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.layout-card {
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    display: flex;
    flex-direction: column;
    gap: 1px;
    user-select: none;
}

.layout-card:hover {
    border-color: #86b7fe;
    background: #f8fbff;
}

.layout-card-wrap input:checked ~ .layout-card {
    border-color: #0d6efd;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(13,110,253,.12);
}

.layout-card-wrap input:checked ~ .layout-card .lc-size { color: #1d4ed8; }

.lc-size  { font-size: .7rem;  font-weight: 700; color: #212529; }
.lc-count { font-size: .63rem; color: #6c757d; }
.lc-html  { font-size: .58rem; }

/* Expanded state for extra tag slots */
#bcMoreTagsRow.bc-tags-open { display: block; }


/* ── Bulk Filter: result list ──────────────────────────── */
.bc-filter-fields {
    position: relative;
    font-size: .8rem;
}

.bc-result-list {
    max-height: 210px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
}

.bc-result-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 9px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .1s;
}

.bc-result-item:last-child { border-bottom: none; }
.bc-result-item:hover      { background: #f8f9fa; }
.bc-result-item.is-checked { background: #eff6ff; }
.bc-result-item.is-disabled { opacity: .45; cursor: not-allowed; }

.bc-result-chk { margin-top: 2px; flex-shrink: 0; cursor: pointer; }

.bc-result-info { min-width: 0; flex: 1; }

.bc-result-barcode {
    font-size: .72rem;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    color: #0d6efd;
}

.bc-result-paricsno {
    font-size: .62rem;
    font-weight: 400;
    color: #6c757d;
    font-family: inherit;
}

.bc-result-desc {
    font-size: .68rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-result-meta {
    font-size: .63rem;
    color: #6c757d;
}

.bc-result-empty {
    padding: 20px;
    text-align: center;
    font-size: .75rem;
    color: #adb5bd;
}

.bc-select-all-btn { font-size: .72rem; }

/* Copies-per-barcode control (visible only when item is checked) */
.bc-result-copies {
    display: none;
    flex-shrink: 0;
    align-items: center;
    gap: 3px;
    padding-left: 6px;
}
.bc-result-item.is-checked .bc-result-copies { display: flex; }
.bc-copies-input {
    width: 46px;
    padding: 1px 4px;
    font-size: .7rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
    background: #fff;
}
.bc-copies-input:focus { outline: none; border-color: #86b7fe; box-shadow: 0 0 0 2px rgba(13,110,253,.15); }
.bc-copies-label { font-size: .65rem; color: #6c757d; white-space: nowrap; }

/* =============================================================
   Workflow / Process Flow Bar
   Usage: place .workflow-bar between .page-header-bar and main content.
   Mark the current step with class "active" on .workflow-step.
   ============================================================= */
.workflow-bar {
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: .75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
}
.workflow-bar-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e9f0;
    font-size: .75rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.workflow-bar-hint {
    font-weight: 400;
    color: #9ca3af;
    text-transform: none;
    letter-spacing: 0;
    font-size: .7rem;
}
.workflow-toggle {
    background: none;
    border: none;
    padding: .1rem .3rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    border-radius: .25rem;
    transition: color .15s, background .15s;
}
.workflow-toggle:hover {
    color: #374151;
    background: #e9ecef;
}
.workflow-toggle .bi {
    display: block;
    transition: transform .25s ease;
}
.workflow-toggle[aria-expanded="false"] .bi {
    transform: rotate(180deg);
}
.workflow-steps {
    display: flex;
    align-items: center;
    padding: .8rem 1rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}
.workflow-steps::-webkit-scrollbar { height: 4px; }
.workflow-steps::-webkit-scrollbar-track { background: transparent; }
.workflow-steps::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 2px; }
.workflow-step {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .65rem;
    border: 1.5px solid #dee2e6;
    border-radius: .5rem;
    background: #f8fafc;
    min-width: max-content;
    flex-shrink: 0;
}
.workflow-step.active {
    border-color: #0d6efd;
    background: #eef3ff;
}
.workflow-step-num {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    font-size: .62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.workflow-step.active .workflow-step-num {
    background: #0d6efd;
    color: #fff;
}
.workflow-step-icon {
    font-size: .85rem;
    color: #adb5bd;
    flex-shrink: 0;
}
.workflow-step.active .workflow-step-icon {
    color: #0d6efd;
}
.workflow-step-label {
    font-size: .7rem;
    color: #6c757d;
    white-space: nowrap;
    font-weight: 500;
}
.workflow-step.active .workflow-step-label {
    color: #0d6efd;
    font-weight: 700;
}
.workflow-connector {
    color: #adb5bd;
    font-size: .7rem;
    padding: 0 .4rem;
    flex-shrink: 0;
}
/* Origin step — preceding module steps shown as muted context */
.workflow-step.origin {
    border-style: dashed;
    border-color: #d1d5db;
    background: #f9fafb;
}
.workflow-step.origin .workflow-step-num {
    background: #e5e7eb;
    color: #9ca3af;
    font-size: .75rem;
}
.workflow-step.origin .workflow-step-icon {
    color: #d1d5db;
}
.workflow-step.origin .workflow-step-label {
    color: #9ca3af;
    font-style: italic;
}
/* "or" separator between two origin source chips */
.workflow-or-sep {
    font-size: .65rem;
    font-weight: 700;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 0 .25rem;
    flex-shrink: 0;
}
/* Separator divider + label between origin steps and current-module steps */
.workflow-module-sep {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .55rem;
    margin: 0 .3rem;
    font-size: .6rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-left: 2px solid #dee2e6;
    white-space: nowrap;
    flex-shrink: 0;
    height: 2rem;
}
/* Wider popover for workflow hints that need more space */
.wf-popover-lg {
    max-width: 360px;
}

/* Hint cursor for steps with a popover */
.workflow-step[data-workflow-hint] {
    cursor: help;
}
.workflow-step[data-workflow-hint]:hover {
    border-color: #6ea8fe;
    background: #f0f4ff;
}
.workflow-step[data-workflow-hint].active:hover {
    border-color: #0b5ed7;
    background: #d9e8ff;
}
