@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* Custom Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass-panel {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   GLOBAL DARK MODE OVERRIDES (Automated Tailwind Inversion)
   Instead of rewriting 1000s of HTML tags, we globally force
   "Light Mode" utilites to invert when "dark-mode" is active.
   ============================================================ */
body.dark-mode { background-color: #0f172a !important; color: #f8fafc !important; }

/* Background Overrides */
body.dark-mode .bg-white, body.dark-mode .card { background-color: #1e293b !important; }
body.dark-mode .bg-gray-50, body.dark-mode .bg-light, body.dark-mode .bg-gray-50\/50 { background-color: #0f172a !important; }
body.dark-mode .bg-gray-100, body.dark-mode .bg-gray-100\/50, body.dark-mode .bg-gray-100\/80 { background-color: #334155 !important; }
body.dark-mode .bg-gray-200, body.dark-mode .bg-gray-300 { background-color: #475569 !important; }

/* Text Overrides */
body.dark-mode .text-dark, body.dark-mode .text-gray-900, body.dark-mode .text-gray-800 { color: #f8fafc !important; }
body.dark-mode .text-gray-700, body.dark-mode .text-gray-600 { color: #cbd5e1 !important; }
body.dark-mode .text-gray-500 { color: #94a3b8 !important; }

/* Border Overrides */
body.dark-mode .border-gray-100, body.dark-mode .border-gray-200, body.dark-mode .border-gray-300 { border-color: #334155 !important; }

/* Custom Overrides for layout structural elements */
body.dark-mode nav, 
body.dark-mode .navbar,
body.dark-mode header,
body.dark-mode .bg-white\/80 { background-color: rgba(30, 41, 59, 0.9) !important; border-color: #334155 !important; }
body.dark-mode aside { border-right-color: #334155 !important; }
body.dark-mode .table td, body.dark-mode .table th, body.dark-mode table td, body.dark-mode table th { border-color: #334155 !important; }

/* Interactive Hover States */
body.dark-mode .hover\:bg-gray-50:hover { background-color: #0f172a !important; }
body.dark-mode .hover\:bg-gray-100:hover { background-color: #334155 !important; }
body.dark-mode .hover\:bg-gray-200:hover { background-color: #475569 !important; }

/* Inputs and Forms */
body.dark-mode input, body.dark-mode select, body.dark-mode textarea, body.dark-mode .form-control {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
body.dark-mode input:focus, body.dark-mode select:focus, body.dark-mode textarea:focus {
    border-color: #3b82f6 !important;
}

/* Modals & Popups Focus */
body.dark-mode .bg-white\/90 { background-color: rgba(30, 41, 59, 0.95) !important; }

/* Shadows - Thicken them slightly for dark mode depth */
body.dark-mode .shadow-sm, body.dark-mode .shadow-md, body.dark-mode .shadow-xl {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4) !important;
}

/* Smooth Transition Logic */
.transition-theme-colors * {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
