/* Core Layout & Theme System for Blue-CollarDigitals CRM */
:root,
html[data-theme="dark"] {
    --crm-bg: #121212;
    --crm-surface: #18181b;
    --crm-surface-hover: #27272a;
    --crm-border: #27272a;
    --crm-text: #ffffff;
    --crm-text-muted: #a1a1aa;
    --crm-input-bg: #212529;
}

html[data-theme="light"] {
    --crm-bg: #f4f4f5 !important;
    --crm-surface: #ffffff !important;
    --crm-surface-hover: #f4f4f5 !important;
    --crm-border: #d4d4d8 !important;
    --crm-text: #09090b !important;
    --crm-text-muted: #52525b !important;
    --crm-input-bg: #ffffff !important;
}

body {
    background-color: var(--crm-bg) !important;
    color: var(--crm-text) !important;
    font-family: 'Outfit', sans-serif;
}

.crm-bg {
    background-color: var(--crm-bg) !important;
}

.crm-surface {
    background-color: var(--crm-surface) !important;
}

.crm-surface-hover:hover {
    background-color: var(--crm-surface-hover) !important;
}

.crm-border {
    border-color: var(--crm-border) !important;
}

.crm-text {
    color: var(--crm-text) !important;
}

.crm-text-muted {
    color: var(--crm-text-muted) !important;
}

/* Dropdown Box Option Contrast Fix — Black Text for Dropdown Options */
select option, select optgroup {
    background-color: #ffffff !important;
    color: #000000 !important;
}

select option:checked, select option:hover {
    background-color: #0052FF !important;
    color: #ffffff !important;
}

/* Light Theme Component & Universal Text Visibility Overrides */
html[data-theme="light"] body {
    background-color: #f4f4f5 !important;
    color: #09090b !important;
}

html[data-theme="light"] nav,
html[data-theme="light"] footer,
html[data-theme="light"] .crm-surface {
    background-color: #ffffff !important;
    color: #09090b !important;
}

html[data-theme="light"] td,
html[data-theme="light"] th,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] p,
html[data-theme="light"] label,
html[data-theme="light"] div,
html[data-theme="light"] span,
html[data-theme="light"] strong,
html[data-theme="light"] a {
    color: #09090b;
}

/* Automatically flip all text-white elements to dark font in Light Mode */
html[data-theme="light"] .text-white {
    color: #09090b !important;
}

html[data-theme="light"] .text-slate-200,
html[data-theme="light"] .text-slate-300 {
    color: #18181b !important;
}

html[data-theme="light"] .crm-text-muted,
html[data-theme="light"] .text-slate-400 {
    color: #52525b !important;
}

html[data-theme="light"] .border,
html[data-theme="light"] .crm-border {
    border-color: #e4e4e7 !important;
}

/* Preserve crisp white text ONLY on action buttons and badges with dark/colored backgrounds */
html[data-theme="light"] .bg-brandBlue,
html[data-theme="light"] .bg-brandBlue *,
html[data-theme="light"] .bg-emerald-600,
html[data-theme="light"] .bg-emerald-600 *,
html[data-theme="light"] .bg-red-600,
html[data-theme="light"] .bg-red-600 *,
html[data-theme="light"] .bg-zinc-800,
html[data-theme="light"] .bg-zinc-800 *,
html[data-theme="light"] .bg-slate-800,
html[data-theme="light"] .bg-blue-950,
html[data-theme="light"] .bg-emerald-950,
html[data-theme="light"] .bg-red-950 {
    color: #ffffff !important;
}

/* Hover state links */
html[data-theme="light"] a.text-brandBlue,
html[data-theme="light"] a:hover {
    color: #0052FF !important;
}

.grid-blueprint {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(0, 82, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 82, 255, 0.02) 1px, transparent 1px);
}

.glow-radial {
    background: radial-gradient(circle at 50% 50%, rgba(0, 82, 255, 0.08) 0%, transparent 70%);
}

.glow-radial-subtle {
    background: radial-gradient(circle at 50% 50%, rgba(0, 82, 255, 0.05) 0%, transparent 70%);
}

/* Hide scrollbar for clean UI */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Honeypot anti-spam field utility */
.hp-field {
    display: none !important;
}

