/* Dark theme overrides (class-based). Applies when <html class="dark"> */
html.dark body{background-color:#0b1220 !important;color:#e5e7eb !important}
html.dark .bg-white{background-color:#0b1220 !important}
html.dark .bg-gray-50{background-color:#0b1220 !important}
html.dark .bg-gray-100{background-color:#0f172a !important}
html.dark .bg-white\/80{background-color:rgba(11,18,32,0.80) !important}
html.dark .text-black,
html.dark .text-gray-800,
html.dark .text-gray-700,
html.dark .text-gray-600{color:#e5e7eb !important}
html.dark .text-gray-500{color:#cbd5e1 !important}
html.dark .border-gray-100{border-color:#334155 !important}
html.dark .border-gray-200{border-color:#334155 !important}
html.dark .border-gray-300{border-color:#475569 !important}
html.dark .hover\:bg-gray-50:hover{background-color:#0f172a !important}
html.dark a{color:#93c5fd}
html.dark .prose, html.dark .content{color:#e5e7eb}
html.dark input, html.dark textarea, html.dark select{background-color:#111827 !important;color:#e5e7eb !important;border-color:#374151 !important}
html.dark .shadow, html.dark .shadow-sm, html.dark .shadow-md{box-shadow:0 1px 2px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.35) !important}
html.dark .ring-1{--tw-ring-color:#334155}
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]){border-color:#334155}
/* Gradient helpers */
html.dark .bg-gradient-to-b{background-image:linear-gradient(to bottom,#0b1220,#0b1220) !important}
/* Tables */
html.dark table{color:#e5e7eb}
html.dark thead{background-color:#0f172a}
html.dark tbody tr{border-color:#334155}
/* Cards */
html.dark .card{background-color:#0f172a !important;border-color:#1f2937 !important}
/* Code blocks */
html.dark pre, html.dark code{background-color:#0f172a !important;color:#e5e7eb !important}

/* === Comprehensive Dark Mode Overrides (all with !important) === */

/* Base */
html.dark body{background-color:#0b1220 !important;color:#e5e7eb !important}
html.dark :where(h1,h2,h3,h4,h5,h6,p,span,small,li,dt,dd,blockquote,strong,em){color:#e5e7eb !important}

/* Links */
html.dark a{color:#93c5fd !important}
html.dark a:hover{color:#bfdbfe !important;text-decoration:undeline !important}

/* Generic Tailwind-ish utilities */
html.dark .bg-white{background-color:#0f172a !important}
html.dark .bg-white\/80{background-color:rgba(15,23,42,0.80) !important}
html.dark .bg-gray-50{background-color:#0b1220 !important}
html.dark .bg-gray-100{background-color:#0f172a !important}
html.dark .bg-gray-200{background-color:#111827 !important}
html.dark .from-gray-50{--tw-gradient-from:#0b1220 !important}
html.dark .to-white{--tw-gradient-to:#0b1220 !important}
html.dark .text-black,
html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700,
html.dark .text-gray-600{color:#e5e7eb !important}
html.dark .text-gray-500{color:#cbd5e1 !important}
html.dark .text-gray-400{color:#94a3b8 !important}
html.dark .border-gray-100{border-color:#334155 !important}
html.dark .border-gray-200{border-color:#334155 !important}
html.dark .border-gray-300{border-color:#475569 !important}
html.dark .border{border-color:#334155 !important}
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]){border-color:#334155 !important}

/* Hover text utilities often used in templates */
html.dark .hover\:text-gray-700:hover,
html.dark .hover\:text-gray-800:hover,
html.dark .hover\:text-gray-600:hover,
html.dark .hover\:text-black:hover{color:#e5e7eb !important}
html.dark .hover\:bg-gray-50:hover{background-color:#111827 !important}
html.dark .hover\:bg-white:hover{background-color:#111827 !important}

/* Inputs & code */
html.dark input, html.dark textarea, html.dark select{background-color:#111827 !important;color:#e5e7eb !important;border-color:#374151 !important}
html.dark pre, html.dark code{background-color:#0f172a !important;color:#e5e7eb !important}
html.dark .shadow, html.dark .shadow-sm, html.dark .shadow-md{box-shadow:0 1px 2px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.35) !important}

/* Gradients */
html.dark .bg-gradient-to-b{background-image:linear-gradient(to bottom,#0b1220,#0b1220) !important}

/* Cards & generic containers */
html.dark .card{background-color:#0f172a !important;border-color:#1f2937 !important}

/* Tables (component + global) */
html.dark table{color:#e5e7eb !important}
html.dark thead, html.dark thead tr{background-color:#0f172a !important;color:#e5e7eb !important}
html.dark tbody tr{border-color:#334155 !important}
html.dark tbody tr:hover{background-color:#0f172a !important}
/* Names table specific */
html.dark #namesTable{background-color:transparent !important;color:#e5e7eb !important;border-color:#334155 !important}
html.dark #namesTable thead th,
html.dark #namesTable tbody tr th,
html.dark #namesTable tbody tr td{color:#e5e7eb !important;border-color:#334155 !important;background-color:transparent !important}
html.dark #namesTable tbody tr{background-color:#0b1220 !important}
html.dark #namesTable tbody tr:hover{background-color:#111827 !important}
html.dark #namesTable .name-mean::before{color:#e5e7eb !important}

/* Footer */
html.dark footer{background-color:#0b1220 !important;color:#e5e7eb !important;border-top-color:#334155 !important}
html.dark footer *{color:#e5e7eb !important}
html.dark footer a{color:#93c5fd !important}
html.dark footer a:hover{color:#bfdbfe !important;text-decoration:underline !important}
html.dark footer .text-gray-600{color:#cbd5e1 !important}

/* Components referenced in inline styles */
html.dark .name-mean{color:#e5e7eb !important}
html.dark .name-mean::before{color:#e5e7eb !important}
html.dark tr.clickable-row:hover{background:#111827 !important}

/* Override common inline color/background styles that were hard-coded for light mode */
html.dark [style*="color:#000"],
html.dark [style*="color:#111"],
html.dark [style*="color:#222"],
html.dark [style*="color:#333"],
html.dark [style*="color:#444"],
html.dark [style*="color:#555"],
html.dark [style*="color:black"],
html.dark [style*="color: rgb(0,0,0)"],
html.dark [style*="color:rgb(0, 0, 0)"]{color:#e5e7eb !important}

html.dark [style*="background:#fff"],
html.dark [style*="background:#fefefe"],
html.dark [style*="background:#f9fafb"],
html.dark [style*="background:#f3f4f6"],
html.dark [style*="background-color:#fff"],
html.dark [style*="background-color:#fefefe"],
html.dark [style*="background-color:#f9fafb"],
html.dark [style*="background-color:#f3f4f6"]{background-color:#0f172a !important}

html.dark [style*="border:#e5e7eb"],
html.dark [style*="border-color:#e5e7eb"],
html.dark [style*="border: 1px solid #e5e7eb"],
html.dark [style*="border:1px solid #e5e7eb"]{border-color:#334155 !important}

/* Hover link color that may be forced in inline <style> */
html.dark [style*=":hover"] a:hover,
html.dark a[style*="color:"]:hover{color:#bfdbfe !important}

/* Badges, pills & misc */
html.dark .badge, html.dark .tag{background-color:#0f172a !important;border-color:#334155 !important;color:#e5e7eb !important}

html.dark .hover\:text-accent-700:hover{color:#bfdbfe !important}


/* SVG icon fixes for hard-coded black strokes/fills */
html.dark svg[stroke="#000"], html.dark svg[stroke="#111"], html.dark svg[stroke="#222"], html.dark svg[stroke="#333"]{stroke:#e5e7eb !important}
html.dark svg[fill="#000"], html.dark svg[fill="#111"], html.dark svg[fill="#222"], html.dark svg[fill="#333"]{fill:#e5e7eb !important}



/* ===== Forms: inputs, labels, placeholders, focus, selects (ALL !important) ===== */
html.dark .hero{background-color:#0f172a !important;border-color:#334155 !important}

html.dark label,
html.dark legend{color:#e5e7eb !important}

html.dark input,
html.dark textarea,
html.dark select{background-color:#111827 !important;color:#e5e7eb !important;border-color:#374151 !important}

html.dark input::placeholder,
html.dark textarea::placeholder{-webkit-text-fill-color:#cbd5e1 !important;color:#cbd5e1 !important;opacity:1 !important}

html.dark input::-webkit-input-placeholder,
html.dark textarea::-webkit-input-placeholder{color:#cbd5e1 !important;opacity:1 !important}

html.dark input:-ms-input-placeholder,
html.dark textarea:-ms-input-placeholder{color:#cbd5e1 !important}

html.dark select option{background-color:#111827 !important;color:#e5e7eb !important}

html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus{outline:none !important;border-color:#60a5fa !important;box-shadow:0 0 0 3px rgba(59,130,246,.35) !important}

/* Autofill fixes (Chrome) */
html.dark input:-webkit-autofill,
html.dark textarea:-webkit-autofill,
html.dark select:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #111827 inset !important;-webkit-text-fill-color:#e5e7eb !important;caret-color:#e5e7eb !important}

/* Disabled/readonly */
html.dark input[disabled], html.dark textarea[disabled], html.dark select[disabled]{background-color:#0f172a !important;color:#94a3b8 !important;border-color:#334155 !important}
html.dark input[readonly], html.dark textarea[readonly], html.dark select[readonly]{background-color:#0f172a !important;color:#cbd5e1 !important;border-color:#334155 !important}

/* Buttons in forms */
html.dark button,
html.dark .btn{color:inherit !important}
html.dark .btn-grad{background:linear-gradient(135deg,#2563eb,#7c3aed) !important;color:#fff !important}



/* === Hero sections (outside forms) === */
html.dark .hero{background-color:#0f172a !important;border-color:#334155 !important}
html.dark .hero h1,
html.dark .hero h2,
html.dark .hero h3,
html.dark .hero p,
html.dark .hero span{color:#e5e7eb !important}
html.dark .hero .text-gray-600{color:#cbd5e1 !important}

/* Footer pseudo-elements */
html.dark footer a::before{color:#e5e7eb !important}



/* Strong override for .hero with gradient background defined in app_top.php */
html.dark .hero{background:#0f172a !important;background-image:none !important}

/* Strong override for .card when background is set via 'background' */
html.dark .card{background:#0f172a !important;background-image:none !important;border-color:#334155 !important}






/* ===== Letter Chips (ডার্ক মোড) ===== */

/* বেস চিপ স্টেট */
html.dark .chip{
  background-color:#0f172a !important;   /* ডার্ক ব্যাকগ্রাউন্ড */
  color:#e5e7eb !important;              /* লাইট টেক্সট */
  border-color:#334155 !important;       /* ডার্ক বর্ডার */
}

/* হোভার হলে */
html.dark .chip:hover{
  background-color:#111827 !important;
  border-color:#60a5fa !important;       /* অ্যাকসেন্ট-লাইট বর্ডার */
}

/* সিলেক্টেড স্টেট (তোমার PHP তে শর্তসাপেক্ষে যোগ হয়: bg-blue-100, text-accent-700, border-accent-600) */
html.dark .chip.bg-blue-100{
  background-color:#1e293b !important;   /* ডার্কার ব্লু-টোন */
  color:#bfdbfe !important;              /* লাইট-স্কাই টেক্সট */
  border-color:#60a5fa !important;       /* চোখে পড়া বর্ডার */
}

/* যদি ক্লাসে সরাসরি border-accent-600 থাকে (হোভার ছাড়াও) */
html.dark .chip.border-accent-600{
  border-color:#60a5fa !important;
}

/* যদি টেক্সটে text-accent-700 থাকে */
html.dark .chip.text-accent-700{
  color:#93c5fd !important;
}

/* Tailwind-এর hover:border-accent-600 ক্লাসটা যাতে !important বর্ডারের উপরেও কাজ করে */
html.dark .hover\:border-accent-600:hover{
  border-color:#60a5fa !important;
}




/* Author box (bg-white/70) — Dark mode */
html.dark .bg-white\/70{
  background-color: rgba(15,23,42,.70) !important;  /* ডার্ক ব্যাকগ্রাউন্ড */
}

/* (ঐচ্ছিক) অন্য translucent সাদা ব্যাকগ্রাউন্ডগুলোও কভার করতে চান? */
html.dark .bg-white\/80{ background-color: rgba(15,23,42,.80) !important; }
html.dark .bg-white\/60{ background-color: rgba(15,23,42,.60) !important; }
html.dark .bg-white\/50{ background-color: rgba(15,23,42,.50) !important; }

/* Author bio টেক্সট যেন ডার্কে হালকা-লাইট থাকে */
html.dark .text-gray-600{ color:#cbd5e1 !important; }

/* বর্ডার ডার্কে স্পষ্ট */
html.dark .border{ border-color:#334155 !important; }

/* (ঐচ্ছিক) একলাইনে সব ‘bg-white/…’ ক্লাস ফোর্স করতে চান? তাহলে এটাও দিন: */
/* html.dark [class*="bg-white/"]{ background-color: rgba(15,23,42,.72) !important; } */






