/* MysteryShopper shared palette. body.light follows the existing saved preference. */
:root {
    --site-green: #00dc82;
    --site-green-hover: #00c574;
    --site-bg: #111c2e;
    --site-surface: #1a2a40;
    --site-input: #142238;
    --site-border: #425a77;
    --site-text: #f1f5f9;
    --site-muted: #bdccde;
    --site-accent: #00dc82;
    --site-hero: linear-gradient(120deg, #243f51, #1a2a40, #142238);
}
body.site-theme.light {
    --site-bg: #f3f6fc;
    --site-surface: #ffffff;
    --site-input: #f6f9fc;
    --site-border: #dce4ee;
    --site-text: #142039;
    --site-muted: #52627a;
    --site-accent: #087f46;
    --site-hero: linear-gradient(120deg, #edf9f2, #f5f8fc);
}
body.site-theme,
body.site-theme.light {
    --bg: var(--site-bg);
    --bg-soft: var(--site-surface);
    --card: var(--site-surface);
    --card-strong: var(--site-input);
    --line: var(--site-border);
    --text: var(--site-text);
    --muted: var(--site-muted);
    --green: var(--site-green);
    --green-dark: var(--site-green-hover);
    --company-accent: var(--site-accent);
    --company-primary-background: var(--site-green);
    --company-primary-text: #04120b;
    background: var(--site-bg);
    color: var(--site-text);
    color-scheme: dark;
}
body.site-theme.light { color-scheme: light; }
.site-theme .topbar,
.site-theme .mobile-nav { background: var(--site-surface); border-color: var(--site-border); }
.site-theme .hero { background: var(--site-hero); }
.site-theme .hero::before { background: transparent; }
.site-theme .glow-one { background: #0e2238; }
.site-theme .glow-two { background: var(--site-green); }
.site-theme .wallet-main-card,
.site-theme .wallet-stat-card,
.site-theme .wallet-panel,
.site-theme .notifications-card,
.site-theme .card { background: var(--site-surface); border-color: var(--site-border); }
.site-theme .wallet-page { color: var(--site-text); }
.site-theme .primary-button,
.site-theme .profile-save-button,
.site-theme .site-primary-button,
.site-theme .btn-primary { background: var(--site-green) !important; color: #04120b !important; }
.site-theme .primary-button:hover,
.site-theme .profile-save-button:hover,
.site-theme .site-primary-button:hover,
.site-theme .btn-primary:hover { background: var(--site-green-hover) !important; }
.site-theme :is(input, select, textarea):focus-visible { outline-color: var(--site-accent); }
.site-theme input[type="checkbox"] { accent-color: var(--site-accent); }
.site-theme.light .brand span span {
    color: #00dc82;
}

.site-theme.light .desktop-nav a.active,
.site-theme.light .desktop-nav a:hover,
.site-theme.light .mobile-nav a.active,
.site-theme.light .mobile-nav a:hover {
    color: var(--site-accent);
}
/* Tailwind layout colors, including login/reset/register and the legacy app shell. */
.site-tailwind-theme .bg-white,
.site-tailwind-theme .bg-gray-50,
.site-tailwind-theme .bg-gray-100 { background-color: var(--site-surface); }
.site-tailwind-theme :is(.text-white,.text-gray-900,.text-gray-800,.text-gray-700) { color: var(--site-text); }
.site-tailwind-theme :is(.text-gray-600,.text-gray-500,.text-gray-400,.text-gray-300) { color: var(--site-muted); }
.site-tailwind-theme :is(.border-gray-100,.border-gray-200,.border-gray-300) { border-color: var(--site-border); }
.site-tailwind-theme input:not([type="checkbox"]):not([type="radio"]),
.site-tailwind-theme select,
.site-tailwind-theme textarea { background: var(--site-input); color: var(--site-text); border-color: var(--site-border); }
.site-tailwind-theme .bg-red-600 { color: #ffffff; }
.site-theme .how,
.site-theme .referral { background: var(--site-hero); }
.site-theme .mini-icon { background: rgba(0,220,130,.15); }
.site-theme .button-primary,
.site-theme .primary { background: var(--site-green); color: #04120b; }
.site-theme .button-primary:hover,
.site-theme .primary:hover { background: var(--site-green-hover); }
.site-theme { --purple: var(--site-accent); }

/* The dashboard hero is also a .card: keep the hero treatment after generic cards. */
body.site-theme .hero.card { background: var(--site-hero); }
body.site-theme .brand { color: var(--site-text); }
body.site-theme .brand span span { color: #00dc82; }
body.site-theme .hero h1,
body.site-theme .balance-card,
body.site-theme .balance-card strong { color: var(--site-text); }
body.site-theme .balance-card > span { color: var(--site-muted); }

/* Admin contrast tokens adapted from the supplied admin design reference.
   Use the application's existing body.light switch for both palettes. */
body.site-theme {
    --admin-bg-body: var(--site-bg);
    --admin-bg-sidebar: #0a1324;
    --admin-bg-card: #0c172c;
    --admin-bg-input: #070e1c;
    --admin-border: #14233c;
    --admin-text-main: #f8fafc;
    --admin-text-muted: #94a3b8;
    --admin-primary: #00dc82;
    --admin-active-bg: rgba(0,220,130,.12);
}
body.site-theme.light {
    --admin-bg-sidebar: #ffffff;
    --admin-bg-card: #ffffff;
    --admin-bg-input: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text-main: #0f172a;
    --admin-text-muted: #64748b;
    --admin-primary: #059669;
    --admin-active-bg: rgba(5,150,105,.08);
}
body.site-theme .admin-layout { background: var(--admin-bg-body); color: var(--admin-text-main); }
body.site-theme .admin-sidebar { background: var(--admin-bg-sidebar); border-color: var(--admin-border); }
body.site-theme .admin-brand,
body.site-theme .admin-brand > span { color: var(--admin-text-main); }
body.site-theme .admin-brand .product-name {
    color: var(--site-text) !important;
}
body.site-theme .admin-sidebar-nav a { color: var(--admin-text-muted); }
body.site-theme .admin-sidebar-nav a:hover,
body.site-theme .admin-sidebar-nav a.active { background: var(--admin-active-bg); color: var(--admin-primary); border-color: var(--admin-primary); }
body.site-theme .admin-main-content .wallet-stat-card,
body.site-theme .admin-main-content .wallet-panel { background: var(--admin-bg-card); border-color: var(--admin-border); color: var(--admin-text-main); }
body.site-theme .admin-table td { color: var(--admin-text-main); border-color: var(--admin-border); }
body.site-theme .admin-table th { background: var(--admin-bg-input); color: var(--admin-text-muted); border-color: var(--admin-border); }
body.site-theme .admin-provider-field input,
body.site-theme .admin-provider-field select,
body.site-theme .admin-provider-field textarea { background: var(--admin-bg-input); color: var(--admin-text-main); border-color: var(--admin-border); }
body.site-theme .admin-provider-field :is(input,select,textarea):focus { border-color: var(--admin-primary); }

/* Shared product identity and compact desktop header. */
.site-theme :is(.brand,.admin-brand,.portal-brand) { display:flex; align-items:center; gap:8px; min-width:0; }
.site-theme :is(.brand,.admin-brand,.portal-brand) img { width:84px; height:56px; object-fit:contain; flex:0 0 auto; border-radius:8px; }
.site-theme .product-name, .site-theme .portal-brand strong { font-size:15px; white-space:nowrap; color:var(--site-text); }
.site-theme:not(.light) :is(.panel,.wallet-panel,.card,.portal-header) { box-shadow:0 0 20px rgba(0,220,130,.045); }
.site-theme :is(input,select,textarea):focus-visible { outline:2px solid var(--site-accent); outline-offset:2px; }
.site-theme .portal-header { gap:12px; }
.site-theme .portal-header nav { min-width:0; gap:8px; align-items:center; }
.site-theme .portal-header nav > a, .site-theme .portal-header nav button { white-space:nowrap; }
@media(min-width:1200px) {
 .site-theme .portal-header { flex-wrap:nowrap; }
 .site-theme .portal-header nav { flex-wrap:nowrap; font-size:13px; }
 .site-theme .topbar { flex-wrap:nowrap; gap:12px; }
 .site-theme .desktop-nav { min-width:0; gap:14px; }
 .site-theme .desktop-nav a { white-space:nowrap; font-size:13px; }
 .site-theme .top-actions { flex-shrink:0; }
}
@media(max-width:700px) {
 .site-theme .portal-header { align-items:flex-start; flex-wrap:wrap; }
 .site-theme .portal-header nav { flex-wrap:wrap; }
 .site-theme :is(.brand,.admin-brand,.portal-brand) img { width:66px; height:44px; }
 .site-theme .product-name { font-size:13px; }
}

.site-theme .admin-brand { flex-direction:column; align-items:flex-start; gap:4px; }
@media(min-width:1200px) { .site-theme .portal-header nav > a:not(.icon-button) { padding:6px 7px; } }
