/* =========================================================================
   VOLTERA GLOBAL — MOBILE-APP DESIGN SYSTEM  (voltera-app.css)
   =========================================================================
   Native-app-style shell + components for the user & admin panels.
   Everything is namespaced under .vg- so it CANNOT collide with the legacy
   bootstrap / AdminLTE CSS that loads BEFORE this file.

   -------------------------------------------------------------------------
   HOW TO LOAD (put these in <head>, AFTER all bootstrap/adminlte CSS):

     <link rel="stylesheet" href="<?php echo base_url('public/user_assets/icons/bootstrap-icons/font/bootstrap-icons.css'); ?>">
     <link rel="stylesheet" href="<?php echo base_url('front_assets/styles/voltera-app.css'); ?>">

   And before </body>:

     <script src="<?php echo base_url('front_assets/script/voltera-app.js'); ?>"></script>

   -------------------------------------------------------------------------
   !! DO NOT load front_assets/styles/voltera.css on panel pages !!
   That file is the MARKETING homepage stylesheet. It carries a global
   `* { margin:0; padding:0 }` reset plus its own `.btn`, `.container` and
   `.section-title` rules which WOULD collide with bootstrap and visually
   break every panel page. This file re-exposes voltera.css's brand tokens
   (same hex values, verbatim) so the panels match the homepage without
   inheriting its reset. Tokens below resolve from voltera.css when it IS
   present and fall back to the identical literal otherwise.

   NOTE ON FONTS: the homepage gets 'Poppins' from the Google Fonts CDN.
   CDNs are banned in the panels and Poppins is NOT self-hosted anywhere in
   this project, so --vg-font keeps Poppins first (used if already cached /
   installed) and degrades to a system stack. Do NOT add a font CDN link.

   NOTE ON ICONS: use the bootstrap-icons copy under public/user_assets/.
   The copy at assets/plugins/bootstrap-icons/ is BROKEN — its font binaries
   are missing (verified 404), so it renders empty tofu boxes.
   That vendored set is an OLDER release: bi-graph-up-arrow, bi-cash-coin,
   bi-x-lg, bi-plus-lg and bi-currency-dollar DO NOT EXIST in it.
   Use bi-graph-up, bi-cash-stack, bi-x, bi-plus, bi-cash instead.
   ========================================================================= */


/* =========================================================================
   1. TOKENS — brand values reused from voltera.css (never re-invented)
   ========================================================================= */
:root {
  /* --- brand palette (aliases; identical hexes to voltera.css) --- */
  --vg-green:       var(--green,       #16c47f);
  --vg-green-light: var(--green-light, #4ade80);
  --vg-teal:        var(--teal,        #0ea5a4);
  --vg-teal-deep:   var(--teal-deep,   #0b8f8e);
  --vg-navy:        var(--navy,        #0a1f33);
  --vg-navy-2:      var(--navy-2,      #0d2a45);
  --vg-navy-3:      var(--navy-3,      #113a5e);
  --vg-ink:         var(--ink,         #0f2233);
  --vg-slate:       var(--slate,       #4a5b6b);
  --vg-muted:       var(--muted,       #6b7c8c);
  --vg-line:        var(--line,        #e4ecf2);
  --vg-bg:          var(--bg,          #ffffff);
  --vg-bg-soft:     var(--bg-soft,     #f4faf7);
  --vg-bg-soft-2:   var(--bg-soft-2,   #eef6f9);
  --vg-white:       var(--white,       #ffffff);

  --vg-grad-brand:  var(--grad-brand,  linear-gradient(135deg, #16c47f 0%, #0ea5a4 45%, #113a5e 100%));
  --vg-grad-navy:   var(--grad-navy,   linear-gradient(160deg, #0a1f33 0%, #0d2a45 55%, #0b3a4a 100%));
  --vg-grad-green:  var(--grad-green,  linear-gradient(135deg, #16c47f 0%, #0ea5a4 100%));

  --vg-shadow-sm:   var(--shadow-sm,   0 4px 14px rgba(11, 58, 74, 0.08));
  --vg-shadow-md:   var(--shadow-md,   0 12px 34px rgba(11, 58, 74, 0.12));
  --vg-shadow-lg:   var(--shadow-lg,   0 26px 60px rgba(10, 31, 51, 0.20));

  --vg-radius:      var(--radius,      18px);
  --vg-radius-sm:   var(--radius-sm,   12px);
  --vg-radius-lg:   var(--radius-lg,   26px);

  --vg-font: var(--font, 'Poppins', 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);

  /* --- status colours (semantic only — not part of the brand ramp) --- */
  --vg-success: #16c47f;
  --vg-danger:  #e5484d;
  --vg-warn:    #f5a524;
  --vg-info:    #0ea5a4;

  /* --- app shell metrics --- */
  --vg-appbar-h:  60px;
  --vg-tabbar-h:  62px;
  --vg-sidebar-w: 256px;
  --vg-tap:       44px;              /* minimum tap target */
  --vg-safe-b:    env(safe-area-inset-bottom, 0px);
  --vg-safe-t:    env(safe-area-inset-top, 0px);

  /* --- z-index scale --- */
  --vg-z-sidebar: 1030;
  --vg-z-appbar:  1040;
  --vg-z-tabbar:  1040;
  --vg-z-scrim:   1050;
  --vg-z-drawer:  1060;
  --vg-z-modal:   1070;
  --vg-z-toast:   1080;

  --vg-ease: cubic-bezier(.4, 0, .2, 1);
}

/* --- SIX WALLET ACCENTS ---------------------------------------------------
   All six gradients are built ONLY from the existing brand ramp
   (green-light -> green -> teal -> teal-deep -> navy-3 -> navy), so every
   wallet is visually distinct while staying 100% on-brand.            */
:root {
  --vg-w-main:       linear-gradient(135deg, #16c47f 0%, #0ea5a4 100%);
  --vg-w-activation: linear-gradient(135deg, #0ea5a4 0%, #113a5e 100%);
  --vg-w-roi:        linear-gradient(135deg, #4ade80 0%, #16c47f 100%);
  --vg-w-welcome:    linear-gradient(135deg, #0b8f8e 0%, #4ade80 100%);
  --vg-w-withdraw:   linear-gradient(135deg, #113a5e 0%, #0b8f8e 100%);
  --vg-w-ab:         linear-gradient(135deg, #0a1f33 0%, #113a5e 100%);
}


/* =========================================================================
   2. APP SHELL
   -------------------------------------------------------------------------
   USAGE — wrap the whole page. .vg-app is the scope root; it also sets the
   font + background WITHOUT touching <body>, so bootstrap stays intact.

     <div class="vg-app">
       <header class="vg-appbar"> ... </header>
       <aside  class="vg-sidebar" id="vgSidebar"> ... </aside>
       <div    class="vg-scrim" data-vg-close="sidebar"></div>
       <main   class="vg-content"> ...page content... </main>
       <nav    class="vg-tabbar"> ... </nav>
     </div>
   ========================================================================= */
.vg-app {
  font-family: var(--vg-font);
  color: var(--vg-ink);
  background: var(--vg-bg-soft);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* the page body must NEVER scroll sideways */
  overflow-x: hidden;
}
.vg-app *,
.vg-app *::before,
.vg-app *::after { box-sizing: border-box; }

.vg-app img { max-width: 100%; }
.vg-app a { text-decoration: none; color: inherit; }

/* ---------- Top app bar (fixed) ---------- */
/* USAGE:
     <header class="vg-appbar">
       <button class="vg-appbar-btn" data-vg-toggle="sidebar" aria-label="Menu">
         <i class="bi bi-list-ul"></i>
       </button>
       <h1 class="vg-appbar-title">Dashboard</h1>
       <a class="vg-appbar-btn" href="..."><i class="bi bi-bell-fill"></i>
         <span class="vg-appbar-dot"></span>
       </a>
     </header>                                                              */
.vg-appbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--vg-appbar-h) + var(--vg-safe-t));
  padding: var(--vg-safe-t) 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--vg-grad-brand);
  color: #fff;
  z-index: var(--vg-z-appbar);
  box-shadow: var(--vg-shadow-sm);
}
.vg-appbar--navy  { background: var(--vg-grad-navy); }
.vg-appbar--plain { background: #fff; color: var(--vg-ink); border-bottom: 1px solid var(--vg-line); }

.vg-appbar-title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.2px;
  margin: 0;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vg-appbar-btn {
  position: relative;
  width: var(--vg-tap);
  height: var(--vg-tap);
  flex: 0 0 var(--vg-tap);
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s var(--vg-ease);
}
.vg-appbar-btn:hover,
.vg-appbar-btn:focus-visible { background: rgba(255,255,255,.16); }
.vg-appbar--plain .vg-appbar-btn:hover { background: var(--vg-bg-soft-2); }
.vg-appbar-dot {
  position: absolute;
  top: 9px; right: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--vg-danger);
  border: 2px solid rgba(255,255,255,.9);
}

/* ---------- Content area ----------
   Padding keeps content clear of BOTH fixed bars + the iOS home indicator. */
.vg-content {
  padding: calc(var(--vg-appbar-h) + var(--vg-safe-t) + 14px) 14px
           calc(var(--vg-tabbar-h) + var(--vg-safe-b) + 22px);
  max-width: 1180px;
  margin: 0 auto;
}
/* Use .vg-content--flush on pages that must go edge-to-edge */
.vg-content--flush { padding-left: 0; padding-right: 0; }

/* ---------- Bottom tab bar (mobile only) ----------
   USAGE — mark the current tab with .is-active (JS also auto-detects by href):
     <nav class="vg-tabbar">
       <a class="vg-tab is-active" href="<?php echo base_url('prc/dashboard'); ?>">
         <i class="bi bi-house-door-fill"></i><span>Home</span>
       </a>
       <a class="vg-tab" href="..."><i class="bi bi-wallet2"></i><span>Wallets</span></a>
       <a class="vg-tab" href="..."><i class="bi bi-diagram-3-fill"></i><span>Team</span></a>
       <a class="vg-tab" href="..."><i class="bi bi-person-circle"></i><span>Profile</span></a>
     </nav>                                                                 */
.vg-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--vg-z-tabbar);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: calc(var(--vg-tabbar-h) + var(--vg-safe-b));
  padding-bottom: var(--vg-safe-b);
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--vg-line);
  box-shadow: 0 -4px 20px rgba(10,31,51,.06);
}
.vg-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--vg-tap);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  color: var(--vg-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1px;
  position: relative;
  transition: color .2s var(--vg-ease);
  -webkit-tap-highlight-color: transparent;
}
.vg-tab i { font-size: 20px; line-height: 1; transition: transform .2s var(--vg-ease); }
.vg-tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vg-tab.is-active { color: var(--vg-teal-deep); }
.vg-tab.is-active i { transform: translateY(-1px); }
.vg-tab.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--vg-grad-green);
}
.vg-tab:active i { transform: scale(.9); }

/* ---------- Sidebar / drawer ----------
   Mobile: off-canvas drawer toggled by [data-vg-toggle="sidebar"].
   Desktop (>=1024px): permanent, collapsible via .vg-app.vg-sidebar-collapsed
   USAGE:
     <aside class="vg-sidebar" id="vgSidebar">
       <div class="vg-sidebar-head">
         <img src="..." alt="Voltera Global"><span>Voltera</span>
       </div>
       <nav class="vg-sidenav">
         <a class="vg-sidenav-item is-active" href="...">
           <i class="bi bi-speedometer2"></i><span>Dashboard</span>
         </a>
       </nav>
     </aside>
     <div class="vg-scrim" data-vg-close="sidebar"></div>                   */
.vg-sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--vg-sidebar-w);
  z-index: var(--vg-z-drawer);
  background: var(--vg-grad-navy);
  color: rgba(233,242,248,.82);
  padding: calc(var(--vg-safe-t) + 14px) 0 calc(var(--vg-safe-b) + 14px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-100%);
  transition: transform .28s var(--vg-ease);
}
.vg-sidebar.is-open { transform: translateX(0); }

.vg-sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 18px;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.3px;
}
.vg-sidebar-head img { height: 34px; width: auto; }

.vg-sidenav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.vg-sidenav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--vg-tap);
  padding: 10px 12px;
  border-radius: var(--vg-radius-sm);
  color: rgba(233,242,248,.82);
  font-size: 14.5px;
  font-weight: 500;
  transition: background .2s var(--vg-ease), color .2s var(--vg-ease);
}
.vg-sidenav-item i { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.vg-sidenav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.vg-sidenav-item.is-active { background: rgba(22,196,127,.16); color: #fff; }
.vg-sidenav-item.is-active i { color: var(--vg-green-light); }
.vg-sidenav-label {
  padding: 16px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(233,242,248,.42);
}

/* Scrim behind drawer / modal */
.vg-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10,31,51,.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  z-index: var(--vg-z-scrim);
  transition: opacity .25s var(--vg-ease), visibility .25s var(--vg-ease);
}
.vg-scrim.is-open { opacity: 1; visibility: visible; }


/* =========================================================================
   3. CARDS / SECTIONS
   ========================================================================= */
/* USAGE:
     <section class="vg-card">
       <div class="vg-card-head">
         <h3 class="vg-card-title"><i class="bi bi-clock-history"></i> Recent activity</h3>
         <a class="vg-link" href="#">View all</a>
       </div>
       <div class="vg-card-body"> ... </div>
     </section>                                                             */
.vg-card {
  background: #fff;
  border: 1px solid var(--vg-line);
  border-radius: var(--vg-radius);
  box-shadow: var(--vg-shadow-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.vg-card--flat  { box-shadow: none; }
.vg-card--soft  { background: var(--vg-bg-soft); }
.vg-card--navy  { background: var(--vg-grad-navy); color: #fff; border-color: transparent; }
.vg-card--brand { background: var(--vg-grad-brand); color: #fff; border-color: transparent; }
.vg-card--navy .vg-card-title,
.vg-card--brand .vg-card-title { color: #fff; }

.vg-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--vg-line);
}
.vg-card--navy .vg-card-head,
.vg-card--brand .vg-card-head { border-bottom-color: rgba(255,255,255,.14); }
.vg-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--vg-ink);
  margin: 0;
  letter-spacing: -.2px;
}
.vg-card-title i { color: var(--vg-teal-deep); font-size: 17px; }
.vg-card--navy .vg-card-title i,
.vg-card--brand .vg-card-title i { color: var(--vg-green-light); }
.vg-card-body { padding: 16px; }
.vg-card-body--tight { padding: 0; }
.vg-card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--vg-line);
  background: var(--vg-bg-soft);
}

/* Section title (page-level heading) —
   USAGE: <h2 class="vg-section-title"><i class="bi bi-wallet2"></i> My wallets</h2> */
.vg-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--vg-slate);
  margin: 20px 2px 10px;
}
.vg-section-title i { color: var(--vg-teal-deep); font-size: 15px; }
.vg-section-title:first-child { margin-top: 4px; }

.vg-link {
  color: var(--vg-teal-deep);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.vg-link:hover { color: var(--vg-green); }


/* =========================================================================
   4. WALLET TILES + SIX-WALLET GRID
   -------------------------------------------------------------------------
   USAGE — the 6 wallets. Escape every echoed value!
   Modifiers: --main --activation --roi --welcome --withdraw --ab

     <div class="vg-wallet-grid">
       <div class="vg-wallet-tile vg-wallet-tile--main">
         <span class="vg-wallet-ico"><i class="bi bi-wallet2"></i></span>
         <span class="vg-wallet-label">Main Wallet</span>
         <span class="vg-wallet-amt">$<?php echo html_escape(number_format((float)$main_wallet, 2)); ?></span>
       </div>
       <div class="vg-wallet-tile vg-wallet-tile--activation">
         <span class="vg-wallet-ico"><i class="bi bi-lightning-charge-fill"></i></span>
         <span class="vg-wallet-label">Activation</span>
         <span class="vg-wallet-amt">$<?php echo html_escape(number_format((float)$activation_wallet, 2)); ?></span>
       </div>
       <div class="vg-wallet-tile vg-wallet-tile--roi">       ... bi-graph-up          "ROI"      </div>
       <div class="vg-wallet-tile vg-wallet-tile--welcome">   ... bi-gift-fill         "Welcome"  </div>
       <div class="vg-wallet-tile vg-wallet-tile--withdraw">  ... bi-cash-stack        "Withdraw" </div>
       <div class="vg-wallet-tile vg-wallet-tile--ab">        ... bi-broadcast-pin      "AB"      </div>
     </div>

   Layout: 2-col mobile / 3-col tablet (>=600px) / 6-col desktop (>=1024px)
   ========================================================================= */
.vg-wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 600px)  { .vg-wallet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1024px) { .vg-wallet-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.vg-wallet-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  border-radius: var(--vg-radius-sm);
  background: var(--vg-grad-green);
  color: #fff;
  box-shadow: var(--vg-shadow-sm);
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s var(--vg-ease), box-shadow .25s var(--vg-ease);
}
/* subtle sheen so tiles read as premium, not flat blocks */
.vg-wallet-tile::after {
  content: '';
  position: absolute;
  top: -60%; right: -30%;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.20) 0%, transparent 65%);
  z-index: -1;
}
a.vg-wallet-tile:hover,
.vg-wallet-tile--clickable:hover { transform: translateY(-3px); box-shadow: var(--vg-shadow-md); }

.vg-wallet-ico {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.20);
  font-size: 16px;
  margin-bottom: 2px;
}
.vg-wallet-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .3px;
  color: rgba(255,255,255,.88);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vg-wallet-amt {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.15;
  color: #fff;
  /* long balances must never blow out the tile */
  overflow-wrap: anywhere;
}
.vg-wallet-sub { font-size: 11px; color: rgba(255,255,255,.75); }

/* six distinct, on-brand accents */
.vg-wallet-tile--main       { background: var(--vg-w-main); }
.vg-wallet-tile--activation { background: var(--vg-w-activation); }
.vg-wallet-tile--roi        { background: var(--vg-w-roi); }
.vg-wallet-tile--welcome    { background: var(--vg-w-welcome); }
.vg-wallet-tile--withdraw   { background: var(--vg-w-withdraw); }
.vg-wallet-tile--ab         { background: var(--vg-w-ab); }

/* ROI/Welcome use light-green gradients -> darken text for AA contrast */
.vg-wallet-tile--roi .vg-wallet-amt,
.vg-wallet-tile--welcome .vg-wallet-amt { color: #06301f; }
.vg-wallet-tile--roi .vg-wallet-label,
.vg-wallet-tile--welcome .vg-wallet-label { color: rgba(6,48,31,.78); }
.vg-wallet-tile--roi .vg-wallet-ico,
.vg-wallet-tile--welcome .vg-wallet-ico { background: rgba(6,48,31,.14); color: #06301f; }
.vg-wallet-tile--roi .vg-wallet-sub,
.vg-wallet-tile--welcome .vg-wallet-sub { color: rgba(6,48,31,.66); }

/* Hero variant — make Main span the full width on mobile if you want it big:
     <div class="vg-wallet-tile vg-wallet-tile--main vg-wallet-tile--wide"> */
.vg-wallet-tile--wide { grid-column: span 2; min-height: 120px; }
.vg-wallet-tile--wide .vg-wallet-amt { font-size: 26px; }
@media (min-width: 1024px) { .vg-wallet-tile--wide { grid-column: span 2; } }


/* =========================================================================
   5. STATS
   -------------------------------------------------------------------------
   USAGE:
     <div class="vg-stat-grid">
       <div class="vg-stat">
         <span class="vg-stat-ico"><i class="bi bi-people-fill"></i></span>
         <div>
           <span class="vg-stat-val"><?php echo html_escape($team_count); ?></span>
           <span class="vg-stat-lbl">Team members</span>
         </div>
       </div>
     </div>
   ========================================================================= */
.vg-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 768px)  { .vg-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }

.vg-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--vg-line);
  border-radius: var(--vg-radius-sm);
  box-shadow: var(--vg-shadow-sm);
}
.vg-stat-ico {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(22,196,127,.15), rgba(14,165,164,.15));
  color: var(--vg-teal-deep);
  font-size: 18px;
}
.vg-stat-val {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--vg-ink);
  line-height: 1.2;
  letter-spacing: -.3px;
  /* Keep the currency token (e.g. "USDT") from breaking into "USD / T".
     Allow a wrap only at the space, never mid-word, so "0.00 USDT" reads cleanly. */
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}
.vg-stat > div { min-width: 0; }
.vg-stat-lbl {
  display: block;
  font-size: 11.5px;
  color: var(--vg-muted);
  font-weight: 500;
}
.vg-stat--up .vg-stat-val   { color: var(--vg-green); }
.vg-stat--down .vg-stat-val { color: var(--vg-danger); }


/* =========================================================================
   6. BUTTONS  (min 44px tap target)
   -------------------------------------------------------------------------
   USAGE — do NOT also put bootstrap's .btn on these, the two will fight:
     <button type="submit" class="vg-btn vg-btn--primary">
       <i class="bi bi-check-circle-fill"></i> Submit
     </button>
     <a class="vg-btn vg-btn--ghost" href="#">Cancel</a>
     <button class="vg-btn vg-btn--danger vg-btn--block">Delete</button>
   Sizes: .vg-btn--sm (36px, use sparingly) / default 44px / .vg-btn--lg (52px)
   ========================================================================= */
.vg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--vg-tap);
  min-width: var(--vg-tap);
  padding: 11px 20px;
  border: 1.5px solid transparent;
  border-radius: 100px;
  font-family: var(--vg-font);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--vg-ease), box-shadow .2s var(--vg-ease),
              background .2s var(--vg-ease), color .2s var(--vg-ease),
              border-color .2s var(--vg-ease);
}
.vg-btn i { font-size: 16px; }
.vg-btn:active { transform: scale(.97); }
.vg-btn:disabled,
.vg-btn.is-disabled { opacity: .55; pointer-events: none; }
.vg-btn:focus-visible { outline: 2px solid var(--vg-teal); outline-offset: 2px; }

.vg-btn--primary {
  background: var(--vg-grad-green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(16,196,127,.32);
}
.vg-btn--primary:hover { box-shadow: 0 12px 26px rgba(16,196,127,.42); color: #fff; }

.vg-btn--ghost {
  background: #fff;
  color: var(--vg-navy);
  border-color: var(--vg-line);
}
.vg-btn--ghost:hover { border-color: var(--vg-teal); color: var(--vg-teal-deep); }

.vg-btn--navy { background: var(--vg-navy); color: #fff; }
.vg-btn--navy:hover { background: var(--vg-navy-3); color: #fff; }

.vg-btn--danger { background: var(--vg-danger); color: #fff; box-shadow: 0 8px 20px rgba(229,72,77,.28); }
.vg-btn--danger:hover { background: #cf3a3f; color: #fff; }

.vg-btn--soft { background: rgba(22,196,127,.12); color: var(--vg-teal-deep); }
.vg-btn--soft:hover { background: rgba(22,196,127,.2); }

.vg-btn--block { display: flex; width: 100%; }
.vg-btn--sm { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.vg-btn--sm i { font-size: 14px; }
.vg-btn--lg { min-height: 52px; padding: 14px 28px; font-size: 16px; }
/* icon-only: ALWAYS give it an aria-label */
.vg-btn--icon { padding: 0; width: var(--vg-tap); height: var(--vg-tap); border-radius: 50%; }


/* =========================================================================
   7. FORMS
   -------------------------------------------------------------------------
   USAGE — keep name/id/value PHP EXACTLY as it was, only swap the class.
   NEVER remove the CSRF hidden input from a form.

     <form method="post" action="<?php echo base_url('prc/save'); ?>">
       <?php echo form_hidden($this->security->get_csrf_token_name(),
                              $this->security->get_csrf_hash()); ?>
       <div class="vg-field">
         <label class="vg-label" for="amount">Amount</label>
         <div class="vg-input-wrap">
           <i class="bi bi-cash"></i>
           <input class="vg-input" type="text" id="amount" name="amount"
                  value="<?php echo html_escape(set_value('amount')); ?>">
         </div>
         <span class="vg-help">Minimum $10</span>
       </div>
       <div class="vg-field">
         <label class="vg-label" for="type">Type</label>
         <select class="vg-select" id="type" name="type"> ... </select>
       </div>
     </form>
   ========================================================================= */
.vg-field { margin-bottom: 14px; }
.vg-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--vg-slate);
  margin-bottom: 6px;
}
.vg-label .vg-req { color: var(--vg-danger); }

.vg-input,
.vg-select,
.vg-textarea {
  width: 100%;
  min-height: var(--vg-tap);
  padding: 11px 14px;
  font-family: var(--vg-font);
  font-size: 15px;                 /* >=16px avoids iOS zoom; 15px + touch-action is our compromise */
  color: var(--vg-ink);
  background: #fff;
  border: 1.5px solid var(--vg-line);
  border-radius: var(--vg-radius-sm);
  transition: border-color .2s var(--vg-ease), box-shadow .2s var(--vg-ease);
  -webkit-appearance: none;
  appearance: none;
}
.vg-textarea { min-height: 92px; resize: vertical; }
.vg-input:focus,
.vg-select:focus,
.vg-textarea:focus {
  outline: none;
  border-color: var(--vg-green);
  box-shadow: 0 0 0 3px rgba(22,196,127,.15);
}
.vg-input::placeholder,
.vg-textarea::placeholder { color: var(--vg-muted); opacity: .75; }
.vg-input:disabled,
.vg-select:disabled,
.vg-input[readonly] { background: var(--vg-bg-soft-2); color: var(--vg-muted); cursor: not-allowed; }

/* native select arrow (inline SVG data-uri — no external asset) */
.vg-select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7c8c'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6'  stroke='%236b7c8c' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* input with a leading icon */
.vg-input-wrap { position: relative; display: block; }
.vg-input-wrap > i {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--vg-muted);
  font-size: 16px;
  pointer-events: none;
}
.vg-input-wrap .vg-input { padding-left: 40px; }

.vg-help { display: block; font-size: 11.5px; color: var(--vg-muted); margin-top: 5px; }
.vg-error { display: block; font-size: 11.5px; color: var(--vg-danger); margin-top: 5px; font-weight: 500; }
.vg-input.is-invalid { border-color: var(--vg-danger); }
.vg-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(229,72,77,.15); }

/* two-up field row on wider screens */
.vg-field-row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 600px) { .vg-field-row { grid-template-columns: 1fr 1fr; } }


/* =========================================================================
   8. BADGES / PILLS
   -------------------------------------------------------------------------
   USAGE:
     <span class="vg-badge vg-badge--success"><i class="bi bi-check-circle-fill"></i> Paid</span>
     <span class="vg-pill">Level 3</span>
   ========================================================================= */
.vg-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .2px;
  background: var(--vg-bg-soft-2);
  color: var(--vg-slate);
  white-space: nowrap;
}
.vg-badge i { font-size: 11px; }
.vg-badge--success { background: rgba(22,196,127,.14); color: #0d8f5b; }
.vg-badge--danger  { background: rgba(229,72,77,.12);  color: #c23237; }
.vg-badge--warn    { background: rgba(245,165,36,.16); color: #a86a05; }
.vg-badge--info    { background: rgba(14,165,164,.14); color: var(--vg-teal-deep); }
.vg-badge--navy    { background: rgba(17,58,94,.10);   color: var(--vg-navy-3); }
.vg-badge--solid   { background: var(--vg-grad-green); color: #fff; }

/* Pill = larger, tappable chip (filter chips etc.) */
.vg-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--vg-line);
  background: #fff;
  color: var(--vg-slate);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s var(--vg-ease);
}
.vg-pill:hover { border-color: var(--vg-teal); color: var(--vg-teal-deep); }
.vg-pill.is-active { background: var(--vg-grad-green); border-color: transparent; color: #fff; }
/* horizontal scroller for a row of pills */
.vg-pill-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.vg-pill-row::-webkit-scrollbar { display: none; }


/* =========================================================================
   9. LIST
   -------------------------------------------------------------------------
   USAGE — leading icon + text + trailing chevron. Use <a> for tappable rows.
     <ul class="vg-list">
       <li>
         <a class="vg-list-item" href="<?php echo base_url('prc/profile'); ?>">
           <span class="vg-list-ico"><i class="bi bi-person-circle"></i></span>
           <span class="vg-list-txt">
             <strong><?php echo html_escape($name); ?></strong>
             <small>Edit your details</small>
           </span>
           <span class="vg-badge vg-badge--success">Active</span>
           <i class="bi bi-chevron-right vg-list-chev"></i>
         </a>
       </li>
     </ul>
   ========================================================================= */
.vg-list { list-style: none; margin: 0; padding: 0; }
.vg-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--vg-line);
  color: var(--vg-ink);
  transition: background .18s var(--vg-ease);
  -webkit-tap-highlight-color: transparent;
}
.vg-list > li:last-child .vg-list-item { border-bottom: 0; }
a.vg-list-item:hover { background: var(--vg-bg-soft); }
a.vg-list-item:active { background: var(--vg-bg-soft-2); }

.vg-list-ico {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(22,196,127,.14), rgba(14,165,164,.14));
  color: var(--vg-teal-deep);
  font-size: 17px;
}
.vg-list-ico--navy   { background: rgba(17,58,94,.10);   color: var(--vg-navy-3); }
.vg-list-ico--danger { background: rgba(229,72,77,.12);  color: var(--vg-danger); }
.vg-list-ico--warn   { background: rgba(245,165,36,.16); color: #a86a05; }

.vg-list-txt { flex: 1 1 auto; min-width: 0; }
.vg-list-txt strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vg-list-txt small {
  display: block;
  font-size: 12px;
  color: var(--vg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vg-list-chev { color: var(--vg-muted); font-size: 14px; flex-shrink: 0; }
.vg-list-amt { font-size: 14.5px; font-weight: 700; flex-shrink: 0; letter-spacing: -.3px; }
.vg-list-amt--in  { color: var(--vg-green); }
.vg-list-amt--out { color: var(--vg-danger); }


/* =========================================================================
   10. TABLES — .vg-table-wrap scrolls INSIDE itself; the page never does.
   -------------------------------------------------------------------------
   USAGE — wrap EVERY data table. Keep bootstrap/DataTables classes on the
   <table> if a plugin needs them; the wrapper is what does the scrolling.

     <div class="vg-table-wrap">
       <table class="vg-table">
         <thead><tr><th>#</th><th>User</th><th>Amount</th></tr></thead>
         <tbody>
           <tr>
             <td><?php echo html_escape($i); ?></td>
             <td><?php echo html_escape($r->username); ?></td>
             <td><?php echo html_escape(number_format((float)$r->amount, 2)); ?></td>
           </tr>
         </tbody>
       </table>
     </div>
   voltera-app.js adds .vg-has-scroll-l/.vg-has-scroll-r for the edge shadows.
   ========================================================================= */
.vg-table-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--vg-radius-sm);
  /* contain the scroll so it never bubbles to the page */
  overscroll-behavior-x: contain;
}
.vg-table-wrap::-webkit-scrollbar { height: 6px; }
.vg-table-wrap::-webkit-scrollbar-thumb { background: rgba(107,124,140,.35); border-radius: 100px; }
.vg-table-wrap::-webkit-scrollbar-track { background: transparent; }

/* scroll-shadow affordance (toggled by JS) */
.vg-table-wrap::before,
.vg-table-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s var(--vg-ease);
  z-index: 2;
}
.vg-table-wrap::before { left: 0;  background: linear-gradient(90deg, rgba(10,31,51,.10), transparent); }
.vg-table-wrap::after  { right: 0; background: linear-gradient(270deg, rgba(10,31,51,.10), transparent); }
.vg-table-wrap.vg-has-scroll-l::before { opacity: 1; }
.vg-table-wrap.vg-has-scroll-r::after  { opacity: 1; }

.vg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #fff;
}
.vg-table thead th {
  position: sticky;
  top: 0;
  background: var(--vg-bg-soft);
  color: var(--vg-slate);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--vg-line);
  white-space: nowrap;
}
.vg-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--vg-line);
  color: var(--vg-ink);
  vertical-align: middle;
  white-space: nowrap;
}
.vg-table tbody tr:last-child td { border-bottom: 0; }
.vg-table tbody tr:hover { background: var(--vg-bg-soft); }
.vg-table .vg-num { text-align: right; font-weight: 600; letter-spacing: -.2px; }
/* let a specific column wrap when you want it to */
.vg-table .vg-wrap-cell { white-space: normal; min-width: 180px; }


/* =========================================================================
   11. MODAL
   -------------------------------------------------------------------------
   USAGE — pure CSS/JS, NOT bootstrap's modal (do not mix the two).
   Open:  <button class="vg-btn vg-btn--primary" data-vg-open="vgConfirm">Open</button>
   Close: any [data-vg-close] inside, the backdrop, or Esc.
   On mobile it presents as a bottom sheet; >=600px as a centred dialog.

     <div class="vg-modal" id="vgConfirm" role="dialog" aria-modal="true" aria-hidden="true">
       <div class="vg-modal-backdrop" data-vg-close></div>
       <div class="vg-modal-panel" role="document">
         <div class="vg-modal-head">
           <h3 class="vg-modal-title">Confirm withdrawal</h3>
           <button class="vg-modal-x" data-vg-close aria-label="Close"><i class="bi bi-x"></i></button>
         </div>
         <div class="vg-modal-body"> ... </div>
         <div class="vg-modal-foot">
           <button class="vg-btn vg-btn--ghost" data-vg-close>Cancel</button>
           <button class="vg-btn vg-btn--primary">Confirm</button>
         </div>
       </div>
     </div>
   ========================================================================= */
.vg-modal {
  position: fixed;
  inset: 0;
  z-index: var(--vg-z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s var(--vg-ease), visibility .25s var(--vg-ease);
}
.vg-modal.is-open { visibility: visible; opacity: 1; }
.vg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,31,51,.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.vg-modal-panel {
  position: relative;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--vg-radius) var(--vg-radius) 0 0;
  box-shadow: var(--vg-shadow-lg);
  padding-bottom: var(--vg-safe-b);
  transform: translateY(100%);
  transition: transform .3s var(--vg-ease);
  overflow: hidden;
}
.vg-modal.is-open .vg-modal-panel { transform: translateY(0); }
/* grabber handle for the bottom-sheet look */
.vg-modal-panel::before {
  content: '';
  width: 38px; height: 4px;
  border-radius: 100px;
  background: var(--vg-line);
  margin: 8px auto 0;
  flex-shrink: 0;
}
.vg-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--vg-line);
}
.vg-modal-title { font-size: 16px; font-weight: 700; margin: 0; color: var(--vg-ink); }
.vg-modal-x {
  width: var(--vg-tap); height: var(--vg-tap);
  flex: 0 0 var(--vg-tap);
  display: grid; place-items: center;
  border: 0; background: transparent;
  color: var(--vg-muted);
  font-size: 18px; border-radius: 50%;
  cursor: pointer;
}
.vg-modal-x:hover { background: var(--vg-bg-soft-2); color: var(--vg-ink); }
.vg-modal-body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.vg-modal-foot {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--vg-line);
  background: var(--vg-bg-soft);
}
.vg-modal-foot .vg-btn { flex: 1 1 0; }

@media (min-width: 600px) {
  .vg-modal { align-items: center; padding: 20px; }
  .vg-modal-panel {
    max-width: 460px;
    border-radius: var(--vg-radius);
    transform: translateY(14px) scale(.97);
    max-height: 84vh;
  }
  .vg-modal.is-open .vg-modal-panel { transform: translateY(0) scale(1); }
  .vg-modal-panel::before { display: none; }
  .vg-modal--lg .vg-modal-panel { max-width: 720px; }
}
/* set by JS while a modal/drawer is open, to stop the page behind scrolling */
.vg-noscroll { overflow: hidden !important; }


/* =========================================================================
   12. TOAST — fired from JS: $vg.toast('Saved', 'success')
   ========================================================================= */
.vg-toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(var(--vg-tabbar-h) + var(--vg-safe-b) + 14px);
  transform: translateX(-50%);
  z-index: var(--vg-z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  max-width: min(92vw, 420px);
  pointer-events: none;
}
@media (min-width: 1024px) { .vg-toast-host { bottom: 24px; } }

.vg-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 100px;
  background: var(--vg-navy);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--vg-shadow-md);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s var(--vg-ease), transform .25s var(--vg-ease);
}
.vg-toast.is-open { opacity: 1; transform: translateY(0); }
.vg-toast i { font-size: 16px; flex-shrink: 0; }
.vg-toast--success i { color: var(--vg-green-light); }
.vg-toast--danger  i { color: #ff8a8d; }
.vg-toast--warn    i { color: #ffc861; }
.vg-toast--info    i { color: #5eead4; }


/* =========================================================================
   13. EMPTY STATE
   -------------------------------------------------------------------------
   USAGE — show instead of an empty table/list:
     <?php if (empty($rows)): ?>
       <div class="vg-empty-state">
         <span class="vg-empty-ico"><i class="bi bi-inbox"></i></span>
         <h4>No transactions yet</h4>
         <p>Your activity will appear here once you make your first deposit.</p>
         <a class="vg-btn vg-btn--primary" href="#"><i class="bi bi-plus"></i> Add funds</a>
       </div>
     <?php endif; ?>
   ========================================================================= */
.vg-empty-state { text-align: center; padding: 40px 22px; }
.vg-empty-ico {
  width: 68px; height: 68px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(22,196,127,.13), rgba(14,165,164,.13));
  color: var(--vg-teal-deep);
  font-size: 28px;
}
.vg-empty-state h4 { font-size: 16px; font-weight: 700; color: var(--vg-ink); margin: 0 0 6px; }
.vg-empty-state p { font-size: 13.5px; color: var(--vg-muted); margin: 0 auto 18px; max-width: 320px; }


/* =========================================================================
   14. SKELETON — placeholder while data loads
   USAGE: <div class="vg-skeleton" style="height:18px;width:60%"></div>
          <div class="vg-skeleton vg-skeleton--circle" style="width:40px;height:40px"></div>
   ========================================================================= */
.vg-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--vg-bg-soft-2);
  border-radius: 8px;
}
.vg-skeleton--circle { border-radius: 50%; }
.vg-skeleton--text { height: 12px; margin-bottom: 8px; }
.vg-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: vg-shimmer 1.4s infinite;
}
@keyframes vg-shimmer { 100% { transform: translateX(100%); } }


/* =========================================================================
   15. FAB — floating action button (sits above the tab bar)
   USAGE:
     <a class="vg-fab" href="#" aria-label="New deposit"><i class="bi bi-plus"></i></a>
     <button class="vg-fab vg-fab--wide"><i class="bi bi-plus"></i><span>Deposit</span></button>
   ========================================================================= */
.vg-fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--vg-tabbar-h) + var(--vg-safe-b) + 16px);
  z-index: 1035;
  width: 54px; height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--vg-grad-green);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(16,196,127,.42);
  transition: transform .2s var(--vg-ease), box-shadow .2s var(--vg-ease);
}
.vg-fab:hover { transform: translateY(-3px); color: #fff; box-shadow: 0 16px 32px rgba(16,196,127,.5); }
.vg-fab:active { transform: scale(.95); }
.vg-fab--wide {
  width: auto;
  border-radius: 100px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
}
.vg-fab--wide i { font-size: 18px; }
@media (min-width: 1024px) { .vg-fab { bottom: 24px; right: 24px; } }


/* =========================================================================
   16. TABS — in-page segmented control
   -------------------------------------------------------------------------
   USAGE (JS-driven panes):
     <div class="vg-tabs" data-vg-tabs>
       <button class="vg-tabs-btn is-active" data-vg-tab="pane-a">Active</button>
       <button class="vg-tabs-btn" data-vg-tab="pane-b">History</button>
     </div>
     <div class="vg-tabs-pane is-active" id="pane-a"> ... </div>
     <div class="vg-tabs-pane" id="pane-b"> ... </div>
   Or use plain <a href> tabs for server-rendered pages (no data-vg-tabs).
   ========================================================================= */
.vg-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--vg-bg-soft-2);
  border-radius: 100px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
}
.vg-tabs::-webkit-scrollbar { display: none; }
.vg-tabs-btn {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 8px 16px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--vg-slate);
  font-family: var(--vg-font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s var(--vg-ease), color .2s var(--vg-ease), box-shadow .2s var(--vg-ease);
}
.vg-tabs-btn.is-active {
  background: #fff;
  color: var(--vg-teal-deep);
  box-shadow: var(--vg-shadow-sm);
}
.vg-tabs-pane { display: none; }
.vg-tabs-pane.is-active { display: block; animation: vg-fade .25s var(--vg-ease); }
@keyframes vg-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }


/* =========================================================================
   17. AVATAR
   USAGE: <span class="vg-avatar"><img src="..." alt=""></span>
          <span class="vg-avatar vg-avatar--lg">JD</span>   (initials fallback)
   ========================================================================= */
.vg-avatar {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--vg-grad-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.vg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vg-avatar--sm { width: 32px; height: 32px; flex-basis: 32px; font-size: 12px; }
.vg-avatar--lg { width: 60px; height: 60px; flex-basis: 60px; font-size: 20px; }
.vg-avatar--ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--vg-green); }


/* =========================================================================
   18. SMALL UTILITIES (namespaced — safe next to bootstrap)
   ========================================================================= */
.vg-row     { display: flex; align-items: center; gap: 10px; }
.vg-row--between { justify-content: space-between; }
.vg-grow    { flex: 1 1 auto; min-width: 0; }
.vg-stack   { display: flex; flex-direction: column; gap: 10px; }
.vg-center  { text-align: center; }
.vg-right   { text-align: right; }
.vg-mt-0 { margin-top: 0 !important; }
.vg-mb-0 { margin-bottom: 0 !important; }
.vg-muted { color: var(--vg-muted); }
.vg-strong { font-weight: 700; }
.vg-xs { font-size: 12px; }
.vg-sm { font-size: 13px; }
.vg-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-hide { display: none !important; }
/* screen-reader-only (for icon-only controls) */
.vg-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.vg-divider { height: 1px; background: var(--vg-line); border: 0; margin: 14px 0; }
.vg-text-green { color: var(--vg-green); }
.vg-text-danger { color: var(--vg-danger); }


/* =========================================================================
   19. RESPONSIVE — desktop shell (>=1024px)
   Sidebar becomes permanent, tab bar hides, content shifts right.
   ========================================================================= */
@media (min-width: 1024px) {
  .vg-tabbar { display: none; }

  .vg-sidebar { transform: translateX(0); }
  .vg-scrim { display: none; }

  .vg-appbar  { left: var(--vg-sidebar-w); }
  .vg-content {
    margin-left: var(--vg-sidebar-w);
    padding: calc(var(--vg-appbar-h) + var(--vg-safe-t) + 20px) 22px 32px;
    transition: margin-left .28s var(--vg-ease);
  }

  /* collapsed rail — JS toggles .vg-sidebar-collapsed on .vg-app */
  .vg-app.vg-sidebar-collapsed .vg-sidebar { width: 68px; }
  .vg-app.vg-sidebar-collapsed .vg-sidebar-head span,
  .vg-app.vg-sidebar-collapsed .vg-sidenav-item span,
  .vg-app.vg-sidebar-collapsed .vg-sidenav-label { display: none; }
  .vg-app.vg-sidebar-collapsed .vg-sidenav-item { justify-content: center; padding: 10px 0; }
  .vg-app.vg-sidebar-collapsed .vg-sidebar-head { justify-content: center; padding-left: 0; padding-right: 0; }
  .vg-app.vg-sidebar-collapsed .vg-appbar  { left: 68px; }
  .vg-app.vg-sidebar-collapsed .vg-content { margin-left: 68px; }

  .vg-content { max-width: none; }
  .vg-card { margin-bottom: 18px; }
}

/* wider gutters on very large screens */
@media (min-width: 1440px) {
  .vg-content { padding-left: 32px; padding-right: 32px; }
}


/* =========================================================================
   20. ACCESSIBILITY / MOTION / PRINT
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .vg-app *,
  .vg-app *::before,
  .vg-app *::after,
  .vg-sidebar, .vg-scrim, .vg-modal, .vg-modal-panel, .vg-toast, .vg-fab {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .vg-skeleton::after { animation: none; }
  .vg-btn:active, .vg-fab:active, .vg-tab:active i { transform: none; }
}

/* visible keyboard focus everywhere */
.vg-app a:focus-visible,
.vg-app button:focus-visible,
.vg-tab:focus-visible,
.vg-list-item:focus-visible,
.vg-pill:focus-visible {
  outline: 2px solid var(--vg-teal);
  outline-offset: 2px;
  border-radius: 8px;
}

@media print {
  .vg-appbar, .vg-tabbar, .vg-sidebar, .vg-fab, .vg-scrim, .vg-toast-host { display: none !important; }
  .vg-content { margin: 0 !important; padding: 0 !important; }
  .vg-card { box-shadow: none; break-inside: avoid; }
  .vg-table-wrap { overflow: visible; }
}


/* =========================================================================
   12. DARK THEME  — opt-in via `vg-dark` on <body>
   -------------------------------------------------------------------------
   The member panel's legacy stylesheet (app/Assets/Website/assets/css/styles.css)
   paints `body { background-color: var(--surface) }` = #11150f. The vg- system
   was authored light, so loading it after the legacy sheet whited-out the panel.
   This block restores the legacy dark palette WITHOUT touching the 43 views that
   already use vg- classes.

   The palette below is the legacy sheet's own :root, reused verbatim — not
   re-invented: --surface #11150f, --secondary #7e8088, --primary #25c866,
   --menuDark #222223, --backdrop #161616, --line #393737.

   Scoped to `.vg-dark` so the AdminLTE admin panel, which loads this same file,
   is unaffected.
   ========================================================================= */
.vg-dark {
  /* page + surfaces */
  --vg-bg:          #11150f;
  --vg-bg-soft:     #11150f;
  --vg-bg-soft-2:   #1e241c;
  --vg-surface:     #181e16;   /* cards / raised panels */
  --vg-surface-2:   #12170f;   /* recessed: inputs, table stripes */
  /* text */
  --vg-ink:         #e9eeec;
  --vg-slate:       #b4bcb7;
  --vg-muted:       #808a83;
  /* lines */
  --vg-line:        #2f362d;
  --vg-line-strong: #3d453a;
}

/* The legacy sheet already paints <body>; keep them in lockstep. */
body.vg-dark { background-color: var(--vg-bg); color: var(--vg-ink); }
.vg-dark .vg-app { background: var(--vg-bg); color: var(--vg-ink); }

/* ---- surfaces that hardcoded #fff ---------------------------------------- */
.vg-dark .vg-card,
.vg-dark .vg-stat,
.vg-dark .vg-modal-panel {
  background: var(--vg-surface);
  border-color: var(--vg-line);
  color: var(--vg-ink);
}
.vg-dark .vg-card--soft { background: var(--vg-bg-soft-2); }
.vg-dark .vg-appbar--plain {
  background: var(--vg-surface);
  color: var(--vg-ink);
  border-bottom-color: var(--vg-line);
}
/* bottom tab bar — translucent (it backdrop-blurs the page behind it), so this
   must stay rgba rather than a flat token, and the light shadow must go dark. */
.vg-dark .vg-tabbar {
  background: rgba(24, 30, 22, .94);
  border-top-color: var(--vg-line);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .5);
}
/* --vg-teal-deep (#0b8f8e) is a light-theme accent; too dim to read on #11150f */
.vg-dark .vg-tab.is-active { color: var(--vg-green); }
.vg-dark .vg-table { background: var(--vg-surface); color: var(--vg-ink); }
.vg-dark .vg-table th { background: var(--vg-bg-soft-2); color: var(--vg-slate); }
.vg-dark .vg-table td { border-color: var(--vg-line); }
.vg-dark .vg-table tbody tr:hover td { background: rgba(255,255,255,.03); }
.vg-dark .vg-pill { background: var(--vg-bg-soft-2); color: var(--vg-slate); border-color: var(--vg-line); }
.vg-dark .vg-btn--ghost { background: var(--vg-surface); color: var(--vg-ink); border-color: var(--vg-line); }
.vg-dark .vg-btn--ghost:hover { background: var(--vg-bg-soft-2); }
.vg-dark .vg-tabs-btn.is-active { background: var(--vg-surface); color: var(--vg-ink); }

/* ---- accent TEXT colours: the token flip does not reach these -------------
   The rules above fix surfaces. These components instead hardcode a *foreground*
   that was chosen to sit on a WHITE card — dark teal/red/amber/navy. Flipping
   the surface to #181e16 leaves that text stranded, so each one had to be
   re-picked. Measured on the real pages with a computed-style contrast pass
   (every pair below was failing WCAG AA before):

     .vg-badge--navy    #113a5e on #17211d = 1.41:1  <- effectively invisible
     .vg-badge--danger  #c23237 on #31231d = 2.74:1
     .vg-btn--soft      #0b8f8e on #183223 = 3.52:1
     .vg-badge--info    #0b8f8e on #17312a = 3.54:1
     .vg-link           #0b8f8e on #181e16 = 4.31:1

   Each replacement keeps the component hue and only raises lightness, so the
   semantic reading (green=ok, red=bad) is unchanged. These are shared vg-
   components, so fixing them here fixes every admin + member page at once —
   no page view needs to know. */
.vg-dark .vg-link { color: #5ed5d4; }
.vg-dark .vg-link:hover { color: var(--vg-green-light, #4ade80); }
.vg-dark .vg-btn--soft { color: #7ee2a8; }
.vg-dark .vg-badge--success { color: #7ee2a8; }
.vg-dark .vg-badge--danger  { background: rgba(229,72,77,.16);  color: #ff9b9e; }
.vg-dark .vg-badge--warn    { color: #f5c37a; }
.vg-dark .vg-badge--info    { color: #5ed5d4; }
/* navy-on-navy cannot work here: the .10 navy tint is nearly the page colour and
   the navy text is darker still. Lift both onto a readable blue. */
.vg-dark .vg-badge--navy    { background: rgba(106,184,255,.14); color: #9dc9f5; }
/* .vg-pill hardcodes background:#fff (section 8) */
.vg-dark .vg-pill:hover { border-color: var(--vg-teal); color: #5ed5d4; }

/* ---- form controls ------------------------------------------------------- */
/* background-COLOR, not the `background` shorthand: .vg-select paints its
   dropdown caret as a background-image data-URI (section 7), and the shorthand
   resets it to none — which silently removed the caret from every select in
   dark mode, app-wide. */
.vg-dark .vg-input,
.vg-dark .vg-select,
.vg-dark .vg-textarea {
  background-color: var(--vg-surface-2);
  color: var(--vg-ink);
  border-color: var(--vg-line-strong);
}
/* the caret SVG hardcodes fill/stroke #6b7c8c (a light-theme grey); re-issue it
   at --vg-muted #808a83 so it reads against #12170f. */
.vg-dark .vg-select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23808a83'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6' stroke='%23808a83' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.vg-dark .vg-input::placeholder,
.vg-dark .vg-textarea::placeholder { color: var(--vg-muted); }
.vg-dark .vg-input:disabled,
.vg-dark .vg-select:disabled,
.vg-dark .vg-input[readonly] { background: var(--vg-bg-soft-2); color: var(--vg-muted); }
/* native dropdown list + autofill both ignore the rules above */
.vg-dark .vg-select option { background: var(--vg-surface); color: var(--vg-ink); }
.vg-dark .vg-input:-webkit-autofill,
.vg-dark .vg-input:-webkit-autofill:hover,
.vg-dark .vg-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--vg-ink);
  -webkit-box-shadow: 0 0 0 1000px var(--vg-surface-2) inset;
  caret-color: var(--vg-ink);
}
.vg-dark { color-scheme: dark; }

/* ---- auth pages (login / register / forgot) ------------------------------
   These pages define their own `vga-` namespace INLINE, after this file loads.
   Equal-specificity rules would lose on source order, so every selector here is
   `.vg-dark .vga-*` (0,2,0) which beats the page's bare `.vga-*` (0,1,0).      */
.vg-dark.vga-body { background: var(--vg-bg); color: var(--vg-ink); }
/* the page's ::before lays a green/teal glow over the navy gradient; on black it
   reads as haze, so soften it rather than remove it (keeps the brand warmth). */
.vg-dark.vga-body::before {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(37,200,102,.10) 0%, rgba(37,200,102,0) 60%),
    radial-gradient(90% 55% at 100% 0%, rgba(14,165,164,.07) 0%, rgba(14,165,164,0) 65%);
}
.vg-dark .vga-card {
  background: var(--vg-surface);
  border: 1px solid var(--vg-line);
  box-shadow: 0 26px 60px rgba(0,0,0,.55);
}
.vg-dark .vga-title { color: var(--vg-ink); }
.vg-dark .vga-sub,
.vg-dark .vga-secure { color: var(--vg-muted); }
.vg-dark .vga-foot { color: var(--vg-slate); }
/* light-theme alert text was darkened for white cards; unreadable on #181e16 */
.vg-dark .vga-alert--danger  { background: rgba(229,72,77,.14);  color: #ff9b9e; border-color: rgba(229,72,77,.34); }
.vg-dark .vga-alert--warn    { background: rgba(245,165,36,.14); color: #f5c37a; border-color: rgba(245,165,36,.34); }
.vg-dark .vga-alert--success { background: rgba(37,200,102,.14); color: #7ee2a8; border-color: rgba(37,200,102,.34); }

/* ---- box-sizing: the auth pages are NOT inside .vg-app -------------------
   `.vg-app *` (line ~141) is the ONLY border-box rule in this file, so on the
   auth pages `.vg-input { width:100%; padding:11px 14px; border:1.5px }` fell
   back to content-box and overflowed its card by exactly 31px. Scope it to the
   auth shell too. This is a layout fix and is deliberately NOT under .vg-dark. */
.vga-body *,
.vga-body *::before,
.vga-body *::after { box-sizing: border-box; }

/* ---- registration credentials block -------------------------------------
   Shown once on the register success modal because send_email() discards its
   result: a silent SMTP failure would otherwise lock the member out for good. */
.vg-cred-box {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: var(--vg-radius-sm);
  background: var(--vg-bg-soft-2, #f4faf7);
  border: 1px solid var(--vg-line);
}
.vg-cred-warn { margin: 0 0 10px; font-size: 13px; color: var(--vg-warn); }
.vg-cred-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
.vg-cred-list dt { font-size: 12.5px; font-weight: 600; color: var(--vg-slate); }
.vg-cred-list dd { margin: 0; }
.vg-cred-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14.5px; font-weight: 600;
  color: var(--vg-ink);
  background: var(--vg-surface-2, rgba(0,0,0,.05));
  border: 1px solid var(--vg-line);
  border-radius: 6px;
  padding: 4px 9px;
  user-select: all;              /* one click selects the whole value */
  word-break: break-all;
}

/* ---- page-local namespaces ----------------------------------------------
   The feature screens each define a page-scoped namespace inline (vgd- dashboard,
   vgbh- boosting history, vgab- auto-blast, vgww-, vgrp-, vgmta-, vg-boost-).
   Almost all of those rules read var(--vg-ink / --vg-line / --vg-bg-soft ...),
   so the token overrides above already carry them. Listed here are ONLY the
   surfaces that hardcode a literal white and therefore ignore the tokens.

   NOT included on purpose:
     .vgd-meter > span  — a white meter fill sitting INSIDE a coloured wallet
                          gradient; white is correct there.
     --vg-white         — left at #fff; it is the text colour on brand gradients,
                          so flipping the token would wreck the wallet tiles.   */
.vg-dark .vgd-action {
  background: var(--vg-surface);
  border-color: var(--vg-line);
  box-shadow: none;
}
.vg-dark .vgd-action:hover { border-color: var(--vg-green); background: var(--vg-bg-soft-2); }
.vg-dark .vgbh-node      { background: var(--vg-surface); border-color: var(--vg-line); }
.vg-dark .vgab-flow-step { background: var(--vg-surface); border-color: var(--vg-line); }


/* =========================================================================
   13. ADMIN / ADMINLTE DARK  — everything the tokens in 12 cannot reach
   -------------------------------------------------------------------------
   Section 12 recolours the `.vg-` components by flipping tokens. That works
   because those components READ the tokens. AdminLTE 3 + bootstrap 4 do not:
   they ship literal hexes (#fff, #f4f6f9, #343a40, #333 ...) baked into
   dist/css/adminlte.min.css and the DataTables sheet. Those files load BEFORE
   this one and are never edited, so the only way to darken them is to restate
   the painted properties here.

   The admin <body> carries `vg-dark` (application/views/admin/header.php), so
   the token block in 12 is already in effect; this section only fixes literals.

   PALETTE: none invented. Everything resolves from 12, which reuses the legacy
   member-panel sheet (app/Assets/Website/assets/css/styles.css) verbatim:
     --surface #11150f  --secondary #7e8088  --primary #25c866
     --menuDark #222223 --backdrop #161616   --line #393737

   SHELL PARITY: the member panel app bar is `.vg-appbar--navy` and its sidebar
   is the same navy ramp, both floating over the #11150f body. The admin sidebar
   already uses --vg-grad-navy; the top bar was hardcoded #fff, so it is flipped
   to the same ramp below. That is what makes the two panels read as one product
   rather than two themes.

   SPECIFICITY: the inline <style> in header.php loads AFTER this file, so equal
   specificity would lose on source order. Every rule here is prefixed `.vg-dark`
   (+1 class), and the few inline rules using !important are met with !important.

   SCOPE: every selector is under `.vg-dark`. Admin pages are the only AdminLTE
   pages that opt in, so nothing here can leak to a light page.

   NOTE ON NUMBERING: this file has two numbering runs — an original 1..20 and
   the dark-theme block appended after it as "12". This section continues that
   appended run (12 -> 13) and is deliberately last in the file.
   ========================================================================= */

/* ---- 13.1 shell ---------------------------------------------------------- */
/* AdminLTE: .content-wrapper{background:#f4f6f9} — the single biggest light
   surface on every admin page. */
.vg-dark .content-wrapper,
.vg-dark .content-wrapper > .content,
.vg-dark .content-header {
  background: var(--vg-bg);
  color: var(--vg-ink);
}
/* AdminLTE: .preloader{background-color:#454d55!important} — a full-viewport
   flash of grey before adminlte.js fades it out. */
.vg-dark .preloader { background-color: var(--vg-bg) !important; }

/* Top bar — header.php paints `.main-header.navbar{background:#fff}` (0,2,0);
   this is (0,3,0) so it wins without !important. Matches .vg-appbar--navy. */
.vg-dark .main-header.navbar,
.vg-dark .main-header.navbar-white,
.vg-dark .main-header.navbar-light {
  background: var(--vg-grad-navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 14px rgba(0,0,0,.45);
}
/* navbar text: header.php forces --vg-slate !important on .main-header .nav-link.
   #b4bcb7 on the navy ramp is ~8:1, so the token flip alone is already AA. The
   hover state below only needs a surface that reads on navy. */
.vg-dark .main-header .nav-link:hover,
.vg-dark .main-header .nav-link:focus {
  background: rgba(255,255,255,.10);
  color: #fff !important;
}
.vg-dark .vg-admin-brandmark { color: #fff; }
/* the env pill + user chip were tinted for a white bar; on navy they vanish */
.vg-dark .vg-admin-envpill {
  color: var(--vg-green-light, #4ade80);
  background: rgba(37,200,102,.14);
  border-color: rgba(37,200,102,.32);
}
.vg-dark .vg-admin-user { background: rgba(255,255,255,.08); }
.vg-dark .vg-admin-user:hover { background: rgba(37,200,102,.18); }
.vg-dark .vg-admin-username { color: #fff; }
.vg-dark .navbar-search-block .form-control-navbar {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}
.vg-dark .navbar-search-block .form-control-navbar::placeholder { color: rgba(255,255,255,.5); }

/* Sidebar — header.php already sets --vg-grad-navy !important, which is exactly
   the member panel ramp. Left alone on purpose; only the search results and the
   AdminLTE `sidebar-dark-primary` divider need help. */
.vg-dark .main-sidebar { box-shadow: 2px 0 24px rgba(0,0,0,.5); }
.vg-dark .sidebar-dark-primary .brand-link { border-bottom-color: rgba(255,255,255,.08); }
.vg-dark .main-sidebar .sidebar-search-results .list-group-item {
  background: var(--vg-surface);
  border-color: var(--vg-line);
  color: var(--vg-ink);
}

/* Footer — header.php paints `.main-footer{background:#fff}` (0,1,0). */
.vg-dark .main-footer {
  background: var(--vg-surface);
  border-top-color: var(--vg-line);
  color: var(--vg-muted);
}
.vg-dark .main-footer a { color: var(--vg-green); }
.vg-dark .vg-admin-foot-brand { color: var(--vg-ink); }
.vg-dark .vg-admin-foot-right { color: var(--vg-green); }
.vg-dark .control-sidebar { background: var(--vg-surface) !important; color: var(--vg-ink); }

/* ---- 13.2 cards ---------------------------------------------------------- */
/* AdminLTE: .card{background:#fff} .card-header{border-bottom:1px solid rgba(0,0,0,.125)}
   White cards dropped onto a black wrapper is THE signature broken-dark look. */
.vg-dark .card {
  background: var(--vg-surface);
  color: var(--vg-ink);
  border: 1px solid var(--vg-line);
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.vg-dark .card-header {
  background: transparent;
  border-bottom-color: var(--vg-line);
  color: var(--vg-ink);
}
.vg-dark .card-body   { background: transparent; color: var(--vg-ink); }
.vg-dark .card-footer { background: var(--vg-surface-2); border-top-color: var(--vg-line); color: var(--vg-slate); }
.vg-dark .card-title  { color: var(--vg-ink); }
.vg-dark .card-comments,
.vg-dark .card-comment { background: var(--vg-surface-2); color: var(--vg-ink); }
/* .card-outline keeps its coloured top rule; only the body needs darkening */
.vg-dark .card.card-outline { background: var(--vg-surface); }
/* AdminLTE tool buttons sit on the card header */
.vg-dark .card-tools .btn-tool { color: var(--vg-muted); }
.vg-dark .card-tools .btn-tool:hover { color: var(--vg-ink); }

/* .info-box / .small-box: .info-box{background:#fff}. .small-box already gets a
   bg-* colour from the page (bg-success/bg-info are the two actually served), so
   only the uncoloured default and the footer strip need attention. */
.vg-dark .info-box { background: var(--vg-surface); color: var(--vg-ink); box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.vg-dark .info-box-content { color: var(--vg-ink); }
.vg-dark .info-box-text, .vg-dark .progress-description { color: var(--vg-slate); }
.vg-dark .info-box .progress { background: rgba(255,255,255,.10); }
.vg-dark .small-box:not([class*="bg-"]) { background: var(--vg-surface); color: var(--vg-ink); }
.vg-dark .small-box > .small-box-footer { color: rgba(255,255,255,.9); background: rgba(0,0,0,.18); }
.vg-dark .small-box > .small-box-footer:hover { color: #fff; background: rgba(0,0,0,.3); }

/* .callout{background:#fff;border-left:5px solid #e9ecef} */
.vg-dark .callout {
  background: var(--vg-surface);
  color: var(--vg-ink);
  border-left-color: var(--vg-line-strong);
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
}

/* .direct-chat — .direct-chat-text{background:#d2d6de;color:#444} */
.vg-dark .direct-chat-text {
  background: var(--vg-bg-soft-2);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .direct-chat-text:after,
.vg-dark .direct-chat-text:before { border-right-color: var(--vg-bg-soft-2); }
.vg-dark .right .direct-chat-text:after,
.vg-dark .right .direct-chat-text:before { border-left-color: var(--vg-bg-soft-2); }
.vg-dark .direct-chat-timestamp { color: var(--vg-muted); }
.vg-dark .direct-chat-contacts { background: var(--vg-surface-2); color: var(--vg-ink); }

/* ---- 13.3 tables --------------------------------------------------------- */
/* bootstrap: .table{color:#212529} — near-black text. On #181e16 that is ~1.1:1,
   i.e. completely invisible. This is the worst offender in the admin. */
.vg-dark .table { color: var(--vg-ink); }
.vg-dark .table th,
.vg-dark .table td { border-color: var(--vg-line); }
/* background-COLOR, never the `background` shorthand: DataTables paints its sort
   arrows as a background-image on these same <th>s, and the shorthand would
   silently reset background-image/-repeat/-position along with the colour. */
.vg-dark .table thead th {
  border-bottom-color: var(--vg-line-strong);
  color: var(--vg-slate);
  background-color: var(--vg-bg-soft-2);
}
.vg-dark .table tbody + tbody { border-top-color: var(--vg-line-strong); }
.vg-dark .table-bordered,
.vg-dark .table-bordered th,
.vg-dark .table-bordered td { border-color: var(--vg-line); }
/* .table-striped stripes with rgba(0,0,0,.05) — invisible on black. */
.vg-dark .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255,255,255,.028); color: var(--vg-ink); }
.vg-dark .table-hover tbody tr:hover { background-color: rgba(37,200,102,.09); color: var(--vg-ink); }
.vg-dark .table-active,
.vg-dark .table-active > td,
.vg-dark .table-active > th { background-color: rgba(255,255,255,.06); }
/* AdminLTE wraps tables in .table-responsive */
.vg-dark .table-responsive { background: transparent; }
/* legacy helpers from header.php: `.bluecolor{color:black}` is literally black */
.vg-dark .bluecolor { color: var(--vg-ink); }
.vg-dark .redcolor  { color: #ff8f92; }

/* ---- 13.4 forms ---------------------------------------------------------- */
/* bootstrap: .form-control{color:#495057;background-color:#fff;border:1px solid #ced4da}
   and — the one everybody forgets — .form-control:focus ALSO re-asserts
   background-color:#fff, so a field that looked right went white on click. */
.vg-dark .form-control,
.vg-dark .form-control-sm,
.vg-dark .form-control-lg,
.vg-dark .custom-select,
.vg-dark textarea.form-control {
  background-color: var(--vg-surface-2);
  color: var(--vg-ink);
  border-color: var(--vg-line-strong);
}
.vg-dark .form-control:focus,
.vg-dark .custom-select:focus {
  background-color: var(--vg-surface-2);
  color: var(--vg-ink);
  border-color: var(--vg-green);
  box-shadow: 0 0 0 .2rem rgba(37,200,102,.22);
}
.vg-dark .form-control::placeholder { color: var(--vg-muted); opacity: 1; }
.vg-dark .form-control:disabled,
.vg-dark .form-control[readonly],
.vg-dark .custom-select:disabled {
  background-color: var(--vg-bg-soft-2);
  color: var(--vg-muted);
}
/* the native dropdown list ignores the colours set on the select itself */
.vg-dark .form-control option,
.vg-dark .custom-select option,
.vg-dark select option { background: var(--vg-surface); color: var(--vg-ink); }
/* .input-group-text{background:#e9ecef;color:#495057} */
.vg-dark .input-group-text {
  background-color: var(--vg-bg-soft-2);
  border-color: var(--vg-line-strong);
  color: var(--vg-slate);
}
.vg-dark .custom-file-label,
.vg-dark .custom-file-label::after {
  background-color: var(--vg-surface-2);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .form-control-plaintext { color: var(--vg-ink); }
.vg-dark label,
.vg-dark .col-form-label { color: var(--vg-slate); }
.vg-dark .form-text,
.vg-dark small.form-text { color: var(--vg-muted); }
.vg-dark .custom-control-label { color: var(--vg-ink); }
.vg-dark .custom-control-label::before { background-color: var(--vg-surface-2); border-color: var(--vg-line-strong); }
/* Chrome paints autofilled inputs #e8f0fe regardless of background-color */
.vg-dark .form-control:-webkit-autofill,
.vg-dark .form-control:-webkit-autofill:hover,
.vg-dark .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--vg-ink);
  -webkit-box-shadow: 0 0 0 1000px var(--vg-surface-2) inset;
  caret-color: var(--vg-ink);
}

/* ---- 13.5 buttons -------------------------------------------------------- */
/* .btn-default{background:#f8f9fa;color:#1f2d3d} .btn-light{background:#f8f9fa}
   Their own text/bg pair is legible, but a bright white slab on a black page is
   the "white card" failure in button form. */
.vg-dark .btn-default,
.vg-dark .btn-light {
  background-color: var(--vg-bg-soft-2);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .btn-default:hover,
.vg-dark .btn-light:hover {
  background-color: var(--vg-line);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .btn-outline-secondary,
.vg-dark .btn-outline-dark { color: var(--vg-slate); border-color: var(--vg-line-strong); }
.vg-dark .btn-outline-secondary:hover,
.vg-dark .btn-outline-dark:hover { background: var(--vg-bg-soft-2); color: var(--vg-ink); }
.vg-dark .btn-link { color: var(--vg-green); }

/* ---- 13.6 modals --------------------------------------------------------- */
/* .modal-content{background:#fff} .close{color:#000;text-shadow:0 1px 0 #fff} */
.vg-dark .modal-content {
  background: var(--vg-surface);
  color: var(--vg-ink);
  border: 1px solid var(--vg-line);
  box-shadow: 0 26px 60px rgba(0,0,0,.6);
}
.vg-dark .modal-header { border-bottom-color: var(--vg-line); }
.vg-dark .modal-footer { border-top-color: var(--vg-line); }
.vg-dark .modal-title  { color: var(--vg-ink); }
.vg-dark .modal-body   { color: var(--vg-ink); }
.vg-dark .close {
  color: var(--vg-ink);
  text-shadow: none;
  opacity: .75;
}
.vg-dark .close:hover { color: var(--vg-ink); text-shadow: none; opacity: 1; }
/* header.php sets `.modal-backdrop{background:none}` — with a dark modal on a
   dark page there is then NOTHING separating them. Restore a real scrim. */
.vg-dark .modal-backdrop,
.vg-dark .modal-backdrop.show { background-color: rgba(0,0,0,.65); opacity: 1; }

/* ---- 13.7 dropdowns ------------------------------------------------------ */
.vg-dark .dropdown-menu {
  background-color: var(--vg-surface);
  border-color: var(--vg-line);
  box-shadow: 0 12px 34px rgba(0,0,0,.5);
}
.vg-dark .dropdown-item { color: var(--vg-slate); }
.vg-dark .dropdown-item:hover,
.vg-dark .dropdown-item:focus { background-color: var(--vg-bg-soft-2); color: var(--vg-ink); }
.vg-dark .dropdown-item.active,
.vg-dark .dropdown-item:active { background-color: rgba(37,200,102,.18); color: var(--vg-ink); }
.vg-dark .dropdown-divider { border-top-color: var(--vg-line); }
.vg-dark .dropdown-header  { color: var(--vg-muted); }
.vg-dark .vg-admin-menu-head { border-bottom-color: var(--vg-line); }
.vg-dark .vg-admin-menu-head strong { color: var(--vg-ink); }

/* ---- 13.8 breadcrumb / pagination ---------------------------------------- */
/* .breadcrumb{background:#e9ecef} — a light grey bar on every content-header */
.vg-dark .breadcrumb { background-color: transparent; }
.vg-dark .breadcrumb-item + .breadcrumb-item::before { color: var(--vg-muted); }
.vg-dark .breadcrumb-item.active { color: var(--vg-muted); }
/* links are bootstrap #007bff = 2.9:1 on #11150f — fails AA. Brand green is 7:1. */
.vg-dark .breadcrumb-item a { color: var(--vg-green); }
.vg-dark .breadcrumb-item a:hover { color: var(--vg-green-light); }

/* .page-link{background:#fff;color:#007bff} .page-item.disabled{background:#fff} */
.vg-dark .page-link {
  background-color: var(--vg-surface);
  border-color: var(--vg-line);
  color: var(--vg-ink);
}
.vg-dark .page-link:hover { background-color: var(--vg-bg-soft-2); border-color: var(--vg-line-strong); color: var(--vg-ink); }
.vg-dark .page-item.active .page-link { background-color: var(--vg-green); border-color: var(--vg-green); color: #04160c; }
.vg-dark .page-item.disabled .page-link { background-color: var(--vg-surface-2); border-color: var(--vg-line); color: var(--vg-muted); }
.vg-dark .pagination { background: transparent; }

/* ---- 13.9 badges / lists / alerts ---------------------------------------- */
/* .badge-light{background:#f8f9fa;color:#212529} — a white chip on black */
.vg-dark .badge-light { background-color: var(--vg-bg-soft-2); color: var(--vg-ink); }
.vg-dark .badge-secondary { background-color: var(--vg-line-strong); color: var(--vg-ink); }
.vg-dark .list-group-item {
  background-color: var(--vg-surface);
  border-color: var(--vg-line);
  color: var(--vg-ink);
}
.vg-dark .list-group-item-action:hover { background-color: var(--vg-bg-soft-2); color: var(--vg-ink); }
.vg-dark .list-group-item.active { background-color: rgba(37,200,102,.18); border-color: var(--vg-green); color: var(--vg-ink); }
/* bootstrap alerts are pale-bg + dark-text. Readable in isolation, but they read
   as light patches on a dark page — same treatment 12 gave .vga-alert--*. */
.vg-dark .alert-success { background-color: rgba(37,200,102,.14);  border-color: rgba(37,200,102,.34);  color: #7ee2a8; }
.vg-dark .alert-danger  { background-color: rgba(229,72,77,.14);   border-color: rgba(229,72,77,.34);   color: #ff9b9e; }
.vg-dark .alert-warning { background-color: rgba(245,165,36,.14);  border-color: rgba(245,165,36,.34);  color: #f5c37a; }
.vg-dark .alert-info    { background-color: rgba(14,165,164,.14);  border-color: rgba(14,165,164,.34);  color: #5ed5d4; }
.vg-dark .alert-secondary,
.vg-dark .alert-light,
.vg-dark .alert-dark    { background-color: var(--vg-bg-soft-2);   border-color: var(--vg-line-strong); color: var(--vg-ink); }
.vg-dark .alert-success .alert-link { color: #a9efc6; }
.vg-dark .alert-danger .alert-link  { color: #ffc2c4; }

/* ---- 13.10 text + background utilities ----------------------------------- */
/* THE classic dark-mode bug: light-theme text utilities left on dark surfaces.
   `.text-dark{color:#343a40}` is served on 3 admin pages and renders at ~1.4:1
   on #11150f — invisible. `.text-muted{color:#6c757d}` lands at 3.8:1, under the
   4.5:1 body-text bar. Both are re-pointed at tokens that clear AA. */
.vg-dark .text-dark  { color: var(--vg-ink) !important; }
.vg-dark .text-body  { color: var(--vg-ink) !important; }
.vg-dark .text-black-50 { color: var(--vg-slate) !important; }
.vg-dark .text-muted,
.vg-dark .text-secondary { color: var(--vg-muted) !important; }   /* 5.0:1 */
/* bootstrap semantic text colours were picked for white backgrounds and lose too
   much contrast when the background inverts. Lightened, same hues. */
.vg-dark .text-primary { color: #6ab8ff !important; }   /* was #007bff -> 2.9:1 */
.vg-dark .text-danger  { color: #ff8f92 !important; }   /* was #dc3545 -> 3.4:1 */
.vg-dark .text-success { color: #4ade80 !important; }   /* was #28a745 -> 4.9:1 */
.vg-dark .text-info    { color: #5ed5d4 !important; }
.vg-dark .text-warning { color: #f5c37a !important; }
.vg-dark .text-white   { color: #fff !important; }
/* white slabs painted by utility class */
.vg-dark .bg-white { background-color: var(--vg-surface) !important; color: var(--vg-ink); }
.vg-dark .bg-light { background-color: var(--vg-bg-soft-2) !important; color: var(--vg-ink); }
.vg-dark .bg-gray-light { background-color: var(--vg-bg-soft-2) !important; color: var(--vg-ink); }
/* the AdminLTE dark utility is now LIGHTER than the page — neutralise it */
.vg-dark .bg-dark { background-color: var(--vg-surface-2) !important; color: var(--vg-ink); }
.vg-dark hr { border-top-color: var(--vg-line); }
.vg-dark .border,
.vg-dark .border-top, .vg-dark .border-right,
.vg-dark .border-bottom, .vg-dark .border-left { border-color: var(--vg-line) !important; }
.vg-dark .content-header h1,
.vg-dark .content-header .m-0 { color: var(--vg-ink); }
.vg-dark .description-block .description-text { color: var(--vg-muted); }
.vg-dark .progress { background-color: rgba(255,255,255,.08); }

/* ---- 13.11 DataTables ---------------------------------------------------- */
/* assetsAdmin/DataTables/media/css/jquery.dataTables.min.css (1.10.6) sets
   `.dataTables_wrapper .dataTables_{length,filter,info,processing,paginate}
   {color:#333}` — the length/search labels, the "Showing 1 to 50 of N entries"
   line and the pager all render #333 on black (~1.3:1, invisible). The pager
   additionally uses `color:#333 !important`, so it must be met with !important. */
.vg-dark .dataTables_wrapper { color: var(--vg-ink); }
.vg-dark .dataTables_wrapper .dataTables_length,
.vg-dark .dataTables_wrapper .dataTables_filter,
.vg-dark .dataTables_wrapper .dataTables_info,
.vg-dark .dataTables_wrapper .dataTables_processing,
.vg-dark .dataTables_wrapper .dataTables_paginate { color: var(--vg-slate); }
.vg-dark .dataTables_wrapper .dataTables_length select,
.vg-dark .dataTables_wrapper .dataTables_filter input {
  background: var(--vg-surface-2);
  color: var(--vg-ink);
  border: 1px solid var(--vg-line-strong);
  border-radius: 8px;
  padding: 5px 9px;
}
.vg-dark .dataTables_wrapper .dataTables_filter input::placeholder { color: var(--vg-muted); }
.vg-dark .dataTables_wrapper .dataTables_filter input:focus,
.vg-dark .dataTables_wrapper .dataTables_length select:focus {
  outline: 0;
  border-color: var(--vg-green);
  box-shadow: 0 0 0 3px rgba(37,200,102,.2);
}
.vg-dark .dataTables_wrapper .dataTables_length select option { background: var(--vg-surface); color: var(--vg-ink); }
/* pager buttons: default #333!important, .current a white->#dcdcdc gradient */
.vg-dark .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--vg-slate) !important;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}
.vg-dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  color: var(--vg-ink) !important;
  border: 1px solid var(--vg-line-strong);
  background: var(--vg-bg-soft-2);
}
.vg-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.vg-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  color: #04160c !important;
  border: 1px solid var(--vg-green);
  background: var(--vg-green);
}
.vg-dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.vg-dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.vg-dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
  color: var(--vg-muted) !important;
  border: 1px solid transparent;
  background: transparent;
}
.vg-dark .dataTables_wrapper .dataTables_paginate .ellipsis { color: var(--vg-muted); }
/* the "Processing..." overlay is a white->transparent gradient */
.vg-dark .dataTables_wrapper .dataTables_processing {
  background: var(--vg-surface);
  color: var(--vg-ink);
  border: 1px solid var(--vg-line);
  border-radius: 8px;
}
/* table body */
.vg-dark table.dataTable { background: var(--vg-surface); color: var(--vg-ink); border-color: var(--vg-line); }
/* background-COLOR only — see the note on `.table thead th` above. Using the
   shorthand here reset background-repeat to `repeat` and background-position to
   `0% 0%`, which tiled the sort arrow across the whole header cell. This rule
   (0,2,3) outranks the DataTables rule that supplies no-repeat/center-right
   (0,2,2), so the shorthand won and the sheet could not put it back. */
.vg-dark table.dataTable thead th,
.vg-dark table.dataTable thead td {
  background-color: var(--vg-bg-soft-2);
  color: var(--vg-ink);
  border-bottom-color: var(--vg-line-strong);
}
.vg-dark table.dataTable tfoot th,
.vg-dark table.dataTable tfoot td { color: var(--vg-slate); border-top-color: var(--vg-line-strong); }
.vg-dark table.dataTable tbody tr { background-color: var(--vg-surface); }
.vg-dark table.dataTable.stripe tbody tr.odd,
.vg-dark table.dataTable.display tbody tr.odd { background-color: rgba(255,255,255,.028); }
.vg-dark table.dataTable.hover tbody tr:hover,
.vg-dark table.dataTable.display tbody tr:hover { background-color: rgba(37,200,102,.09); }
.vg-dark table.dataTable.row-border tbody th,
.vg-dark table.dataTable.row-border tbody td,
.vg-dark table.dataTable.display tbody th,
.vg-dark table.dataTable.display tbody td { border-top-color: var(--vg-line); }
.vg-dark table.dataTable.cell-border tbody th,
.vg-dark table.dataTable.cell-border tbody td { border-top-color: var(--vg-line); border-right-color: var(--vg-line); }
/* the selected-row highlight is a blue that swamps the palette */
.vg-dark table.dataTable tbody tr.selected { background-color: rgba(37,200,102,.22); color: var(--vg-ink); }
/* scrolling tables clone the header into .dataTables_scrollHead — it sits
   OUTSIDE the main <table>, so none of the rules above reach it and it stays
   white. */
.vg-dark .dataTables_scroll,
.vg-dark .dataTables_scrollHead,
.vg-dark .dataTables_scrollHeadInner,
.vg-dark .dataTables_scrollFoot,
.vg-dark .dataTables_scrollFootInner { background: var(--vg-bg-soft-2); color: var(--vg-ink); }
.vg-dark .dataTables_scrollBody { background: var(--vg-surface); }
.vg-dark .dataTables_scrollHead table.dataTable { background: var(--vg-bg-soft-2); }
.vg-dark div.dataTables_scrollBody > table { border-top-color: var(--vg-line); }
/* Sort arrows: 1.10.x paints media/images/sort_*.png — dark grey chevrons that
   disappear on a dark header. Swapped for inline SVG in the palette greys.
   data: URIs are local by definition — no CDN, no new binary to vendor.
   repeat/position/size are restated on every arrow rule rather than left to the
   DataTables sheet: any future `background:` shorthand landing on these <th>s
   would reset them and tile the arrow across the cell. */
.vg-dark table.dataTable thead .sorting,
.vg-dark table.dataTable thead .sorting_asc,
.vg-dark table.dataTable thead .sorting_desc,
.vg-dark table.dataTable thead .sorting_asc_disabled,
.vg-dark table.dataTable thead .sorting_desc_disabled {
  background-repeat: no-repeat;
  background-position: center right;
  background-size: 10px 16px;
}
.vg-dark table.dataTable thead .sorting {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16'%3E%3Cpath d='M5 3L8.5 7H1.5z' fill='%23808a83'/%3E%3Cpath d='M5 13L1.5 9h7z' fill='%23808a83'/%3E%3C/svg%3E");
}
.vg-dark table.dataTable thead .sorting_asc {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16'%3E%3Cpath d='M5 3L8.5 7H1.5z' fill='%2325c866'/%3E%3Cpath d='M5 13L1.5 9h7z' fill='%233d453a'/%3E%3C/svg%3E");
}
.vg-dark table.dataTable thead .sorting_desc {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16'%3E%3Cpath d='M5 3L8.5 7H1.5z' fill='%233d453a'/%3E%3Cpath d='M5 13L1.5 9h7z' fill='%2325c866'/%3E%3C/svg%3E");
}
.vg-dark table.dataTable thead .sorting_asc_disabled,
.vg-dark table.dataTable thead .sorting_desc_disabled {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16'%3E%3Cpath d='M5 3L8.5 7H1.5z' fill='%232f362d'/%3E%3Cpath d='M5 13L1.5 9h7z' fill='%232f362d'/%3E%3C/svg%3E");
}
/* DataTables >= 1.11 dropped the sprites for ::before/::after glyphs. The sheet
   in use is 1.10.6 but the JS is 1.11.x — cover both so a later CSS bump does
   not silently reintroduce dark-on-dark arrows. */
.vg-dark table.dataTable thead th.sorting::before,
.vg-dark table.dataTable thead th.sorting::after,
.vg-dark table.dataTable thead th.sorting_asc::before,
.vg-dark table.dataTable thead th.sorting_asc::after,
.vg-dark table.dataTable thead th.sorting_desc::before,
.vg-dark table.dataTable thead th.sorting_desc::after { color: var(--vg-ink); }
/* TableTools chrome (assetsAdmin/DataTables/extensions/TableTools) */
.vg-dark .DTTT_button,
.vg-dark button.DTTT_button,
.vg-dark div.DTTT_button {
  background: var(--vg-bg-soft-2) !important;
  border-color: var(--vg-line-strong) !important;
  color: var(--vg-ink) !important;
}

/* ---- 13.12 plugins ------------------------------------------------------- */
/* select2 (served on 7 admin views) — .select2-selection{background:#fff} */
.vg-dark .select2-container--default .select2-selection--single,
.vg-dark .select2-container--default .select2-selection--multiple {
  background-color: var(--vg-surface-2);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--vg-ink); }
.vg-dark .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--vg-muted); }
.vg-dark .select2-dropdown {
  background-color: var(--vg-surface);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .select2-container--default .select2-search--dropdown .select2-search__field {
  background: var(--vg-surface-2);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .select2-container--default .select2-results__option { color: var(--vg-ink); }
.vg-dark .select2-container--default .select2-results__option[aria-selected="true"] { background-color: var(--vg-bg-soft-2); }
.vg-dark .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: rgba(37,200,102,.22); color: var(--vg-ink); }
.vg-dark .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--vg-bg-soft-2);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}

/* daterangepicker + tempusdominus (served on 6 admin views) */
.vg-dark .daterangepicker,
.vg-dark .bootstrap-datetimepicker-widget.dropdown-menu {
  background-color: var(--vg-surface);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .daterangepicker td.available:hover,
.vg-dark .daterangepicker th.available:hover { background-color: var(--vg-bg-soft-2); color: var(--vg-ink); }
.vg-dark .daterangepicker td.off,
.vg-dark .daterangepicker td.off.in-range { background-color: var(--vg-surface-2); color: var(--vg-muted); }
.vg-dark .daterangepicker td.in-range { background-color: rgba(37,200,102,.14); color: var(--vg-ink); }
.vg-dark .daterangepicker td.active,
.vg-dark .daterangepicker td.active:hover { background-color: var(--vg-green); color: #04160c; }
.vg-dark .daterangepicker:before { border-bottom-color: var(--vg-line-strong); }
.vg-dark .daterangepicker:after  { border-bottom-color: var(--vg-surface); }
.vg-dark .daterangepicker .calendar-table { background: var(--vg-surface); border-color: var(--vg-line); }
.vg-dark .bootstrap-datetimepicker-widget table td.day:hover { background: var(--vg-bg-soft-2); color: var(--vg-ink); }
.vg-dark .bootstrap-datetimepicker-widget table td.old,
.vg-dark .bootstrap-datetimepicker-widget table td.new { color: var(--vg-muted); }
.vg-dark .bootstrap-datetimepicker-widget table td.active { background-color: var(--vg-green); color: #04160c; }

/* summernote (served on 6 admin views) */
.vg-dark .note-editor.note-frame,
.vg-dark .note-editor .note-toolbar,
.vg-dark .note-editor .note-statusbar {
  background-color: var(--vg-surface);
  border-color: var(--vg-line);
  color: var(--vg-ink);
}
.vg-dark .note-editor .note-editing-area .note-editable {
  background-color: var(--vg-surface-2);
  color: var(--vg-ink);
}
.vg-dark .note-btn { background-color: var(--vg-bg-soft-2); border-color: var(--vg-line-strong); color: var(--vg-ink); }

/* jQuery UI (assetsAdmin/css/jquery-ui.min.css) — autocomplete / datepicker */
.vg-dark .ui-widget-content {
  background: var(--vg-surface);
  border-color: var(--vg-line-strong);
  color: var(--vg-ink);
}
.vg-dark .ui-widget-header { background: var(--vg-bg-soft-2); border-color: var(--vg-line-strong); color: var(--vg-ink); }
.vg-dark .ui-state-default,
.vg-dark .ui-widget-content .ui-state-default { background: var(--vg-surface-2); border-color: var(--vg-line-strong); color: var(--vg-ink); }
.vg-dark .ui-state-active,
.vg-dark .ui-widget-content .ui-state-active { background: var(--vg-green); border-color: var(--vg-green); color: #04160c; }
.vg-dark .ui-menu .ui-menu-item-wrapper.ui-state-active { background: rgba(37,200,102,.22); border-color: transparent; color: var(--vg-ink); }
