/* ==========================================================================
   Design engine: variants selected in Admin > Design Templates
   Loaded after app.css. Colours come from CSS variables printed per design
   (core/config/designs.php); layout options come from body classes:
     theme-light | theme-dark
     hero--split | hero--center | hero--band
     auth--split | auth--side | auth--card
     sidebar--plain | sidebar--brand | sidebar--contrast
     cards--border | cards--shadow
     buttons--rounded | buttons--pill | buttons--square
   ========================================================================== */

/* ---------- Text on accent colours (black or white, picked per design) ---------- */
.btn-primary, .cmn-btn, .btn--primary, .btn-accent, .btn-gradient,
.page-item.active .page-link, .topbar__balance a, .socials a:hover, .balance-card .btn-white,
.cta-band .btn, .about-img__play, .bottom-nav a.bottom-nav__cta i { color: var(--on-accent) !important; }
::selection { color: var(--on-accent); }

/* ---------- Light mode ---------- */
.theme-light { color-scheme: light; }
.theme-light .form-control::placeholder,
.theme-light .contact-form input::placeholder,
.theme-light .contact-form textarea::placeholder { color: #9aa1ac; }
.theme-light .table tbody tr:hover { background: rgba(0, 0, 0, .02); }
.theme-light .sidebar__label { color: var(--muted); }
.theme-light .crumbs li + li::before { color: var(--border); }
.theme-light .alert-danger { color: #b42318; }
.theme-light .alert-success { color: #067647; }
.theme-light .alert-warning { color: #93370d; }
.theme-light .btn-secondary:hover, .theme-light .btn-ghost:hover, .theme-light .btn-light:hover { color: var(--text) !important; }
.theme-light .modal-backdrop.show { opacity: .45; }
.theme-light ::-webkit-scrollbar-track { background: var(--bg); }
.theme-light .stat__icon { background: rgba(var(--accent-rgb), .1); }
.theme-light .pill--muted, .theme-light .badge-dark, .theme-light .badge-secondary { background: var(--surface-3); color: var(--text-2); }
.theme-light select.form-control option { background: #fff; }
.theme-light .gw-card__logo { border: 1px solid var(--border-soft); }
.theme-light .design-preview-bar { box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }

/* ---------- Card styles ---------- */
.cards--shadow .card, .cards--shadow .m-card, .cards--shadow .stat, .cards--shadow .ad-card, .cards--shadow .gw-card,
.cards--shadow .plan-card, .cards--shadow .earn-card, .cards--shadow .post-card, .cards--shadow .quote-card,
.cards--shadow .counter-box, .cards--shadow .faq-item, .cards--shadow .bonus-hero, .cards--shadow .quick-action {
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
}
.cards--shadow .balance-card, .cards--shadow .ref-hero, .cards--shadow .bonus-banner, .cards--shadow .contest-hero {
  border-top-color: transparent; border-right-color: transparent; border-bottom-color: transparent;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
}
.cards--shadow .plan-card--featured { border-color: var(--accent); }
.theme-dark.cards--shadow .m-card, .theme-dark.cards--shadow .stat { box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }

/* ---------- Button shapes ---------- */
.buttons--pill .btn, .buttons--pill .cmn-btn, .buttons--pill .seg, .buttons--pill .seg a { border-radius: 999px; }
.buttons--pill .btn-icon { border-radius: 50%; }
.buttons--square .btn, .buttons--square .cmn-btn { border-radius: 4px; }
.buttons--square .form-control, .buttons--square .input-group-text { border-radius: 4px; }

/* ---------- Sidebar styles ---------- */
.sidebar--brand .sidebar { background: var(--accent); border-right: 0; }
.sidebar--brand .sidebar__brand { border-bottom-color: rgba(255, 255, 255, .16); }
.sidebar--brand .sidebar .brand,
.sidebar--brand .sidebar__link,
.sidebar--brand .sidebar__link i,
.sidebar--brand .sidebar__label { color: var(--on-accent); }
.sidebar--brand .sidebar__link { opacity: .85; }
.sidebar--brand .sidebar__label { opacity: .6; }
.sidebar--brand .sidebar__link:hover { background: rgba(255, 255, 255, .14); opacity: 1; color: var(--on-accent); }
.sidebar--brand .sidebar__link:hover i { color: var(--on-accent); }
.sidebar--brand .sidebar__link.active { background: rgba(255, 255, 255, .22); opacity: 1; color: var(--on-accent); }
.sidebar--brand .sidebar__link.active i { color: var(--on-accent); }
.sidebar--brand .sidebar__link.active::before { background: var(--on-accent); }
.sidebar--brand .sidebar__promo { background: rgba(255, 255, 255, .14); border: 0; }
.sidebar--brand .sidebar__promo h6, .sidebar--brand .sidebar__promo p { color: var(--on-accent); }
.sidebar--brand .sidebar__promo .btn { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent) !important; }
.sidebar--brand .sidebar .pill { background: rgba(255, 255, 255, .24); color: var(--on-accent); }

.sidebar--contrast .sidebar { background: #111827; border-right: 0; }
.sidebar--contrast .sidebar__brand { border-bottom-color: #1f2937; }
.sidebar--contrast .sidebar .brand { color: #f9fafb; }
.sidebar--contrast .sidebar__link { color: #cbd5e1; }
.sidebar--contrast .sidebar__link i { color: #94a3b8; }
.sidebar--contrast .sidebar__link:hover,
.sidebar--contrast .sidebar__link.active { background: #1f2937; color: #fff; }
.sidebar--contrast .sidebar__link.active i { color: var(--accent); }
.sidebar--contrast .sidebar__label { color: #64748b; }
.sidebar--contrast .sidebar__promo { background: #1f2937; border: 0; border-left: 3px solid var(--accent); }
.sidebar--contrast .sidebar__promo h6 { color: #f9fafb; }
.sidebar--contrast .sidebar__promo p { color: #cbd5e1; }

/* ---------- Hero layouts ---------- */
.hero__art { position: relative; }
.hero__art .illustration { width: 100%; height: auto; max-width: 560px; display: block; margin-left: auto; }

.hero--center .hero .row { flex-direction: column; text-align: center; }
.hero--center .hero__text { max-width: 780px; margin: 0 auto; padding-right: 15px !important; flex: 0 0 auto; }
.hero--center .hero__cta, .hero--center .hero__checks, .hero--center .hero__trust { justify-content: center; }
.hero--center .hero__sub { margin-left: auto; margin-right: auto; }
.hero--center .hero__art { flex: 0 0 auto; width: 100%; max-width: 620px; margin: 2.5rem auto 0; }
.hero--center .hero__art .illustration { margin: 0 auto; }

.hero--band .hero { background: var(--accent); border-bottom: 0; }
.hero--band .site-header:not(.scrolled):not(.open) .brand,
.hero--band .site-header:not(.scrolled):not(.open) .site-nav__menu a { color: var(--on-accent); }
.hero--band .site-header:not(.scrolled):not(.open) .site-nav__menu a:hover,
.hero--band .site-header:not(.scrolled):not(.open) .site-nav__menu a.active { background: rgba(255, 255, 255, .16); color: var(--on-accent); }
.hero--band .site-header:not(.scrolled):not(.open) .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .55); color: var(--on-accent) !important; }
.hero--band .site-header:not(.scrolled):not(.open) .btn-primary { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent) !important; }
.hero--band .site-header:not(.scrolled):not(.open) .lang-select { background-color: rgba(255, 255, 255, .14) !important; border-color: rgba(255, 255, 255, .35) !important; color: var(--on-accent) !important; }
.hero--band .hero__title, .hero--band .hero__sub, .hero--band .hero__checks, .hero--band .hero__checks i,
.hero--band .hero__trust-item strong, .hero--band .hero__trust-item span, .hero--band .hero .eyebrow { color: var(--on-accent); }
.hero--band .hero__sub, .hero--band .hero__trust-item span, .hero--band .hero .eyebrow { opacity: .85; }
.hero--band .hero .btn-primary { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent) !important; }
.hero--band .hero .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .55); color: var(--on-accent) !important; }
.hero--band .hero .illustration .il-accent-soft { fill: rgba(255, 255, 255, .13); }
.hero--band .hero .illustration .il-accent2-soft { fill: rgba(255, 255, 255, .1); }

/* ---------- Illustration palette ---------- */
.illustration .il-accent { fill: var(--accent); }
.illustration .il-accent-soft { fill: rgba(var(--accent-rgb), .1); }
.illustration .il-accent-soft2 { fill: rgba(var(--accent-rgb), .32); }
.illustration .il-accent2 { fill: var(--accent-2); }
.illustration .il-accent2-dark { fill: var(--accent-2); filter: brightness(.78); }
.illustration .il-accent2-light { fill: var(--accent-2); filter: brightness(1.12); }
.illustration .il-accent2-soft { fill: rgba(var(--accent-2-rgb), .16); }
.illustration .il-on-accent { fill: var(--on-accent); }
.illustration .il-on-accent-soft { fill: var(--on-accent); opacity: .45; }
.illustration .il-on-accent2 { fill: var(--on-accent-2); }
.illustration .il-ink { fill: #1f2430; }
.illustration .il-surface { fill: var(--surface); }
.illustration .il-surface-2 { fill: var(--surface-2); }
.illustration .il-stroke { stroke: var(--border); stroke-width: 1.5; }
.illustration .il-text { fill: var(--text); }
.illustration .il-muted { fill: var(--muted); }
.illustration .il-muted-soft { fill: var(--muted); opacity: .45; }
.illustration .il-success { fill: var(--success); }
.illustration .il-check { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
/* wallet illustration on a normal surface */
.illustration .il-panel-soft { fill: rgba(var(--accent-rgb), .1); }
.illustration .il-panel-dot { fill: var(--accent); }
.illustration .il-panel-dark { fill: var(--accent); filter: brightness(.72); }
.illustration .il-panel-mid { fill: var(--accent); }
.illustration .il-panel-card { fill: var(--accent-2); }
.illustration .il-panel-line { fill: var(--on-accent); opacity: .55; }
/* ...and on the coloured auth side panel */
.auth__side .illustration .il-panel-soft { fill: rgba(255, 255, 255, .12); }
.auth__side .illustration .il-panel-dot { fill: var(--on-accent); opacity: .7; }
.auth__side .illustration .il-panel-dark { fill: rgba(0, 0, 0, .28); filter: none; }
.auth__side .illustration .il-panel-mid { fill: var(--on-accent); opacity: .95; }
.auth__side .illustration .il-panel-line { fill: var(--accent); opacity: .5; }

/* ---------- Auth layouts ---------- */
.auth__side { background: var(--accent); border-right: 0; }
.auth__side h2, .auth__side p, .auth__side .brand, .auth__perks li, .auth__copy { color: var(--on-accent); }
.auth__side p, .auth__copy { opacity: .85; }
.auth__perks i { background: rgba(255, 255, 255, .18); color: var(--on-accent); }
.auth__art { max-width: 360px; margin: 1.5rem 0 2rem; }
.auth__art .illustration, .auth__box-art .illustration { width: 100%; height: auto; display: block; }
.auth__main { background: var(--bg); }
.auth__box-head { display: none; }
.auth--side .auth__side { order: 2; }
.auth--side .auth__main { order: 1; }

.auth--card .auth { grid-template-columns: 1fr; }
.auth--card .auth__side { display: none; }
.auth--card .auth__main { padding: 3rem 1rem; }
.auth--card .auth__box { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 2.25rem; max-width: 480px; }
.auth--card .auth__box--wide { max-width: 640px; }
.auth--card.cards--shadow .auth__box { border-color: transparent; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 36px rgba(16, 24, 40, .1); }
.auth--card .auth__box-head { display: flex; flex-direction: column; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.auth--card .auth__box-art { width: 170px; }
.auth--card .auth__box h3, .auth--card .auth__box > p { text-align: center; }
@media (max-width: 991px) {
  .auth__box-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
  .auth__box-art { width: 110px; }
  .auth--card .auth__box { padding: 1.5rem; }
}

/* ---------- About section illustration ---------- */
.about-art { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 2rem; }
.cards--shadow .about-art { border-color: transparent; box-shadow: 0 6px 20px rgba(16, 24, 40, .06); }
.about-art .illustration { width: 100%; height: auto; display: block; }

/* ---------- Admin design preview bar ---------- */
.design-preview-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2000; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; padding: .65rem .75rem .65rem 1.1rem; border-radius: 10px; background: #111827; color: #e5e7eb; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); max-width: calc(100% - 24px); }
.design-preview-bar strong { color: #fff; }
.design-preview-bar__actions { display: flex; gap: .5rem; }
.design-preview-bar__actions a { padding: .4rem .8rem; border-radius: 6px; background: #374151; color: #fff; font-weight: 600; font-size: 13px; }
.design-preview-bar__actions a:first-child { background: var(--accent); color: var(--on-accent); }
@media (max-width: 767px) { .design-preview-bar { bottom: 84px; } }

/* ---------- Payout proof ---------- */
.payout-list { display: flex; flex-direction: column; }
.payout-row { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border-soft); }
.payout-row:last-child { border-bottom: 0; }
.payout-row__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--success-rgb), .14); color: var(--success); font-size: 18px; flex-shrink: 0; }
.payout-row__who { flex: 1; min-width: 0; }
.payout-row__who strong { display: block; color: var(--text); font-size: 14.5px; }
.payout-row__who small, .payout-row__amount small { color: var(--muted); font-size: 12.5px; }
.payout-row__amount { text-align: right; white-space: nowrap; }
.payout-row__amount strong { display: block; color: var(--success); font-size: 15px; }
.payouts-home .m-card { max-width: 760px; }

/* Logo wordmark on a coloured header/sidebar: plain text so it stays readable on every design */
.hero--band .site-header:not(.scrolled):not(.open) .brand__tail { color: inherit; opacity: .85; }
.hero--band .site-header:not(.scrolled):not(.open) .brand__mark { background: var(--on-accent); color: var(--accent); }
