/* kumbhmela.guru THEMES (owner order 2026-08-02): 6 curated themes + user
 * custom colors. Each theme overrides the design-token variables; the bright
 * themes additionally re-skin the literal dark surfaces so every word stays
 * readable. Applied via <html data-theme="...">; custom themes inject their
 * four chosen colors as inline variables on <html>. */

/* ── 🌅 Ganga Dawn — the BRIGHT theme (light, serene, fully readable) ── */
:root[data-theme="ganga-dawn"] {
  --ink: #faf6ec; --ink-2: #ffffff; --bg: #faf6ec;
  --text: #2a1f10; --text-dim: #4a3b24; --text-faint: #7a6a4f;
  --gold-pale: #8a5a00; --gold: #96660a; --ganga: #0d6d7a;
  --saffron: #d97706; --saffron-deep: #b45309;
  --line: rgba(90, 60, 10, .14); --line-strong: rgba(90, 60, 10, .3);
}
:root[data-theme="ganga-dawn"] body { background: #faf6ec; color: #2a1f10; }
:root[data-theme="ganga-dawn"] .site-header,
:root[data-theme="ganga-dawn"] .site-footer { background: #fffdf6; border-color: rgba(90, 60, 10, .15); }
:root[data-theme="ganga-dawn"] .card, :root[data-theme="ganga-dawn"] .kpi,
:root[data-theme="ganga-dawn"] .register-panel, :root[data-theme="ganga-dawn"] .pan-cell {
  background: #ffffff; border-color: rgba(90, 60, 10, .16);
  box-shadow: 0 2px 14px rgba(90, 60, 10, .07);
}
:root[data-theme="ganga-dawn"] .adm-wrap, :root[data-theme="ganga-dawn"] .dp-wrap { background: #ffffff; }
:root[data-theme="ganga-dawn"] input, :root[data-theme="ganga-dawn"] select, :root[data-theme="ganga-dawn"] textarea {
  background: #fffdf6 !important; color: #2a1f10 !important; border-color: rgba(90, 60, 10, .3) !important;
}
:root[data-theme="ganga-dawn"] .page-hero, :root[data-theme="ganga-dawn"] .cta-band { background: linear-gradient(180deg, #fdf3dd, #faf6ec); }
:root[data-theme="ganga-dawn"] .join-ribbon { background: #d97706; color: #fff; }
:root[data-theme="ganga-dawn"] .nav-more .drop { background: #fffdf6; border: 1px solid rgba(90, 60, 10, .2); }

/* ── 🧡 Kesar Prabhat — bright warm saffron-cream ── */
:root[data-theme="kesar-prabhat"] {
  --ink: #fff3e2; --ink-2: #fffaf2; --bg: #fff3e2;
  --text: #331d05; --text-dim: #59401d; --text-faint: #8a7050;
  --gold-pale: #9a5b00; --gold: #a86a00; --ganga: #8a3d00;
  --saffron: #ea580c; --saffron-deep: #c2410c;
  --line: rgba(120, 70, 10, .16); --line-strong: rgba(120, 70, 10, .34);
}
:root[data-theme="kesar-prabhat"] body { background: #fff3e2; color: #331d05; }
:root[data-theme="kesar-prabhat"] .site-header, :root[data-theme="kesar-prabhat"] .site-footer { background: #fffaf2; border-color: rgba(120, 70, 10, .18); }
:root[data-theme="kesar-prabhat"] .card, :root[data-theme="kesar-prabhat"] .kpi,
:root[data-theme="kesar-prabhat"] .register-panel, :root[data-theme="kesar-prabhat"] .pan-cell {
  background: #fffaf2; border-color: rgba(120, 70, 10, .2); box-shadow: 0 2px 14px rgba(150, 80, 10, .08);
}
:root[data-theme="kesar-prabhat"] .adm-wrap, :root[data-theme="kesar-prabhat"] .dp-wrap { background: #fffaf2; }
:root[data-theme="kesar-prabhat"] input, :root[data-theme="kesar-prabhat"] select, :root[data-theme="kesar-prabhat"] textarea {
  background: #fff !important; color: #331d05 !important; border-color: rgba(120, 70, 10, .35) !important;
}
:root[data-theme="kesar-prabhat"] .page-hero, :root[data-theme="kesar-prabhat"] .cta-band { background: linear-gradient(180deg, #ffe8c7, #fff3e2); }
:root[data-theme="kesar-prabhat"] .join-ribbon { background: #ea580c; color: #fff; }
:root[data-theme="kesar-prabhat"] .nav-more .drop { background: #fffaf2; border: 1px solid rgba(120, 70, 10, .25); }

/* ── 🌊 Triveni Ratri — deep blue night + silver-gold ── */
:root[data-theme="triveni-ratri"] {
  --ink: #050b1c; --ink-2: #0b1530; --bg: #050b1c;
  --text: #e9eefc; --text-dim: #b9c4e2; --text-faint: #7c89ad;
  --gold-pale: #ffe9a8; --gold: #e8c04c; --ganga: #7fd4e4;
  --saffron: #ffab40; --saffron-deep: #f57c00;
  --line: rgba(160, 190, 255, .12); --line-strong: rgba(160, 190, 255, .28);
}
:root[data-theme="triveni-ratri"] body { background: #050b1c; }

/* ── 🔱 Neelkanth — teal-slate + gold ── */
:root[data-theme="neelkanth"] {
  --ink: #061417; --ink-2: #0b2227; --bg: #061417;
  --text: #eaf6f4; --text-dim: #bcd8d3; --text-faint: #7fa39d;
  --gold-pale: #f4dc9a; --gold: #d9b64c; --ganga: #6fd8c8;
  --saffron: #ff9933; --saffron-deep: #e07b1f;
  --line: rgba(140, 220, 205, .12); --line-strong: rgba(140, 220, 205, .3);
}
:root[data-theme="neelkanth"] body { background: #061417; }

/* ── 🪷 Rudraksha — deep maroon-earth + gold ── */
:root[data-theme="rudraksha"] {
  --ink: #170807; --ink-2: #2a100e; --bg: #170807;
  --text: #f8ece6; --text-dim: #dcc2b6; --text-faint: #a5877b;
  --gold-pale: #f7dfa0; --gold: #e0b34e; --ganga: #e8a87c;
  --saffron: #ff8a3d; --saffron-deep: #d96820;
  --line: rgba(255, 170, 120, .12); --line-strong: rgba(255, 170, 120, .3);
}
:root[data-theme="rudraksha"] body { background: #170807; }

/* ── custom (user-mixed): four inline vars set by theme.js ── */
:root[data-theme="custom"] {
  --ink: var(--u-bg, #0d0819); --ink-2: var(--u-panel, #1b1130); --bg: var(--u-bg, #0d0819);
  --text: var(--u-text, #f2ead8); --text-dim: var(--u-text, #f2ead8); --text-faint: var(--u-text, #f2ead8);
  --saffron: var(--u-accent, #ff9933); --saffron-deep: var(--u-accent, #ff9933);
  --gold-pale: var(--u-accent, #f7dfa0); --gold: var(--u-accent, #e8b64c);
}
:root[data-theme="custom"] body { background: var(--u-bg, #0d0819); color: var(--u-text, #f2ead8); }
:root[data-theme="custom"] .card, :root[data-theme="custom"] .kpi, :root[data-theme="custom"] .pan-cell,
:root[data-theme="custom"] .register-panel { background: var(--u-panel, #1b1130); }

/* theme picker panel */
#kmg-theme-btn {
  position: fixed; bottom: 78px; right: 18px; z-index: 940;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 183, 77, .6);
  background: linear-gradient(160deg, #2a1740, #1b1130); color: #f7dfa0; font-size: 1.25rem;
  cursor: pointer; box-shadow: 0 4px 18px rgba(0, 0, 0, .4);
}
:root[data-theme="ganga-dawn"] #kmg-theme-btn, :root[data-theme="kesar-prabhat"] #kmg-theme-btn { background: #fff; color: #b45309; }
#kmg-theme-panel {
  position: fixed; bottom: 134px; right: 18px; z-index: 941; width: 270px;
  background: var(--ink-2, #1b1130); border: 1px solid var(--line-strong, rgba(255, 183, 77, .5));
  border-radius: 16px; padding: 16px; box-shadow: 0 10px 34px rgba(0, 0, 0, .5);
}
#kmg-theme-panel h4 { margin: 0 0 10px; font-size: .9rem; color: var(--gold-pale, #f7dfa0); }
.kmg-sw { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line, rgba(255,255,255,.12)); background: none; color: var(--text, #f2ead8); border-radius: 10px; padding: 8px 10px; margin: 4px 0; cursor: pointer; font-family: inherit; font-size: .82rem; text-align: left; }
.kmg-sw.on { border-color: var(--saffron, #ff9933); }
.kmg-sw i { width: 26px; height: 18px; border-radius: 5px; display: inline-block; border: 1px solid rgba(0, 0, 0, .25); }
.kmg-custom-row { display: flex; align-items: center; justify-content: space-between; font-size: .74rem; margin: 4px 0; }
.kmg-custom-row input[type="color"] { width: 42px; height: 26px; border: none; background: none; padding: 0; cursor: pointer; }

/* ── bright themes must also re-skin the ADMIN console surfaces
   (owner 2026-08-02: admin looked broken under a light theme) ── */
:root[data-theme="ganga-dawn"] .admin-tab,
:root[data-theme="kesar-prabhat"] .admin-tab { color: #4a3b24; }
:root[data-theme="ganga-dawn"] .admin-tab:hover,
:root[data-theme="kesar-prabhat"] .admin-tab:hover { border-color: rgba(120,70,10,.35); }
:root[data-theme="ganga-dawn"] .admin-tab.on,
:root[data-theme="kesar-prabhat"] .admin-tab.on { color: #fff; }
:root[data-theme="ganga-dawn"] table.adm td,
:root[data-theme="kesar-prabhat"] table.adm td { color: #3a2c14; }
:root[data-theme="ganga-dawn"] table.adm th,
:root[data-theme="kesar-prabhat"] table.adm th { color: #a4550a; border-bottom-color: rgba(120,70,10,.3); }
:root[data-theme="ganga-dawn"] #side-toggle,
:root[data-theme="kesar-prabhat"] #side-toggle { background: #fffdf6; color: #a4550a; border-color: rgba(120,70,10,.3); }
:root[data-theme="ganga-dawn"] #kmg-modal .box,
:root[data-theme="kesar-prabhat"] #kmg-modal .box { background: #fffdf6; color: #2a1f10; border-color: rgba(120,70,10,.35); }
:root[data-theme="ganga-dawn"] .chat-msg,
:root[data-theme="kesar-prabhat"] .chat-msg { background: rgba(120,70,10,.05); }
:root[data-theme="ganga-dawn"] .grid-tools input,
:root[data-theme="kesar-prabhat"] .grid-tools input { background: #fff !important; }
/* the language pill in the admin nav needs the light treatment too */
:root[data-theme="ganga-dawn"] #kmg-lang,
:root[data-theme="kesar-prabhat"] #kmg-lang { background: #fffdf6; color: #a4550a; border-color: rgba(120,70,10,.35); }
