/* BlockMag Premium Custom Stylesheet - Dark Glassmorphism Design System */

:root {
    --bg-main: #0a0814;
    --text-main: #cbd5e1;
    --text-muted: #94a3b8;
    --primary-glow: #6366f1;
    --primary-glow-hover: #4f46e5;
    --glass-bg: rgba(20, 16, 42, 0.55);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-focus: rgba(99, 102, 241, 0.35);
    --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    --mesh-gradient: radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
                     radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.14) 0%, transparent 50%),
                     radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.06) 0%, transparent 60%),
                     #0a0814;
}

html {
    background-color: #0a0814 !important;
}

/* Prevent white resizer handle pixel artifact on rounded dark textareas */
textarea::-webkit-resizer {
    display: none !important;
}

body {
    background: var(--mesh-gradient);
    font-family: 'Roboto', 'Outfit', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
}

/* Premium Dynamic Glass Buttons */
.btn-premium {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-premium:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-premium:active {
    transform: translateY(1px);
}

.btn-glass-secondary {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-glass-secondary:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05) !important;
    transform: translateY(-2px);
}

.btn-glass-secondary:active {
    transform: translateY(1px);
}

/* Header navbar gradient */
.navbar-inverse {
    background: linear-gradient(135deg, #141126 0%, #0a0814 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#navbar-main {
    z-index: 1040 !important;
    position: relative;
}

.navbar-inverse .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.navbar-inverse .navbar-nav > li > a {
    color: #cbd5e1 !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus,
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px;
}

/* User dropdown button specific styling */
.navbar-nav > .dropdown-user > a,
.navbar-inverse .navbar-nav > .dropdown-user > a {
    color: #cbd5e1 !important;
    font-weight: 600;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navbar-nav > .dropdown-user > a:hover,
.navbar-nav > .dropdown-user > a:focus,
.navbar-nav > .dropdown-user.open > a,
.navbar-nav > .dropdown-user.open > a:hover,
.navbar-nav > .dropdown-user.open > a:focus,
.navbar-inverse .navbar-nav > .dropdown-user.open > a,
.navbar-inverse .navbar-nav > .dropdown-user.open > a:hover,
.navbar-inverse .navbar-nav > .dropdown-user.open > a:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25) !important;
}

/* Quick action buttons style */
.btn-quick1, .btn-quick2 {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 6px;
    padding: 6px 12px !important;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-quick1:hover, .btn-quick2:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

/* Second Navbar / Sidebar Style */
#navbar-second {
    background-color: rgba(20, 17, 38, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    z-index: 1010 !important;
    position: relative;
}

#navbar-second .navbar-nav > li > a {
    color: #cbd5e1 !important;
    font-weight: 500;
    padding: 15px 20px;
    transition: all 0.2s ease;
}

#navbar-second .navbar-nav > li > a:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

#navbar-second .navbar-nav > .active > a,
#navbar-second .navbar-nav > .active > a:hover,
#navbar-second .navbar-nav > .active > a:focus {
    background-color: transparent !important;
    color: #818cf8 !important;
    box-shadow: inset 0 -3px 0 #6366f1;
}

#navbar-second .navbar-nav > .open > a,
#navbar-second .navbar-nav > .open > a:hover,
#navbar-second .navbar-nav > .open > a:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

/* Flat panels with modern shadow and glass touch (Dark glassmorphism) */
.panel-flat, .panel-body.login-form {
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    background-color: #191630 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 25px;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.panel-flat:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3) !important;
}

.panel-heading {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    padding: 18px 20px !important;
    background-color: #151128 !important;
}

.panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff !important;
}

/* Beautiful modern Tabs */
.nav-tabs-highlight {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.nav-tabs-highlight > li > a {
    font-weight: 500;
    color: #94a3b8 !important;
    border-radius: 6px 6px 0 0 !important;
    padding: 12px 20px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-tabs-highlight > li > a:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: #ffffff !important;
}

.nav-tabs-highlight > li.active > a,
.nav-tabs-highlight > li.active > a:hover,
.nav-tabs-highlight > li.active > a:focus {
    border-top: 3px solid #6366f1 !important;
    border-left-color: rgba(255, 255, 255, 0.05) !important;
    border-right-color: rgba(255, 255, 255, 0.05) !important;
    background-color: #191630 !important;
    color: #818cf8 !important;
    font-weight: 600;
}

/* Premium Tables */
.table {
    margin-bottom: 0;
}

.table > head > tr > th,
.table > thead > tr > th {
    background-color: #151128 !important;
    color: #818cf8 !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05) !important;
    padding: 12px 16px;
}

.table > tbody > tr > td {
    padding: 14px 16px;
    vertical-align: middle;
    border-top: 1px solid rgba(255, 255, 255, 0.03) !important;
    color: #cbd5e1 !important;
    font-size: 13px;
}

.table > tbody > tr {
    transition: background-color 0.15s ease;
}

/* Override Bootstrap table striped and hover for Dark Glassmorphism compatibility */
.table-striped > tbody > tr:nth-of-type(odd),
.table-striped > tbody > tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.015) !important;
}

.table-striped > tbody > tr:nth-of-type(even),
.table-striped > tbody > tr:nth-child(even) {
    background-color: transparent !important;
}

.table-hover > tbody > tr:hover,
.table > tbody > tr:hover,
.table-striped.table-hover > tbody > tr:hover,
.table-striped.table-hover > tbody > tr:nth-of-type(odd):hover,
.table-striped.table-hover > tbody > tr:nth-of-type(even):hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Dark theme table borders */
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Forms styling */
.form-group label {
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.form-control {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px;
    padding: 8px 12px;
    height: auto;
    font-size: 13px;
    color: #ffffff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
}

.form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.form-control::placeholder {
    color: #64748b !important;
}

/* Premium Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 16px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border: none !important;
    color: #fff !important;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

.btn-default,
.heading-elements .btn-default,
.page-header-content .heading-elements .btn-default,
.heading-btn.btn-default,
.btn-default.heading-btn,
.navbar-nav .btn-default {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.btn-default:hover, .btn-default:focus,
.heading-elements .btn-default:hover,
.heading-elements .btn-default:focus,
.page-header-content .heading-elements .btn-default:hover,
.page-header-content .heading-elements .btn-default:focus,
.heading-btn.btn-default:hover,
.heading-btn.btn-default:focus,
.btn-default.heading-btn:hover,
.btn-default.heading-btn:focus,
.navbar-nav .btn-default:hover,
.navbar-nav .btn-default:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
}

.btn-danger:hover, .btn-danger:focus {
    background-color: rgba(239, 68, 68, 0.25) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25) !important;
}

/* Modals - Universal Liquid Glass Modal Scrollability & Sticky Footer */
.modal {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

body.modal-open {
    overflow: hidden !important;
}

.modal-dialog {
    margin: 30px auto !important;
    max-width: 95%;
}

.modal-content,
.modal-content > form {
    background-color: #1c1936 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    max-height: calc(100vh - 60px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    width: 100%;
}

.modal-header {
    background-color: #151128 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    padding: 16px 20px;
    flex-shrink: 0;
}

.modal-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    max-height: calc(100vh - 190px) !important;
    padding: 20px;
}

.modal-footer {
    background-color: #151128 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    padding: 14px 20px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.modal-title {
    font-weight: 600;
    color: #ffffff !important;
}

/* Badge and Labels */
.label {
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
}

/* Glassmorphism Labels & Badges */
.label-success {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #a7f3d0 !important;
}

.label-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

.label-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #fde68a !important;
}

.label-info {
    background-color: rgba(6, 182, 212, 0.15) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    color: #cffafe !important;
}

.label-primary {
    background-color: rgba(99, 102, 241, 0.15) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: #e0e7ff !important;
}

.label-default {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
}

.text-semibold, strong {
    color: #ffffff !important;
}

.text-muted {
    color: #94a3b8 !important;
}

/* Dropdown menus (selects, navs) */
.dropdown-menu {
    background: rgba(24, 20, 44, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.15) !important;
    padding: 6px 0 !important;
    z-index: 1070 !important;
}

.dropdown-menu > li > a {
    color: #cbd5e1 !important;
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%) !important;
    color: #ffffff !important;
    padding-left: 22px !important;
}

.dropdown-menu > li > a > i {
    color: #818cf8 !important;
    margin-right: 8px !important;
    transition: transform 0.2s ease !important;
}

.dropdown-menu > li > a:hover > i {
    color: #a5b4fc !important;
    transform: scale(1.15);
}

.dropdown-menu .divider {
    background-color: rgba(255, 255, 255, 0.08) !important;
    margin: 5px 0 !important;
}

/* Alert notifications styles override */
.alert-styled-left {
    background-color: #191630 !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}

/* Pagination Styling */
.pagination > li > a,
.pagination > li > span {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
    transition: all 0.2s ease;
}

.pagination > li > a:hover,
.pagination > li > span:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.pagination > .disabled > a,
.pagination > .disabled > span,
.pagination > .disabled > a:hover,
.pagination > .disabled > span:hover {
    background-color: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
    color: #64748b !important;
}

/* Stats cards glassmorphism */
.panel {
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    background-color: #191630 !important;
    margin-bottom: 25px;
    backdrop-filter: blur(12px);
}

.panel.bg-teal-400 {
    border-left: 3px solid #14b8a6 !important;
    background-color: #191630 !important;
}
.panel.bg-teal-400 i {
    color: #14b8a6 !important;
    text-shadow: 0 0 8px rgba(20, 184, 166, 0.5);
}

.panel.bg-blue-400 {
    border-left: 3px solid #3b82f6 !important;
    background-color: #191630 !important;
}
.panel.bg-blue-400 i {
    color: #3b82f6 !important;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.panel.bg-orange-400 {
    border-left: 3px solid #f97316 !important;
    background-color: #191630 !important;
}
.panel.bg-orange-400 i {
    color: #f97316 !important;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
}

.panel.bg-danger-400 {
    border-left: 3px solid #ef4444 !important;
    background-color: #191630 !important;
}
.panel.bg-danger-400 i {
    color: #ef4444 !important;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.panel.bg-teal-400 h3,
.panel.bg-blue-400 h3,
.panel.bg-orange-400 h3,
.panel.bg-danger-400 h3 {
    color: #ffffff !important;
    font-weight: 700;
}

/* Page Header Override */
.page-header {
    background-color: transparent !important;
    border-bottom: none !important;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.page-header .page-title h4 {
    color: #ffffff !important;
    font-weight: 600;
}

/* Fallback for general nav-tabs */
.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.nav-tabs > li > a {
    font-weight: 500;
    color: #94a3b8 !important;
    border-radius: 6px 6px 0 0 !important;
    padding: 12px 20px;
    transition: all 0.2s ease;
    border: 1px solid transparent !important;
}

.nav-tabs > li > a:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: #ffffff !important;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    border-top: 3px solid #6366f1 !important;
    border-left-color: rgba(255, 255, 255, 0.05) !important;
    border-right-color: rgba(255, 255, 255, 0.05) !important;
    background-color: #191630 !important;
    color: #818cf8 !important;
    font-weight: 600;
}

/* Form Controls option list background fix */
select.form-control option {
    background-color: #191630 !important;
    color: #ffffff !important;
}

/* Login Page Icon Object Glassmorphism */
.icon-object {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #818cf8 !important;
    background-color: rgba(99, 102, 241, 0.05) !important;
}

/* dataTables styling overrides */
.dataTables_filter input,
.dataTables_length select {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px;
    padding: 6px 10px;
    color: #ffffff !important;
}

.dataTables_filter input:focus,
.dataTables_length select:focus {
    border-color: #6366f1 !important;
    outline: none;
}

/* Panel Footer Dark Glassmorphism */
.panel-footer {
    background-color: #151128 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 10px 20px !important;
}

/* Timesheets Hub values & slate text styling overrides */
.bg-slate-300,
.panel-body .bg-slate-300 {
    background-color: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.panel-body .bg-slate-300 h3,
.panel-body .bg-slate-300 .text-primary {
    color: #818cf8 !important;
    text-shadow: 0 0 8px rgba(129, 140, 248, 0.4);
}

.text-slate {
    color: #cbd5e1 !important;
}

/* Media List Linked Hover Override for Dark Glassmorphism */
.media-list-linked .media-link,
.media-list-linked .media-link:hover,
.media-list-linked .media-link:focus,
.media-list-linked > li > a:hover,
.media-list-linked > li > .media-link:hover {
    transition: background-color 0.25s ease, color 0.25s ease;
}

.media-list-linked .media-link:hover,
.media-list-linked .media-link:focus,
.media-list-linked > li > a:hover,
.media-list-linked > li > .media-link:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
}

.media-list-linked .media-link:hover .text-muted,
.media-list-linked > li > a:hover .text-muted {
    color: #cbd5e1 !important;
}

/* Autofill overrides for dark glassmorphism (prevents browser white/yellow autofill background and black text on focus) */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
input:-webkit-autofill::first-line,
textarea:-webkit-autofill::first-line,
select:-webkit-autofill::first-line {
    -webkit-box-shadow: 0 0 0 1000px #161427 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    caret-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Premium Custom Checkbox Styling to match Dark Glassmorphism */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.25) !important;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    margin: 0 8px 0 0 !important;
    transition: all 0.2s ease-in-out;
}

input[type="checkbox"]:hover {
    border-color: rgba(99, 102, 241, 0.6) !important;
    background-color: rgba(99, 102, 241, 0.1) !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
}

input[type="checkbox"]:focus {
    outline: none;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

input[type="checkbox"]:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Global Accent Color override to replace default browser blue on interactive widgets */
html, body, input, select, textarea, button, option {
    accent-color: #6366f1 !important;
}

/* ==========================================
   Uniform.js Premium Styling Overrides
   ========================================== */

/* Checkbox wrapper generated by Uniform.js */
.checker span {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(0, 0, 0, 0.25) !important;
    border-radius: 4px !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-block !important;
}

.checker:hover span, .checker.focus span {
    border-color: rgba(99, 102, 241, 0.6) !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.2) !important;
}

.checker span.checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
}

.checker span.checked:after {
    color: #ffffff !important; /* Forces the checkmark icon to render white */
}

/* Radio buttons wrapper generated by Uniform.js */
.choice span {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(0, 0, 0, 0.25) !important;
    border-radius: 50% !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-block !important;
}

.choice:hover span, .choice.focus span {
    border-color: rgba(99, 102, 241, 0.6) !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.2) !important;
}

.choice span.checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
}

.choice span.checked:after {
    color: #ffffff !important;
    background-color: #ffffff !important;
}

/* Selector wrapper (select dropdowns) generated by Uniform.js */
.selector {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    height: auto !important;
    padding: 0 !important;
}

.selector span {
    color: #ffffff !important;
    font-size: 13px !important;
    padding: 8px 30px 8px 12px !important;
    height: auto !important;
    line-height: normal !important;
}

.selector.focus, .selector.active, .selector:active, .selector:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.selector.disabled {
    opacity: 0.5 !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================
   Datepicker Styling Overrides (jQuery UI & Bootstrap)
   ========================================== */
.ui-datepicker, .datepicker {
    background: rgba(25, 22, 48, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    color: #cbd5e1 !important;
    padding: 10px !important;
    z-index: 9999 !important;
}

.ui-datepicker-header, .datepicker-days thead {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    background: transparent !important;
}

.ui-datepicker .ui-datepicker-title, .datepicker-switch {
    font-weight: 600 !important;
    color: #818cf8 !important;
}

.ui-datepicker-prev, .ui-datepicker-next, .prev, .next {
    color: #94a3b8 !important;
    cursor: pointer !important;
}

.ui-datepicker-calendar th, .datepicker-days th {
    color: #818cf8 !important;
    font-weight: 500 !important;
}

.ui-datepicker-calendar td a, .datepicker-days td {
    color: #cbd5e1 !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
    background: transparent !important;
    border: none !important;
    text-align: center !important;
}

.ui-datepicker-calendar td a:hover, .datepicker-days td:hover {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: #ffffff !important;
}

.ui-datepicker-calendar td.ui-datepicker-current-day a,
.ui-datepicker-calendar td.ui-datepicker-today a,
.datepicker-days td.active,
.datepicker-days td.today,
.datepicker-days td.active:hover {
    background-color: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
}

/* ==========================================
   Native HTML5 Date/Time Widget Customizations
   ========================================== */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8) sepia(1) saturate(5) hue-rotate(200deg) !important; /* Shifts calendar/clock icons to indigo */
    cursor: pointer !important;
    opacity: 0.8 !important;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1 !important;
}

::-webkit-datetime-edit-field:focus {
    background-color: rgba(99, 102, 241, 0.4) !important;
    color: #ffffff !important;
    border-radius: 3px !important;
}

/* ==========================================
   Custom Dropdown Select Styling
   ========================================== */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
    display: block;
}

.custom-select-wrapper.active {
    z-index: 1000;
}

.custom-select-trigger {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px;
    padding: 8px 30px 8px 12px;
    font-size: 13px;
    color: #ffffff !important;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.custom-select-trigger:after {
    content: '\e9c5'; /* Icomoon icon for chevron down */
    font-family: 'icomoon', sans-serif;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.custom-select-wrapper.active .custom-select-trigger {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.custom-select-wrapper.active .custom-select-trigger:after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-options {
    background: rgba(25, 22, 48, 0.96) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
}

.custom-options.open {
    display: block;
}

.custom-option {
    padding: 8px 12px;
    font-size: 13px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-option:hover {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: #ffffff !important;
}

.custom-option.selected {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}

/* ==========================================
   Premium Flatpickr Customization (Glassmorphism)
   ========================================== */
.flatpickr-calendar {
    background: rgba(25, 22, 48, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1) !important;
}

/* Force absolute center alignment on screens/modals where input is too wide */
.flatpickr-calendar.open {
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    margin-top: 5px !important;
}

/* Strip default flatpickr grey backgrounds to reveal Liquid Glass */
.flatpickr-months,
.flatpickr-weekdays,
span.flatpickr-weekday {
    background: transparent !important;
}

.flatpickr-months {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-bottom: 5px !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: #ffffff !important;
    color: #ffffff !important;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, 
.flatpickr-day.startRange.inRange, 
.flatpickr-day.endRange.inRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.startRange:focus, 
.flatpickr-day.endRange:focus, 
.flatpickr-day.selected:hover, 
.flatpickr-day.startRange:hover, 
.flatpickr-day.endRange:hover, 
.flatpickr-day.prevMonthDay.selected, 
.flatpickr-day.nextMonthDay.selected {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
}

.flatpickr-day:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.flatpickr-time input:hover, 
.flatpickr-time .flatpickr-am-pm:hover, 
.flatpickr-time input:focus, 
.flatpickr-time .flatpickr-am-pm:focus {
    background: rgba(99, 102, 241, 0.15) !important;
}

.flatpickr-months .flatpickr-month {
    color: #818cf8 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent !important;
    color: #ffffff !important;
    padding: 0 5px 0 0 !important;
    margin: 0 !important;
    width: auto !important;
    border: none !important;
    text-align: center !important;
    text-align-last: center !important;
}

.flatpickr-current-month {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 !important;
    width: 100% !important;
    left: 0 !important;
    position: absolute !important;
}

.flatpickr-current-month .numInputWrapper {
    width: 55px !important;
    display: inline-block !important;
}

.flatpickr-current-month input.cur-year {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    text-align: center !important;
}

/* ==========================================
   Custom Scrollbar Styling (Premium Dark Theme)
   ========================================== */
::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 3px !important;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3) !important;
    border-radius: 3px !important;
    transition: background 0.2s !important;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6) !important;
}

/* Firefox scrollbar compatibility */
* {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(99, 102, 241, 0.3) rgba(0, 0, 0, 0.15) !important;
}

/* ==========================================
   Custom Timepicker Popover Styling
   ========================================== */
.custom-timepicker-popover {
    background: rgba(20, 18, 38, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(99, 102, 241, 0.1);
    display: flex;
    position: absolute;
    z-index: 9999;
    padding: 12px;
    gap: 12px;
    width: 210px;
    margin-top: 4px;
}

.timepicker-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.timepicker-col-title {
    font-size: 10px;
    font-weight: 700;
    color: #818cf8 !important;
    text-transform: uppercase;
    text-align: center;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.timepicker-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 2px;
}

.time-opt {
    padding: 6px 8px;
    font-size: 13px;
    text-align: center;
    color: #cbd5e1;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-family: monospace;
}

.time-opt:hover {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: #ffffff !important;
}

.time-opt.selected {
    background-color: #6366f1 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

/* ==========================================
   Workspace Profile Selection Styles
   ========================================== */
.workspace-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    position: relative;
    overflow: hidden;
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.1);
}

.profile-card.active {
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.profile-icon {
    font-size: 28px;
    color: #94a3b8;
    margin-bottom: 12px;
    display: block;
    transition: color 0.25s ease;
}

.profile-card:hover .profile-icon {
    color: #cbd5e1;
}

.profile-card.active .profile-icon {
    color: #818cf8 !important;
}

.profile-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.profile-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
}

.profile-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #6366f1;
    color: #ffffff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    display: none;
}

.profile-card.active .profile-badge {
    display: inline-block;
}

/* Responsive Navigation Tabs overrides for Mobile devices */
@media (max-width: 768px) {
    .nav-tabs {
        background-color: rgba(25, 22, 48, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
    }
    
    .nav-tabs:before {
        color: var(--text-muted) !important;
        opacity: 0.6 !important;
    }
    
    .nav-tabs > li > a {
        color: var(--text-muted) !important;
        background-color: transparent !important;
    }
    
    .nav-tabs > li > a:hover,
    .nav-tabs > li > a:focus {
        background-color: rgba(255, 255, 255, 0.02) !important;
        color: #ffffff !important;
    }
    
    .nav-tabs > li.active > a,
    .nav-tabs > li.active > a:hover,
    .nav-tabs > li.active > a:focus {
        border-left-color: #6366f1 !important;
        background-color: rgba(99, 102, 241, 0.1) !important;
        color: #818cf8 !important;
    }
}

/* ==========================================
   Reports Hub Glassmorphism Styles
   ========================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(171, 48, 232, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(171, 48, 232, 0.1);
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-header);
}

.kpi-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 22px;
    opacity: 0.8;
}

.reports-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.reports-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.reports-header-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.chart-bar-sales {
    fill: url(#salesGradient);
    cursor: pointer;
    transition: all 0.3s;
}

.chart-bar-sales:hover {
    fill: #d880ff;
    filter: drop-shadow(0 0 8px rgba(171, 48, 232, 0.6));
}

.chart-bar-purchases {
    fill: url(#purchasesGradient);
    cursor: pointer;
    transition: all 0.3s;
}

.chart-bar-purchases:hover {
    fill: #4fe3ff;
    filter: drop-shadow(0 0 8px rgba(0, 209, 255, 0.6));
}

.chart-axis-line {
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 1;
}

.chart-grid-line {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.chart-label {
    fill: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-body);
}

.chart-value-label {
    fill: var(--text-main);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-body);
    text-anchor: middle;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.chart-bar-group:hover .chart-value-label {
    opacity: 1;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-sales {
    background: linear-gradient(135deg, #ab30e8, #e05cff);
    box-shadow: 0 0 8px rgba(171, 48, 232, 0.4);
}

.legend-purchases {
    background: linear-gradient(135deg, #00b4db, #00d2ff);
    box-shadow: 0 0 8px rgba(0, 209, 255, 0.4);
}

.days-overdue-badge {
    background: rgba(255, 46, 99, 0.15);
    color: #ff2e63;
    border: 1px solid rgba(255, 46, 99, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 46, 99, 0.3);
    display: inline-block;
}

.days-warning-badge {
    background: rgba(255, 179, 0, 0.15);
    color: #ffb300;
    border: 1px solid rgba(255, 179, 0, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 179, 0, 0.3);
    display: inline-block;
}

.action-btn-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-small:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 0 10px rgba(171, 48, 232, 0.4);
}

/* ==========================================
   Global Form Input & Code Tag Premium Styling Overrides
   ========================================== */

/* Premium styling for <code> tags */
code {
    background-color: rgba(99, 102, 241, 0.15) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 12px !important;
    text-shadow: none !important;
}

/* Premium styling for standard checkboxes */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 4px;
    width: 16px;
    height: 16px;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: -3px;
    margin-right: 6px;
}

input[type="checkbox"]:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4) !important;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Premium styling for standard radio buttons */
input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: -3px;
    margin-right: 6px;
}

input[type="radio"]:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4) !important;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
}

input[type="radio"]:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Premium styling for native select dropdowns */
select, select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: rgba(0, 0, 0, 0.25) !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px;
    padding: 8px 32px 8px 12px !important;
    color: #ffffff !important;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

select:focus, select.form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    outline: none;
}

select option {
    background-color: #191630 !important;
    color: #ffffff !important;
}

/* Premium custom file inputs */
.custom-file-input-wrapper {
    position: relative;
    width: 100%;
    height: 38px;
}
.custom-file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}
.custom-file-input-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px;
    padding: 8px 12px;
    color: #cbd5e1;
    font-size: 13px;
    height: 100%;
    transition: all 0.2s ease;
    pointer-events: none;
}
.custom-file-input-btn::after {
    content: 'Browse';
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.custom-file-input-wrapper input[type="file"]:hover + .custom-file-input-btn {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff;
}
.custom-file-input-wrapper input[type="file"]:hover + .custom-file-input-btn::after {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   Mobile Responsive & Window Display Enhancements
   ========================================== */

@media (max-width: 768px) {
    /* Modal responsive layout fixes for all screens */
    .modal-dialog {
        width: 95% !important;
        max-width: 100% !important;
        margin: 12px auto !important;
    }
    
    .modal-content {
        max-height: 92vh !important;
        display: flex !important;
        flex-direction: column !important;
        border-radius: 16px !important;
        overflow: hidden !important;
    }
    
    .modal-header {
        padding: 14px 16px !important;
        flex-shrink: 0;
    }
    
    .modal-body {
        padding: 16px !important;
        overflow-y: auto !important;
        max-height: calc(92vh - 120px) !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        padding: 12px 16px !important;
        flex-shrink: 0;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: flex-end !important;
    }

    .modal-footer .btn {
        margin: 0 !important;
        flex: 1 1 auto;
        min-width: 100px;
    }

    /* Biometric Card Mobile Centering & Responsiveness */
    .biometric-card {
        width: 92% !important;
        max-width: 380px !important;
        padding: 24px 18px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Table horizontal scroll container for small viewports */
    .table-responsive {
        border: 0 !important;
        margin-bottom: 15px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Container padding tweaks */
    .content-wrapper {
        padding: 10px !important;
    }

    .panel-body {
        padding: 15px !important;
    }

    .page-header-content {
        padding: 15px 10px !important;
    }

    /* Form stack on mobile */
    .form-horizontal .form-group {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Quick stats grid wrapping */
    .row > [class*="col-"] {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .panel-title {
        font-size: 14px !important;
    }
    
    .btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    .pulse-icon {
        font-size: 40px !important;
        margin-bottom: 16px !important;
    }
}

/* ==========================================
   Global Dark Glassmorphism Component Overrides
   (Eliminates white backgrounds app-wide)
   ========================================== */

/* Select2 Dropdown Styling Overrides */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background-color: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px !important;
    height: 38px !important;
    padding: 4px 8px !important;
    color: #ffffff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
    line-height: 28px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

.select2-dropdown {
    background-color: #1c1936 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.select2-results__option {
    color: #cbd5e1 !important;
    background-color: transparent !important;
    padding: 8px 12px !important;
}

.select2-results__option--highlighted[aria-selected],
.select2-results__option[aria-selected="true"] {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
}

/* Bootstrap Wells, Panels & Jumbotrons */
.well, .well-lg, .well-sm, .jumbotron {
    background-color: #191630 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    color: #cbd5e1 !important;
    border-radius: 12px !important;
}

.panel-default, 
.panel-default > .panel-heading {
    background-color: #191630 !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

/* List Groups */
.list-group-item {
    background-color: #191630 !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}

.list-group-item:hover, 
.list-group-item:focus {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
}

/* Input Group Addons */
.input-group-addon {
    background-color: #151128 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #818cf8 !important;
}

/* Disabled & Readonly Form Controls */
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #64748b !important;
    cursor: not-allowed;
}

/* Popovers & Tooltips */
.popover {
    background-color: #1c1936 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border-radius: 8px !important;
}

.popover-title {
    background-color: #151128 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.popover-content {
    color: #cbd5e1 !important;
}

/* Modal Content & Containers */
.modal-content {
    background-color: #1c1936 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6) !important;
    color: #cbd5e1 !important;
}

/* ==========================================
   Mobile 3-Dots Action Menu (heading-elements) Glassmorphism Overrides
   ========================================== */

.heading-elements-toggle,
.breadcrumb-elements-toggle {
    color: #818cf8 !important;
}

.heading-elements-toggle:hover,
.heading-elements-toggle:focus,
.breadcrumb-elements-toggle:hover,
.breadcrumb-elements-toggle:focus {
    color: #ffffff !important;
}

/* 3-dots popup/expanded container on mobile */
@media (max-width: 768px) {
    .heading-elements,
    .heading-elements.visible,
    .heading-elements.in,
    .heading-elements.collapse.in,
    .panel-body > .heading-elements.visible,
    .page-header-content .heading-elements.visible,
    .panel-heading .heading-elements.visible,
    .breadcrumb-elements,
    .breadcrumb-elements.visible,
    .breadcrumb-elements.in {
        background-color: #191630 !important;
        background: #191630 !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
        padding: 15px !important;
        color: #cbd5e1 !important;
        z-index: 1000 !important;
    }

    .heading-elements .dropdown-menu,
    .breadcrumb-elements .dropdown-menu,
    .heading-elements > .dropdown-menu {
        background-color: #1c1936 !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        color: #cbd5e1 !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
        border-radius: 8px !important;
    }

    .heading-elements .dropdown-menu > li > a,
    .breadcrumb-elements .dropdown-menu > li > a {
        color: #cbd5e1 !important;
    }

    .heading-elements .dropdown-menu > li > a:hover,
    .heading-elements .dropdown-menu > li > a:focus,
    .breadcrumb-elements .dropdown-menu > li > a:hover,
    .breadcrumb-elements .dropdown-menu > li > a:focus {
        background-color: rgba(255, 255, 255, 0.05) !important;
        color: #ffffff !important;
    }
}

/* HTML5 Date / Time / Datetime-Local Crisp White Input Styling */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    color-scheme: dark !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
input[type="date"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="time"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="time"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="time"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="date"]::-webkit-datetime-edit-hour-field,
input[type="time"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="date"]::-webkit-datetime-edit-minute-field,
input[type="time"]::-webkit-datetime-edit-minute-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
input[type="date"]::-webkit-datetime-edit-ampm-field,
input[type="time"]::-webkit-datetime-edit-ampm-field,
input[type="datetime-local"]::-webkit-datetime-edit-ampm-field {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(2) !important;
    cursor: pointer;
    opacity: 0.9;
}

/* Mobile navbar collapse styling */
@media (max-width: 768px) {
    .navbar-inverse .navbar-collapse {
        background: #141126 !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        padding-bottom: 10px !important;
    }
    .navbar-inverse .navbar-nav .open .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.35) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 8px !important;
        margin: 5px 15px !important;
    }
    .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
        color: #cbd5e1 !important;
        padding: 9px 15px !important;
    }
    .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover {
        color: #ffffff !important;
        background-color: rgba(99, 102, 241, 0.2) !important;
    }
    #connection-status-item {
        padding: 12px 20px !important;
        float: none !important;
    }
}
