/* ============================================================
   TRW theme — literal colours only (no custom-property
   dependencies, so nothing can silently drop).
   Loaded last on dashboard + auth pages.
   ============================================================ */

/* ---------- page canvas ---------- */
html.dark-style,
html.dark-style body{
  background-color: #0a0b18 !important;
  background-image:
    radial-gradient(55% 40% at 10% -5%, rgba(123,97,255,.20), transparent 65%),
    radial-gradient(45% 35% at 100% 0%, rgba(91,61,245,.14), transparent 60%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  color: #e8eaf3 !important;
}
html.dark-style .layout-navbar,
html.dark-style .content-backdrop{ background: transparent !important; }

html.dark-style h1,
html.dark-style h2,
html.dark-style h3,
html.dark-style h4,
html.dark-style h5,
html.dark-style h6,
html.dark-style .h1,
html.dark-style .h2,
html.dark-style .h3,
html.dark-style .h4,
html.dark-style .h5,
html.dark-style .h6,
html.dark-style .card-title{ color:#fff !important; }
html.dark-style .text-muted,
html.dark-style .text-body-secondary{ color:#98a0b3 !important; }
html.dark-style a{ color:#a78bfa; }
html.dark-style a:hover{ color:#d6c9ff; }

/* ---------- cards ---------- */
html.dark-style .layout-wrapper,
html.dark-style .layout-page,
html.dark-style .content-wrapper,
html.dark-style .layout-container,
html.dark-style body .card,
html.dark-style body .card.h-100,
html.dark-style body .card.shadow-none{
  background-color: #131425 !important;
  background-image: none !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.45) !important;
  color: #e8eaf3 !important;
}
html.dark-style body .card > .card-body{ padding: 1.15rem 1.25rem !important; }
html.dark-style body .card-footer{ background: transparent !important; border-color: rgba(255,255,255,.07) !important; }

html.dark-style body .card-header,
html.dark-style .modal-content,
html.dark-style .dropdown-menu,
html.dark-style .offcanvas,
html.dark-style .list-group-item,
html.dark-style .accordion-item{
  background-color: #131425 !important;
  border-color: rgba(255,255,255,.07) !important;
  color: #e8eaf3 !important;
}
html.dark-style .dropdown-item{ color:#e8eaf3; }
html.dark-style .dropdown-item:hover,
html.dark-style .dropdown-item:focus{ background-color: rgba(123,97,255,.14) !important; color:#fff; }
html.dark-style .table{ --bs-table-bg: transparent; --bs-table-color:#e8eaf3; --bs-table-border-color: rgba(255,255,255,.07); }

/* ---------- buttons ---------- */
html.dark-style .btn{ border-radius: 12px; font-weight: 600; }
html.dark-style .btn-primary{
  background-image: linear-gradient(135deg,#8b5cf6 0%,#6d28d9 100%) !important;
  background-color: #7c3aed !important;
  border: 0 !important;
  color:#fff !important;
  box-shadow: 0 10px 24px rgba(109,40,217,.38) !important;
  padding: .55rem 1.15rem !important;
}
html.dark-style .btn-primary:hover,
html.dark-style .btn-primary:focus{
  background-image: linear-gradient(135deg,#9a70ff 0%,#7c3aed 100%) !important;
  box-shadow: 0 12px 28px rgba(109,40,217,.5) !important;
}
html.dark-style .btn-outline-primary{
  border: 1px solid rgba(167,139,250,.45) !important;
  color:#c9bcff !important;
  background-color: rgba(123,97,255,.08) !important;
  padding: .55rem 1.15rem !important;
}
html.dark-style .btn-outline-primary:hover{
  background-color: rgba(123,97,255,.2) !important;
  color:#fff !important;
  border-color:#a78bfa !important;
}
html.dark-style .btn-label-secondary{ background-color: rgba(255,255,255,.06) !important; color:#cfd3e0 !important; border:1px solid rgba(255,255,255,.07) !important; }

/* ---------- inputs ---------- */
html.dark-style .form-control,
html.dark-style .form-select,
html.dark-style textarea.form-control{
  background-color: #1a1b31 !important;
  border-color: rgba(255,255,255,.09) !important;
  color:#fff !important;
  border-radius: 12px !important;
}
html.dark-style .form-control::placeholder{ color:#7e8698 !important; }
html.dark-style .form-control:focus,
html.dark-style .form-select:focus{
  background-color: #1a1b31 !important;
  border-color:#7b61ff !important;
  box-shadow: 0 0 0 3px rgba(123,97,255,.22) !important;
  color:#fff !important;
}
html.dark-style .form-label{ color:#cfd3e0; font-weight:500; }
html.dark-style .input-group-text{ background-color:#1a1b31 !important; border-color: rgba(255,255,255,.09) !important; color:#cfd3e0; }

/* ---------- Signal Strength bar ---------- */
html.dark-style body .progress{
  height: 8px !important;
  border-radius: 999px !important;
  background-color: rgba(255,255,255,.08) !important;
  overflow: hidden;
}
html.dark-style body .progress .progress-bar{
  background-image: linear-gradient(90deg,#22c55e,#4ade80) !important;
  background-color: #22c55e !important;
  border-radius: 999px !important;
}

/* ---------- Trading Signal meter ---------- */
html.dark-style body .sig-meter .sig-meter-title{ color:#fff !important; font-weight:600 !important; }
/* segments: size only — the filled ones carry an inline colour that must win */
html.dark-style body .sig-meter .sig-meter-seg{
  height: 10px !important;
  border-radius: 4px !important;
}
/* the empty segments (no inline style) get the muted track colour */
html.dark-style body .sig-meter .sig-meter-seg:not([style]){
  background-color: rgba(255,255,255,.12) !important;
}
html.dark-style body .sig-meter .sig-meter-band{
  background-color: rgba(255,77,79,.16) !important;
  border: 1px solid rgba(255,77,79,.35) !important;
  padding: 3px 12px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}
html.dark-style body .sig-meter .sig-meter-foot{ color:#9aa2b5 !important; }

/* ---------- pills ---------- */
html.dark-style .badge{ border-radius: 999px; font-weight: 600; }
html.dark-style .bg-label-primary{ background-color: rgba(123,97,255,.18) !important; color:#c4b5fd !important; }
html.dark-style .bg-label-success{ background-color: rgba(34,197,94,.16) !important; color:#4ade80 !important; }
html.dark-style .bg-label-warning{ background-color: rgba(250,204,21,.14) !important; color:#facc15 !important; }
html.dark-style .bg-label-danger{ background-color: rgba(239,68,68,.16) !important; color:#f87171 !important; }

/* ---------- welcome card ---------- */
html.dark-style body .card.trw-welcome{
  position: relative;
  overflow: hidden;
  border: 0 !important;
  border-radius: 20px !important;
  background-color: #3a2aa5 !important;
  background-image: linear-gradient(135deg,#2a1f6e 0%,#3a2aa5 46%,#5b3df5 100%) !important;
  box-shadow: 0 22px 55px rgba(60,40,180,.38) !important;
  min-height: 208px;
}
html.dark-style .trw-welcome::after{
  content:"";
  position:absolute; inset:0;
  background-image: radial-gradient(55% 75% at 88% 18%, rgba(167,139,250,.32), transparent 62%);
  pointer-events:none;
}
html.dark-style .trw-welcome .card-body{ position: relative; z-index: 3; padding: 22px 20px !important; }
html.dark-style .trw-welcome .trw-hello{
  font-size: 1.28rem; font-weight: 700; color:#fff !important;
  letter-spacing:-.01em; margin:0 0 2px; max-width:68%;
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
html.dark-style .trw-welcome .trw-label{
  color:#d8d2ff !important; margin:0 0 6px; font-size:.95rem; max-width:68%;
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
html.dark-style .trw-welcome .trw-balance{
  font-size: 2.45rem; font-weight: 800; line-height: 1.05;
  letter-spacing: -.035em; color:#a78bfa !important; margin: 0 0 20px;
  text-shadow: 0 2px 18px rgba(167,139,250,.35); max-width:78%;
}
html.dark-style .trw-hero{
  position: absolute; right: 0; bottom: 0;
  height: 100%; width: 55%;
  object-fit: cover; object-position: right bottom;
  z-index: 1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
}
html.dark-style .trw-welcome .btn{ position: relative; z-index: 4; }
html.dark-style .trw-welcome .trw-btn-ghost{
  background-color: rgba(10,11,24,.45) !important;
  background-image: none !important;
  border: 1px solid rgba(167,139,250,.5) !important;
  color:#fff !important;
}
html.dark-style .trw-welcome .trw-btn-ghost:hover{
  background-color: rgba(10,11,24,.65) !important;
  border-color:#a78bfa !important;
}

@media (max-width: 575.98px){
html.dark-style .trw-hero{ width: 48%; }
html.dark-style .trw-welcome .trw-balance{ font-size: 2.1rem; margin-bottom: 16px; }
html.dark-style .trw-welcome .card-body{ padding: 18px 16px !important; }
}
@media (min-width: 1200px){
html.dark-style .trw-welcome .trw-balance{ font-size: 2.15rem; margin-bottom: 16px; }
html.dark-style .trw-hero{ width: 52%; }
html.dark-style .trw-welcome{ min-height: 200px; }
}

/* ---------- auth ---------- */
html.dark-style .authentication-wrapper.authentication-bg{
  background-color: #0a0b18 !important;
  background-image:
    radial-gradient(55% 45% at 15% 0%, rgba(123,97,255,.22), transparent 62%),
    radial-gradient(45% 40% at 100% 10%, rgba(91,61,245,.16), transparent 60%) !important;
}
html.dark-style .authentication-wrapper .authentication-inner .card{
  background-color: #131425 !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.55) !important;
}

/* ---------- chrome ---------- */
html.dark-style .bg-menu-theme,
html.dark-style .menu.bg-menu-theme{ background-color:#131425 !important; }
html.dark-style .layout-navbar.navbar{ background: transparent !important; box-shadow: none !important; }
html.dark-style .nav-link,
html.dark-style .menu-link{ color:#cfd3e0; }
html.dark-style .nav-link.active,
html.dark-style .menu-item.active > .menu-link{ color:#fff; }

/* ---------- toasts (toastr + bootstrap) ---------- */
html.dark-style #toast-container > div{
  background-color: #131425 !important;
  background-repeat: no-repeat !important;
  opacity: 1 !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.55) !important;
  color: #e8eaf3 !important;
  font-weight: 500;
  padding: 14px 16px 14px 50px !important;
}
html.dark-style #toast-container > div:hover{ box-shadow: 0 22px 50px rgba(0,0,0,.65) !important; }
html.dark-style #toast-container > .toast-success{
  border-left: 3px solid #22c55e !important;
  box-shadow: 0 18px 40px rgba(34,197,94,.20) !important;
}
html.dark-style #toast-container > .toast-error{
  border-left: 3px solid #ef4444 !important;
  box-shadow: 0 18px 40px rgba(239,68,68,.20) !important;
}
html.dark-style #toast-container > .toast-info{
  border-left: 3px solid #7b61ff !important;
  box-shadow: 0 18px 40px rgba(123,97,255,.22) !important;
}
html.dark-style #toast-container > .toast-warning{
  border-left: 3px solid #f59e0b !important;
  box-shadow: 0 18px 40px rgba(245,158,11,.20) !important;
}
html.dark-style #toast-container .toast-title{ color:#fff !important; font-weight:700; }
html.dark-style #toast-container .toast-message{ color:#c9cede !important; font-size:14px; line-height:1.45; }
html.dark-style #toast-container .toast-close-button{ color:#98a0b3 !important; text-shadow:none; opacity:.85; }
html.dark-style #toast-container .toast-close-button:hover{ color:#fff !important; }
html.dark-style #toast-container .toast-progress{
  background-image: linear-gradient(90deg,#8b5cf6,#6d28d9) !important;
  background-color:#7c3aed !important;
  opacity: 1 !important;
  height: 3px !important;
}
/* bootstrap toasts, if any page uses them */
html.dark-style .toast{ background-color:#131425 !important; border:1px solid rgba(255,255,255,.08) !important; color:#e8eaf3 !important; border-radius:14px !important; }
html.dark-style .toast-header{ background-color:#1a1b31 !important; color:#fff !important; border-color:rgba(255,255,255,.08) !important; }

/* ---------- SweetAlert (admin uses Swal toasts on Users) ---------- */
html.dark-style .swal2-container .swal2-toast{
  background-color:#131425 !important;
  color:#e8eaf3 !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:14px !important;
  box-shadow:0 18px 40px rgba(0,0,0,.55) !important;
}
html.dark-style .swal2-container .swal2-toast .swal2-title{ color:#fff !important; font-weight:600 !important; }
html.dark-style .swal2-container .swal2-popup{
  background-color:#131425 !important;
  color:#e8eaf3 !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:18px !important;
  box-shadow:0 24px 60px rgba(0,0,0,.6) !important;
}
html.dark-style .swal2-container .swal2-title{ color:#fff !important; }
html.dark-style .swal2-container .swal2-html-container{ color:#c9cede !important; }
html.dark-style .swal2-container .swal2-confirm.swal2-styled{
  background-image:linear-gradient(135deg,#8b5cf6,#6d28d9) !important;
  background-color:#7c3aed !important;
  border:0 !important;
  border-radius:12px !important;
  box-shadow:0 10px 24px rgba(109,40,217,.38) !important;
}
html.dark-style .swal2-container .swal2-cancel.swal2-styled{
  background-color:rgba(255,255,255,.08) !important;
  color:#dfe2ec !important;
  border-radius:12px !important;
}
html.dark-style .swal2-container .swal2-timer-progress-bar{ background:linear-gradient(90deg,#8b5cf6,#6d28d9) !important; }

/* ============================================================
   LIGHT THEME — the admin and the light auth page.
   Same design language, light surfaces: this is what makes
   light pages look finished rather than half-styled.
   ============================================================ */
html.light-style body{
  background-color:#f4f5fa !important;
  background-image:
    radial-gradient(50% 35% at 12% -5%, rgba(123,97,255,.10), transparent 62%) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  color:#2f3349 !important;
}
html.light-style h1, html.light-style h2, html.light-style h3,
html.light-style h4, html.light-style h5, html.light-style h6,
html.light-style .h1, html.light-style .h2, html.light-style .h3,
html.light-style .h4, html.light-style .h5, html.light-style .h6,
html.light-style .card-title{ color:#20263b !important; }
html.light-style .text-muted,
html.light-style .text-body-secondary{ color:#6f7689 !important; }
html.light-style a{ color:#5b3df5; }

html.light-style .card{
  background-color:#ffffff !important;
  border:1px solid #e9ebf3 !important;
  border-radius:18px !important;
  box-shadow:0 10px 28px rgba(16,24,40,.08) !important;
  color:#2f3349 !important;
}
html.light-style .card-header,
html.light-style .card-footer{ background:transparent !important; border-color:#eceef6 !important; }
html.light-style .modal-content,
html.light-style .dropdown-menu,
html.light-style .offcanvas,
html.light-style .list-group-item,
html.light-style .accordion-item{
  background-color:#ffffff !important;
  border-color:#e9ebf3 !important;
  color:#2f3349 !important;
}
html.light-style .dropdown-item{ color:#3b4256; }
html.light-style .dropdown-item:hover,
html.light-style .dropdown-item:focus{ background-color:rgba(123,97,255,.10) !important; color:#20263b; }

/* buttons keep the same violet gradient — it reads well on light too */
html.light-style .btn-primary{
  background-image:linear-gradient(135deg,#8b5cf6 0%,#6d28d9 100%) !important;
  background-color:#7c3aed !important;
  border:0 !important;
  color:#fff !important;
  box-shadow:0 8px 20px rgba(109,40,217,.28) !important;
  border-radius:12px !important;
}
html.light-style .btn-outline-primary{
  border:1px solid rgba(123,97,255,.40) !important;
  color:#5b3df5 !important;
  background-color:rgba(123,97,255,.06) !important;
  border-radius:12px !important;
}
html.light-style .btn-outline-primary:hover{
  background-color:rgba(123,97,255,.14) !important;
  color:#4c2fe0 !important;
}

html.light-style .form-control,
html.light-style .form-select,
html.light-style textarea.form-control{
  background-color:#ffffff !important;
  border:1px solid #dfe3ee !important;
  color:#2f3349 !important;
  border-radius:12px !important;
}
html.light-style .form-control::placeholder{ color:#98a0b3 !important; }
html.light-style .form-control:focus,
html.light-style .form-select:focus{
  border-color:#7b61ff !important;
  box-shadow:0 0 0 3px rgba(123,97,255,.15) !important;
  background-color:#ffffff !important;
  color:#2f3349 !important;
}
html.light-style .form-label{ color:#3b4256; }

html.light-style .progress{
  height:8px !important;
  border-radius:999px !important;
  background-color:#eceef6 !important;
}
html.light-style .progress .progress-bar{
  background-image:linear-gradient(90deg,#22c55e,#4ade80) !important;
  background-color:#22c55e !important;
  border-radius:999px !important;
}
html.light-style .sig-meter .sig-meter-seg:not([style]){ background-color:#e7e9f2 !important; }
html.light-style .sig-meter .sig-meter-title{ color:#20263b !important; }
html.light-style .sig-meter .sig-meter-foot{ color:#6f7689 !important; }

html.light-style .badge{ border-radius:999px; }
html.light-style .bg-menu-theme,
html.light-style .menu.bg-menu-theme{ background-color:#ffffff !important; }

/* toasts + sweets on light */
html.light-style #toast-container > div{
  background-color:#ffffff !important;
  color:#2f3349 !important;
  border:1px solid #e9ebf3 !important;
  border-radius:14px !important;
  box-shadow:0 16px 36px rgba(16,24,40,.16) !important;
}
html.light-style #toast-container .toast-title{ color:#20263b !important; }
html.light-style #toast-container .toast-message{ color:#5b6273 !important; }
html.light-style .swal2-container .swal2-popup,
html.light-style .swal2-container .swal2-toast{
  background-color:#ffffff !important;
  color:#2f3349 !important;
  border:1px solid #e9ebf3 !important;
  border-radius:16px !important;
  box-shadow:0 20px 50px rgba(16,24,40,.18) !important;
}
html.light-style .swal2-container .swal2-title{ color:#20263b !important; }
html.light-style .swal2-container .swal2-html-container{ color:#5b6273 !important; }

/* ============================================================
   BRAND CARD — theme-independent.
   The welcome card is a brand surface: its gradient, its hero
   image and its white text must render the same in light and
   dark mode. Scoping these to dark-style is what broke light.
   ============================================================ */
html .card.trw-welcome{
  position: relative !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 20px !important;
  background-color: #3a2aa5 !important;
  background-image: linear-gradient(135deg,#2a1f6e 0%,#3a2aa5 46%,#5b3df5 100%) !important;
  box-shadow: 0 22px 55px rgba(60,40,180,.38) !important;
  min-height: 208px;
}
html .card.trw-welcome::after{
  content:"";
  position:absolute; inset:0;
  background-image: radial-gradient(55% 75% at 88% 18%, rgba(167,139,250,.32), transparent 62%);
  pointer-events:none;
}
html .card.trw-welcome .card-body{ position:relative !important; z-index:3 !important; padding:22px 20px !important; }
html .trw-welcome .trw-hello{
  font-size:1.28rem !important; font-weight:700 !important; color:#ffffff !important;
  letter-spacing:-.01em; margin:0 0 2px !important; max-width:68%;
  text-shadow:0 1px 12px rgba(0,0,0,.35);
}
html .trw-welcome .trw-label{
  color:#d8d2ff !important; margin:0 0 6px !important; font-size:.95rem !important;
  max-width:68%; text-shadow:0 1px 12px rgba(0,0,0,.35);
}
html .trw-welcome .trw-balance{
  font-size:2.45rem !important; font-weight:800 !important; line-height:1.05 !important;
  letter-spacing:-.035em !important; color:#a78bfa !important; margin:0 0 20px !important;
  text-shadow:0 2px 18px rgba(167,139,250,.35); max-width:78%;
}
html .trw-hero{
  position:absolute !important; right:0; bottom:0;
  height:100% !important; width:55%;
  object-fit:cover !important; object-position:right bottom;
  z-index:1 !important; pointer-events:none;
  max-width:55% !important;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 30%);
  mask-image:linear-gradient(90deg,transparent 0%,#000 30%);
}
html .trw-welcome .btn{ position:relative !important; z-index:4 !important; }
html .trw-welcome .trw-btn-ghost{
  background-color:rgba(10,11,24,.45) !important;
  background-image:none !important;
  border:1px solid rgba(167,139,250,.5) !important;
  color:#ffffff !important;
}
html .trw-welcome .trw-btn-ghost:hover{
  background-color:rgba(10,11,24,.65) !important;
  border-color:#a78bfa !important;
}
@media (max-width:575.98px){
  html .trw-hero{ width:48%; max-width:48%; }
  html .trw-welcome .trw-balance{ font-size:2.1rem !important; margin-bottom:16px !important; }
  html .trw-welcome .card-body{ padding:18px 16px !important; }
}
@media (min-width:1200px){
  html .trw-welcome .trw-balance{ font-size:2.15rem !important; margin-bottom:16px !important; }
  html .trw-hero{ width:52%; max-width:52%; }
  html .card.trw-welcome{ min-height:200px; }
}

/* new crypto artwork: keep the wallet centred rather than right-anchored */
html .trw-hero{
  width: 58% !important;
  max-width: 58% !important;
  object-position: center bottom !important;
}
@media (max-width:575.98px){
  html .trw-hero{ width: 50% !important; max-width: 50% !important; }
}
@media (min-width:1200px){
  html .trw-hero{ width: 54% !important; max-width: 54% !important; }
}

/* display the crypto artwork closer to its native size so it stays crisp */
html .trw-hero{
  width: 46% !important;
  max-width: 46% !important;
  object-position: center bottom !important;
  image-rendering: auto !important;
}
@media (max-width:575.98px){
  html .trw-hero{ width: 44% !important; max-width: 44% !important; }
}
@media (min-width:1200px){
  html .trw-hero{ width: 44% !important; max-width: 44% !important; }
}

/* never stretch the artwork past its native detail (2x) */
html .trw-hero{ max-width: 210px !important; }

/* high-res artwork is in place: allow a proper hero size again */
html .trw-hero{
  width: 54% !important;
  max-width: 300px !important;
  object-position: center bottom !important;
}
@media (max-width:575.98px){
  html .trw-hero{ width: 52% !important; max-width: 240px !important; }
}
@media (min-width:1200px){
  html .trw-hero{ width: 54% !important; max-width: 230px !important; }
}

/* the balance figure is the headline number: make it read bright */
html .trw-welcome .trw-balance{
  color: #ffffff !important;
  text-shadow: 0 0 22px rgba(196,181,253,.55), 0 2px 6px rgba(0,0,0,.35) !important;
  font-weight: 800 !important;
  letter-spacing: -.03em !important;
}

/* balance must read white — matched specificity, declared last */
html.dark-style .trw-welcome .trw-balance,
html.light-style .trw-welcome .trw-balance,
html .trw-welcome .trw-balance{
  color: #ffffff !important;
  text-shadow: 0 0 24px rgba(196,181,253,.6), 0 2px 8px rgba(0,0,0,.4) !important;
}
