/* ==========================================================================
   XQlusive Hospital Management System — Professional Theme
   Designed for Bootstrap 3 | Compatible with existing jQuery scripts
   ========================================================================== */

/* Google Fonts are loaded via googlefonts.css linked separately in _Layout.vbhtml */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
    --primary:        #1a4f8b;
    --primary-dark:   #0f3160;
    --primary-light:  #2e6fc0;
    --primary-glass:  rgba(26, 79, 139, 0.08);
    --accent:         #00b4a2;
    --accent-dark:    #009486;
    --accent-light:   #e0f7f5;
    --danger:         #e63946;
    --warning:        #f4a261;
    --success:        #2a9d8f;
    --text-primary:   #1a2332;
    --text-secondary: #4a5568;
    --text-muted:     #7a8aa0;
    --border:         #e2e8f0;
    --border-light:   #f1f5f9;
    --bg-body:        #d6dde8;
    --bg-white:       #ffffff;
    --bg-card:        #ffffff;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg:      0 10px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-navbar:  0 2px 20px rgba(15, 49, 96, 0.15);
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      16px;
    --radius-xl:      24px;
    --font-body:      'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    --font-display:   'Lora', Georgia, serif;
    --transition:     all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --navbar-h:       62px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    font-size: 13.5px;
    line-height: 1.6;
    color: #1a2332;
    color: #1a2332;
    background: #d6dde8;
    background: #d6dde8;
    margin-bottom: 52px;
    padding-top: 0 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a, a:hover, a:focus {
    text-decoration: none;
    color: #1a4f8b;
}

/* ==========================================================================
   Navbar — Premium Redesign
   ========================================================================== */
#mainMenu.navbar {
    background: linear-gradient(135deg, #0f3160 0%, #1a4f8b 60%, #2e6fc0 100%);
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    min-height: 62px;
    box-shadow: 0 2px 20px rgba(15,49,96,0.15);
    position: sticky;
    top: 0;
    z-index: 1030;
}

#mainMenu .navbar-header {
    height: 62px;
    display: flex;
    align-items: center;
}

#mainMenu .navbar-brand {
    padding: 10px 20px 10px 0;
    height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff !important;
    font-family: 'Lora',Georgia,serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

#mainMenu .navbar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    padding: 2px;
}

/* Nav links */
#mainMenu .nav > li > a {
    color: rgba(255,255,255,0.88) !important;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 20px 14px;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    height: 62px;
    display: flex;
    align-items: center;
}

#mainMenu .nav > li > a:hover,
#mainMenu .nav > li > a:focus,
#mainMenu .nav > li.open > a {
    color: #ffffff !important;
    background: rgba(255,255,255,0.12) !important;
    border-bottom-color: #00b4a2;
}

/* Dropdown menus */
#mainMenu .dropdown-menu {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 200px;
    margin-top: 0;
    animation: dropIn 0.18s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

#mainMenu .dropdown-menu > li > a {
    color: #1a2332 !important;
    font-size: 12.5px;
    font-weight: 500;
    padding: 9px 18px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

#mainMenu .dropdown-menu > li > a:hover,
#mainMenu .dropdown-menu > li > a:focus {
    background: rgba(26,79,139,0.08) !important;
    color: #1a4f8b !important;
    border-left-color: #1a4f8b;
}

#mainMenu .dropdown-menu > li.divider {
    background: #f1f5f9;
    margin: 4px 0;
}

#mainMenu .dropdown-menu .dropdown-header {
    color: #7a8aa0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 8px 18px 4px;
}

/* Nested dropdown */
#mainMenu .dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 1px;
    border-radius: 10px;
}

/* Right nav — user area */
#mainMenu .navbar-right {
    display: flex;
    align-items: center;
}

#mUserName {
    color: rgba(255,255,255,0.9) !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 12px;
    margin: 0 8px;
}

/* Logout button */
#mainMenu .navbar-right > li > a {
    color: rgba(255,255,255,0.85) !important;
    padding: 18px 16px;
    transition: all 0.2s ease;
    height: 62px;
    display: flex;
    align-items: center;
}

#mainMenu .navbar-right > li > a:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

/* Mobile toggle */
#mainMenu .navbar-toggle {
    border-color: rgba(255,255,255,0.3);
    margin-top: 14px;
}
#mainMenu .navbar-toggle .icon-bar {
    background-color: rgba(255,255,255,0.9);
}
#mainMenu .navbar-toggle:hover {
    background: rgba(255,255,255,0.12);
}

/* ==========================================================================
   Body / Content Area
   ========================================================================== */
#body.body-content {
    padding: 24px 20px 60px;
}

/* ==========================================================================
   Panels — Complete Redesign
   ========================================================================== */
.panel {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    background: #ffffff;
    margin-bottom: 20px;
    overflow: hidden;
}

.panel-primary {
    border-top: 3px solid #1a4f8b;
}

.panel-default {
    border-top: 3px solid #e2e8f0;
}

.panel-success {
    border-top: 3px solid #2a9d8f;
}

.panel-info {
    border-top: 3px solid #00b4a2;
}

.panel-warning {
    border-top: 3px solid #f4a261;
}

.panel-danger {
    border-top: 3px solid #e63946;
}

/* Panel Heading */
.panel-heading {
    background: linear-gradient(to right, rgba(26,79,139,0.08), transparent) !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 14px 20px !important;
    color: #1a4f8b !important;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.02em;
}

.panel-heading .panel-title {
    color: #1a4f8b !important;
    font-weight: 600;
}

.panel-heading .panel-title a {
    color: #1a4f8b !important;
    font-weight: 600;
}

.panel-heading .panel-title a:hover {
    color: #0f3160 !important;
    text-decoration: none;
}

.panel-body {
    padding: 20px;
}

.panel-footer {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 0 0 16px 16px;
}

/* Panel heading span/buttons */
.panel-heading span {
    margin-top: 0;
    font-size: 13px;
}

/* ==========================================================================
   Accordion
   ========================================================================== */
.panel-group .panel {
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.panel-group .panel + .panel {
    margin-top: 0;
}

.panel-group .panel-heading {
    border-bottom: none !important;
}

.panel-group .panel-collapse {
    border-top: 1px solid #f1f5f9;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-control {
    height: 36px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Plus Jakarta Sans','Segoe UI',sans-serif;
    font-size: 13px;
    color: #1a2332;
    background: #fff;
    padding: 6px 10px;
    transition: all 0.2s ease;
    box-shadow: none;
}

.form-control:focus {
    border-color: #1a4f8b;
    box-shadow: 0 0 0 3px rgba(26, 79, 139, 0.12);
    outline: none;
}

.form-control:hover:not(:focus):not([disabled]):not([readonly]) {
    border-color: #b0bec5;
}

input[readonly].form-control,
textarea[readonly].form-control {
    background-color: #f8fafc !important;
    color: #4a5568;
}

input[disabled].form-control,
select[disabled].form-control {
    background-color: #f1f5f9 !important;
    color: #7a8aa0;
    cursor: not-allowed;
}

.control-label {
    font-weight: 600;
    font-size: 11.5px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.control-label.small {
    font-size: 11px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Form groups */
.form-group {
    margin-bottom: 16px;
}

.form-group-md .form-control {
    height: 36px;
}

/* Input groups */
.input-group-addon {
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px 0 0 6px;
    color: #1a4f8b;
    font-size: 13px;
    padding: 6px 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.input-group-addon:hover {
    background: rgba(26,79,139,0.08);
    color: #0f3160;
}

.input-group .form-control {
    border-radius: 0 6px 6px 0;
}

.input-group .form-control:first-child {
    border-radius: 6px 0 0 6px;
}

/* Selectpicker / Bootstrap-select */
.bootstrap-select .btn {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    height: 36px;
    background: #fff;
    color: #1a2332;
    font-family: 'Plus Jakarta Sans','Segoe UI',sans-serif;
    box-shadow: none;
    transition: all 0.2s ease;
}

.bootstrap-select .btn:hover,
.bootstrap-select.open .btn {
    border-color: #1a4f8b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 79, 139, 0.10);
}

.bootstrap-select .dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 6px 0;
}

.bootstrap-select .dropdown-menu > li > a {
    font-size: 13px;
    padding: 8px 14px;
}

/* ==========================================================================
   Buttons — Complete Redesign
   ========================================================================== */
.btn {
    font-family: 'Plus Jakarta Sans','Segoe UI',sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 6px;
    padding: 7px 18px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:focus,
.btn:active:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 79, 139, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #1a4f8b 0%, #2e6fc0 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 79, 139, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #0f3160 0%, #1a4f8b 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26, 79, 139, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(26, 79, 139, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #2a9d8f 0%, #35b8a8 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(42, 157, 143, 0.3);
}

.btn-success:hover, .btn-success:focus {
    background: linear-gradient(135deg, #229083 0%, #2a9d8f 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(42, 157, 143, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #e63946 0%, #f05c68 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.btn-danger:hover, .btn-danger:focus {
    background: linear-gradient(135deg, #c72d3a 0%, #e63946 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.4);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, #f4a261 0%, #f6b97a 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(244, 162, 97, 0.3);
}

.btn-warning:hover, .btn-warning:focus {
    background: linear-gradient(135deg, #e08828 0%, #f4a261 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(244, 162, 97, 0.4);
    transform: translateY(-1px);
}

.btn-info {
    background: linear-gradient(135deg, #00b4a2 0%, #00cdb8 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 180, 162, 0.3);
}

.btn-info:hover, .btn-info:focus {
    background: linear-gradient(135deg, #009486 0%, #00b4a2 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 180, 162, 0.4);
    transform: translateY(-1px);
}

.btn-default {
    background: #fff;
    color: #4a5568;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.btn-default:hover, .btn-default:focus {
    background: #f1f5f9;
    color: #1a2332;
    border-color: #b0bec5;
}

.btn-sm {
    font-size: 11.5px;
    padding: 5px 12px;
    border-radius: 5px;
}

.btn-xs {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 4px;
}

.btn-lg {
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 10px;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
    font-size: 12.5px;
    margin-bottom: 0;
}

.table > thead > tr > th {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    color: #4a5568;
    font-weight: 700;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none;
    padding: 6px 8px;
    white-space: nowrap;
    vertical-align: middle !important;
}

.table > tbody > tr > td {
    padding: 5px 8px;
    border-top: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1a2332;
    font-size: 12px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(26, 79, 139, 0.025);
}

.table-hover > tbody > tr:hover {
    background-color: rgba(26, 79, 139, 0.06) !important;
    cursor: pointer;
}

/* Bootstrap-table specific */
.fixed-table-container {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.fixed-table-toolbar {
    padding: 10px 16px 8px;
}

.fixed-table-pagination {
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
}

.fixed-table-pagination .pagination > li > a {
    border-radius: 6px;
    margin: 0 2px;
    font-size: 12px;
    font-weight: 600;
    color: #1a4f8b;
    border-color: #e2e8f0;
    padding: 5px 10px;
}

.fixed-table-pagination .pagination > .active > a {
    background: #1a4f8b;
    border-color: #1a4f8b;
    color: #fff;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #0f3160 0%, #1a4f8b 100%);
    border-bottom: none;
    padding: 18px 24px;
}

.modal-header .modal-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-family: 'Lora',Georgia,serif;
}

.modal-header .close {
    color: rgba(255,255,255,0.8);
    opacity: 1;
    font-size: 22px;
    margin-top: -2px;
    transition: all 0.2s ease;
}

.modal-header .close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    background: #fafbfc;
}

.modal-footer {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 14px 24px;
    border-radius: 0 0 16px 16px;
}

/* Modal width classes */
.modal-wide .modal-dialog  { width: 85%; max-width: 1100px; }
.modal-medium .modal-dialog { width: 65%; max-width: 800px; }

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 16px;
    border-left: 4px solid;
}

.alert-success {
    background: #e8f8f5;
    color: #1a7a6e;
    border-left-color: #2a9d8f;
}

.alert-danger {
    background: #fdecea;
    color: #b52831;
    border-left-color: #e63946;
}

.alert-warning {
    background: #fff8ec;
    color: #9a6200;
    border-left-color: #f4a261;
}

.alert-info {
    background: #e6f7f5;
    color: #0a6d65;
    border-left-color: #00b4a2;
}

/* ==========================================================================
   Badges & Labels
   ========================================================================== */
.label {
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 7px;
}

.badge {
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    background: #1a4f8b;
}

/* ==========================================================================
   Rows & Layout
   ========================================================================== */
.row {
    margin-top: 0;
    padding: 0;
}

.body-content {
    padding-left: 20px;
    padding-right: 20px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 42px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.05);
    z-index: 900;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

footer .panel {
    background: transparent;
    box-shadow: none;
    margin: 0;
    border: none;
    border-radius: 0;
}

footer .panel.panel-success {
    border: none;
    background: transparent;
}

footer .panel-success.text-center.footer {
    font-size: 12px;
    color: #4a5568;
    font-weight: 500;
    padding: 0;
    display: flex;
    align-items: center;
    height: 42px;
}

footer a {
    color: #1a4f8b;
    font-weight: 600;
}

footer a:hover {
    color: #0f3160;
}

#mFinancialYear {
    font-weight: 700;
    color: #1a4f8b;
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */
#Working {
    background: rgba(15, 49, 96, 0.55) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#Working img {
    border-radius: 50%;
    width: 64px;
    height: 64px;
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 0;
}

.nav-tabs > li > a {
    border: none;
    border-radius: 6px 6px 0 0;
    color: #4a5568;
    font-size: 12.5px;
    font-weight: 600;
    padding: 10px 18px;
    transition: all 0.2s ease;
    margin-right: 2px;
}

.nav-tabs > li > a:hover {
    background: rgba(26,79,139,0.08);
    color: #1a4f8b;
    border: none;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    background: #1a4f8b;
    color: #fff;
    border: none;
    border-bottom: 2px solid #1a4f8b;
}

.tab-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

/* ==========================================================================
   Glyphicons as FA fallback — color
   ========================================================================== */
.glyphicon {
    font-size: 13px;
}

.glyphicon-plus       { color: #1a4f8b; }
.glyphicon-pencil     { color: #f4a261; }
.glyphicon-trash      { color: #e63946; }
.glyphicon-search     { color: #4a5568; }
.glyphicon-refresh    { color: #1a4f8b; }
.glyphicon-save       { color: #2a9d8f; }
.glyphicon-ok         { color: #2a9d8f; }
.glyphicon-remove     { color: #e63946; }
.glyphicon-calendar   { color: #4a5568; }

/* ==========================================================================
   Clickable rows
   ========================================================================== */
.clickable { cursor: pointer; }

/* ==========================================================================
   DateTimePicker customization
   ========================================================================== */
.datetimepicker {
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
}

.datetimepicker table tr td.active,
.datetimepicker table tr td.active:hover {
    background: #1a4f8b !important;
    border-radius: 6px;
}

.datetimepicker table tr td.today:before {
    border-bottom-color: #00b4a2;
}

/* ==========================================================================
   Scrollbar (webkit)
   ========================================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #1a4f8b; }

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-primary { color: #1a4f8b !important; }
.text-muted   { color: #7a8aa0 !important; }
.text-danger  { color: #e63946 !important; }
.text-success { color: #2a9d8f !important; }

.font-bold {
    font-weight: 700;
    font-size: 11px;
    color: #1a2332;
}

.font-small {
    font-size: 12px;
    font-family: 'Plus Jakarta Sans','Segoe UI',sans-serif;
    color: #4a5568;
}

.checkbox { padding-left: 20px; }

/* ==========================================================================
   Input checkbox badge (existing)
   ========================================================================== */
.badgebox { opacity: 0; }
.badgebox + .badge { text-indent: -999999px; width: 27px; }
.badgebox:focus + .badge { box-shadow: inset 0px 0px 5px; }
.badgebox:checked + .badge { text-indent: 0; }

/* ==========================================================================
   Page titles / section headers
   ========================================================================== */
.page-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    margin: 0 0 20px;
}

.page-header h3, .page-header h4 {
    color: #1a4f8b;
    font-family: 'Lora',Georgia,serif;
    font-weight: 600;
    margin: 0;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 768px) {
    #mainMenu .dropdown-menu {
        border-radius: 0;
        box-shadow: none;
        border-left: 3px solid #1a4f8b;
    }

    #mainMenu .nav > li > a {
        padding: 12px 16px;
        height: auto;
    }

    #body.body-content {
        padding: 14px 12px 60px;
    }

    .panel-body {
        padding: 14px;
    }

    .modal-wide .modal-dialog,
    .modal-medium .modal-dialog {
        width: 96%;
        margin: 10px auto;
    }
}

/* ==========================================================================
   Print styles
   ========================================================================== */
@media print {
    * { background: transparent !important; color: #000 !important; box-shadow: none !important; }
    #mainMenu, footer, #Working { display: none !important; }
    #body.body-content { padding: 0; }
    .panel { border: 1px solid #ccc; border-radius: 0; }
    a:after { content: ""; }
}

/* ==========================================================================
   Login Page
   ========================================================================== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

.login-brand {
    flex: 1;
    background: linear-gradient(145deg, #0f3160 0%, #1a4f8b 50%, #2e6fc0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    top: -100px;
    left: -120px;
}

.login-brand::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(0,180,162,0.12);
    border-radius: 50%;
    bottom: -60px;
    right: -60px;
}

.login-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 380px;
}

.login-brand img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    padding: 6px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-brand h1 {
    font-family: 'Lora',Georgia,serif;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.2;
}

.login-brand p {
    color: rgba(255,255,255,0.68);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.brand-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 36px;
}

.brand-pill {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 20px;
    color: rgba(255,255,255,0.82);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 14px;
    letter-spacing: 0.04em;
}

.login-form-panel {
    width: 420px;
    min-width: 360px;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}

.login-card {
    width: 100%;
}

.login-card h2 {
    font-family: 'Lora',Georgia,serif;
    font-size: 24px;
    font-weight: 600;
    color: #1a2332;
    margin: 0 0 6px;
}

.login-card .subtitle {
    color: #7a8aa0;
    font-size: 13px;
    margin: 0 0 36px;
}

.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #4a5568;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.field-input-wrap {
    position: relative;
}

.field-input-wrap .field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a8aa0;
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.field-input-wrap input {
    width: 100%;
    height: 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Plus Jakarta Sans','Segoe UI',sans-serif;
    font-size: 13.5px;
    color: #1a2332;
    background: #fff;
    padding: 0 14px 0 40px;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    max-width: 100%;
}

.field-input-wrap input:focus {
    border-color: #1a4f8b;
    box-shadow: 0 0 0 3px rgba(26,79,139,0.12);
}

.field-input-wrap input.error,
.field-input-wrap input[style*="Red"] {
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230,57,70,0.10);
}

.btn-login {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #1a4f8b 0%, #2e6fc0 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Plus Jakarta Sans','Segoe UI',sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 16px rgba(26,79,139,0.35);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #0f3160 0%, #1a4f8b 100%);
    box-shadow: 0 6px 20px rgba(26,79,139,0.45);
    transform: translateY(-1px);
    color: #fff;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26,79,139,0.3);
}

#resultMessage {
    display: block;
    margin-top: 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #e63946;
    text-align: center;
    min-height: 18px;
}

.login-footer-note {
    margin-top: 40px;
    text-align: center;
    color: #7a8aa0;
    font-size: 11.5px;
}

.login-footer-note a {
    color: #1a4f8b;
    font-weight: 600;
}

@media (max-width: 768px) {
    .login-brand { display: none; }
    .login-form-panel {
        width: 100%;
        min-width: 0;
        padding: 40px 28px;
    }
}

/* ==========================================================================
   Navbar user chip and logout — replaces inline styles
   ========================================================================== */
.navbar-user-chip {
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.navbar-user-chip #mUserName {
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 12px;
    margin: 0 8px;
}

.navbar-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px 16px !important;
    color: rgba(255,255,255,0.75) !important;
    font-size: 12px;
    transition: all 0.2s ease;
}

.navbar-logout:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

.navbar-logout img {
    opacity: 0.85;
    vertical-align: middle;
}

/* ==========================================================================
   Working overlay — replaces inline style block
   ========================================================================== */
#Working {
    color: transparent;
    background-color: rgba(15, 49, 96, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: 5000;
    top: 0;
    left: 0;
    text-align: center;
    padding-top: 15%;
}

/* ==========================================================================
   COMPACT LAYOUT — Reduce all vertical spacing to minimum
   Overrides Bootstrap defaults across all .vbhtml views
   ========================================================================== */

/* Row spacing — Bootstrap default is 15px top margin, we added 40px, kill both */
.row {
    margin-top: 6px !important;
    margin-bottom: 0 !important;
}

/* Form groups — Bootstrap default is 15px bottom, reduce drastically */
.form-group {
    margin-bottom: 6px !important;
}

.form-group-sm {
    margin-bottom: 4px !important;
}

/* Form controls — reduce height */
.form-control {
    height: 30px !important;
    padding: 3px 8px !important;
    font-size: 12.5px !important;
}

textarea.form-control {
    height: auto !important;
}

/* Input group addons — match reduced height */
.input-group-addon {
    height: 30px !important;
    padding: 3px 8px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* Bootstrap-select button — match reduced height */
.bootstrap-select .btn {
    height: 30px !important;
    padding: 3px 8px !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
}

.bootstrap-select .btn .filter-option {
    line-height: 22px !important;
}

/* Labels — tighter */
.control-label,
.control-label.small,
label.control-label {
    margin-bottom: 1px !important;
    padding-top: 4px !important;
    font-size: 11px !important;
}

/* Panel heading — slimmer */
.panel-heading {
    padding: 7px 14px !important;
    font-size: 12.5px !important;
}

/* Panel body — tighter padding */
.panel-body {
    padding: 10px 14px !important;
}

/* Panel footer */
.panel-footer {
    padding: 6px 14px !important;
}

/* Panel overall */
.panel {
    margin-bottom: 8px !important;
    border-radius: 10px !important;
}

/* Panel group accordion */
.panel-group .panel {
    margin-bottom: 4px !important;
}

/* Modal header */
.modal-header {
    padding: 10px 16px !important;
}

.modal-header .modal-title {
    font-size: 13.5px !important;
}

/* Modal body — tighter */
.modal-body {
    padding: 12px 16px !important;
}

/* Modal footer */
.modal-footer {
    padding: 8px 16px !important;
}

/* Table cells — defined in main table section above */

/* Buttons — slim */
.btn {
    padding: 4px 12px !important;
    font-size: 12px !important;
    height: 30px !important;
    line-height: 1.4 !important;
}

.btn-xs {
    padding: 2px 6px !important;
    font-size: 11px !important;
    height: 22px !important;
}

.btn-sm {
    padding: 3px 8px !important;
    font-size: 11.5px !important;
    height: 26px !important;
}

/* Body top padding */
body {
    padding-top: 0 !important;
}

/* Body content area */
#body.body-content {
    padding: 8px 12px 52px !important;
}

/* Col padding — leave Bootstrap defaults intact to avoid breaking bootstrap-table alignment */

/* Fixed table toolbar and pagination */
.fixed-table-toolbar {
    padding: 4px 8px;
}

.fixed-table-pagination {
    padding: 4px 8px;
}

/* Accordion panel heading link */
.panel-group .panel-heading {
    padding: 6px 12px !important;
}

.panel-title {
    font-size: 12px !important;
}

/* h4, h5, h6 in panels */
.panel h4, .panel h5, .panel h6 {
    margin: 0 !important;
    font-size: 12.5px !important;
}

/* Navbar height stays comfortable — do not compress */

/* ==========================================================================
   FontAwesome — only formats available in /fonts/ folder
   ttf = already existed, woff + eot = downloaded manually
   ========================================================================== */
@font-face {
    font-family: 'FontAwesome';
    src: url('../fonts/fontawesome-webfont.eot');
    src: url('../fonts/fontawesome-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/fontawesome-webfont.woff') format('woff'),
         url('../fonts/fontawesome-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

/* ==========================================================================
   Accordion — open/close arrow using FontAwesome (now properly loaded)
   Overrides site.css colours to match new theme
   ========================================================================== */
#accordion .panel-heading .panel-title a::before {
    font-family: 'FontAwesome' !important;
    content: "\f054" !important;
    margin-right: 8px !important;
    font-size: 11px !important;
    color: #1a4f8b !important;
    display: inline-block !important;
    transition: transform 0.2s ease !important;
    transform: rotate(0deg) !important;
}

#accordion .panel-heading .panel-title a[aria-expanded="true"]::before {
    transform: rotate(90deg) !important;
    color: #1a4f8b !important;
}

#accordion .panel-heading .panel-title a[aria-expanded="true"] {
    color: #1a4f8b !important;
    background: rgba(26,79,139,0.08) !important;
    border-left: 3px solid #1a4f8b !important;
}

#accordion .panel-heading .panel-title a:hover {
    background: rgba(26,79,139,0.08) !important;
    color: #1a4f8b !important;
}

#accordion .panel:first-child .panel-heading .panel-title a::before {
    color: #1a4f8b !important;
}

/* ==========================================================================
   Tabs — active tab style fix
   ========================================================================== */
.nav-tabs > li {
    margin-bottom: -2px;
}

.nav-tabs > li > a {
    border: 1.5px solid transparent !important;
    border-radius: 6px 6px 0 0 !important;
    color: #4a5568;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    transition: all 0.2s ease;
    margin-right: 2px;
    background: #f1f5f9;
}

.nav-tabs > li > a:hover {
    background: rgba(26,79,139,0.08) !important;
    color: #1a4f8b !important;
    border-color: #e2e8f0 !important;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    background: #1a4f8b !important;
    color: #fff !important;
    border-color: #1a4f8b !important;
    border-bottom-color: #1a4f8b !important;
    font-weight: 700;
}

.tab-content {
    background: #fff;
    padding: 14px;
    border: 1.5px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

/* ==========================================================================
   Global Message Box — compact, fixed top-right, always visible
   ========================================================================== */
#globalMessage {
    position: fixed !important;
    top: 70px !important;        /* just below navbar */
    right: 16px !important;
    z-index: 99999 !important;
    min-width: 260px !important;
    max-width: 360px !important;
    width: auto !important;
    pointer-events: all;
}

#globalMessage .alert {
    padding: 10px 36px 10px 14px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08) !important;
    border: none !important;
    border-left: 4px solid transparent !important;
    word-break: break-word !important;
    white-space: normal !important;
}

#globalMessage .alert-success {
    background: linear-gradient(to right, #f0fdf9, #fff) !important;
    border-left-color: #2a9d8f !important;
    color: #1a6b62 !important;
}

#globalMessage .alert-danger {
    background: linear-gradient(to right, #fff5f5, #fff) !important;
    border-left-color: #e63946 !important;
    color: #b52831 !important;
}

#globalMessage .alert-warning {
    background: linear-gradient(to right, #fffbf0, #fff) !important;
    border-left-color: #f4a261 !important;
    color: #9a5a00 !important;
}

#globalMessage .alert-info {
    background: linear-gradient(to right, #f0f4ff, #fff) !important;
    border-left-color: #1a4f8b !important;
    color: #1a4f8b !important;
}

#globalMessage .close {
    position: absolute !important;
    top: 8px !important;
    right: 10px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    opacity: 0.5 !important;
    padding: 0 !important;
    color: inherit !important;
}

#globalMessage .close:hover {
    opacity: 1 !important;
}

/* Slide-in animation */
#globalMessage.show {
    animation: xqMsgIn 0.25s cubic-bezier(0.22,1,0.36,1) forwards;
}

@keyframes xqMsgIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
