/* ==========================================================================
   Panel + Auth Themes System v2.0
   Supports 15 distinct themes (10 Light & 5 Dark Moods)
   Full Dark Mode visibility & readability for Admin, Member & Auth pages.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LIGHT / VIBRANT THEMES
   -------------------------------------------------------------------------- */

[data-panel-theme="teal"] {
  --primary: #0B6B5E; --primary-hover: #07473E; --primary-lt: #e6f4ef;
  --sidebar-bg: #ffffff; --sidebar-hover: #f4f6f9;
  --sidebar-active: #07473E; --sidebar-active-bg: #e6f4ef;
  --sidebar-text: #333333; --sidebar-text-active: #07473E;
}

[data-panel-theme="indigo"] {
  --primary: #4F46E5; --primary-hover: #3730A3; --primary-lt: #eef0fe;
  --sidebar-bg: #ffffff; --sidebar-hover: #eef0fe;
  --sidebar-active: #3730A3; --sidebar-active-bg: #eef0fe;
  --sidebar-text: #333333; --sidebar-text-active: #3730A3;
}

[data-panel-theme="blue"] {
  --primary: #0284C7; --primary-hover: #0369A1; --primary-lt: #e0f2fe;
  --sidebar-bg: #ffffff; --sidebar-hover: #e0f2fe;
  --sidebar-active: #0369A1; --sidebar-active-bg: #e0f2fe;
  --sidebar-text: #333333; --sidebar-text-active: #0369A1;
}

[data-panel-theme="emerald"] {
  --primary: #059669; --primary-hover: #047857; --primary-lt: #d1fae5;
  --sidebar-bg: #ffffff; --sidebar-hover: #ecfdf5;
  --sidebar-active: #047857; --sidebar-active-bg: #d1fae5;
  --sidebar-text: #333333; --sidebar-text-active: #047857;
}

[data-panel-theme="rose"] {
  --primary: #9D174D; --primary-hover: #831843; --primary-lt: #fce7f3;
  --sidebar-bg: #ffffff; --sidebar-hover: #fce7f3;
  --sidebar-active: #831843; --sidebar-active-bg: #fce7f3;
  --sidebar-text: #333333; --sidebar-text-active: #831843;
}

[data-panel-theme="saffron"] {
  --primary: #EA580C; --primary-hover: #C2410C; --primary-lt: #ffedd5;
  --sidebar-bg: #ffffff; --sidebar-hover: #fff7ed;
  --sidebar-active: #C2410C; --sidebar-active-bg: #ffedd5;
  --sidebar-text: #333333; --sidebar-text-active: #C2410C;
}

[data-panel-theme="violet"] {
  --primary: #7C3AED; --primary-hover: #5B21B6; --primary-lt: #ede9fe;
  --sidebar-bg: #ffffff; --sidebar-hover: #f5f3ff;
  --sidebar-active: #5B21B6; --sidebar-active-bg: #ede9fe;
  --sidebar-text: #333333; --sidebar-text-active: #5B21B6;
}

[data-panel-theme="amber"] {
  --primary: #D97706; --primary-hover: #B45309; --primary-lt: #fef3c7;
  --sidebar-bg: #ffffff; --sidebar-hover: #fffbeb;
  --sidebar-active: #B45309; --sidebar-active-bg: #fef3c7;
  --sidebar-text: #333333; --sidebar-text-active: #B45309;
}

[data-panel-theme="crimson"] {
  --primary: #DC2626; --primary-hover: #991B1B; --primary-lt: #fee2e2;
  --sidebar-bg: #ffffff; --sidebar-hover: #fef2f2;
  --sidebar-active: #991B1B; --sidebar-active-bg: #fee2e2;
  --sidebar-text: #333333; --sidebar-text-active: #991B1B;
}

[data-panel-theme="slate"] {
  --primary: #475569; --primary-hover: #1E293B; --primary-lt: #f1f5f9;
  --sidebar-bg: #ffffff; --sidebar-hover: #f8fafc;
  --sidebar-active: #1E293B; --sidebar-active-bg: #f1f5f9;
  --sidebar-text: #333333; --sidebar-text-active: #1E293B;
}

/* --------------------------------------------------------------------------
   2. DARK / NIGHT THEMES
   -------------------------------------------------------------------------- */

/* 2.1 Dark Night (Slate & Emerald) */
[data-panel-theme="dark"] {
  --primary: #10B981; --primary-hover: #059669; --primary-lt: #1e293b;
  --body-bg: #0f172a; --text: #e5e7eb; --text-muted: #cbd5e1; --text-faint: #94a3b8;
  --border: #334155; --border-light: #1e293b;
  --input-bg: #1e293b; --input-border: #334155;
  --card-bg: #1a1f2e; --card-shadow: 0 4px 18px rgba(0,0,0,.45);
  --sidebar-bg: #0f172a; --sidebar-hover: #1e293b;
  --sidebar-active: #10B981; --sidebar-active-bg: #1e293b;
  --sidebar-text: #cbd5e1; --sidebar-text-active: #ffffff;
}

/* 2.2 Midnight Navy (Deep Ocean & Cyan) */
[data-panel-theme="midnight"] {
  --primary: #0EA5E9; --primary-hover: #0284C7; --primary-lt: rgba(14, 165, 233, 0.15);
  --body-bg: #0b1329; --text: #f0fdf4; --text-muted: #cbd5e1; --text-faint: #94a3b8;
  --border: #1e3a8a; --border-light: #172554;
  --input-bg: #111d42; --input-border: #1e3a8a;
  --card-bg: #111d42; --card-shadow: 0 4px 20px rgba(0,0,0,.5);
  --sidebar-bg: #0a0f1d; --sidebar-hover: #172554;
  --sidebar-active: #0EA5E9; --sidebar-active-bg: rgba(14, 165, 233, 0.15);
  --sidebar-text: #cbd5e1; --sidebar-text-active: #ffffff;
}

/* 2.3 Dracula (Cyber Dark & Neon Violet) */
[data-panel-theme="dracula"] {
  --primary: #C084FC; --primary-hover: #A855F7; --primary-lt: rgba(192, 132, 252, 0.15);
  --body-bg: #181622; --text: #f5f3ff; --text-muted: #d8b4fe; --text-faint: #a855f7;
  --border: #3b2d54; --border-light: #2e1065;
  --input-bg: #221f33; --input-border: #3b2d54;
  --card-bg: #221f33; --card-shadow: 0 4px 20px rgba(0,0,0,.5);
  --sidebar-bg: #13111c; --sidebar-hover: #2e1065;
  --sidebar-active: #C084FC; --sidebar-active-bg: rgba(192, 132, 252, 0.15);
  --sidebar-text: #d8b4fe; --sidebar-text-active: #ffffff;
}

/* 2.4 Charcoal (True OLED Dark & Warm Gold) */
[data-panel-theme="charcoal"] {
  --primary: #F59E0B; --primary-hover: #D97706; --primary-lt: rgba(245, 158, 11, 0.15);
  --body-bg: #171717; --text: #fafafa; --text-muted: #d4d4d4; --text-faint: #a3a3a3;
  --border: #383838; --border-light: #262626;
  --input-bg: #212121; --input-border: #383838;
  --card-bg: #212121; --card-shadow: 0 4px 20px rgba(0,0,0,.6);
  --sidebar-bg: #121212; --sidebar-hover: #262626;
  --sidebar-active: #F59E0B; --sidebar-active-bg: rgba(245, 158, 11, 0.15);
  --sidebar-text: #d4d4d4; --sidebar-text-active: #ffffff;
}

/* 2.5 Forest Night (Deep Jungle & Mint Teal) */
[data-panel-theme="forest"] {
  --primary: #2DD4BF; --primary-hover: #14B8A6; --primary-lt: rgba(45, 212, 191, 0.15);
  --body-bg: #0d1f1a; --text: #f0fdfa; --text-muted: #99f6e4; --text-faint: #5eead4;
  --border: #1f483c; --border-light: #134e4a;
  --input-bg: #142d25; --input-border: #1f483c;
  --card-bg: #142d25; --card-shadow: 0 4px 20px rgba(0,0,0,.5);
  --sidebar-bg: #0a1713; --sidebar-hover: #134e4a;
  --sidebar-active: #2DD4BF; --sidebar-active-bg: rgba(45, 212, 191, 0.15);
  --sidebar-text: #99f6e4; --sidebar-text-active: #ffffff;
}

/* --------------------------------------------------------------------------
   3. UNIVERSAL DARK MODE SYSTEM
   Active whenever data-theme-mode="dark" or any dark panel/auth theme is set.
   -------------------------------------------------------------------------- */

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"],
  [data-theme="dark"]
) {
  color-scheme: dark;
}

/* Base Body & Layout */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"],
  [data-theme="dark"]
) body {
  background-color: var(--body-bg) !important;
  color: var(--text) !important;
}

/* Headings and Titles */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(h1, h2, h3, h4, h5, h6, .page-title, .modal-title, .card-custom-title) {
  color: #f1f5f9 !important;
}

/* Links */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) a:not(.btn):not(.dropdown-item):not(.nav-link):not(.nav-sublink) {
  color: var(--primary);
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) a:not(.btn):not(.dropdown-item):not(.nav-link):not(.nav-sublink):hover {
  color: var(--primary-hover);
}

/* Muted & Pretitle text */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.text-muted, .page-pretitle, .hint-text, .form-text, .form-text-custom) {
  color: var(--text-faint, #94a3b8) !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .breadcrumb-bar {
  color: #cbd5e1;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .breadcrumb-bar .sep {
  color: #64748b;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .breadcrumb-bar .current {
  color: #f1f5f9;
}

/* Critical Text Override: Fix all .text-dark and .text-black in dark mode */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.text-dark, .text-black) {
  color: #f1f5f9 !important;
}

/* 3.1 Sidebar in Dark Mode */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar {
  background-color: var(--sidebar-bg) !important;
  border-right: 1px solid var(--border);
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-header {
  background-color: var(--sidebar-bg) !important;
  border-bottom: 1px solid var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-brand .brand-text {
  color: #f1f5f9 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-close-btn {
  background-color: var(--input-bg) !important;
  color: #94a3b8 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-close-btn:hover {
  background-color: var(--border) !important;
  color: #fff !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-search-input {
  background-color: var(--input-bg) !important;
  border-color: var(--border) !important;
  color: #e5e7eb !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-search-input::placeholder {
  color: #64748b !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-search-input:focus {
  border-color: var(--primary) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .search-kbd {
  background-color: var(--border) !important;
  color: #cbd5e1 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .nav-section-label {
  color: #64748b !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .nav-link {
  color: var(--sidebar-text, #cbd5e1) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .nav-link:hover {
  background-color: var(--sidebar-hover) !important;
  color: #fff !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .nav-link.active {
  background-color: var(--primary) !important;
  color: #fff !important;
  border-left-color: var(--primary-hover) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .nav-sublink {
  color: #94a3b8 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .nav-sublink:hover {
  color: #fff !important;
  background-color: var(--sidebar-hover) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .nav-sublink.active {
  color: #fff !important;
  background-color: var(--primary) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-footer {
  background-color: var(--sidebar-bg) !important;
  border-top: 1px solid var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-user-info .name {
  color: #f1f5f9 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-user-info .role {
  color: #94a3b8 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-user .logout-btn {
  border-color: var(--border) !important;
  color: #94a3b8 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .sidebar-user .logout-btn:hover {
  background-color: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

/* 3.2 Topbar in Dark Mode */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .topbar {
  background-color: var(--card-bg) !important;
  border-bottom: 1px solid var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.sidebar-toggle-btn, .tb-btn) {
  background-color: var(--input-bg) !important;
  border-color: var(--border) !important;
  color: #cbd5e1 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.sidebar-toggle-btn:hover, .tb-btn:hover) {
  background-color: var(--border) !important;
  color: #fff !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .tb-avatar {
  background-color: color-mix(in srgb, var(--primary) 22%, transparent) !important;
  color: var(--primary) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .dropdown-menu-custom {
  background-color: var(--card-bg) !important;
  border-color: var(--border) !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.6) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .dropdown-menu-custom .dropdown-item {
  color: #cbd5e1 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .dropdown-menu-custom .dropdown-item:hover {
  background-color: #0B6B5E !important;
  color: #fff !important;
  text-decoration: none !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .dropdown-divider {
  border-color: var(--border) !important;
}

/* 3.3 Cards, Tables & Containers */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .card-custom {
  background-color: var(--card-bg) !important;
  border: none !important;
  box-shadow: var(--card-shadow) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .card-custom-header {
  border-bottom: 1px solid var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .card-custom-footer {
  background-color: var(--sidebar-bg) !important;
  border-top: 1px solid var(--border) !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(table, .table-custom, .page-content table) {
  border-color: var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.table-custom thead th, .page-content table thead th, table thead th) {
  background-color: var(--input-bg) !important;
  color: #f1f5f9 !important;
  border-color: var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.table-custom tbody td, .page-content table tbody td, table tbody td) {
  color: #cbd5e1 !important;
  border-color: var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.table-custom tbody tr:hover td, .page-content table tbody tr:hover td, table tbody tr:hover td) {
  background-color: var(--input-bg) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .table-custom strong {
  color: #f1f5f9 !important;
}

/* 3.4 Form Inputs & Controls */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.form-control, .form-control-sm-custom, .gateway-input, .form-input, input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), textarea) {
  background-color: var(--input-bg) !important;
  border-color: var(--input-border, var(--border)) !important;
  color: #e5e7eb !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.form-control, .form-control-sm-custom, .gateway-input, .form-input, input, textarea)::placeholder {
  color: #64748b !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.form-control, .form-control-sm-custom, .gateway-input, .form-input, input, textarea):focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent) !important;
}

/* Form Select with crisp light chevron arrow */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .form-select {
  background-color: var(--input-bg) !important;
  border-color: var(--input-border, var(--border)) !important;
  color: #e5e7eb !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right .75rem center !important;
  background-size: 16px 12px !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) select option {
  background-color: var(--input-bg) !important;
  color: #e5e7eb !important;
}

/* Disabled & Readonly Inputs */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.form-control:disabled, .form-control[readonly], input[disabled], input[readonly], textarea[readonly]) {
  background-color: color-mix(in srgb, var(--body-bg) 70%, black) !important;
  border-color: var(--border) !important;
  color: #94a3b8 !important;
  opacity: .85;
}

/* Labels */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.form-label, .form-label-custom, .input-label) {
  color: #cbd5e1 !important;
}

/* Switches, Toggles & Checkboxes */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .form-check-input {
  background-color: var(--input-bg);
  border-color: var(--border);
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .toggle-track {
  background-color: var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .toggle-track.on {
  background-color: var(--primary) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .enc-checkbox {
  background-color: var(--input-bg) !important;
  border-color: var(--border) !important;
  color: #cbd5e1 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .enc-checkbox:hover {
  background-color: var(--border) !important;
  border-color: #64748b !important;
  color: #fff !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .enc-checkbox.checked {
  background-color: color-mix(in srgb, var(--primary) 20%, transparent) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .env-group {
  background-color: var(--sidebar-bg) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .env-label {
  color: #94a3b8 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .env-label.active {
  background-color: var(--primary) !important;
  color: #fff !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .anim-picker {
  background-color: var(--sidebar-bg) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .anim-picker .anim-label {
  color: #cbd5e1 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .anim-picker .anim-label:hover {
  background-color: var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .anim-picker .sl-anim:checked + .anim-label {
  background-color: var(--primary) !important;
  color: #fff !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .pw-toggle-sm {
  color: #94a3b8 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .pw-toggle-sm:hover {
  color: var(--primary) !important;
  background-color: color-mix(in srgb, var(--primary) 15%, transparent) !important;
}

/* 3.5 Buttons */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .btn-custom-outline {
  background-color: var(--input-bg) !important;
  color: #e5e7eb !important;
  border-color: var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .btn-custom-outline:hover {
  background-color: var(--border) !important;
  color: #fff !important;
  border-color: #64748b !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .btn-custom-ghost {
  color: #cbd5e1 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .btn-custom-ghost:hover {
  background-color: var(--input-bg) !important;
  color: #fff !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* 3.6 Modals */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .modal-content {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 25px 60px rgba(0,0,0,.6) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .modal-header {
  border-bottom: 1px solid var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .modal-footer {
  background-color: var(--sidebar-bg) !important;
  border-top: 1px solid var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .modal-title {
  color: #f1f5f9 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .modal-body p {
  color: #cbd5e1 !important;
}

/* 3.7 Badges, Media Items, Toasts & Utilities */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .badge.bg-light {
  background-color: var(--border) !important;
  color: #f1f5f9 !important;
  border-color: var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .gateway-badge.badge-active {
  background-color: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .gateway-badge.badge-inactive {
  background-color: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .empty-state-title {
  color: #f1f5f9 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .empty-state-subtitle {
  color: #94a3b8 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .empty-state-icon {
  color: var(--primary) !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.media-item, .slider-item) {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.media-thumb, .slider-thumb) {
  background-color: var(--body-bg) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .media-title {
  color: #f1f5f9 !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.media-date, .slider-date) {
  color: #94a3b8 !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .footer {
  background-color: var(--card-bg) !important;
  border-top: 1px solid var(--border) !important;
  color: #94a3b8 !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) #toastContainer > div {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.6) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) #toastContainer button {
  color: #94a3b8 !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) .alert-info {
  background-color: rgba(14, 165, 233, 0.15) !important;
  border-color: #0284c7 !important;
  color: #bae6fd !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.bg-white) {
  background-color: var(--card-bg) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.bg-light) {
  background-color: var(--body-bg) !important;
}
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(.border, .border-light) {
  border-color: var(--border) !important;
}

/* 3.8 Inline-Style Safety Net Overrides */
:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(
  [style*="color:#000"], [style*="color: #000"],
  [style*="color:#111"], [style*="color: #111"],
  [style*="color:#333"], [style*="color: #333"],
  [style*="color:#44403c"], [style*="color: #44403c"],
  [style*="color:#1f2937"], [style*="color: #1f2937"]
) {
  color: #e5e7eb !important;
}

:is(
  [data-theme-mode="dark"],
  [data-panel-theme="dark"],
  [data-panel-theme="midnight"],
  [data-panel-theme="dracula"],
  [data-panel-theme="charcoal"],
  [data-panel-theme="forest"]
) :is(
  [style*="background:#fff"], [style*="background: #fff"],
  [style*="background:#f4f6f9"], [style*="background: #f4f6f9"],
  [style*="background:#f1f5f9"], [style*="background: #f1f5f9"],
  [style*="background:#f9f9f9"], [style*="background: #f9f9f9"],
  [style*="background:#f8fafc"], [style*="background: #f8fafc"]
) {
  background-color: var(--input-bg, #1e293b) !important;
}

/* --------------------------------------------------------------------------
   4. AUTH PAGES (LOGIN / REGISTER)
   -------------------------------------------------------------------------- */

/* Light Auth Themes */
[data-auth-theme="teal"]    { --auth-primary: #0B6B5E; --auth-dark: #07473E; --auth-bg: #f4f8f7; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="indigo"]  { --auth-primary: #4F46E5; --auth-dark: #3730A3; --auth-bg: #eef0fe; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="blue"]    { --auth-primary: #0284C7; --auth-dark: #0369A1; --auth-bg: #f0f9ff; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="emerald"] { --auth-primary: #059669; --auth-dark: #047857; --auth-bg: #f0fdf4; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="rose"]    { --auth-primary: #9D174D; --auth-dark: #831843; --auth-bg: #fff1f2; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="saffron"] { --auth-primary: #EA580C; --auth-dark: #C2410C; --auth-bg: #fff7ed; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="violet"]  { --auth-primary: #7C3AED; --auth-dark: #5B21B6; --auth-bg: #faf5ff; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="amber"]   { --auth-primary: #D97706; --auth-dark: #B45309; --auth-bg: #fffbeb; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="crimson"] { --auth-primary: #DC2626; --auth-dark: #991B1B; --auth-bg: #fef2f2; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }
[data-auth-theme="slate"]   { --auth-primary: #475569; --auth-dark: #1E293B; --auth-bg: #f8fafc; --auth-card-bg: #ffffff; --auth-border: #e2e8f0; --auth-input-bg: #ffffff; }

/* Dark Auth Themes */
[data-auth-theme="dark"]     { --auth-primary: #10B981; --auth-dark: #059669; --auth-bg: #0f172a; --auth-card-bg: #1a1f2e; --auth-border: #334155; --auth-input-bg: #1e293b; }
[data-auth-theme="midnight"] { --auth-primary: #0EA5E9; --auth-dark: #0284C7; --auth-bg: #0b1329; --auth-card-bg: #111d42; --auth-border: #1e3a8a; --auth-input-bg: #172554; }
[data-auth-theme="dracula"]  { --auth-primary: #C084FC; --auth-dark: #A855F7; --auth-bg: #181622; --auth-card-bg: #221f33; --auth-border: #3b2d54; --auth-input-bg: #2e1065; }
[data-auth-theme="charcoal"] { --auth-primary: #F59E0B; --auth-dark: #D97706; --auth-bg: #171717; --auth-card-bg: #212121; --auth-border: #383838; --auth-input-bg: #262626; }
[data-auth-theme="forest"]   { --auth-primary: #2DD4BF; --auth-dark: #14B8A6; --auth-bg: #0d1f1a; --auth-card-bg: #142d25; --auth-border: #1f483c; --auth-input-bg: #134e4a; }

/* Auth page background */
html[data-auth-theme] body, body[data-auth-theme] {
  background-color: var(--auth-bg, #f5f7fa);
}

[data-auth-theme] .login-card input:focus {
  border-color: var(--auth-primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-primary) 18%, transparent) !important;
}
[data-auth-theme] .login-card button[type="submit"] {
  background-color: var(--auth-primary) !important;
}
[data-auth-theme] .login-card button[type="submit"]:hover {
  background-color: var(--auth-dark) !important;
}
[data-auth-theme] .login-card .forgot a,
[data-auth-theme] .login-card .signup a {
  color: var(--auth-primary) !important;
}

/* Universal Dark Mode on Auth Pages */
:is(
  [data-theme-mode="dark"],
  [data-auth-theme="dark"],
  [data-auth-theme="midnight"],
  [data-auth-theme="dracula"],
  [data-auth-theme="charcoal"],
  [data-auth-theme="forest"]
) .login-card {
  background-color: var(--auth-card-bg, #1a1f2e) !important;
  border: 1px solid var(--auth-border, #334155) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,.6) !important;
}

:is(
  [data-theme-mode="dark"],
  [data-auth-theme="dark"],
  [data-auth-theme="midnight"],
  [data-auth-theme="dracula"],
  [data-auth-theme="charcoal"],
  [data-auth-theme="forest"]
) .login-card h1 {
  color: #f1f5f9 !important;
}

:is(
  [data-theme-mode="dark"],
  [data-auth-theme="dark"],
  [data-auth-theme="midnight"],
  [data-auth-theme="dracula"],
  [data-auth-theme="charcoal"],
  [data-auth-theme="forest"]
) :is(.login-card .subtitle, .login-card .signup, .login-card .dev-note) {
  color: #94a3b8 !important;
}

:is(
  [data-theme-mode="dark"],
  [data-auth-theme="dark"],
  [data-auth-theme="midnight"],
  [data-auth-theme="dracula"],
  [data-auth-theme="charcoal"],
  [data-auth-theme="forest"]
) .login-card label {
  color: #cbd5e1 !important;
}

:is(
  [data-theme-mode="dark"],
  [data-auth-theme="dark"],
  [data-auth-theme="midnight"],
  [data-auth-theme="dracula"],
  [data-auth-theme="charcoal"],
  [data-auth-theme="forest"]
) .login-card input:not([type="hidden"]):not([type="checkbox"]) {
  background-color: var(--auth-input-bg, #1e293b) !important;
  border-color: var(--auth-border, #334155) !important;
  color: #e5e7eb !important;
}

:is(
  [data-theme-mode="dark"],
  [data-auth-theme="dark"],
  [data-auth-theme="midnight"],
  [data-auth-theme="dracula"],
  [data-auth-theme="charcoal"],
  [data-auth-theme="forest"]
) .login-card .auto-login {
  background-color: var(--auth-input-bg, #1e293b) !important;
  border-color: var(--auth-border, #334155) !important;
  color: #cbd5e1 !important;
}

:is(
  [data-theme-mode="dark"],
  [data-auth-theme="dark"],
  [data-auth-theme="midnight"],
  [data-auth-theme="dracula"],
  [data-auth-theme="charcoal"],
  [data-auth-theme="forest"]
) .login-card .auto-login:hover {
  background-color: var(--auth-border, #334155) !important;
  color: #fff !important;
}

/* Mobile Screen Override: prevent white flash on mobile auth */
@media (max-width: 480px) {
  :is(
    html[data-theme-mode="dark"],
    html[data-auth-theme="dark"],
    html[data-auth-theme="midnight"],
    html[data-auth-theme="dracula"],
    html[data-auth-theme="charcoal"],
    html[data-auth-theme="forest"]
  ) body {
    background-color: var(--auth-bg, #0f172a) !important;
  }
}
