@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   HALCHAL ENTERPRISE 5-THEME SYSTEM (CSS ENGINE)
   ========================================================================== */

/* 1. ENTERPRISE BLUE (DEFAULT) */
:root,
html[data-theme="theme-blue"],
body[data-theme="theme-blue"] {
    --theme-id: 'theme-blue';
    --theme-name: 'Enterprise Sapphire Blue';
    --theme-primary: #2563eb;
    --theme-primary-hover: #1d4ed8;
    --theme-primary-rgb: 37, 99, 235;
    --theme-primary-light: #eff6ff;
    --theme-primary-border: #bfdbfe;
    --theme-primary-text: #1e40af;
    --theme-accent: #3b82f6;
    --theme-accent-gradient-from: #2563eb;
    --theme-accent-gradient-to: #4f46e5;
    --theme-flagship-bg: linear-gradient(180deg, #0b1528 0%, #060a14 100%);
    --theme-hero-glow: rgba(37, 99, 235, 0.22);
    --theme-border-glow: rgba(37, 99, 235, 0.4);
}

/* 2. CYBER EMERALD & FOREST */
html[data-theme="theme-emerald"],
body[data-theme="theme-emerald"] {
    --theme-id: 'theme-emerald';
    --theme-name: 'Cyber Emerald & Forest';
    --theme-primary: #059669;
    --theme-primary-hover: #047857;
    --theme-primary-rgb: 5, 150, 105;
    --theme-primary-light: #ecfdf5;
    --theme-primary-border: #a7f3d0;
    --theme-primary-text: #065f46;
    --theme-accent: #10b981;
    --theme-accent-gradient-from: #059669;
    --theme-accent-gradient-to: #0d9488;
    --theme-flagship-bg: linear-gradient(180deg, #04241b 0%, #02140f 100%);
    --theme-hero-glow: rgba(16, 185, 129, 0.22);
    --theme-border-glow: rgba(16, 185, 129, 0.4);
}

/* 3. ROYAL INDIGO & TECH VIOLET */
html[data-theme="theme-indigo"],
body[data-theme="theme-indigo"] {
    --theme-id: 'theme-indigo';
    --theme-name: 'Royal Indigo & Tech Violet';
    --theme-primary: #4f46e5;
    --theme-primary-hover: #4338ca;
    --theme-primary-rgb: 79, 70, 229;
    --theme-primary-light: #eef2ff;
    --theme-primary-border: #c7d2fe;
    --theme-primary-text: #3730a3;
    --theme-accent: #6366f1;
    --theme-accent-gradient-from: #4f46e5;
    --theme-accent-gradient-to: #7c3aed;
    --theme-flagship-bg: linear-gradient(180deg, #120e2e 0%, #070617 100%);
    --theme-hero-glow: rgba(99, 102, 241, 0.22);
    --theme-border-glow: rgba(99, 102, 241, 0.4);
}

/* 4. NORDIC CYBER CYAN & TEAL */
html[data-theme="theme-cyan"],
body[data-theme="theme-cyan"] {
    --theme-id: 'theme-cyan';
    --theme-name: 'Nordic Cyber Cyan & Teal';
    --theme-primary: #0891b2;
    --theme-primary-hover: #0e7490;
    --theme-primary-rgb: 8, 145, 178;
    --theme-primary-light: #ecfeff;
    --theme-primary-border: #a5f3fc;
    --theme-primary-text: #155e75;
    --theme-accent: #06b6d4;
    --theme-accent-gradient-from: #0891b2;
    --theme-accent-gradient-to: #0284c7;
    --theme-flagship-bg: linear-gradient(180deg, #052129 0%, #021217 100%);
    --theme-hero-glow: rgba(6, 182, 212, 0.22);
    --theme-border-glow: rgba(6, 182, 212, 0.4);
}

/* 5. EXECUTIVE AMBER & TITANIUM */
html[data-theme="theme-amber"],
body[data-theme="theme-amber"] {
    --theme-id: 'theme-amber';
    --theme-name: 'Executive Amber & Titanium';
    --theme-primary: #d97706;
    --theme-primary-hover: #b45309;
    --theme-primary-rgb: 217, 119, 6;
    --theme-primary-light: #fffbeb;
    --theme-primary-border: #fde68a;
    --theme-primary-text: #92400e;
    --theme-accent: #f59e0b;
    --theme-accent-gradient-from: #d97706;
    --theme-accent-gradient-to: #ea580c;
    --theme-flagship-bg: linear-gradient(180deg, #251608 0%, #0f0903 100%);
    --theme-hero-glow: rgba(245, 158, 11, 0.22);
    --theme-border-glow: rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY & RESET
   ========================================================================== */

:root {
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: #0f172a;
    background-color: #f8fafc;
}

code, pre, .font-mono {
    font-family: var(--font-mono);
}

/* Accessible dynamic focus ring */
*:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--theme-primary);
}

/* Minimal Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--theme-primary);
}

/* Glassmorphism Navigation */
.glass-nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Hero Background Grid */
.bg-grid-pattern {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(226, 232, 240, 0.5) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(226, 232, 240, 0.5) 1px, transparent 1px);
}

/* Animated Pulse Dot */
.pulse-emerald {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseEmerald 2s infinite;
}

@keyframes pulseEmerald {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ==========================================================================
   DYNAMIC THEME OVERRIDES (ALL 5 THEMES COHESIVELY TRANSFORMS THE SITE)
   ========================================================================== */

/* 1. BUTTONS & ACTIONS */
[data-theme] .bg-blue-600,
[data-theme] button.bg-blue-600,
[data-theme] a.bg-blue-600 {
    background-color: var(--theme-primary) !important;
}

[data-theme] .hover\:bg-blue-700:hover,
[data-theme] .hover\:bg-blue-500:hover,
[data-theme] button.bg-blue-600:hover,
[data-theme] a.bg-blue-600:hover {
    background-color: var(--theme-primary-hover) !important;
}

/* 2. TEXT, TITLES & HOVERS */
[data-theme] .text-blue-600,
[data-theme] .hover\:text-blue-600:hover {
    color: var(--theme-primary) !important;
}

[data-theme] .text-blue-500,
[data-theme] .text-blue-400 {
    color: var(--theme-accent) !important;
}

[data-theme] .text-blue-700,
[data-theme] .text-blue-800 {
    color: var(--theme-primary-text) !important;
}

/* 3. LIGHT BADGES, CHIPS & CONTAINERS */
[data-theme] .bg-blue-50 {
    background-color: var(--theme-primary-light) !important;
}

[data-theme] .bg-blue-500\/20,
[data-theme] .bg-blue-600\/20 {
    background-color: rgba(var(--theme-primary-rgb), 0.22) !important;
}

[data-theme] .bg-blue-600\/10 {
    background-color: rgba(var(--theme-primary-rgb), 0.12) !important;
}

/* 4. BORDERS & ACCENTS */
[data-theme] .border-blue-100,
[data-theme] .border-blue-200 {
    border-color: var(--theme-primary-border) !important;
}

[data-theme] .border-blue-500\/30,
[data-theme] .border-blue-500\/40 {
    border-color: rgba(var(--theme-primary-rgb), 0.38) !important;
}

[data-theme] .focus\:ring-blue-500:focus {
    --tw-ring-color: var(--theme-primary) !important;
}

[data-theme] .shadow-blue-500\/20 {
    box-shadow: 0 10px 15px -3px rgba(var(--theme-primary-rgb), 0.25), 0 4px 6px -4px rgba(var(--theme-primary-rgb), 0.2) !important;
}

/* 5. HERO GRADIENT TEXT HEADLINE */
[data-theme] .from-blue-600 {
    --tw-gradient-from: var(--theme-accent-gradient-from) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgba(var(--theme-primary-rgb), 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

[data-theme] .to-indigo-600 {
    --tw-gradient-to: var(--theme-accent-gradient-to) var(--tw-gradient-to-position) !important;
}

/* 6. FLAGSHIP SPOTLIGHT SECTION BACKGROUND */
[data-theme] #flagship-tenders {
    background: var(--theme-flagship-bg) !important;
    transition: background 0.4s ease;
}

/* 7. AMBIENT HERO & SPOTLIGHT GLOWS */
[data-theme] #flagship-tenders .bg-blue-600\/10,
[data-theme] #flagship-tenders .bg-indigo-600\/10 {
    background-color: var(--theme-hero-glow) !important;
}

/* 8. TOP ANNOUNCEMENT & UTILITY BAR ACCENT */
.top-theme-accent-line {
    border-top: 3px solid var(--theme-primary);
}

/* 9. SUPER ADMIN TOP CONSOLE BAR & ACTIVE ACCENTS */
[data-theme] .admin-top-bar {
    border-bottom: 2px solid var(--theme-primary);
}

[data-theme] .admin-theme-title {
    color: var(--theme-accent) !important;
}

/* 10. ACTIVE THEME CARD HIGHLIGHT IN DASHBOARD */
.theme-card-selected {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 2px var(--theme-primary), 0 10px 20px -5px rgba(var(--theme-primary-rgb), 0.3) !important;
}

/* 11. CONTRACTOR CHECKLIST TOOL */
[data-theme] #tender-checklist {
    background: var(--theme-flagship-bg) !important;
}

[data-theme] #readinessProgressBar {
    background-color: var(--theme-primary) !important;
}

/* 12. COMPARISON TABLE HIGHLIGHT COLUMN */
[data-theme] .comparison-highlight-col {
    background-color: var(--theme-primary-light) !important;
    border-color: var(--theme-primary-border) !important;
}

/* 13. SERVICE CARD HOVER ACCENT */
.service-card:hover .service-img {
    transform: scale(1.06);
}
.service-card:hover .service-icon-box {
    background-color: var(--theme-primary) !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

/* 14. ACCORDION SUMMARY */
details summary::-webkit-details-marker {
    display: none;
}
details[open] summary .faq-chevron {
    transform: rotate(180deg);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-modal {
    animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-toast {
    animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
