/* Admin theme system: Light is the default; Dark is an explicit user choice. */
:root,
html[data-admin-theme="light"] {
  --color-bg-cosmic:#f3f6fb; --color-bg-panel:rgba(255,255,255,.94); --color-bg-card:#fff; --color-bg-hover:#fff5df;
  --color-gold-primary:#a95f00; --color-gold-hover:#814800; --color-gold-light:#f4ad32; --color-gold-glow:rgba(169,95,0,.16);
  --color-text-main:#172033; --color-text-muted:#5b6678; --color-border:rgba(123,76,12,.22);
  --color-shubh:#087c58; --color-shubh-bg:rgba(8,124,88,.10); --color-ashubh:#b42332; --color-ashubh-bg:rgba(180,35,50,.10);
  --color-info:#087ca8; --color-purple:#6d43a8; --color-dark-void:#172033; --color-dark-surface:#fff;
  --shadow-glass:0 8px 28px rgba(35,49,74,.10);
}
html[data-admin-theme="dark"] {
  --color-bg-cosmic:hsl(226,45%,9%); --color-bg-panel:hsla(226,40%,15%,.92); --color-bg-card:hsla(224,38%,18%,.82); --color-bg-hover:hsla(224,45%,25%,.9);
  --color-gold-primary:hsl(43,88%,56%); --color-gold-hover:hsl(43,95%,66%); --color-gold-light:hsl(43,95%,66%); --color-gold-glow:hsla(43,88%,56%,.3);
  --color-text-main:hsl(210,30%,95%); --color-text-muted:hsl(215,20%,68%); --color-border:hsla(43,88%,56%,.22);
  --color-shubh:hsl(152,75%,45%); --color-shubh-bg:hsla(152,75%,45%,.12); --color-ashubh:hsl(355,82%,60%); --color-ashubh-bg:hsla(355,82%,60%,.14);
  --color-info:hsl(199,89%,55%); --color-purple:hsl(270,75%,65%); --color-dark-void:#070f2b; --color-dark-surface:hsla(224,45%,12%,.95);
  --shadow-glass:0 8px 32px rgba(0,0,0,.45);
}
html[data-admin-theme="light"] body.theme-vedic-cosmic {
  background:#f3f6fb;
  background-image:radial-gradient(at 8% 12%,rgba(249,194,94,.16),transparent 38%),radial-gradient(at 92% 85%,rgba(82,132,194,.10),transparent 42%);
  color:var(--color-text-main);
}
html[data-admin-theme="dark"] body.theme-vedic-cosmic {
  background:var(--color-bg-cosmic);
  background-image:radial-gradient(at 10% 20%,hsla(270,60%,15%,.4) 0,transparent 60%),radial-gradient(at 90% 80%,hsla(43,88%,56%,.15) 0,transparent 50%),radial-gradient(at 50% 50%,hsla(215,50%,12%,.8) 0,transparent 100%);
}
.admin-theme-toggle { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:9px; border:1px solid var(--color-border); background:var(--color-bg-card); color:var(--color-text-main); font:600 13px var(--font-sans); cursor:pointer; transition:var(--transition-smooth); }
.admin-theme-toggle:hover { border-color:var(--color-gold-primary); color:var(--color-gold-primary); background:var(--color-bg-hover); }
html[data-admin-theme="light"] .glass-card,
html[data-admin-theme="light"] .glass-panel { background:rgba(255,255,255,.94); }
html[data-admin-theme="light"] .app-sidebar { background:#fff; }
html[data-admin-theme="light"] .card { background:#fff; color:var(--color-text-main); }
html[data-admin-theme="light"] .form-control,
html[data-admin-theme="light"] .form-select { background:#fff; color:#172033; border-color:#cbd3df; }
html[data-admin-theme="light"] .form-control::placeholder { color:#7b8493; }
html[data-admin-theme="light"] .form-select option { background:#fff; color:#172033; }
html[data-admin-theme="light"] .table { background:#fff; color:#172033; }
html[data-admin-theme="light"] .table th { background:#f4ead8; color:#7b4600; border-color:#dcc8a5; }
html[data-admin-theme="light"] .table td,
html[data-admin-theme="light"] .table th { border-bottom-color:#e3e7ee; }
html[data-admin-theme="light"] .lang-switch-group { background:#edf1f6; }
html[data-admin-theme="light"] .avatar-circle { color:#fff; }
html[data-admin-theme="light"] .nav-link.active { box-shadow:inset 4px 0 0 var(--color-gold-primary),0 4px 12px rgba(35,49,74,.08); }
html[data-admin-theme="light"] .chart-container-d1 { background:#fffaf0; }
html[data-admin-theme="light"] .login-card { box-shadow:0 20px 60px rgba(35,49,74,.18)!important; }
html[data-admin-theme="light"] .app-main-viewport [style*="background: hsla(224"],
html[data-admin-theme="light"] .app-main-viewport [style*="background:hsla(224"],
html[data-admin-theme="light"] .app-main-viewport [style*="background: hsla(220"],
html[data-admin-theme="light"] .app-main-viewport [style*="background:hsla(220"] { background:#fff!important; color:var(--color-text-main)!important; }
html[data-admin-theme="light"] .app-main-viewport [style*="background: hsla(270"],
html[data-admin-theme="light"] .app-main-viewport [style*="background:hsla(270"] { background:#f7f1ff!important; }
html[data-admin-theme="light"] .app-main-viewport [style*="background: hsla(0,0%,0%"],
html[data-admin-theme="light"] .app-main-viewport [style*="background: rgba(0,0,0"] { background:#f5f7fa!important; }
html[data-admin-theme="light"] .app-main-viewport [style*="#55efc4"] { color:#087c58!important; }
html[data-admin-theme="light"] .app-main-viewport [style*="#ff7675"] { color:#b42332!important; }
html[data-admin-theme="light"] .app-main-viewport [style*="#ffeaa7"] { color:#8a5200!important; }
html[data-admin-theme="light"] .app-main-viewport [style*="#a29bfe"] { color:#6d43a8!important; }
html[data-admin-theme="light"] .kundli-tab-btn { background:#fff; color:#5b6678; }
html[data-admin-theme="light"] .kundli-tab-btn:hover { background:#fff5df; color:#172033; }
html[data-admin-theme="light"] .kundli-tab-btn.active { color:#172033; }
html[data-admin-theme="light"] .ctrl-pill { background:#fff; color:#5b6678; }
html[data-admin-theme="light"] .table-custom td { background:#fff; color:#172033; }
@media (max-width:768px) { .admin-theme-toggle { padding:8px 10px; } .header-right { gap:8px; } .lang-btn { padding:6px 8px; } }
