/* ============================================================================
   Top Growth Marketing brand palette — user-facing pages only.

   Colours are sampled from the live corporate site (topgrowthmarketing.com),
   which is a three-tone system rather than a single-colour one:
     sage green   #7AA57B   primary   — header bar, section bands, links
     deep teal    #163334   anchor    — body text, dark bands, footer
     warm gold    #F5C848   emphasis  — VIP, rewards, points, active tab
     mid green    #3E615B   hover/pressed state

   HOW THE THREE TONES ARE ASSIGNED
   --------------------------------
   Green carries the structural UI (buttons, links, progress, states) so the
   product reads as one coherent brand. Teal anchors it — all body text and the
   dark chrome. Gold is reserved for *value* moments: VIP, rewards, points,
   certificates and the selected tab. Using gold for everything would flatten
   the hierarchy and, at #F5C848, would fail contrast behind white text, so it
   is never a background for body copy.

   WHY A SEPARATE FILE AND NOT AN EDIT TO index-fc62c6f2.css
   --------------------------------------------------------
   That stylesheet is a compiled Vite/Tailwind build. Editing it in place works
   but is lost the moment the bundle is regenerated. More importantly the app is
   already *variable driven*:

       :root { --main-color: #30c2df; ... }
       .bg-main   { background-color: var(--main-color) }
       .text-main { color: var(--main-color) }

   and the SPA wires Vant's design tokens to the same variable:

       themeVars: { "primary-color": "var(--main-color)",
                    "button-primary-background": "var(--main-color)", ... }

   So reassigning the handful of custom properties re-themes every Vant button,
   tab, checkbox, radio, spinner and switch at once. Only a few *arbitrary*
   Tailwind classes (text-[#30c2df]) and the tab bar colour are hard-coded, and
   they are overridden explicitly below.

   This file is loaded from includes/header.php, which is the USER shell. The
   admin panel has its own header (admin/includes/header.php) and its own
   AdminLTE stylesheet, so it is deliberately untouched by any of this.
   ========================================================================== */

:root {
  /* ---- brand tokens (the only values that need editing to re-brand) ------
     The reference site is a THREE-tone system, and the three tones do
     different jobs. Keeping the roles explicit is what stops the palette from
     turning into "everything is green":

       GREEN  = the primary, calm, structural colour. Navigation, buttons,
                links, active states, progress. Most of the UI.
       TEAL   = the anchor. Body text, dark bands, header and tab bar. Gives
                the green something to sit against.
       GOLD   = emphasis. Rewards, VIP, points, certificates, earnings and
                other "value" moments. Used sparingly so it still reads as a
                highlight.
     ---------------------------------------------------------------------- */
  --tg-green:        #7AA57B;   /* primary            */
  --tg-green-dark:   #3E615B;   /* hover / pressed    */
  --tg-green-light:  #7CC68D;   /* on-dark accent     */
  --tg-teal:         #163334;   /* anchor / text      */
  --tg-teal-soft:    #26476C;   /* secondary text     */
  --tg-gold:         #F5C848;   /* emphasis           */
  --tg-gold-dark:    #E8B84B;   /* emphasis hover     */
  --tg-gold-deep:    #7A5A12;   /* gold text on light — 6.4:1, readable */
  --tg-tint:         #F4F8F4;
  --tg-tint-2:       #E8ECE6;

  /* ---- the app's own theme hooks ---------------------------------------- */
  --main-color:      var(--tg-green);
  --primary-color:   var(--tg-green-dark);
  --header-bg:       var(--tg-teal);
  --menu-bg:         var(--tg-green);
  --menu-color:      #FFFFFF;

  /* ---- Vant design tokens ------------------------------------------------
     The bundle only remaps primary-color; the rest of Vant still resolves
     through --van-blue, so retint the blue ramp too or a stray component
     (links, checked icons, tags) would stay cyan-blue.                     */
  --van-blue:              var(--tg-green);
  --van-primary-color:     var(--tg-green);
  --van-link-color:        var(--tg-green-dark);
  --van-success-color:     var(--tg-green);
  --van-danger-color:      #E05252;
  --van-text-color:        var(--tg-teal);
  --van-text-color-2:      #4A6362;

  /* ---- semantic aliases used by the new support buttons ------------------ */
  --tg-livechat:  #2E8B8B;
  --tg-whatsapp:  #25D366;
  --tg-telegram:  #2AABEE;
  --tg-email:     #C0563F;

  /* ------------------------------------------------------------------------
     LOGO VISIBILITY
     ------------------------------------------------------------------------
     History, because this is easy to get wrong again:

     The ORIGINAL bundled logo was a WHITE mark on transparency (average
     luminance 241/255). Every user-facing surface is light, so it measured
     1.00:1 and was invisible on /login, /register, /start, /home, /contact and
     the rest. A temporary CSS filter retinted it to brand teal as a stopgap.

     The client has now supplied a proper DARK logo — a 364x85 transparent PNG
     averaging luminance 98, with the mark in brand green (#7AA67C) and the
     wordmark in near-black (#3E3E3E). It is legible on light backgrounds by
     itself, so the filter is DISABLED.

     Do not re-enable this filter while a dark logo is installed: `brightness(0)`
     flattens the whole image to one colour and would destroy the green mark.
     Only switch it back on if the logo is ever replaced with a light/white one.
     ---------------------------------------------------------------------- */
  --tg-logo-fix: none;
}

/*
 * Logo retint hook — inert today.
 *
 * `--tg-logo-fix` is `none` because both logo variants are now supplied as real
 * assets, and the correct one is chosen per surface (see the note above). This
 * rule is kept only so a future light-on-light regression can be corrected by
 * changing that single custom property.
 *
 * NOTE: no per-surface logo swapping happens here on purpose. The app already
 * splits the two cases in the right place, with no CSS trickery:
 *
 *   post-login header  -> hardcoded "png/logo-5c00e766.png"  (white asset)
 *   login/register/start -> website.logo setting             (dark asset)
 *
 * Doing the swap in CSS would have required overriding `content:` on an <img>,
 * which paints over the element and can break its intrinsic sizing.
 */
img[src*="logo" i] {
  filter: var(--tg-logo-fix);
}

/* ============================================================================
   1. Hard-coded accents in the compiled markup.
   These are Tailwind arbitrary-value classes baked into the JS bundles, so a
   custom property cannot reach them. Selectors mirror Tailwind's own escaping.
   ========================================================================== */

/* Home: section labels / service headings were the old cyan. */
.text-\[\#30c2df\] {
  color: var(--tg-green) !important;
}

/* Home: the dark band under the services list was neutral grey #54595F. */
.bg-\[\#54595F\] {
  background-color: var(--tg-teal) !important;
}

/* Order page: item headings were a mid petrol blue. */
.text-\[\#307087\] {
  color: var(--tg-teal-soft) !important;
}

/* Gift records: "shipped" status chip was a saturated blue. */
.bg-\[\#2027cb\] {
  background-color: var(--tg-green-dark) !important;
}

/* Assorted light-blue text used on dark panels. */
.text-\[\#5faaff\] {
  color: var(--tg-green-light) !important;
}

/* Support dialog: row label was a desaturated slate that clashed with the new
   green; align it with the body colour. */
.text-\[\#3b4a48\] {
  color: var(--tg-teal) !important;
}

/* ============================================================================
   2. Decorative gradients that carried the old cyan.
   ========================================================================== */

/* "WHAT WE DO"-style title, was #7847f6 -> #15f0d9 (purple to cyan). */
.text-grid-title {
  background-image: linear-gradient(to right, var(--tg-teal) 0%, var(--tg-green) 100%) !important;
}

/* Outlined gradient pill, was #ff8042 -> #a5dbff (orange to ice blue). */
.grad-button::before {
  background: linear-gradient(90deg, var(--tg-yellow) 0%, var(--tg-green) 100%) !important;
}

/* ============================================================================
   3. Tab bar.
   The SPA sets background/indicator colours INLINE via Vant's themeVars
   (`tabbar-background: "#26262C"`), which sits above any normal stylesheet
   rule. An `!important` declaration in an author stylesheet is the only thing
   that outranks a non-important inline style, so these are pinned explicitly.
   ========================================================================== */

.van-tabbar {
  background-color: var(--tg-teal) !important;
}

.van-tabbar-item {
  color: rgba(255, 255, 255, 0.72) !important;
}

/*
 * Tab bar: every item is WHITE; selection is shown by weight, not by hue.
 *
 * Before this, the active item was gold (label) while its icon was a raster that
 * could not be tinted from CSS — so the selected tab showed a green icon over a
 * gold label and looked broken. All three icons are now white artwork, so the
 * label colour is the only thing left to align.
 *
 * Using full white for every label (rather than 72% for inactive) removes the
 * mismatch the client noticed between Home and Records. Vant already applies
 * font-weight:700 to .van-tabbar-item--active, so the selected tab still reads as
 * selected.
 */
.van-tabbar-item,
.van-tabbar-item .van-tabbar-item__text {
  color: #FFFFFF !important;
}

.van-tabbar-item--active,
.van-tabbar-item--active .van-tabbar-item__text {
  color: #FFFFFF !important;
}

/* Swipe pager indicator, was #8DAAC4 set inline by themeVars. */
.van-swipe__indicator {
  background-color: var(--tg-tint-2) !important;
}

.van-swipe__indicator--active {
  background-color: var(--tg-green) !important;
}

/* ============================================================================
   4. Small readability corrections that follow from the retint.
   ========================================================================== */

/* Vant paints primary buttons white-on-primary. Sage green at this lightness
   gives ~3.6:1 against white, which is acceptable for bold/large text and for
   the button labels used here, but keep the weight so it stays legible. */
.van-button--primary {
  font-weight: 600;
}

/* --- gold as an emphasis colour ------------------------------------------
 * Vant's warning palette is the closest thing the app has to an "emphasis"
 * token, and several screens (VIP, gifts, awards) already use it for exactly
 * that. Map it to the brand gold so those moments match the reference instead
 * of showing an unrelated amber. Text on gold is always the deep teal, never
 * white: gold is far too light to carry white legibly.
 * ------------------------------------------------------------------------ */
.van-tag--warning,
.van-tag--warning .van-tag__text {
  background-color: var(--tg-gold) !important;
  color: var(--tg-teal) !important;
  font-weight: 600;
}

.van-notice-bar--warning,
.van-notice-bar--warning .van-notice-bar__wrap {
  color: var(--tg-gold-deep) !important;
}

/* Emphasis text that should read as gold on a light background needs the dark
   gold, because #F5C848 on white is only 1.7:1 and would be unreadable. */
.tg-gold-text {
  color: var(--tg-gold-deep) !important;
}

/*
 * Header "Contact" pill -> GOLD.
 *
 * It is the only call-to-action in the dark header, and green on teal was low
 * contrast (4.8:1 against the surrounding bar with a white label on top of it,
 * which left the pill barely separated from the header). Gold reads as the one
 * thing to click.
 *
 * The label must go to the deep teal: white on #F5C848 is only 1.7:1 and fails
 * WCAG, whereas #163334 on gold is 12.3:1.
 *
 * Scoped to the header bar ([class*="54595F"]) so this cannot leak into the
 * Contact PAGE tiles, which use .bg-main deliberately and sit on a light card.
 */
[class*="54595F"] .bg-main {
  background-color: var(--tg-gold) !important;
}

[class*="54595F"] .bg-main > * {
  color: var(--tg-teal) !important;
  font-weight: 600;
}

/* NProgress bar already reads var(--main-color); nothing to override. */

/* ============================================================================
   Withdrawal Information — hide the redundant "Withdrawal Type" dropdown.
   ----------------------------------------------------------------------------
   The form has two tabs that already collect everything needed to identify the
   destination:

       Bank Card      -> Bank Name, Branch, Account Number, Account Holder
       Mobile Wallet  -> Wallet Name (e.g. bitcoin, USDT TRC-20), Wallet Address

   The extra "Withdrawal Type" dropdown only listed a couple of unrelated options
   (USDT TRC-20, PayPal) and duplicated the choice the tab already made, so users
   were picking a "type" that contradicted the tab they were on — and its value
   was the only thing feeding `kindId`, which then made a wallet submission fail
   with a *bank* validation error.

   The API now infers the kind from the fields that were actually filled, so this
   control is no longer read and can be removed from the UI.

   Targeted via the `van-field` that WRAPS the dropdown, not by element position
   and not by `.pt-4 > …`: Vant nests the menu several levels deep
   (van-cell > van-cell__value > van-field__body > van-field__control), so a
   direct-child selector silently matches nothing.
   ========================================================================== */
.van-field:has(> .van-field__body > .van-field__control > .van-dropdown-menu) {
  display: none !important;
}

/* Fallback for browsers without :has() — the dropdown's own bar is unique here. */
.van-dropdown-menu {
  display: none !important;
}

/* If the menu had been opened, Vant leaves a floating panel behind. */
.van-dropdown-item {
  display: none !important;
}
