/* =====================================================================
   Codly India — dark theme bridge for pages still built on the old
   design (includes/header.php + footer.php). Active only when the
   <html> element has class "v2shell" and the dark theme is on (light mode shows the
   old pages in their own light styling). Maps the old light design tokens
   and common light utilities onto the v2 palette, so old page content
   (forms, logins, payments) keeps its code but matches the new look.
   ===================================================================== */
html.v2shell[data-theme="dark"] {
  --background: transparent;
  --background-alt: rgba(20, 13, 52, .45);
  --foreground: #FFFFFF;
  --foreground-muted: #D9D4F0;
  --foreground-subtle: #A9A2CC;
  --card: rgba(28, 18, 66, .9);
  --card-foreground: #FFFFFF;
  --card-border: rgba(167, 139, 250, .26);
  --primary: #F97316;
  --primary-dark: #EA580C;
  --primary-light: #FB923C;
  --primary-foreground: #FFFFFF;
  --secondary: rgba(124, 58, 237, .18);
  --secondary-foreground: #FFFFFF;
  --muted: #B9B2DC; /* old pages use --muted as a text colour */
  --muted-foreground: #A9A2CC;
  --border: rgba(167, 139, 250, .24);
  --border-subtle: rgba(167, 139, 250, .14);
  --border-strong: rgba(196, 181, 253, .4);
  --border-hover: rgba(196, 181, 253, .6);
  --input: rgba(11, 8, 32, .65);
  --ring: #F97316;
  --brand-blue: #7C3AED;
  --brand-blue-rgb: 124, 58, 237;
  --brand-deep: #4C1D95;
  --brand-electric: #A855F7;
  --brand-navy: #0B0820;
  --success-bg: rgba(16, 185, 129, .12);
  --success-border: rgba(16, 185, 129, .35);
  --warning-bg: rgba(245, 158, 11, .12);
  --warning-border: rgba(245, 158, 11, .35);
  --danger-bg: rgba(239, 68, 68, .12);
  --danger-border: rgba(239, 68, 68, .35);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, .5);
  --font-heading: 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;
  color-scheme: dark;
}
html.v2shell[data-theme="dark"] body { background: #0B0820 !important; color: #D9D4F0 !important; font-family: 'Poppins', system-ui, sans-serif; }
html.v2shell[data-theme="dark"] .font-heading, html.v2shell[data-theme="dark"] h1, html.v2shell[data-theme="dark"] h2, html.v2shell[data-theme="dark"] h3, html.v2shell[data-theme="dark"] h4 { font-family: 'Poppins', system-ui, sans-serif; }
html.v2shell[data-theme="dark"] main, html.v2shell[data-theme="dark"] section, html.v2shell[data-theme="dark"] .section-padding { position: relative; z-index: 1; }

/* Light utility classes → dark equivalents */
html.v2shell[data-theme="dark"] .bg-white, html.v2shell[data-theme="dark"] .bg-gray-50, html.v2shell[data-theme="dark"] .bg-slate-50 { background-color: rgba(28, 18, 66, .88) !important; }
html.v2shell[data-theme="dark"] .bg-slate-100, html.v2shell[data-theme="dark"] .bg-gray-100, html.v2shell[data-theme="dark"] .bg-slate-200 { background-color: rgba(124, 58, 237, .16) !important; }
html.v2shell[data-theme="dark"] .bg-blue-50, html.v2shell[data-theme="dark"] .bg-indigo-50, html.v2shell[data-theme="dark"] .bg-sky-50 { background-color: rgba(124, 58, 237, .16) !important; }
html.v2shell[data-theme="dark"] .bg-emerald-50, html.v2shell[data-theme="dark"] .bg-green-50 { background-color: rgba(16, 185, 129, .12) !important; }
html.v2shell[data-theme="dark"] .bg-amber-50, html.v2shell[data-theme="dark"] .bg-yellow-50, html.v2shell[data-theme="dark"] .bg-orange-50 { background-color: rgba(245, 158, 11, .12) !important; }
html.v2shell[data-theme="dark"] .bg-rose-50, html.v2shell[data-theme="dark"] .bg-red-50, html.v2shell[data-theme="dark"] .bg-pink-50 { background-color: rgba(244, 63, 94, .12) !important; }
html.v2shell[data-theme="dark"] .bg-purple-50, html.v2shell[data-theme="dark"] .bg-violet-50 { background-color: rgba(168, 85, 247, .14) !important; }
html.v2shell[data-theme="dark"] .text-slate-900, html.v2shell[data-theme="dark"] .text-gray-900, html.v2shell[data-theme="dark"] .text-slate-800, html.v2shell[data-theme="dark"] .text-gray-800, html.v2shell[data-theme="dark"] .text-black { color: #FFFFFF !important; }
html.v2shell[data-theme="dark"] .text-slate-700, html.v2shell[data-theme="dark"] .text-gray-700 { color: #E9E4FF !important; }
html.v2shell[data-theme="dark"] .text-slate-600, html.v2shell[data-theme="dark"] .text-gray-600, html.v2shell[data-theme="dark"] .text-slate-500, html.v2shell[data-theme="dark"] .text-gray-500 { color: #C3BCE3 !important; }
html.v2shell[data-theme="dark"] .text-slate-400, html.v2shell[data-theme="dark"] .text-gray-400 { color: #A9A2CC !important; }
html.v2shell[data-theme="dark"] .text-blue-600, html.v2shell[data-theme="dark"] .text-blue-700, html.v2shell[data-theme="dark"] .text-indigo-600 { color: #FB923C !important; }
html.v2shell[data-theme="dark"] .text-emerald-700, html.v2shell[data-theme="dark"] .text-emerald-900, html.v2shell[data-theme="dark"] .text-green-700 { color: #6EE7B7 !important; }
html.v2shell[data-theme="dark"] .text-rose-700, html.v2shell[data-theme="dark"] .text-rose-900, html.v2shell[data-theme="dark"] .text-red-700 { color: #FDA4AF !important; }
html.v2shell[data-theme="dark"] .text-amber-700, html.v2shell[data-theme="dark"] .text-amber-800 { color: #FCD34D !important; }
html.v2shell[data-theme="dark"] .text-purple-700, html.v2shell[data-theme="dark"] .text-violet-700 { color: #D8B4FE !important; }
html.v2shell[data-theme="dark"] [class*="border-slate-"], html.v2shell[data-theme="dark"] [class*="border-gray-"] { border-color: rgba(167, 139, 250, .24) !important; }

/* Inline light backgrounds / dark text written straight into the old markup */
html.v2shell[data-theme="dark"] [style*="background:#FFFFFF"], html.v2shell[data-theme="dark"] [style*="background: #FFFFFF"], html.v2shell[data-theme="dark"] [style*="background:#fff;"],
html.v2shell[data-theme="dark"] [style*="background:#ffffff"], html.v2shell[data-theme="dark"] [style*="background: #ffffff"], html.v2shell[data-theme="dark"] [style*="background: #fff;"],
html.v2shell[data-theme="dark"] [style*="background:#FFF;"], html.v2shell[data-theme="dark"] [style*="background-color:#FFFFFF"], html.v2shell[data-theme="dark"] [style*="background-color: #FFFFFF"] { background: rgba(28, 18, 66, .9) !important; }
html.v2shell[data-theme="dark"] [style*="background:#F8FAFC"], html.v2shell[data-theme="dark"] [style*="background: #F8FAFC"], html.v2shell[data-theme="dark"] [style*="background:#F1F5F9"],
html.v2shell[data-theme="dark"] [style*="background: #F1F5F9"], html.v2shell[data-theme="dark"] [style*="background:#f8fafc"], html.v2shell[data-theme="dark"] [style*="background: #f8fafc"] { background: rgba(20, 13, 52, .6) !important; }
html.v2shell[data-theme="dark"] [style*="color:#0F172A"], html.v2shell[data-theme="dark"] [style*="color: #0F172A"], html.v2shell[data-theme="dark"] [style*="color:#1E293B"], html.v2shell[data-theme="dark"] [style*="color:#334155"] { color: #FFFFFF !important; }
html.v2shell[data-theme="dark"] [style*="color:#475569"], html.v2shell[data-theme="dark"] [style*="color: #475569"], html.v2shell[data-theme="dark"] [style*="color:#64748B"], html.v2shell[data-theme="dark"] [style*="color: #64748B"] { color: #C3BCE3 !important; }
html.v2shell[data-theme="dark"] [style*="border:1px solid #E2E8F0"], html.v2shell[data-theme="dark"] [style*="border: 1px solid #E2E8F0"] { border-color: rgba(167, 139, 250, .24) !important; }

/* Form fields */
html.v2shell[data-theme="dark"] main input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="submit"]):not([type="button"]),
html.v2shell[data-theme="dark"] main select, html.v2shell[data-theme="dark"] main textarea,
html.v2shell[data-theme="dark"] .cf-input, html.v2shell[data-theme="dark"] .form-input, html.v2shell[data-theme="dark"] .smm-input {
  background: rgba(11, 8, 32, .65) !important; color: #FFFFFF !important; border-color: rgba(167, 139, 250, .3) !important; }
html.v2shell[data-theme="dark"] main input::placeholder, html.v2shell[data-theme="dark"] main textarea::placeholder { color: #8F88B8 !important; }
html.v2shell[data-theme="dark"] main input:focus, html.v2shell[data-theme="dark"] main select:focus, html.v2shell[data-theme="dark"] main textarea:focus { border-color: #F97316 !important; box-shadow: 0 0 0 3px rgba(249, 115, 22, .2) !important; outline: none; }
html.v2shell[data-theme="dark"] select option { background: #140D34; color: #FFFFFF; }

/* Old buttons → v2 look */
html.v2shell[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, #F97316, #EA580C) !important; color: #FFFFFF !important; border-color: transparent !important; box-shadow: 0 6px 22px rgba(249, 115, 22, .3); }
html.v2shell[data-theme="dark"] .btn-outline, html.v2shell[data-theme="dark"] .btn-secondary { background: transparent !important; color: #FFFFFF !important; border: 1.5px solid rgba(233, 228, 255, .5) !important; }
html.v2shell[data-theme="dark"] .btn-outline:hover, html.v2shell[data-theme="dark"] .btn-secondary:hover { border-color: #FFFFFF !important; background: rgba(124, 58, 237, .15) !important; }
html.v2shell[data-theme="dark"] a { text-decoration-color: rgba(249, 115, 22, .6); }

/* Old cards, badges, misc */
html.v2shell[data-theme="dark"] .card, html.v2shell[data-theme="dark"] .feature-card { background: rgba(28, 18, 66, .88) !important; border-color: rgba(167, 139, 250, .24) !important; }
html.v2shell[data-theme="dark"] .badge, html.v2shell[data-theme="dark"] .section-label { background: rgba(76, 29, 149, .35) !important; color: #E9E4FF !important; border-color: rgba(167, 139, 250, .3) !important; }
html.v2shell[data-theme="dark"] .text-gradient, html.v2shell[data-theme="dark"] .text-gradient-primary { background: linear-gradient(135deg, #F97316, #EC4899) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; -webkit-text-fill-color: transparent !important; }
html.v2shell[data-theme="dark"] .glow-orb { opacity: .25 !important; }
html.v2shell[data-theme="dark"] hr { border-color: rgba(167, 139, 250, .2); }
html.v2shell[data-theme="dark"] table th { color: #FFFFFF; }
html.v2shell[data-theme="dark"] table td, html.v2shell[data-theme="dark"] table th { border-color: rgba(167, 139, 250, .2) !important; }
html.v2shell[data-theme="dark"] .prose, html.v2shell[data-theme="dark"] .prose p, html.v2shell[data-theme="dark"] .prose li { color: #D9D4F0 !important; }
html.v2shell[data-theme="dark"] .prose h1, html.v2shell[data-theme="dark"] .prose h2, html.v2shell[data-theme="dark"] .prose h3, html.v2shell[data-theme="dark"] .prose h4, html.v2shell[data-theme="dark"] .prose strong { color: #FFFFFF !important; }
html.v2shell[data-theme="dark"] .prose a { color: #FB923C !important; }
html.v2shell[data-theme="dark"] .prose code { background: rgba(124, 58, 237, .2); color: #F0ABFC; }
html.v2shell[data-theme="dark"] .prose pre { background: #0F0A28 !important; border: 1px solid rgba(167, 139, 250, .2); }
html.v2shell[data-theme="dark"] .prose blockquote { border-left-color: #F97316 !important; color: #E9E4FF !important; }

/* Old chrome that the v2 shell replaces */
html.v2shell #main-nav, html.v2shell .navbar-spacer, html.v2shell #scroll-progress, html.v2shell #back-to-top { display: none !important; }

/* Old "Schedule a Meeting" modal: keep it, darken it */
html.v2shell[data-theme="dark"] #smm-overlay > div, html.v2shell[data-theme="dark"] .smm-modal, html.v2shell[data-theme="dark"] [id^="smm-"][class*="modal"] { background: #140D34 !important; color: #D9D4F0 !important; }

/* Old js/script.js tags the first <nav> with .navbar-glass — keep the v2 header nav clean */
html.v2shell nav.navbar-glass, html.v2shell nav.navbar-glass.scrolled { background: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border: 0 !important; box-shadow: none !important; }
html.v2shell .site-head .dd-menu a.active { background: none; }

/* Inline light gradients on old hero sections */
html.v2shell[data-theme="dark"] [style*="#F8FAFC 0%"], html.v2shell[data-theme="dark"] [style*="#FFFFFF 100%"], html.v2shell[data-theme="dark"] [style*="#ffffff 100%"], html.v2shell[data-theme="dark"] [style*="#EFF6FF"], html.v2shell[data-theme="dark"] [style*="#F0F9FF"] { background: transparent !important; }

/* Old blue gradient headline text → v2 orange/rose */
html.v2shell[data-theme="dark"] .text-gradient-blue, html.v2shell[data-theme="dark"] .text-gradient-orange { background: linear-gradient(135deg, #F97316, #EC4899) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; -webkit-text-fill-color: transparent !important; }

/* Old global "svg { max-width:100%; height:auto }" collapses v2 chrome icons */
html.v2shell .site-head svg, html.v2shell .m-nav svg, html.v2shell .bnav svg, html.v2shell .sheet svg, html.v2shell .site-foot svg, html.v2shell .wa-fab svg { max-width: none; }
html.v2shell .bnav .bn-item { display: grid !important; justify-items: center; align-content: center; width: 100%; gap: 2px; }
