/* ==========================================================================
   ZUMBEYL ENTERPRISE THEMES ENGINE & HIGH-CONTRAST FONT VISIBILITY
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL HIGH-CONTRAST TEXT & SURFACE RULES
   -------------------------------------------------------------------------- */
body {
    background-color: var(--bg-body, #f8fafc) !important;
    color: var(--text-main, #0f172a) !important;
    font-family: 'Inter', sans-serif !important;
}

.vd_content-wrapper, .content {
    background-color: var(--bg-body, #f8fafc) !important;
}

/* Page Titles and Section Headers on Light Canvas */
.vd_panel-header h1, 
.vd_title-section h1,
.vd_title-section .subtitle,
.vd_title-section small {
    color: #0f172a !important;
}

/* White & Light Surface Containers (100% Dark Font Visibility) */
.panel.widget, 
.panel-body, 
.settings-card, 
.cms-card, 
.meter-info-card, 
.meter-table-wrapper, 
.well, 
.modal-content, 
.dropdown-menu,
.table-responsive {
    background-color: #ffffff !important;
}

/* Ensure all headings, titles, labels, paragraphs, table cells & captions on white spaces are dark & 100% readable */
.panel.widget h1, .panel.widget h2, .panel.widget h3, .panel.widget h4, .panel.widget h5, .panel.widget h6,
.settings-card h1, .settings-card h2, .settings-card h3, .settings-card h4, .settings-card h5, .settings-card h6,
.cms-card h1, .cms-card h2, .cms-card h3, .cms-card h4, .cms-card h5, .cms-card h6,
.meter-info-card h1, .meter-info-card h2, .meter-info-card h3, .meter-info-card h4,
.panel-title,
.panel-body,
.panel-body label,
.settings-card label,
.cms-card label,
.meter-info-card label,
.panel-body p,
.panel-body span,
.panel-body div {
    color: #0f172a !important;
}

/* Captions and Subtitles on White Spaces */
.panel-body .help-block,
.panel-body small,
.panel-body .subtitle,
.settings-card .help-block,
.settings-card small,
.cms-card small {
    color: #475569 !important;
    font-weight: 500 !important;
}

/* Form Inputs on White Spaces */
.panel-body .form-control,
.panel-body input[type="text"],
.panel-body input[type="password"],
.panel-body input[type="email"],
.panel-body select,
.panel-body textarea,
.settings-card .form-control,
.settings-card input[type="text"],
.settings-card select,
.cms-card .form-control,
.cms-card input[type="text"],
.cms-card textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 500 !important;
}

.panel-body input::placeholder,
.settings-card input::placeholder,
.cms-card input::placeholder,
.cms-card textarea::placeholder {
    color: #64748b !important;
}

/* Data Tables on White Spaces */
.table {
    color: #0f172a !important;
}

.table > thead > tr > th,
.table > thead > tr > td {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #cbd5e1 !important;
}

.table > tbody > tr > td,
.table > tbody > tr > th {
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

/* --------------------------------------------------------------------------
   2. THEME PALETTES
   -------------------------------------------------------------------------- */

/* 1. Corporate Slate (Default) */
body.theme-corporate-slate {
    --bg-body: #f8fafc;
    --header-bg: #1e293b;
    --sidebar-bg: #0f172a;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #1e40af;
    --primary-hover: #1d4ed8;
    --accent-emerald: #0f766e;
    --accent-rose: #dc2626;
    --accent-amber: #d97706;
}

/* 2. Dark Mode Glassmorphism (Brighter Font on Dark Surfaces) */
body.theme-dark-glass {
    --bg-body: #090d16;
    --header-bg: #0f172a;
    --sidebar-bg: #030712;
    --card-bg: #0f172a;
    --card-border: rgba(51, 65, 85, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #2563eb;
    --primary-hover: #3b82f6;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
}

body.theme-dark-glass .vd_content-wrapper,
body.theme-dark-glass .content {
    background: #090d16 !important;
}

body.theme-dark-glass .panel.widget,
body.theme-dark-glass .panel-body,
body.theme-dark-glass .settings-card,
body.theme-dark-glass .cms-card,
body.theme-dark-glass .meter-info-card,
body.theme-dark-glass .vd_status-widget,
body.theme-dark-glass .table-responsive {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

body.theme-dark-glass .vd_panel-header h1,
body.theme-dark-glass .panel-title,
body.theme-dark-glass .vd_title-section h1,
body.theme-dark-glass .vd_title-section .subtitle,
body.theme-dark-glass .vd_title-section small,
body.theme-dark-glass h1, 
body.theme-dark-glass h2, 
body.theme-dark-glass h3, 
body.theme-dark-glass h4,
body.theme-dark-glass h5,
body.theme-dark-glass h6,
body.theme-dark-glass label,
body.theme-dark-glass th,
body.theme-dark-glass td,
body.theme-dark-glass span,
body.theme-dark-glass p,
body.theme-dark-glass .panel-body p,
body.theme-dark-glass .panel-body span,
body.theme-dark-glass .panel-body div {
    color: #f8fafc !important;
}

body.theme-dark-glass .panel-body .help-block,
body.theme-dark-glass .panel-body small,
body.theme-dark-glass .settings-card .help-block,
body.theme-dark-glass .settings-card small,
body.theme-dark-glass .cms-card small {
    color: #94a3b8 !important;
}

body.theme-dark-glass .table {
    color: #cbd5e1 !important;
}
body.theme-dark-glass .table > thead > tr > th,
body.theme-dark-glass .table > thead > tr > td {
    background-color: #1e293b !important;
    color: #ffffff !important;
}
body.theme-dark-glass .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(30, 41, 59, 0.5) !important;
}
body.theme-dark-glass .table-bordered, 
body.theme-dark-glass .table-bordered > tbody > tr > td, 
body.theme-dark-glass .table-bordered > tbody > tr > th, 
body.theme-dark-glass .table-bordered > tfoot > tr > td, 
body.theme-dark-glass .table-bordered > tfoot > tr > th, 
body.theme-dark-glass .table-bordered > thead > tr > td, 
body.theme-dark-glass .table-bordered > thead > tr > th {
    border-color: #1e293b !important;
}

body.theme-dark-glass .panel-body .form-control,
body.theme-dark-glass .panel-body input[type="text"],
body.theme-dark-glass .panel-body input[type="password"],
body.theme-dark-glass .panel-body select,
body.theme-dark-glass .panel-body textarea,
body.theme-dark-glass .settings-card .form-control,
body.theme-dark-glass .settings-card input[type="text"],
body.theme-dark-glass .settings-card select,
body.theme-dark-glass .cms-card .form-control,
body.theme-dark-glass .cms-card input[type="text"],
body.theme-dark-glass .cms-card textarea {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #334155 !important;
}

body.theme-dark-glass .breadcrumb > li,
body.theme-dark-glass .breadcrumb > li a {
    color: #94a3b8 !important;
}

/* 3. Emerald Industrial */
body.theme-emerald-industrial {
    --bg-body: #f0fdf4;
    --header-bg: #064e3b;
    --sidebar-bg: #022c22;
    --card-bg: #ffffff;
    --card-border: #a7f3d0;
    --text-main: #064e3b;
    --text-muted: #047857;
    --primary: #059669;
    --primary-hover: #10b981;
    --accent-emerald: #047857;
    --accent-rose: #e11d48;
    --accent-amber: #d97706;
}

body.theme-emerald-industrial .header-1 {
    background: #064e3b !important;
}
body.theme-emerald-industrial .vd_navbar-left,
body.theme-emerald-industrial .vd_navbar-left .navbar-menu {
    background: #022c22 !important;
}

/* 4. Sapphire Enterprise */
body.theme-sapphire-enterprise {
    --bg-body: #eff6ff;
    --header-bg: #1e3a8a;
    --sidebar-bg: #172554;
    --card-bg: #ffffff;
    --card-border: #bfdbfe;
    --text-main: #1e3a8a;
    --text-muted: #2563eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-emerald: #059669;
    --accent-rose: #dc2626;
    --accent-amber: #d97706;
}

body.theme-sapphire-enterprise .header-1 {
    background: #1e3a8a !important;
}
body.theme-sapphire-enterprise .vd_navbar-left,
body.theme-sapphire-enterprise .vd_navbar-left .navbar-menu {
    background: #172554 !important;
}

/* 5. Clean Minimalist Light (Darker Fonts for Light Sidebar) */
body.theme-clean-minimalist {
    --bg-body: #ffffff;
    --header-bg: #ffffff;
    --sidebar-bg: #f8fafc;
    --card-bg: #f8fafc;
    --card-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent-emerald: #10b981;
    --accent-rose: #ef4444;
    --accent-amber: #f59e0b;
}

body.theme-clean-minimalist .header-1 {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
body.theme-clean-minimalist .vd_navbar-left,
body.theme-clean-minimalist .vd_navbar-left .navbar-menu {
    background: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
}
body.theme-clean-minimalist .vd_navbar-left .menu-title,
body.theme-clean-minimalist .vd_navbar-left h3.menu-title,
body.theme-clean-minimalist .vd_navbar-left .navbar-menu ul li a .menu-text,
body.theme-clean-minimalist .vd_navbar-left .child-menu ul li a .menu-text {
    color: #0f172a !important;
}
body.theme-clean-minimalist .vd_navbar-left .child-menu {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}
body.theme-clean-minimalist .vd_navbar-left .navbar-menu ul li a .menu-icon,
body.theme-clean-minimalist .vd_navbar-left .navbar-menu ul li a .menu-icon font,
body.theme-clean-minimalist .vd_navbar-left .navbar-menu ul li a .menu-icon i,
body.theme-clean-minimalist .vd_navbar-left .child-menu ul li a .menu-icon,
body.theme-clean-minimalist .vd_navbar-left .child-menu ul li a .menu-icon font,
body.theme-clean-minimalist .vd_navbar-left .child-menu ul li a .menu-icon i {
    color: #1e40af !important;
}
