/* J&Q Fleet — global theme bindings (uses CSS vars set by theme-palette.js) */

body {
  background: var(--theme-body-bg) !important;
  background-attachment: fixed !important;
}

body.dark-mode {
  background: var(--theme-body-bg) !important;
}

/* Iridescent card top sheen */
.kpi-card::after,
.content-card::after,
.page-header-card::after,
.filter-card::after,
.av-kpi-card::after,
.av-request-card::after,
.pr-kpi-card::after,
.cf-kpi-card::after,
.el-grid-card::after,
.bk-kpi-card::after,
.bk-card::after,
.tf-kpi-card::after,
.lc-card::after,
.mn-card::after,
.gr-card::after,
.cm-section-card::after,
.st-card::after {
  background: var(--theme-iridescent) !important;
}

/* ===== MODALS ===== */
.modal-header,
.modal-header.orange,
.modal-header.red,
.modal-header.purple,
.modal-header.violet,
.modal-header.pink,
.modal-header.cyan,
.modal-header.dark {
  background: var(--theme-gradient-primary) !important;
  color: var(--text-on-brand) !important;
}
.modal-header.blue,
.modal-header.indigo {
  background: var(--theme-gradient-blue) !important;
  color: var(--text-on-brand) !important;
}
.modal-header.green {
  background: var(--theme-gradient-green) !important;
  color: var(--text-on-brand) !important;
}

/* ===== TABLE HEADERS ===== */
.table-header-band,
.table-header-band.orange,
.table-header-band.red {
  background: var(--theme-gradient-primary) !important;
}
.table-header-band.blue,
.table-header-band.indigo,
.table-header-band.purple {
  background: var(--theme-gradient-blue) !important;
}
.table-header-band.green {
  background: var(--theme-gradient-green) !important;
}

.erp-table thead tr,
.erp-table th {
  background: var(--jq-blue) !important;
  color: #fff !important;
}
.erp-table th.red,
.erp-table tr.red th,
.erp-table tr.orange th {
  background: var(--jq-accent) !important;
}
.erp-table th.blue,
.erp-table th.indigo,
.erp-table tr.blue th,
.erp-table tr.indigo th {
  background: var(--jq-blue) !important;
}
.erp-table th.green,
.erp-table tr.green th {
  background: var(--jq-green) !important;
}
.erp-table th.purple {
  background: var(--jq-blue) !important;
}

/* ===== PAGE HEADER ICONS ===== */
.page-header-icon.orange,
.page-header-icon.red {
  background: var(--theme-gradient-primary) !important;
}
.page-header-icon.blue,
.page-header-icon.indigo,
.page-header-icon.purple {
  background: var(--theme-gradient-blue) !important;
}
.page-header-icon.green {
  background: var(--theme-gradient-green) !important;
}

/* ===== HERO / BANNERS ===== */
.hero-banner {
  background: var(--theme-gradient-hero) !important;
  box-shadow: var(--theme-shadow-hero) !important;
}
.banner-card.orange,
.banner-card.red {
  background: var(--theme-gradient-primary) !important;
  box-shadow: var(--theme-shadow-primary) !important;
}
.banner-card.purple {
  background: var(--theme-gradient-blue) !important;
  box-shadow: var(--theme-shadow-blue) !important;
}
.banner-card.dark {
  background: var(--theme-gradient-banner-dark) !important;
}

/* ===== BUTTONS ===== */
.btn-primary:not(.red):not(.green):not(.blue):not(.purple):not(.indigo),
a.btn-primary:not(.red):not(.green):not(.blue):not(.purple):not(.indigo) {
  background: var(--theme-gradient-primary) !important;
  box-shadow: var(--theme-shadow-primary) !important;
}
.btn-primary.red {
  background: var(--theme-gradient-primary) !important;
  box-shadow: var(--theme-shadow-primary) !important;
}
.btn-primary.blue,
.btn-primary.indigo {
  background: var(--theme-gradient-blue) !important;
  box-shadow: var(--theme-shadow-blue) !important;
}
.btn-primary.green {
  background: var(--theme-gradient-green) !important;
  box-shadow: var(--theme-shadow-green) !important;
}
.btn-primary.purple {
  background: var(--theme-gradient-blue) !important;
  box-shadow: var(--theme-shadow-blue) !important;
}

/* ===== PILLS / TOGGLES ===== */
.toggle-pill.active,
.stage-pill.active,
.doc-filter-pill.active {
  background: var(--theme-gradient-primary) !important;
  color: var(--text-on-brand) !important;
  border-color: var(--jq-accent) !important;
}
.modal-tab-btn.active {
  background: var(--jq-accent-muted) !important;
  border-color: var(--jq-accent-border) !important;
  color: var(--jq-accent) !important;
}

/* ===== KPI BUBBLES ===== */
.bubble-orange {
  background: linear-gradient(135deg, var(--theme-tint-primary-18), var(--theme-tint-primary-06)) !important;
  color: var(--jq-accent) !important;
  border-color: var(--theme-tint-primary-22) !important;
}
.bubble-blue {
  background: linear-gradient(135deg, var(--theme-tint-blue-18), var(--theme-tint-blue-06)) !important;
  color: var(--jq-blue) !important;
  border-color: var(--theme-tint-blue-22) !important;
}
.bubble-green {
  background: linear-gradient(135deg, var(--theme-tint-green-18), var(--theme-tint-green-06)) !important;
  color: var(--jq-green) !important;
  border-color: var(--theme-tint-green-22) !important;
}

/* ===== FLASH MESSAGES ===== */
.flash-warning {
  background: var(--jq-accent) !important;
}
.flash-info {
  background: var(--jq-blue) !important;
}
.flash-success {
  background: var(--jq-green) !important;
}

/* ===== NAV & TABS ===== */
.bottom-nav-item:hover,
.bottom-nav-item.active,
.bottom-nav-item.active i {
  color: var(--jq-accent) !important;
}
.staff-tab-btn.active,
.tabs-nav .tab-btn.active {
  color: var(--jq-blue) !important;
  border-bottom-color: var(--jq-blue) !important;
}
.fv-live-tab.active {
  color: var(--jq-accent) !important;
}

/* ===== MISC ACCENTS ===== */
.kpi-hint,
.service-tag i,
.item-card h4,
.sidebar-footer a,
.pf-money,
.import-type-card.active,
.fv-import-section-title i {
  color: var(--jq-accent) !important;
}
.import-type-card.active,
.doc-upload-box:hover {
  border-color: var(--jq-accent) !important;
}
.import-type-card.active {
  background: var(--jq-accent-muted) !important;
}

.avatar {
  background: var(--theme-gradient-blue) !important;
}
.notes-fab,
.msg-history-fab {
  background: var(--theme-gradient-primary) !important;
}

/* ===== SECTION HEADERS (module panels) ===== */
.cp-section-header.orange,
.cp-section-header.red {
  background: var(--theme-gradient-primary) !important;
}
.cp-section-header.green {
  background: var(--theme-gradient-green) !important;
}
.cp-section-header.purple {
  background: var(--theme-gradient-blue) !important;
}

/* ===== PRE-FLEET / FLEET STAT CARDS ===== */
.pf-stat-card.purple::before,
.pf-stat-icon.purple {
  background: var(--theme-gradient-primary) !important;
}
.pf-stat-card.blue::before,
.pf-stat-icon.blue {
  background: var(--theme-gradient-blue) !important;
}
.pf-stat-icon.green {
  background: var(--theme-gradient-green) !important;
}
.pf-stat-card.purple .pf-stat-value {
  color: var(--jq-accent) !important;
}
.pf-stat-card.blue .pf-stat-value {
  color: var(--jq-blue) !important;
}
.pf-stat-card.green .pf-stat-value {
  color: var(--jq-green) !important;
}

/* ===== GRID CARDS ===== */
.fv-grid-card {
  border-top-color: var(--jq-green) !important;
}
.fv-grid-card:hover,
.fv-grid-card.has-open-menu {
  border-color: var(--jq-accent-border) !important;
}

/* ===== PROFILE / SETTINGS ===== */
.st-profile-hero {
  background: var(--theme-gradient-blue) !important;
}
.st-profile-card-head {
  background: var(--theme-gradient-primary) !important;
}

/* ===== LIVE STAT / VALUE ICONS ===== */
.cp-live-stat.blue .cp-stat-icon,
.cp-value-card .cp-value-icon.blue {
  background: var(--theme-tint-blue-12) !important;
  color: var(--jq-blue) !important;
}
.cp-live-stat.purple .cp-stat-icon,
.cp-value-card .cp-value-icon.purple {
  background: var(--theme-tint-primary-12) !important;
  color: var(--jq-accent) !important;
}

/* ===== AGREEMENTS / INLINE OVERRIDES ===== */
.tabs-nav .tab-btn {
  color: var(--text-2) !important;
}
.tabs-nav [style*="color:#2563eb"],
.tabs-nav [style*="color: #2563eb"] {
  color: var(--jq-blue) !important;
}
.tabs-nav [style*="border-bottom:3px solid #2563eb"],
.tabs-nav [style*="border-bottom: 3px solid #2563eb"] {
  border-bottom-color: var(--jq-blue) !important;
}

/* ===== VISITORS KPI ===== */
.vf-kpi-card.purple::before {
  background: var(--theme-gradient-primary) !important;
}
.vf-kpi-card.orange::before {
  background: var(--theme-gradient-primary) !important;
}
.vf-kpi-card.green::before {
  background: var(--theme-gradient-green) !important;
}
.vf-kpi-card.purple .vf-kpi-label,
.vf-kpi-card.orange .vf-kpi-label {
  color: var(--jq-accent) !important;
}
.vf-kpi-card.green .vf-kpi-label {
  color: var(--jq-green) !important;
}

/* ===== ADVANCES KPI ===== */
.av-kpi-card.pending.is-active {
  border-color: var(--jq-accent) !important;
}
.av-kpi-card.pending::before {
  background: var(--jq-accent) !important;
}
.av-kpi-card.pending .av-kpi-icon,
.av-kpi-card.pending .av-kpi-value {
  color: var(--jq-accent) !important;
}
.av-kpi-card.approved.is-active {
  border-color: var(--jq-green) !important;
}
.av-kpi-card.approved::before {
  background: var(--jq-green) !important;
}
.av-kpi-card.approved .av-kpi-icon,
.av-kpi-card.approved .av-kpi-value {
  color: var(--jq-green) !important;
}

/* ===== PAYROLL KPI TINTS ===== */
.pr-kpi-card.orange {
  background: var(--theme-tint-primary-08) !important;
  border-color: var(--theme-tint-primary-22) !important;
}
.pr-kpi-card.blue {
  background: var(--theme-tint-blue-08) !important;
  border-color: var(--theme-tint-blue-22) !important;
}
.pr-kpi-card.green {
  background: var(--theme-tint-green-08) !important;
  border-color: var(--theme-tint-green-22) !important;
}
.pr-kpi-card2.blue {
  background: linear-gradient(135deg, var(--theme-tint-blue-08), var(--theme-tint-blue-12)) !important;
  border-color: var(--theme-tint-blue-22) !important;
}
.pr-kpi-card2.purple {
  background: linear-gradient(135deg, var(--theme-tint-primary-08), var(--theme-tint-primary-12)) !important;
  border-color: var(--theme-tint-primary-22) !important;
}
.pr-kpi-card2.green {
  background: linear-gradient(135deg, var(--theme-tint-green-08), var(--theme-tint-green-12)) !important;
  border-color: var(--theme-tint-green-22) !important;
}

/* ===== BIKES / OPS MODULE ACCENTS ===== */
.bk-kpi-card::before,
.tf-kpi-card::before,
.mn-kpi-card::before,
.gr-kpi-card::before,
.lc-kpi-card::before,
.cf-kpi-card::before,
.el-kpi-card::before,
.cm-kpi-card::before,
.al-kpi-card::before {
  background: var(--theme-iridescent) !important;
}

/* ===== QUICK THEME MODAL ===== */
.quick-mode-btn.active {
  background: var(--theme-gradient-primary) !important;
  color: var(--text-on-brand) !important;
  box-shadow: var(--theme-shadow-primary) !important;
}
.quick-preset-card.active {
  border-color: var(--jq-accent) !important;
  box-shadow: 0 0 0 2px var(--jq-accent), 0 8px 20px rgba(0, 0, 0, 0.2) !important;
  background: var(--jq-accent-muted) !important;
}

/* ===== LINKS & FOCUS ===== */
a:not(.btn-primary):not(.nav-item):not(.bottom-nav-item):not(.user-dropdown-item):hover {
  color: var(--jq-blue);
}
.jq-search-add,
.jq-search-option:focus {
  color: var(--jq-blue) !important;
}
.st-input:focus,
.jq-search-input:focus {
  border-color: var(--jq-accent) !important;
  box-shadow: 0 0 0 3px var(--jq-focus-ring) !important;
}
