/* Portal color palette and shared presentation. */
:root { color-scheme: light; --jhc-bg:#f3f5f9; --jhc-surface:#fff; --jhc-raised:#f8fafc; --jhc-text:#202d40; --jhc-muted:#596579; --jhc-border:#d6deea; --jhc-primary:#2454c6; --jhc-hover:#edf2fb; --jhc-stripe:#f7f9fc; --jhc-focus:#3775e7; }
html[data-theme="dark"] { color-scheme:dark; --jhc-bg:#121923; --jhc-surface:#1b2533; --jhc-raised:#222f40; --jhc-text:#e4eaf3; --jhc-muted:#b1bfd1; --jhc-border:#40506a; --jhc-primary:#a5c4ff; --jhc-hover:#2b3b51; --jhc-stripe:#202c3c; --jhc-focus:#8db8ff; }
body { background:var(--jhc-bg); color:var(--jhc-text); line-height:1.5; }
.main-wrapper, .page-wrapper, .page-content { background:var(--jhc-bg); }
.card, .modal-content, .dropdown-menu, .list-group-item, .sidebar, .sidebar .sidebar-header, .sidebar .sidebar-body, .navbar, .footer { background:var(--jhc-surface); color:var(--jhc-text); border-color:var(--jhc-border); }
.card { border:1px solid var(--jhc-border); border-radius:.6rem; box-shadow:0 2px 8px rgb(0 0 0 / 4%); }
.card-title { letter-spacing:.015em; line-height:1.4; }
.card-header, .card-footer, .modal-header, .modal-footer, .dropdown-divider { border-color:var(--jhc-border); }
.card-header, .card-footer { background:var(--jhc-raised); }
.text-muted, .text-secondary, .form-text, .breadcrumb-item, .breadcrumb-item.active { color:var(--jhc-muted) !important; }
a { color:var(--jhc-primary); }
.navbar .navbar-content .navbar-nav .nav-item .nav-link, .sidebar .sidebar-body .nav .nav-item .nav-link, .sidebar .sidebar-header .sidebar-brand, .dropdown-item { color:var(--jhc-text); }
.dropdown-item:hover, .dropdown-item:focus, .list-group-item-action:hover, .list-group-item-action:focus { background:var(--jhc-hover); color:var(--jhc-text); }
.form-control, .form-select, .input-group-text, .custom-select, .dataTables_wrapper input, .dataTables_wrapper select { background-color:var(--jhc-surface); color:var(--jhc-text); border-color:var(--jhc-border); }
.form-control:focus, .form-select:focus { background-color:var(--jhc-surface); color:var(--jhc-text); border-color:var(--jhc-focus); box-shadow:0 0 0 .2rem rgb(55 117 231 / 25%); }
.form-control::placeholder { color:var(--jhc-muted); opacity:1; }
.form-control:disabled, .form-control[readonly], .form-select:disabled, .input-group-text { background-color:var(--jhc-raised); color:var(--jhc-muted); }
.table { color:var(--jhc-text); border-color:var(--jhc-border); --bs-table-bg:transparent; --bs-table-color:var(--jhc-text); --bs-table-striped-bg:var(--jhc-stripe); --bs-table-striped-color:var(--jhc-text); --bs-table-hover-bg:var(--jhc-hover); --bs-table-hover-color:var(--jhc-text); }
.table > :not(caption) > * > * { padding:.55rem .7rem; border-color:var(--jhc-border); }
.table thead th { background:var(--jhc-raised); color:var(--jhc-text); position:sticky; top:0; z-index:2; vertical-align:middle; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color:var(--bs-table-striped-bg); color:var(--bs-table-striped-color); }
.table-hover > tbody > tr:hover > * { background-color:var(--bs-table-hover-bg); color:var(--bs-table-hover-color); }
.jhc-money { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.dataTables_wrapper, .dataTables_info, .dataTables_length, .dataTables_filter { color:var(--jhc-muted); }
.page-link { background:var(--jhc-surface); color:var(--jhc-primary); border-color:var(--jhc-border); }
.page-link:hover, .page-link:focus { background:var(--jhc-hover); color:var(--jhc-primary); }
.page-item.disabled .page-link { background:var(--jhc-raised); color:var(--jhc-muted); border-color:var(--jhc-border); }
.nav-tabs { border-color:var(--jhc-border); }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { background:var(--jhc-surface); color:var(--jhc-text); border-color:var(--jhc-border) var(--jhc-border) var(--jhc-surface); }
.nav-tabs .nav-link:hover { border-color:var(--jhc-border); }
.btn { min-height:2.15rem; border-radius:.35rem; }
.btn-sm { min-height:1.8rem; }
.jhc-theme-toggle { width:2.3rem; height:2.3rem; padding:.4rem; margin-inline:.5rem; }
.jhc-theme-toggle svg { width:1.15rem; height:1.15rem; }
:focus-visible { outline:3px solid var(--jhc-focus) !important; outline-offset:3px; }
html[data-theme="dark"] .bg-white, html[data-theme="dark"] .bg-light { background-color:var(--jhc-raised) !important; }
html[data-theme="dark"] .text-dark, html[data-theme="dark"] .text-black { color:var(--jhc-text) !important; }
html[data-theme="dark"] .border { border-color:var(--jhc-border) !important; }
html[data-theme="dark"] .btn-close { filter:invert(1) grayscale(1) brightness(1.7); }
html[data-theme="dark"] .btn-outline-primary { color:#a5c4ff; border-color:#a5c4ff; }
html[data-theme="dark"] .btn-outline-secondary, html[data-theme="dark"] .btn-outline-dark { color:#d2dceb; border-color:#8999af; }
html[data-theme="dark"] .btn-outline-success { color:#8de0b4; border-color:#8de0b4; }
html[data-theme="dark"] .btn-outline-danger { color:#ffb2bc; border-color:#ffb2bc; }
html[data-theme="dark"] .btn-outline-warning { color:#ffdc88; border-color:#ffdc88; }
html[data-theme="dark"] .btn-outline-info { color:#94ddf3; border-color:#94ddf3; }
html[data-theme="dark"] .btn-outline-light { color:#e4eaf3; border-color:#e4eaf3; }
html[data-theme="dark"] [class*="btn-outline-"]:hover, html[data-theme="dark"] [class*="btn-outline-"]:active { background-color:#dce7fb; color:#142238; border-color:#dce7fb; }
html[data-theme="dark"] .alert-success { background:#173d30; color:#b5f2cd; border-color:#397957; }
html[data-theme="dark"] .alert-danger { background:#492630; color:#ffd0d6; border-color:#995968; }
html[data-theme="dark"] .alert-warning { background:#45391f; color:#ffe4a5; border-color:#957d41; }
html[data-theme="dark"] .alert-info, html[data-theme="dark"] .alert-primary { background:#233d57; color:#c6e5ff; border-color:#557ea8; }
html[data-theme="dark"] .alert-secondary, html[data-theme="dark"] .alert-light, html[data-theme="dark"] .alert-dark { background:var(--jhc-raised); color:var(--jhc-text); border-color:var(--jhc-border); }
html[data-theme="dark"] .text-success { color:#8de0b4 !important; }
html[data-theme="dark"] .text-danger { color:#ffb2bc !important; }
html[data-theme="dark"] .text-warning { color:#ffdc88 !important; }
html[data-theme="dark"] .text-info { color:#94ddf3 !important; }
html[data-theme="dark"] .badge.bg-success, html[data-theme="dark"] .badge.bg-danger, html[data-theme="dark"] .badge.bg-primary, html[data-theme="dark"] .badge.bg-secondary { color:#fff; }
html[data-theme="dark"] .badge.bg-warning, html[data-theme="dark"] .badge.bg-info, html[data-theme="dark"] .badge.bg-light { color:#142238; }
.popover, .popover-header, .popover-body { background:var(--jhc-surface); color:var(--jhc-text); border-color:var(--jhc-border); }
.tooltip-inner { background:var(--jhc-text); color:var(--jhc-bg); }
html[data-theme="dark"] .flatpickr-calendar, html[data-theme="dark"] .flatpickr-months .flatpickr-month, html[data-theme="dark"] .flatpickr-weekdays, html[data-theme="dark"] span.flatpickr-weekday, html[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months { background:var(--jhc-surface); color:var(--jhc-text); }
html[data-theme="dark"] .flatpickr-day { color:var(--jhc-text); }
html[data-theme="dark"] .flatpickr-day.prevMonthDay, html[data-theme="dark"] .flatpickr-day.nextMonthDay, html[data-theme="dark"] .flatpickr-day.flatpickr-disabled { color:var(--jhc-muted); }
html[data-theme="dark"] .flatpickr-day:hover { background:var(--jhc-hover); border-color:var(--jhc-border); }
html[data-theme="dark"] .flatpickr-months svg { fill:var(--jhc-text); }
html[data-theme="dark"] .select2-container .select2-selection, html[data-theme="dark"] .select2-dropdown, html[data-theme="dark"] .select2-search__field { background:var(--jhc-surface); color:var(--jhc-text); border-color:var(--jhc-border); }
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color:var(--jhc-text); }
html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice { background:var(--jhc-raised); color:var(--jhc-text); border-color:var(--jhc-border); }
html[data-theme="dark"] .select2-results__option[aria-selected=true] { background:var(--jhc-hover); }
@media (max-width:767.98px) { .page-wrapper .page-content { padding:1rem; } .card .card-body { padding:1rem; } .table-responsive { overscroll-behavior-inline:contain; } .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length { text-align:left; margin-bottom:.6rem; } .modal-dialog { margin:.75rem; } }

/* Preserve contextual table meaning, including approved refund rows. */
html[data-theme="dark"] .table-success { --bs-table-bg:#173d30; --bs-table-color:#b5f2cd; --bs-table-striped-bg:#204b3b; --bs-table-striped-color:#b5f2cd; --bs-table-hover-bg:#285943; --bs-table-hover-color:#b5f2cd; }
html[data-theme="dark"] .table-danger { --bs-table-bg:#492630; --bs-table-color:#ffd0d6; --bs-table-striped-bg:#57303c; --bs-table-striped-color:#ffd0d6; --bs-table-hover-bg:#663949; --bs-table-hover-color:#ffd0d6; }
html[data-theme="dark"] .table-warning { --bs-table-bg:#45391f; --bs-table-color:#ffe4a5; --bs-table-striped-bg:#534529; --bs-table-striped-color:#ffe4a5; --bs-table-hover-bg:#61512f; --bs-table-hover-color:#ffe4a5; }
html[data-theme="dark"] .table-info, html[data-theme="dark"] .table-primary { --bs-table-bg:#233d57; --bs-table-color:#c6e5ff; --bs-table-striped-bg:#2b4865; --bs-table-striped-color:#c6e5ff; --bs-table-hover-bg:#345675; --bs-table-hover-color:#c6e5ff; }
html[data-theme="dark"] .table-secondary, html[data-theme="dark"] .table-light, html[data-theme="dark"] .table-dark { --bs-table-bg:var(--jhc-raised); --bs-table-color:var(--jhc-text); --bs-table-striped-bg:#2a394d; --bs-table-striped-color:var(--jhc-text); --bs-table-hover-bg:#34465c; --bs-table-hover-color:var(--jhc-text); }
html[data-theme="dark"] .table [class*="table-"] > * { color:var(--bs-table-color); }
html[data-theme="dark"] .btn-primary { --bs-btn-color:#142238; --bs-btn-bg:#a5c4ff; --bs-btn-border-color:#a5c4ff; --bs-btn-hover-color:#142238; --bs-btn-hover-bg:#c5d9ff; --bs-btn-hover-border-color:#c5d9ff; --bs-btn-active-color:#142238; --bs-btn-active-bg:#c5d9ff; }
html[data-theme="dark"] .btn-secondary { --bs-btn-color:#142238; --bs-btn-bg:#c0ccde; --bs-btn-border-color:#c0ccde; --bs-btn-hover-color:#142238; --bs-btn-hover-bg:#dce5f1; --bs-btn-hover-border-color:#dce5f1; --bs-btn-active-color:#142238; --bs-btn-active-bg:#dce5f1; }
html[data-theme="dark"] .btn-success { --bs-btn-color:#102b21; --bs-btn-bg:#8de0b4; --bs-btn-border-color:#8de0b4; --bs-btn-hover-color:#102b21; --bs-btn-hover-bg:#b5f2cd; --bs-btn-hover-border-color:#b5f2cd; }
html[data-theme="dark"] .btn-danger { --bs-btn-color:#3a1420; --bs-btn-bg:#ffb2bc; --bs-btn-border-color:#ffb2bc; --bs-btn-hover-color:#3a1420; --bs-btn-hover-bg:#ffd0d6; --bs-btn-hover-border-color:#ffd0d6; }
html[data-theme="dark"] .sidebar .sidebar-body .nav.sub-menu .nav-item .nav-link { color:var(--jhc-text); }
html[data-theme="dark"] .sidebar .sidebar-body .nav .nav-item:hover .nav-link, html[data-theme="dark"] .sidebar .sidebar-body .nav .nav-item.active .nav-link, html[data-theme="dark"] .sidebar .sidebar-body .nav .nav-item.active .nav-link .link-icon, html[data-theme="dark"] .sidebar .sidebar-body .nav.sub-menu .nav-item .nav-link.active { color:var(--jhc-primary); }
html[data-theme="dark"] .sidebar .sidebar-body .nav .nav-item.nav-category { color:var(--jhc-muted); }
.bs-popover-top > .popover-arrow::after { border-top-color:var(--jhc-surface); }
.bs-popover-bottom > .popover-arrow::after { border-bottom-color:var(--jhc-surface); }
.bs-popover-start > .popover-arrow::after { border-left-color:var(--jhc-surface); }
.bs-popover-end > .popover-arrow::after { border-right-color:var(--jhc-surface); }
.bs-tooltip-top .tooltip-arrow::before { border-top-color:var(--jhc-text); }
.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color:var(--jhc-text); }
.bs-tooltip-start .tooltip-arrow::before { border-left-color:var(--jhc-text); }
.bs-tooltip-end .tooltip-arrow::before { border-right-color:var(--jhc-text); }

html[data-theme="dark"] .badge.bg-success { background-color:#246543 !important; color:#fff; }
html[data-theme="dark"] .badge.bg-danger { background-color:#a52d43 !important; color:#fff; }
html[data-theme="dark"] .badge.bg-primary { background-color:#315c9e !important; color:#fff; }
html[data-theme="dark"] .badge.bg-secondary { background-color:#52627b !important; color:#fff; }
html[data-theme="dark"] .badge.bg-light { background-color:#dce7fb !important; color:#142238; }
html[data-theme="dark"] .btn-light { --bs-btn-bg:#dce7fb; --bs-btn-color:#142238; }
html[data-theme="dark"] .select2-results__option--highlighted[aria-selected] { background-color:#315c9e; color:#fff; }
@media print { .jhc-theme-toggle { display:none !important; } .table thead th { position:static; } }
