/* ToolVerse Admin & Public - Motion Stabilized & Anti-Blink CSS */
html.dark,
html.dark body,
body.dark-mode {
    background-color: #090c15 !important;
    color: #f1f5f9 !important;
    color-scheme: dark;
}
html:not(.dark),
html.light,
html:not(.dark) body,
html.light body {
    background-color: #f8fafc;
    color: #1e293b;
    color-scheme: light;
}

/* Disable initial transitions on load/reload to eliminate flicker and element morphing */
.preload, .preload * {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.012em;
    background-color: #f8fafc;
    color: #1e293b;

    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   PERFECT ICON CENTERING (MATERIAL SYMBOLS & BADGES)
   ========================================================= */
.material-symbols-outlined,
[class*="material-symbols"] {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal !important;
    font-style: normal !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    user-select: none !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    font-feature-settings: 'liga' !important;
    -webkit-font-feature-settings: 'liga' !important;
    width: 1em !important;
    height: 1em !important;
    flex-shrink: 0 !important;
    speak: none;
}

/* =========================================================
   MODERN HIGH-IMPACT TYPOGRAPHY & FONT SCALING (ADMIN PANEL)
   ========================================================= */

h1, h2, h3, h4, h5, h6, .font-outfit, .font-heading {
    font-family: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    letter-spacing: -0.025em;
}

h1, .text-3xl, .text-4xl, .text-5xl {
    font-weight: 800;
}

h2, h3, .text-xl, .text-2xl {
    font-weight: 700;
}

body, .font-sans {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-mono, code, pre, .stat-mono, .tabular-nums {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace !important;
    font-variant-numeric: tabular-nums;
}

/* Sidebar Navigation Typography & Layout Polish */
aside#adminSidebar {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    background: rgba(13, 17, 28, 0.94) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

aside nav {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

aside nav a {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.75rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

aside nav a .material-symbols-outlined {
    font-size: 1.2rem !important;
}

aside nav .sidebar-badge {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    padding: 0.15rem 0.45rem !important;
}

.sidebar-header-box .font-outfit {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
}

/* Sleek Slim Scrollbar for Navigation */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.4);
}

/* KPI & Metric Numbers Impact */
.kpi-metric-number, .stat-value, .metric-number {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
}

/* Table Readability */
table th {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

table td {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Form Controls & Inputs */
input, select, textarea, .custom-input {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

label {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.825rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
}

button {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
}

.glass-panel {
    background: rgba(15, 20, 35, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card, .bento-card, .kpi-card {
    background: rgba(19, 26, 46, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover, .bento-card:hover, .kpi-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 14px 35px -10px rgba(0, 0, 0, 0.4), 0 0 20px -5px rgba(99, 102, 241, 0.2);
}

.chart-point {
    transition: cx 0.4s ease-out, cy 0.4s ease-out, r 0.2s ease;
    cursor: pointer;
}
.chart-point:hover {
    r: 8;
    fill: #a855f7;
}

.cat-pill.active {
    background: #6366f1;
    color: #ffffff;
    font-weight: 700;
    border-color: #818cf8;
}

.section-item.active {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.5);
    color: #ffffff;
}

.custom-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: all 0.2s ease;
}
.custom-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
    outline: none;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

/* Layout Stability & Anti-FOUC on reload (Admin Sidebar Only) */
aside#adminSidebar {
    width: 14rem;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    box-sizing: border-box;
}

/* Material Symbols Layout Stability */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal !important;
    font-style: normal !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    font-feature-settings: 'liga' !important;
    -webkit-font-feature-settings: 'liga' !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    width: 1em !important;
    height: 1em !important;
    vertical-align: middle !important;
    user-select: none !important;
    flex-shrink: 0 !important;
}

/* Zero-Blink & Motion Stabilization: Eliminate repetitive pulsing & flashing */
.animate-pulse,
.animate-ping,
[class*="animate-pulse"],
[class*="animate-ping"] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Smooth SVG curve transitions */
#svgPathArea, #svgPathLine {
    transition: all 0.4s ease-out;
}

/* ==========================================================================
/* ==========================================================================
   TOOLVERSE ADMIN & PUBLIC - ULTRA-PREMIUM HIGH-CONTRAST LIGHT THEME ENGINE
   Linear / Stripe / Vercel Inspired Precision Light Architecture (html.light / html:not(.dark))
   ========================================================================== */

html.light,
html:not(.dark) {
    background-color: #FFFFFF !important;
    color-scheme: light !important;
}

html.light body,
html:not(.dark) body {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    background-image: none !important;
}

/* 1. Global Typography & Headings High Contrast */
html.light h1:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html.light h2:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html.light h3:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html.light h4:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html.light h5:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html.light h6:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html:not(.dark) h1:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html:not(.dark) h2:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html:not(.dark) h3:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html:not(.dark) h4:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html:not(.dark) h5:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]),
html:not(.dark) h6:not([class*="text-white"]):not([class*="text-indigo"]):not([class*="text-purple"]):not([class*="text-emerald"]):not([class*="text-cyan"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-transparent"]) {
    color: #0F172A;
}

html.light p:not(.text-white):not([class*="text-white"]):not([class*="text-slate-200"]):not([class*="text-slate-300"]),
html:not(.dark) p:not(.text-white):not([class*="text-white"]):not([class*="text-slate-200"]):not([class*="text-slate-300"]) {
    color: #334155;
}

html.light label,
html:not(.dark) label {
    color: #334155;
}

/* Explicit white text protection across all themes */
html.light .text-white,
html:not(.dark) .text-white,
.text-white {
    color: #FFFFFF !important;
}

/* 2. Sidebar Navigation in Light Theme */
html.light aside,
html.light #adminSidebar,
html:not(.dark) aside,
html:not(.dark) #adminSidebar {
    background: #FFFFFF !important;
    border-right: 1px solid #E2E8F0 !important;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.04) !important;
}

/* Normal / Inactive Sidebar Links */
html.light aside nav a,
html:not(.dark) aside nav a {
    color: #475569 !important;
}
html.light aside nav a .material-symbols-outlined,
html:not(.dark) aside nav a .material-symbols-outlined {
    color: #64748B !important;
}
html.light aside nav a:hover,
html:not(.dark) aside nav a:hover {
    background-color: #F1F5F9 !important;
    color: #0F172A !important;
}
html.light aside nav a:hover .material-symbols-outlined,
html:not(.dark) aside nav a:hover .material-symbols-outlined {
    color: #4F46E5 !important;
}

/* Active Sidebar Link (High Contrast Indigo on Soft Lilac Background) */
html.light aside nav a.bg-indigo-50,
html.light aside nav a[class*="bg-indigo-50"],
html.light aside nav a.active,
html:not(.dark) aside nav a.bg-indigo-50,
html:not(.dark) aside nav a[class*="bg-indigo-50"],
html:not(.dark) aside nav a.active {
    background-color: #EEF2FF !important;
    border: 1px solid #C7D2FE !important;
    color: #4338CA !important;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.1) !important;
}
html.light aside nav a.bg-indigo-50 span,
html.light aside nav a[class*="bg-indigo-50"] span,
html.light aside nav a.active span,
html:not(.dark) aside nav a.bg-indigo-50 span,
html:not(.dark) aside nav a[class*="bg-indigo-50"] span,
html:not(.dark) aside nav a.active span {
    color: #4338CA !important;
}
html.light aside nav a.bg-indigo-50 .material-symbols-outlined,
html.light aside nav a[class*="bg-indigo-50"] .material-symbols-outlined,
html.light aside nav a.active .material-symbols-outlined,
html:not(.dark) aside nav a.bg-indigo-50 .material-symbols-outlined,
html:not(.dark) aside nav a[class*="bg-indigo-50"] .material-symbols-outlined,
html:not(.dark) aside nav a.active .material-symbols-outlined {
    color: #4F46E5 !important;
}
html.light aside nav a.bg-indigo-50 .sidebar-badge,
html.light aside nav a[class*="bg-indigo-50"] .sidebar-badge,
html:not(.dark) aside nav a.bg-indigo-50 .sidebar-badge,
html:not(.dark) aside nav a[class*="bg-indigo-50"] .sidebar-badge {
    background-color: #E0E7FF !important;
    color: #3730A3 !important;
    border: 1px solid #C7D2FE !important;
}

html.light .sidebar-header-box .font-outfit,
html:not(.dark) .sidebar-header-box .font-outfit {
    color: #0F172A !important;
}

/* 3. Top Header Bar & Search Input in Light Theme */
html.light header.glass-panel,
html.light .glass-panel,
html:not(.dark) header.glass-panel,
html:not(.dark) .glass-panel {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
}

html.light #globalSearchInput,
html:not(.dark) #globalSearchInput {
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    color: #0F172A !important;
}
html.light #globalSearchInput::placeholder,
html:not(.dark) #globalSearchInput::placeholder {
    color: #94A3B8 !important;
}

/* 4. Cards, Containers, and Panels in Light Theme */
html.light .glass-card,
html.light .tool-card,
html.light .bento-glow-card,
html.light .bento-card,
html.light .plugin-item,
html.light .stat-card,
html.light .kpi-card,
html:not(.dark) .glass-card,
html:not(.dark) .tool-card,
html:not(.dark) .bento-glow-card,
html:not(.dark) .bento-card,
html:not(.dark) .plugin-item,
html:not(.dark) .stat-card,
html:not(.dark) .kpi-card {
    background-color: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    color: #0F172A !important;
}

html.light .glass-card:hover,
html.light .tool-card:hover,
html.light .bento-glow-card:hover,
html.light .plugin-item:hover,
html:not(.dark) .glass-card:hover,
html:not(.dark) .tool-card:hover,
html:not(.dark) .bento-glow-card:hover,
html:not(.dark) .plugin-item:hover {
    border-color: #CBD5E1 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06) !important;
}

/* 5. Inputs, Selects, and Textareas */
html.light input[type="text"],
html.light input[type="search"],
html.light input[type="number"],
html.light input[type="email"],
html.light input[type="password"],
html.light input[type="url"],
html.light select,
html.light textarea,
html.light .custom-input,
html:not(.dark) input[type="text"],
html:not(.dark) input[type="search"],
html:not(.dark) input[type="number"],
html:not(.dark) input[type="email"],
html:not(.dark) input[type="password"],
html:not(.dark) input[type="url"],
html:not(.dark) select,
html:not(.dark) textarea,
html:not(.dark) .custom-input {
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    color: #0F172A !important;
}

html.light input::placeholder,
html.light textarea::placeholder,
html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
    color: #94A3B8 !important;
}

html.light input:focus,
html.light textarea:focus,
html.light select:focus,
html:not(.dark) input:focus,
html:not(.dark) textarea:focus,
html:not(.dark) select:focus {
    border-color: #6366F1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
    background-color: #FFFFFF !important;
}

/* Seamless Search Capsule Input Overrides: Prevent rectangular forced box */
.tv-search-capsule,
.tv-search-capsule * {
    box-sizing: border-box;
}
.tv-search-capsule input,
.tv-search-capsule input[type="text"],
.tv-search-capsule input[type="search"],
#dirSearch,
#toolSearchInput,
#blogSearchInput {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}
.tv-search-capsule input:focus,
.tv-search-capsule input[type="text"]:focus,
.tv-search-capsule input[type="search"]:focus,
#dirSearch:focus,
#toolSearchInput:focus,
#blogSearchInput:focus {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* 6. Buttons & Interactive Controls in Light Mode */
/* Secondary / Neutral action buttons (e.g. edit, delete, configure, view) */
html.light button.bg-slate-100,
html.light a.bg-slate-100,
html:not(.dark) button.bg-slate-100,
html:not(.dark) a.bg-slate-100 {
    background-color: #F1F5F9 !important;
    color: #334155 !important;
    border: 1px solid #E2E8F0 !important;
}
html.light button.bg-slate-100:hover,
html.light a.bg-slate-100:hover,
html:not(.dark) button.bg-slate-100:hover,
html:not(.dark) a.bg-slate-100:hover {
    background-color: #E2E8F0 !important;
    color: #0F172A !important;
}
html.light button.bg-slate-100 .material-symbols-outlined,
html.light a.bg-slate-100 .material-symbols-outlined,
html:not(.dark) button.bg-slate-100 .material-symbols-outlined,
html:not(.dark) a.bg-slate-100 .material-symbols-outlined {
    color: #475569 !important;
}
html.light button.bg-slate-100:hover .material-symbols-outlined,
html.light a.bg-slate-100:hover .material-symbols-outlined,
html:not(.dark) button.bg-slate-100:hover .material-symbols-outlined,
html:not(.dark) a.bg-slate-100:hover .material-symbols-outlined {
    color: #0F172A !important;
}

/* Soft indigo buttons (like CSV export, Filter pills) */
html.light button.bg-indigo-50,
html.light a.bg-indigo-50,
html:not(.dark) button.bg-indigo-50,
html:not(.dark) a.bg-indigo-50 {
    background-color: #EEF2FF !important;
    color: #4338CA !important;
    border: 1px solid #C7D2FE !important;
}
html.light button.bg-indigo-50 span,
html.light a.bg-indigo-50 span,
html.light button.bg-indigo-50 .material-symbols-outlined,
html.light a.bg-indigo-50 .material-symbols-outlined,
html:not(.dark) button.bg-indigo-50 span,
html:not(.dark) a.bg-indigo-50 span,
html:not(.dark) button.bg-indigo-50 .material-symbols-outlined,
html:not(.dark) a.bg-indigo-50 .material-symbols-outlined {
    color: #4338CA !important;
}

/* Primary solid gradient buttons (e.g. Save, New, Upgrade, Apply) */
html.light button.bg-gradient-to-r,
html.light a.bg-gradient-to-r,
html.light button.button-primary,
html.light a.button-primary,
html:not(.dark) button.bg-gradient-to-r,
html:not(.dark) a.bg-gradient-to-r,
html:not(.dark) button.button-primary,
html:not(.dark) a.button-primary {
    color: #FFFFFF !important;
}
html.light button.bg-gradient-to-r span,
html.light a.bg-gradient-to-r span,
html:not(.dark) button.bg-gradient-to-r span,
html:not(.dark) a.bg-gradient-to-r span {
    color: #FFFFFF !important;
}

/* Secondary & Toolbar Buttons in Light Mode */
html.light .btn-move-up,
html.light .btn-move-down,
html.light .btn-secondary,
html.light button.bg-white,
html.light a.bg-white,
html:not(.dark) .btn-move-up,
html:not(.dark) .btn-move-down,
html:not(.dark) .btn-secondary,
html:not(.dark) button.bg-white,
html:not(.dark) a.bg-white {
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    color: #334155 !important;
}

html.light .btn-move-up:hover:not(:disabled),
html.light .btn-move-down:hover:not(:disabled),
html.light .btn-secondary:hover,
html:not(.dark) .btn-move-up:hover:not(:disabled),
html:not(.dark) .btn-move-down:hover:not(:disabled),
html:not(.dark) .btn-secondary:hover {
    background-color: #EEF2FF !important;
    color: #4338CA !important;
    border-color: #C7D2FE !important;
}

/* 7. Badges, Chips & Highlights in Light Mode */
html.light .sequence-badge,
html:not(.dark) .sequence-badge {
    background-color: #F1F5F9 !important;
    border: 1px solid #CBD5E1 !important;
    color: #334155 !important;
}

html.light .item-url-text,
html:not(.dark) .item-url-text {
    background-color: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    color: #475569 !important;
}

/* 8. Table Elements in Light Mode */
html.light table,
html:not(.dark) table {
    background-color: #FFFFFF !important;
}

html.light table th,
html:not(.dark) table th {
    background-color: #F8FAFC !important;
    color: #475569 !important;
    border-color: #E2E8F0 !important;
}

html.light table td,
html:not(.dark) table td {
    background-color: #FFFFFF !important;
    border-color: #F1F5F9 !important;
    color: #1E293B !important;
}

html.light table tr:hover td,
html:not(.dark) table tr:hover td {
    background-color: rgba(238, 242, 255, 0.6) !important;
}

/* 9. Modals & Command Palette in Light Mode */
html.light #commandPalette > div,
html.light #nodesHealthModal > div,
html.light #drilldownModal > div,
html.light #menuModal > div,
html.light #editPlanModal > div,
html.light #categoryModal > div,
html.light #createWorkerModal > div,
html.light #assignTaskModal > div,
html.light #toolPricingModal > div,
html.light #editToolModal > div,
html.light #quickEditPageModal > div,
html.light #createPageModal > div,
html.light #addCustomUrlModal > div,
html.light #pingSearchEnginesModal > div,
html.light #codeSnippetModal > div,
html.light #redirectModal > div,
html.light #testRedirectModal > div,
html.light #uploadMediaModal > div,
html.light #mediaDetailsModal > div,
html.light #batchDeleteModal > div,
html.light #deleteConfirmModal > div,
html.light #aiTitlesModal > div,
html.light #aiEngagementModal > div,
html.light #dashUpgradeModal > div,
html.light #checkoutModal > div,
html.light #quotaExceededModal > div,
html:not(.dark) #commandPalette > div,
html:not(.dark) #nodesHealthModal > div,
html:not(.dark) #drilldownModal > div,
html:not(.dark) #menuModal > div,
html:not(.dark) #editPlanModal > div,
html:not(.dark) #categoryModal > div,
html:not(.dark) #createWorkerModal > div,
html:not(.dark) #assignTaskModal > div,
html:not(.dark) #toolPricingModal > div,
html:not(.dark) #editToolModal > div,
html:not(.dark) #quickEditPageModal > div,
html:not(.dark) #createPageModal > div,
html:not(.dark) #addCustomUrlModal > div,
html:not(.dark) #pingSearchEnginesModal > div,
html:not(.dark) #codeSnippetModal > div,
html:not(.dark) #redirectModal > div,
html:not(.dark) #testRedirectModal > div,
html:not(.dark) #uploadMediaModal > div,
html:not(.dark) #mediaDetailsModal > div,
html:not(.dark) #batchDeleteModal > div,
html:not(.dark) #deleteConfirmModal > div,
html:not(.dark) #aiTitlesModal > div,
html:not(.dark) #aiEngagementModal > div,
html:not(.dark) #dashUpgradeModal > div,
html:not(.dark) #checkoutModal > div,
html:not(.dark) #quotaExceededModal > div {
    background-color: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2) !important;
    color: #0F172A !important;
}

/* 10. Scrollbar in Light Theme */
html.light .custom-scrollbar::-webkit-scrollbar-track,
html:not(.dark) .custom-scrollbar::-webkit-scrollbar-track {
    background: #F1F5F9 !important;
}
html.light .custom-scrollbar::-webkit-scrollbar-thumb,
html:not(.dark) .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #CBD5E1 !important;
    border-radius: 9999px;
}
html.light .custom-scrollbar::-webkit-scrollbar-thumb:hover,
html:not(.dark) .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94A3B8 !important;
}

/* 11. Cards, Grids & Borders Deep Contrast in Light Theme */
html.light div[class*="bg-slate-900"]:not(.dark-terminal-block):not(.dark-terminal-block *),
html.light div[class*="bg-slate-950"]:not(.dark-terminal-block):not(.dark-terminal-block *),
html.light div[class*="bg-[#0d111c]"]:not(.dark-terminal-block):not(.dark-terminal-block *),
html.light div[class*="bg-[#131929]"]:not(.dark-terminal-block):not(.dark-terminal-block *),
html:not(.dark) div[class*="bg-slate-900"]:not(.dark-terminal-block):not(.dark-terminal-block *),
html:not(.dark) div[class*="bg-slate-950"]:not(.dark-terminal-block):not(.dark-terminal-block *),
html:not(.dark) div[class*="bg-[#0d111c]"]:not(.dark-terminal-block):not(.dark-terminal-block *),
html:not(.dark) div[class*="bg-[#131929]"]:not(.dark-terminal-block):not(.dark-terminal-block *) {
    background-color: #FFFFFF;
    color: #0F172A;
    border-color: #E2E8F0;
}

html.light div[class*="border-slate-800"],
html.light div[class*="border-slate-700"],
html:not(.dark) div[class*="border-slate-800"],
html:not(.dark) div[class*="border-slate-700"] {
    border-color: #E2E8F0;
}

/* Tooltips, Dropdowns & Popovers in Light Theme */
html.light .sidebar-tooltip,
html:not(.dark) .sidebar-tooltip {
    background-color: #0F172A !important;
    color: #FFFFFF !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2) !important;
}

html.light #homeCategoryDropdownMenu,
html:not(.dark) #homeCategoryDropdownMenu {
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1) !important;
}

/* =========================================================
   EDITORIAL BLOG & ARTICLE PROSE TYPOGRAPHY (DUAL-THEME)
   ========================================================= */

.article-body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #cbd5e1; /* slate-300 */
}

html:not(.dark) .article-body,
html.light .article-body {
    color: #334155 !important; /* slate-700 */
}

/* Headings H2 & H3 */
.article-body h2 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1.1rem !important;
    padding-left: 1rem !important;
    border-left: 4px solid #6366f1 !important; /* Indigo accent */
    display: flex !important;
    align-items: center !important;
}

html:not(.dark) .article-body h2,
html.light .article-body h2 {
    color: #0f172a !important; /* slate-900 */
    border-left-color: #4f46e5 !important;
}

.article-body h3 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #f1f5f9 !important;
    margin-top: 1.75rem !important;
    margin-bottom: 0.85rem !important;
}

html:not(.dark) .article-body h3,
html.light .article-body h3 {
    color: #1e293b !important;
}

/* Paragraphs */
.article-body p {
    margin-bottom: 1.35rem !important;
    font-size: 1.05rem !important;
    line-height: 1.8 !important;
}

.article-body p.lead-text {
    font-size: 1.2rem !important;
    line-height: 1.75 !important;
    color: #e2e8f0 !important;
    font-weight: 500 !important;
    margin-bottom: 1.75rem !important;
}

html:not(.dark) .article-body p.lead-text,
html.light .article-body p.lead-text {
    color: #1e293b !important;
}

/* Unordered Lists with Custom Glowing Bullets */
.article-body ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 1.25rem 0 1.75rem 0 !important;
}

.article-body ul li {
    position: relative !important;
    padding-left: 2rem !important;
    margin-bottom: 0.85rem !important;
    line-height: 1.7 !important;
}

.article-body ul li::before {
    content: "" !important;
    position: absolute !important;
    left: 0.35rem !important;
    top: 0.6rem !important;
    width: 0.55rem !important;
    height: 0.55rem !important;
    border-radius: 9999px !important;
    background: #6366f1 !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.7) !important;
}

html:not(.dark) .article-body ul li::before,
html.light .article-body ul li::before {
    background: #4f46e5 !important;
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.4) !important;
}

/* Ordered Lists with Number Badges */
.article-body ol {
    list-style: none !important;
    counter-reset: blog-counter !important;
    padding-left: 0 !important;
    margin: 1.25rem 0 1.75rem 0 !important;
}

.article-body ol li {
    counter-increment: blog-counter !important;
    position: relative !important;
    padding-left: 2.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.7 !important;
}

.article-body ol li::before {
    content: counter(blog-counter) !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.15rem !important;
    width: 1.6rem !important;
    height: 1.6rem !important;
    border-radius: 0.5rem !important;
    background: rgba(99, 102, 241, 0.15) !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    color: #818cf8 !important;
    font-size: 0.8rem !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html:not(.dark) .article-body ol li::before,
html.light .article-body ol li::before {
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
    color: #4f46e5 !important;
}

/* Strong Text Highlights */
.article-body strong {
    color: #ffffff !important;
    font-weight: 700 !important;
}

html:not(.dark) .article-body strong,
html.light .article-body strong {
    color: #0f172a !important;
}

/* Comparison Tables in Articles */
.article-table-container {
    overflow-x: auto;
    border-radius: 1rem;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

html:not(.dark) .article-table-container,
html.light .article-table-container {
    border-color: #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

.article-body table {
    width: 100% !important;
    border-collapse: collapse !important;
    text-align: left !important;
    font-size: 0.95rem !important;
}

.article-body table th {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #f8fafc !important;
    padding: 0.9rem 1.1rem !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
}

html:not(.dark) .article-body table th,
html.light .article-body table th {
    background: #f8fafc !important;
    color: #334155 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.article-body table td {
    padding: 0.9rem 1.1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
}

html:not(.dark) .article-body table td,
html.light .article-body table td {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #475569 !important;
}

.article-body table tr:hover td {
    background: rgba(99, 102, 241, 0.05) !important;
}

/* Article Body Images & Figures */
.article-body figure {
    margin: 2rem 0 !important;
    border-radius: 1.25rem !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(15, 23, 42, 0.8) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
}
html:not(.dark) .article-body figure,
html.light .article-body figure {
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
}
.article-body img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 1rem !important;
}
.article-body figure img {
    width: 100% !important;
    max-height: 520px !important;
    object-fit: cover !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
}
.article-body figcaption {
    padding: 0.75rem 1rem !important;
    font-size: 0.75rem !important;
    text-align: center !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    color: #94a3b8 !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
html:not(.dark) .article-body figcaption,
html.light .article-body figcaption {
    color: #64748b !important;
    background: #f1f5f9 !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* Callout Cards & Pro Tips */
.article-callout-card {
    position: relative;
    border-radius: 1.25rem;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.06) 100%);
}

html:not(.dark) .article-callout-card,
html.light .article-callout-card {
    border-color: #c7d2fe !important;
    background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%) !important;
}

/* Infographic / Visual Diagram Cards */
.article-visual-card {
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.8);
    padding: 1.75rem;
    margin: 2.25rem 0;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.4);
}

html:not(.dark) .article-visual-card,
html.light .article-visual-card {
    border-color: #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06) !important;
}

/* The Bottom Line Conclusion Card */
.the-bottom-line-card {
    border-radius: 1.5rem;
    border: 2px solid rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 27, 75, 0.8) 100%);
    padding: 2rem;
    margin: 3rem 0 2rem 0;
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.2);
}

html:not(.dark) .the-bottom-line-card,
html.light .the-bottom-line-card {
    border-color: #a5b4fc !important;
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%) !important;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.08) !important;
}

/* Circular Glow Badge for Icon */
.bento-icon-glow {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: 1.5px solid rgba(199, 210, 254, 0.7);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff;
    transition: all 0.25s ease;
    flex-shrink: 0;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.bento-icon-glow .material-symbols-outlined,
.bento-icon-glow span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    font-size: 1.35rem !important;
    width: 1em !important;
    height: 1em !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile 2-Column Responsive Layout for Bento Glow Cards */
@media (max-width: 640px) {
    .bento-glow-card {
        border-radius: 16px !important;
        padding: 0.45rem 0.5rem 0.45rem 0.45rem !important;
        gap: 0.45rem !important;
    }
    .bento-icon-glow {
        width: 2.15rem !important;
        height: 2.15rem !important;
        border-width: 1px !important;
    }
    .bento-icon-glow span {
        font-size: 1.05rem !important;
    }
    .bento-glow-card h3 {
        font-size: 0.76rem !important;
        line-height: 1.2 !important;
    }
    .bento-glow-card p {
        font-size: 0.58rem !important;
        margin-top: 0.1rem !important;
    }
    .bento-glow-card .chevron-arrow-box,
    .bento-glow-card > div.flex-shrink-0 > span:last-child {
        display: none !important;
    }
}

/* ==========================================================================
   UNIVERSAL MOBILE RESPONSIVE ENGINE (Cross-Device & Cross-Browser Stability)
   ========================================================================== */

/* 1. Global Viewport & Horizontal Overflow Guard */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    -webkit-text-size-adjust: 100%;
}

/* 2. Prevent iOS Safari auto-zoom on input focus */
@media (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="password"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* 3. Universal Touch-Scrolling for Tables, Pre/Code & Wide Outputs */
table {
    max-width: 100% !important;
}
.table-responsive,
.overflow-x-auto,
pre,
code {
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
}

/* 4. Small Mobile Adjustments (<= 640px) */
@media (max-width: 640px) {
    /* Action button groups wrap gracefully */
    .btn-group,
    .action-group,
    .tools-action-row,
    .button-group,
    .flex-wrap-mobile {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    /* Search capsule responsiveness */
    .tv-search-capsule {
        padding: 4px 6px 4px 12px !important;
        gap: 6px !important;
    }
    .tv-search-capsule input {
        font-size: 13px !important;
    }
    .tv-search-capsule a,
    .tv-search-capsule button {
        padding: 7px 14px !important;
        font-size: 11px !important;
    }

    /* Modals & Dialogs on mobile */
    .modal-content,
    .dialog-box,
    .popup-card {
        width: 94% !important;
        max-width: 94% !important;
        margin: 12px auto !important;
        padding: 16px !important;
        border-radius: 20px !important;
    }
}

/* 5. Ultra-Compact Mobile Screens (<= 400px, e.g. iPhone SE, Galaxy A-series) */
@media (max-width: 400px) {
    .container,
    .max-w-7xl,
    main {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .bento-glow-card {
        padding: 0.35rem 0.4rem !important;
        gap: 0.35rem !important;
    }
    .bento-icon-glow {
        width: 1.9rem !important;
        height: 1.9rem !important;
    }
    .bento-glow-card h3 {
        font-size: 0.72rem !important;
    }
}




