/**
 * Dark Theme Override - Clean Team Ghana
 * Provides better font clarity and full dark theme support
 */

/* ========================================
   DARK THEME - ROOT VARIABLES
   ======================================== */
:root {
  /* Core Dark Theme Palette */
  --background-color: #0f172a;
  --default-color: #e2e8f0;
  --heading-color: #f1f5f9;
  --accent-color: #22d3ee;
  --surface-color: #1e293b;
  --contrast-color: #ffffff;

  /* Extended text colors */
  --muted-color: #94a3b8;
  --light-color: #cbd5e1;

  /* Borders */
  --border-color: #334155;
  --border-color-light: #1e293b;
  --border-color-dark: #475569;

  /* Status colors */
  --success-color: #10b981;
  --success-color-light: rgba(16, 185, 129, 0.15);
  --warning-color: #f59e0b;
  --warning-color-light: rgba(245, 158, 11, 0.15);
  --danger-color: #ef4444;
  --danger-color-light: rgba(239, 68, 68, 0.15);
  --info-color: #3b82f6;
  --info-color-light: rgba(59, 130, 246, 0.15);

  /* Navigation colors */
  --nav-color: #e2e8f0;
  --nav-hover-color: #22d3ee;
  --nav-mobile-background-color: #1e293b;
  --nav-dropdown-background-color: #1e293b;
  --nav-dropdown-color: #e2e8f0;
  --nav-dropdown-hover-color: #22d3ee;

  /* Header */
  --header-bg: rgba(30, 41, 59, 0.95);
  --header-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --header-border: #334155;

  /* Sidebar */
  --sidebar-bg: #1e293b;
  --sidebar-border: #334155;
  --sidebar-color: #e2e8f0;
  --sidebar-muted-color: #94a3b8;
  --sidebar-hover-bg: rgba(34, 211, 238, 0.1);
  --sidebar-active-bg: rgba(34, 211, 238, 0.15);
  --sidebar-active-color: #22d3ee;

  /* Cards */
  --card-bg: #1e293b;
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  --card-border: #334155;

  /* Tables */
  --table-header-bg: #334155;
  --table-hover-bg: #293548;
  --table-stripe-bg: #1a2332;

  /* Forms */
  --input-bg: #0f172a;
  --input-border: #334155;
  --input-focus-border: #22d3ee;
  --input-focus-ring: rgba(34, 211, 238, 0.25);
}

/* ========================================
   GLOBAL BODY & FONT RENDERING
   ======================================== */
body {
  background-color: var(--background-color) !important;
  color: var(--default-color) !important;
  font-family: var(--default-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Better font rendering for all text */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LOGIN PAGE - DARK THEME
   ======================================== */

/* Split Auth Layout - Left Visual Panel */
.fauth-visual {
  background: linear-gradient(165deg, #1e3a8a, #1e40af) !important;
  color: #f1f5f9 !important;
}

.fauth-visual::before {
  background: rgba(34, 211, 238, 0.08) !important;
}

.fauth-visual::after {
  background: rgba(34, 211, 238, 0.06) !important;
}

.fauth-kicker {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.fauth-visual-title {
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fauth-visual-text {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 400;
}

.fauth-point {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
}

.fauth-point i {
  color: rgba(255, 255, 255, 0.8) !important;
}

.fauth-visual .fauth-logo {
  color: #ffffff !important;
  font-weight: 700;
}

/* Main Auth Panel */
.fauth-main {
  background-color: #0f172a !important;
}

.fauth-card {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

.fauth-title {
  color: #f1f5f9 !important;
  font-weight: 700;
}

.fauth-subtitle {
  color: #94a3b8 !important;
  font-weight: 400;
}

/* Form Elements */
.fauth-field label,
.form-label,
label {
  color: #ffffff !important;
  font-weight: 500;
}

/* Ensure all label variants are white on dark backgrounds */
label.form-label,
label.col-form-label,
label.form-check-label,
.form-group label,
.mb-3 label,
.form-floating label,
legend,
.control-label {
  color: #ffffff !important;
  font-weight: 500;
}

.fauth-field input,
.form-control {
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
  font-weight: 400;
}

.fauth-field input:focus,
.form-control:focus {
  background-color: #0f172a !important;
  border-color: #22d3ee !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15) !important;
}

.fauth-field input::placeholder,
.form-control::placeholder {
  color: #64748b !important;
  opacity: 1;
}

/* Input Group */
.input-group-text {
  background-color: #334155 !important;
  border: 1px solid #334155 !important;
  color: #94a3b8 !important;
}

.btn-outline-secondary {
  background-color: #334155 !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

.btn-outline-secondary:hover {
  background-color: #475569 !important;
  color: #e2e8f0 !important;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, #22d3ee, #0ea5e9) !important;
  border: none !important;
  color: #0f172a !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  box-shadow: 0 6px 16px rgba(34, 211, 238, 0.4);
  transform: translateY(-1px);
}

/* Links */
.fauth-link {
  color: #22d3ee !important;
  font-weight: 500;
}

.fauth-link:hover {
  color: #0ea5e9 !important;
}

/* Footer */
.fauth-foot-text,
.footer-copyright {
  color: #94a3b8 !important;
  font-weight: 400;
}

.footer-copyright a {
  color: #22d3ee !important;
  font-weight: 500;
}

/* Alerts */
.alert-danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
}

/* Form Check */
.form-check-input {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

.form-check-input:checked {
  background-color: #22d3ee !important;
  border-color: #22d3ee !important;
}

.form-check-label {
  color: #ffffff !important;
  font-weight: 500;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
  background-color: var(--header-bg) !important;
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: var(--header-shadow);
}

.header-brand,
.header-title {
  color: #f1f5f9 !important;
  font-weight: 700;
}

.header-user-name {
  color: #e2e8f0 !important;
  font-weight: 500;
}

.header-user-email {
  color: #94a3b8 !important;
  font-weight: 400;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
  background-color: var(--sidebar-bg) !important;
  border-right: 1px solid var(--border-color) !important;
}

/* Force sidebar to dark theme with higher specificity */
aside.sidebar {
  background-color: #1e293b !important;
  border-right-color: #334155 !important;
}

/* Sidebar navigation styling */
.sidebar .nav-menu,
.sidebar .sidebar-nav,
.sidebar-nav {
  background-color: #1e293b !important;
}

/* Navigation items */
.sidebar .nav-item,
.sidebar-nav .nav-item {
  background-color: transparent !important;
}

/* Navigation links */
.sidebar .nav-link,
.sidebar-nav .nav-link {
  color: #e2e8f0 !important;
  background-color: transparent !important;
}

.sidebar .nav-link:hover,
.sidebar-nav .nav-link:hover {
  background-color: rgba(34, 211, 238, 0.1) !important;
  color: #22d3ee !important;
}

.sidebar .nav-link.active,
.sidebar-nav .nav-link.active {
  background-color: rgba(34, 211, 238, 0.15) !important;
  color: #22d3ee !important;
  font-weight: 600;
}

/* Navigation icons */
.sidebar .nav-icon,
.sidebar-nav .nav-icon {
  color: #94a3b8 !important;
}

.sidebar .nav-link:hover .nav-icon,
.sidebar .nav-link.active .nav-icon {
  color: #22d3ee !important;
}

/* Navigation text */
.sidebar .nav-text,
.sidebar-nav .nav-text {
  color: #e2e8f0 !important;
}

/* Submenu styling */
.sidebar .nav-submenu,
.sidebar-nav .nav-submenu {
  background-color: #0f172a !important;
}

.sidebar .nav-submenu .nav-link,
.sidebar-nav .nav-submenu .nav-link {
  color: #cbd5e1 !important;
  background-color: transparent !important;
}

.sidebar .nav-submenu .nav-link:hover {
  background-color: rgba(34, 211, 238, 0.08) !important;
  color: #22d3ee !important;
}

/* Navigation dots for submenu */
.sidebar .nav-dot {
  background-color: #475569 !important;
}

.sidebar .nav-link:hover .nav-dot,
.sidebar .nav-link.active .nav-dot {
  background-color: #22d3ee !important;
}

/* Menu category titles */
.sidebar .nav-category,
.sidebar-menu-title {
  color: #64748b !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* Navigation badges */
.sidebar .nav-badge {
  background-color: rgba(34, 211, 238, 0.15) !important;
  color: #22d3ee !important;
}

/* Navigation arrows for expandable items */
.sidebar .nav-arrow,
.sidebar-nav .nav-arrow {
  color: #64748b !important;
}

.sidebar .nav-link:hover .nav-arrow,
.sidebar .nav-link.active .nav-arrow {
  color: #22d3ee !important;
}

.sidebar-link {
  color: var(--sidebar-color) !important;
  font-weight: 500;
}

.sidebar-link:hover {
  background-color: var(--sidebar-hover-bg) !important;
  color: var(--nav-hover-color) !important;
}

.sidebar-link.active {
  background-color: var(--sidebar-active-bg) !important;
  color: var(--sidebar-active-color) !important;
  font-weight: 600;
}

/* ========================================
   CARDS & CONTENT
   ======================================== */
.card {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--card-shadow);
}

.card-title {
  color: var(--heading-color) !important;
  font-weight: 600;
}

.card-body {
  color: var(--default-color) !important;
}

/* ========================================
   TABLES
   ======================================== */
.table {
  color: var(--default-color) !important;
}

.table thead th {
  background-color: var(--table-header-bg) !important;
  color: var(--heading-color) !important;
  border-color: var(--border-color) !important;
  font-weight: 600;
}

.table tbody tr {
  border-color: var(--border-color) !important;
}

.table tbody tr:hover {
  background-color: var(--table-hover-bg) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--table-stripe-bg) !important;
}

/* ========================================
   BADGES & LABELS
   ======================================== */
.badge {
  font-weight: 600;
  padding: 0.35em 0.65em;
}

.badge-success {
  background-color: var(--success-color) !important;
  color: #ffffff !important;
}

.badge-warning {
  background-color: var(--warning-color) !important;
  color: #ffffff !important;
}

.badge-danger {
  background-color: var(--danger-color) !important;
  color: #ffffff !important;
}

.badge-info {
  background-color: var(--info-color) !important;
  color: #ffffff !important;
}

/* ========================================
   DROPDOWNS
   ======================================== */
.dropdown-menu {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
  color: var(--default-color) !important;
  font-weight: 400;
}

.dropdown-item:hover {
  background-color: var(--sidebar-hover-bg) !important;
  color: var(--nav-hover-color) !important;
}

/* ========================================
   MODALS
   ======================================== */
.modal-content {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--default-color) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border-color) !important;
}

.modal-title {
  color: var(--heading-color) !important;
  font-weight: 600;
}

.modal-footer {
  border-top: 1px solid var(--border-color) !important;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ========================================
   STATISTICS & DASHBOARD CARDS
   ======================================== */
.stats-card {
  background: linear-gradient(135deg, #1e293b, #334155) !important;
  border: 1px solid #334155 !important;
}

.stats-value {
  color: #22d3ee !important;
  font-weight: 700;
}

.stats-label {
  color: #ffffff !important;
  font-weight: 500;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ========================================
   SELECT2 DARK THEME
   ======================================== */
.select2-container--default .select2-selection--single {
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #e2e8f0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #64748b !important;
}

.select2-dropdown {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
}

.select2-container--default .select2-results__option {
  color: #e2e8f0 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #334155 !important;
  color: #22d3ee !important;
}

/* ========================================
   UTILITY TEXT CLASSES
   ======================================== */
.text-muted {
  color: var(--muted-color) !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color) !important;
  font-weight: 600;
}

p {
  color: var(--default-color) !important;
}

small {
  color: var(--muted-color) !important;
}

/* ========================================
   COMPREHENSIVE LABEL STYLING
   Ensures ALL labels are white on dark backgrounds
   ======================================== */

/* All label elements */
label,
.label,
.form-label,
.col-form-label,
.form-check-label,
.control-label,
.input-group-text label,
th label,
td label,
.card-body label,
.modal-body label,
.sidebar label,
dt,
.field-label,
.filter-label,
span.label-text {
  color: #ffffff !important;
  font-weight: 500;
}

/* Table headers (th) should also have white text */
th,
thead th,
.table th,
.table thead th {
  color: #ffffff !important;
  font-weight: 600;
}

/* Data cells maintain light color */
td {
  color: var(--default-color) !important;
}

/* Span elements that act as labels */
span.label,
span.form-text,
span.help-text,
.form-text,
.help-block,
.field-validation-error,
.field-validation-valid {
  color: #ffffff !important;
}

/* Small text in forms */
small.form-text,
small.text-muted,
.small {
  color: #cbd5e1 !important;
}

/* Input group labels */
.input-group-prepend .input-group-text,
.input-group-append .input-group-text {
  color: #ffffff !important;
}

/* Required field indicators */
.required,
.field-required,
span.required,
.text-danger {
  color: #fca5a5 !important;
}

/* Floating labels */
.form-floating > label {
  color: #ffffff !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: #22d3ee !important;
}

/* Select labels */
.select2-container .select2-selection__placeholder,
.select2-container .select2-search__field::placeholder {
  color: #64748b !important;
}

/* Checkbox and Radio labels specifically */
.custom-control-label,
.custom-checkbox label,
.custom-radio label {
  color: #ffffff !important;
  font-weight: 500;
}

/* Card header labels */
.card-header label,
.card-title label {
  color: #ffffff !important;
  font-weight: 600;
}

/* Filter/Search labels */
.filter-panel label,
.search-panel label,
.form-inline label {
  color: #ffffff !important;
  font-weight: 500;
}

/* Table filter labels */
.dataTables_length label,
.dataTables_filter label {
  color: #ffffff !important;
}

/* ========================================
   WHITE/LIGHT CONTAINERS - FORCE DARK BACKGROUNDS
   Remove all white/light backgrounds and force dark theme everywhere
   ======================================== */

/* FORCE ALL CONTAINERS TO DARK BACKGROUNDS */
.bg-white,
.bg-light,
.bg-gray,
.bg-gray-100,
.bg-gray-200,
.bg-gray-300,
.bg-grey-100,
.bg-grey-200,
.bg-grey-300,
.table-light,
.table-white,
.alert-light,
.badge-light,
.list-group-item-light {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}

/* Force all cards to dark background */
.card,
.card-body,
.card-header,
.card-footer {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Force all panels to dark background */
.panel,
.panel-body,
.panel-heading,
.panel-footer,
.panel-default,
.panel-white,
.panel-light {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Force all modals to dark background */
.modal-content,
.modal-header,
.modal-body,
.modal-footer {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Force all forms to dark background */
form,
.form,
.form-container,
.form-panel,
.form-section {
  background-color: transparent !important;
  color: #e2e8f0 !important;
}

/* Force all tables to dark theme */
.table,
.table-bordered,
.table-striped,
.table-hover {
  background-color: transparent !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

.table thead,
.table thead th {
  background-color: #334155 !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}

.table tbody tr {
  background-color: transparent !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

.table tbody tr:hover {
  background-color: #293548 !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #1a2332 !important;
}

/* Force all containers to dark */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
  color: #e2e8f0 !important;
}

/* Force all sections to dark */
.section,
.content-section,
.page-section,
.report-section,
.filter-section,
.dashboard-section {
  background-color: transparent !important;
  color: #e2e8f0 !important;
}

/* Force all wells/boxes to dark */
.well,
.box,
.content-box,
.info-box,
.filter-box {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Force all alerts to dark background with appropriate colors */
.alert {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.15) !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}

/* Force all navigation to dark */
.navbar,
.navbar-light,
.navbar-default,
.nav,
.nav-tabs,
.nav-pills {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

.nav-link {
  color: #e2e8f0 !important;
}

.nav-link:hover,
.nav-link.active {
  color: #22d3ee !important;
  background-color: rgba(34, 211, 238, 0.1) !important;
}

/* Force breadcrumbs to dark */
.breadcrumb {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}

.breadcrumb-item a {
  color: #22d3ee !important;
}

/* Force accordions to dark */
.accordion,
.accordion-item {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

.accordion-header,
.accordion-button {
  background-color: #334155 !important;
  color: #ffffff !important;
}

.accordion-body {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}

/* Force offcanvas to dark */
.offcanvas,
.offcanvas-header,
.offcanvas-body {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Force list groups to dark */
.list-group,
.list-group-item {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

.list-group-item:hover {
  background-color: #293548 !important;
}

/* Force badges to appropriate dark theme colors */
.badge {
  font-weight: 600;
}

.badge-primary {
  background-color: #22d3ee !important;
  color: #0f172a !important;
}

.badge-secondary {
  background-color: #64748b !important;
  color: #ffffff !important;
}

.badge-success {
  background-color: #10b981 !important;
  color: #ffffff !important;
}

.badge-danger {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}

.badge-warning {
  background-color: #f59e0b !important;
  color: #0f172a !important;
}

.badge-info {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* Force progress bars to dark */
.progress {
  background-color: #334155 !important;
}

/* Force tooltips and popovers to dark */
.tooltip,
.popover {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Remove any white backgrounds from divs with inline styles */
div[style*="background: white"],
div[style*="background: #fff"],
div[style*="background: #ffffff"],
div[style*="background-color: white"],
div[style*="background-color: #fff"],
div[style*="background-color: #ffffff"],
div[style*="background: #f"],
div[style*="background-color: #f"] {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}

/* Ensure all text on dark backgrounds is light colored */
.bg-dark,
.bg-primary,
.bg-secondary,
.text-dark {
  color: #e2e8f0 !important;
}

/* ENSURE ALL LABELS ARE WHITE (no exceptions) */
label,
.label,
.form-label,
.col-form-label,
.form-check-label,
.control-label,
legend,
dt,
.field-label,
.filter-label,
.custom-control-label,
.custom-checkbox label,
.custom-radio label,
.stats-label,
.input-group-text label,
th label,
td label,
.card-body label,
.modal-body label,
.sidebar label,
.panel label,
.panel-body label,
.well label,
.box label {
  color: #ffffff !important;
  font-weight: 500;
}

/* Table headers always white */
th,
thead th,
.table th,
.table thead th {
  color: #ffffff !important;
  font-weight: 600;
  background-color: #334155 !important;
}

/* Ensure all headings are light colored */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: #f1f5f9 !important;
}

/* Ensure all paragraphs are light colored */
p {
  color: #e2e8f0 !important;
}

/* Ensure small text is visible */
small,
.small {
  color: #cbd5e1 !important;
}

/* Force filter panels to dark */
.filter-panel,
.search-panel,
.control-panel {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Force report headers to dark */
.report-header,
.page-header {
  background-color: transparent !important;
  color: #f1f5f9 !important;
}

/* Force dashboard cards to dark */
.dashboard-card,
.stats-card,
.metric-card,
.info-card {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* ========================================
   RESPONSIVE IMPROVEMENTS
   ======================================== */
@media (max-width: 768px) {
  .fauth-visual {
    padding: 24px 20px;
  }

  .fauth-visual-title {
    font-size: 1.5rem;
  }

  .fauth-main {
    padding: 15px;
  }

  /* FORCE ALL LABELS TO WHITE IN MOBILE VIEW */
  label,
  .label,
  .form-label,
  .col-form-label,
  .form-check-label,
  .control-label,
  .fauth-field label,
  .fauth-row-between label,
  legend,
  .field-label,
  .filter-label,
  span.label-text,
  .input-group-text label,
  th label,
  td label,
  .card-body label,
  .modal-body label,
  .sidebar label,
  dt,
  .custom-control-label,
  .custom-checkbox label,
  .custom-radio label,
  .card-header label,
  .card-title label,
  .filter-panel label,
  .search-panel label,
  .form-inline label,
  .dataTables_length label,
  .dataTables_filter label,
  .form-floating > label,
  .stats-label {
    color: #ffffff !important;
    font-weight: 500 !important;
  }

  /* Table headers white in mobile */
  th,
  thead th,
  .table th,
  .table thead th {
    color: #ffffff !important;
    font-weight: 600 !important;
  }

  /* Ensure subtitle is visible in mobile */
  .fauth-subtitle {
    color: #cbd5e1 !important;
  }

  /* Footer text in mobile */
  .footer-copyright,
  .footer-links a {
    color: #94a3b8 !important;
  }

  .footer-copyright a {
    color: #22d3ee !important;
  }
}

/* Additional mobile breakpoint for very small screens */
@media (max-width: 576px) {
  /* FORCE ALL LABELS TO WHITE IN VERY SMALL SCREENS */
  label,
  .label,
  .form-label,
  .col-form-label,
  .form-check-label,
  .control-label,
  .fauth-field label,
  .fauth-row-between label,
  legend,
  .field-label,
  .filter-label,
  span.label-text,
  .input-group-text label,
  th label,
  td label,
  .card-body label,
  .modal-body label,
  .sidebar label,
  dt,
  .custom-control-label,
  .custom-checkbox label,
  .custom-radio label,
  .card-header label,
  .card-title label,
  .filter-panel label,
  .search-panel label,
  .form-inline label,
  .dataTables_length label,
  .dataTables_filter label,
  .form-floating > label,
  .stats-label {
    color: #ffffff !important;
    font-weight: 500 !important;
  }

  /* Table headers white in small mobile */
  th,
  thead th,
  .table th,
  .table thead th {
    color: #ffffff !important;
    font-weight: 600 !important;
  }

  /* Adjust padding for very small screens */
  .fauth-visual {
    padding: 16px;
  }

  .fauth-main {
    padding: 10px;
  }

  .fauth-card {
    padding: 16px !important;
  }
}

/* Landscape mode for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
  /* FORCE ALL LABELS TO WHITE IN LANDSCAPE MODE */
  label,
  .label,
  .form-label,
  .col-form-label,
  .form-check-label,
  .control-label,
  .fauth-field label,
  .fauth-row-between label,
  legend,
  .field-label,
  .filter-label,
  span.label-text,
  .input-group-text label,
  th label,
  td label,
  .card-body label,
  .modal-body label,
  .sidebar label,
  dt,
  .stats-label {
    color: #ffffff !important;
    font-weight: 500 !important;
  }

  /* Table headers white in landscape */
  th,
  thead th,
  .table th,
  .table thead th {
    color: #ffffff !important;
    font-weight: 600 !important;
  }
}
