/* ================================================
   USER DASHBOARD — Premium Fintech CSS
   ================================================ */

:root {
  --primary: #a78bfa;
  --secondary: #8b5cf6;
  --accent-dark: #7c3aed;
  --bg: #f8f9fc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: rgba(167, 139, 250, 0.08);
  --text-primary: #0f0a1e;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border: rgba(167, 139, 250, 0.15);
  --border-soft: rgba(167, 139, 250, 0.08);
  --green: #4ade80;
  --red: #f87171;
  --gold: #f59e0b;
  --blue: #60a5fa;
  --shadow-sm: 0 2px 8px rgba(139, 92, 246, 0.04);
  --shadow-md: 0 8px 24px rgba(139, 92, 246, 0.08);
  --shadow-lg: 0 20px 40px rgba(139, 92, 246, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 260px;
  --header-h: 70px;
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body.dashboard-body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* UTILS */
.w-full {
  width: 100%;
}
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.75rem;
}
.text-lg {
  font-size: 1.125rem;
}
.text-xl {
  font-size: 1.25rem;
}
.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}
.text-muted {
  color: var(--text-muted);
}
.text-primary {
  color: var(--secondary);
}
.text-green {
  color: var(--green);
}
.text-red {
  color: var(--red);
}
.text-gold {
  color: var(--gold);
}
.text-center {
  text-align: center;
}
.mt-16 {
  margin-top: 16px;
}
.flex-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---------- BUTTONS (Inherited from homepage) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 12px;
  padding: 10px 22px;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--accent-dark) 100%
  );
  opacity: 0;
  transition: var(--transition);
}
.btn-primary:hover::before {
  opacity: 1;
}
.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.55);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}
.btn-outline:hover {
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 10px;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}
.logo-icon svg {
  width: 32px;
  height: 32px;
}

/* Logo Animation */
.logo-bar {
  opacity: 0;
  transform: translateY(-8px);
  animation: dropFade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.logo-bar.bar-1 {
  animation-delay: 0.1s;
}
.logo-bar.bar-2 {
  animation-delay: 0.3s;
}
.logo-bar.bar-3 {
  animation-delay: 0.5s;
}

@keyframes dropFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-text {
  color: var(--text-primary);
}
.logo-accent {
  color: var(--secondary);
}

.sidebar-nav {
  padding: 18px 12px;
  flex: 1;
  overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}
.nav-link svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateX(4px);
}
.nav-link:hover svg {
  color: var(--secondary);
}
.nav-link.active {
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.1),
    rgba(139, 92, 246, 0.15)
  );
  color: var(--secondary);
  font-weight: 600;
}
.nav-link.active svg {
  color: var(--secondary);
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: var(--secondary);
  border-radius: 0 4px 4px 0;
}
.nav-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 12px 0;
}
.logout-action:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.1);
}
.logout-action:hover svg {
  color: var(--red);
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  height: 100vh;
  height: 100dvh; /* Use dynamic viewport height for better mobile support */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.main-content::after {
  content: "";
  display: block;
  height: 45px;
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
}
@media (max-width: 991px) {
  .main-content::after {
    height: 0 !important;
  }
}

/* Consistent right-side scrollbar for user panel pages */
.main-content {
  scrollbar-gutter: stable;
  overflow-x: hidden;
}
@media (min-width: 768px) {
  .main-content::-webkit-scrollbar {
    width: 10px;
  }
  .main-content::-webkit-scrollbar-track {
    background: transparent;
  }
  .main-content::-webkit-scrollbar-thumb {
    background: rgba(15, 10, 30, 0.06);
    border-radius: 10px;
    border: 2px solid transparent;
  }
}

/* ---------- TOP HEADER ---------- */
.top-header {
  height: var(--header-h) !important;
  min-height: var(--header-h) !important;
  max-height: var(--header-h) !important;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-sizing: border-box;
  gap: 12px;
}

/* Logo: always anchored left */
.top-header .header-logo-link { justify-self: start; }
/* Title: always perfectly centered */
.top-header .page-title { justify-self: center; text-align: center; }
/* Logout: always anchored right */
.top-header .header-logout-btn { justify-self: end; }

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

/* --- Header Logo (left side) --- */
.header-logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.header-logo-link:hover { opacity: 0.8; }

/* --- Header Logo Candle Animation (5-Second Loop) --- */
.header-logo-bar {
  opacity: 0;
  transform: translateY(-5px);
  animation: dropFadeLoop 5s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}
.header-logo-bar.bar-1 { animation-delay: 0s; }
.header-logo-bar.bar-2 { animation-delay: 0.2s; }
.header-logo-bar.bar-3 { animation-delay: 0.4s; }

@keyframes dropFadeLoop {
  /* Rapid entry and settle */
  12% {
    opacity: 1;
    transform: translateY(0);
  }
  /* Hold the state */
  92% {
    opacity: 1;
    transform: translateY(0);
  }
  /* Exit before restart */
  100% {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.header-logo-link .logo-text {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}
.header-logo-link .logo-accent { color: var(--secondary); }

/* --- Header Logout Button (right side) --- */
.header-logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(239, 68, 68, 0.15);
  transition: var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}
.header-logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}
.header-logout-btn svg { flex-shrink: 0; }

/* Mobile: hide text label, show only icon */
@media (max-width: 420px) {
  .header-logout-btn span { display: none; }
  .header-logout-btn { padding: 8px 10px; }
  .header-logo-link .logo-text { display: none; }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  /* Hide until auth check populates real user data (prevents John Doe flash) */
  opacity: 0;
  transition: opacity 0.2s ease;
}
.header-ready .header-right {
  opacity: 1;
}

/* Profile Dropdown */
.profile-dropdown-container {
  position: relative;
}
.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 30px;
  border: 1px solid transparent;
  transition: var(--transition);
}
.profile-btn:hover,
.profile-btn[aria-expanded="true"] {
  background: var(--bg-hover);
  border-color: var(--border);
}
.avatar-placeholder,
#headerAvatar {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  flex-shrink: 0;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden !important;
  position: relative;
}
.avatar-placeholder img,
#headerAvatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 50% !important;
  position: absolute;
  top: 0;
  left: 0;
}
.chevron-icon {
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}
.profile-btn[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}
.profile-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
}
.user-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}
.user-email {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.dropdown-list {
  padding: 8px 0;
}
.dropdown-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}
.dropdown-list li a:hover {
  background: var(--bg-hover);
  color: var(--secondary);
}
.dropdown-list li a svg {
  color: var(--text-muted);
  transition: var(--transition);
}
.dropdown-list li a:hover svg {
  color: var(--secondary);
}
.dropdown-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 4px 0;
}
.dropdown-list .logout-link:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.05);
}
.dropdown-list .logout-link:hover svg {
  color: var(--red);
}

/* ---------- HAMBURGER ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- DASHBOARD GRID ---------- */
.dashboard-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Dashboard Cards */
.dashboard-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  padding: 18px;
  transition: var(--transition);
}
.dashboard-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--border);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Status Badges */
.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-badge.success {
  background: rgba(74, 222, 128, 0.15);
  color: #166534;
}
.status-badge.info {
  background: rgba(96, 165, 250, 0.15);
  color: #1e40af;
}
.status-badge.pulse {
  animation: pulseBg 2s infinite;
}
@keyframes pulseBg {
  0% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }
}

/* Locked States */
.locked-blur {
  filter: blur(8px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
.locked-container {
  position: relative;
  overflow: hidden;
}
.lock-overlay-mini {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bg-card-rgb, 255, 255, 255), 0.4);
  backdrop-filter: blur(2px);
  z-index: 10;
  text-align: center;
  padding: 15px;
}
.lock-icon-mini {
  background: rgba(167, 139, 250, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--secondary);
}
.lock-text-mini {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Plan Card Specifics */
.plan-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 8px;
}
.plan-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.plan-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  margin-top: auto;
}

/* Signal Card Specifics */
.signal-pair {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.trade-type {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 800;
}
.trade-type.buy {
  background: var(--green);
  color: white;
}
.trade-type.sell {
  background: var(--red);
  color: white;
}
.signal-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
}
.signal-detail {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
}
.signal-detail .label {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  color: var(--text-secondary);
}

/* P&L Card Specifics */
.pnl-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.pnl-stat {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.pnl-profit {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.pnl-loss {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.pnl-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
}
.pnl-profit .pnl-val {
  color: var(--green);
}
.pnl-loss .pnl-val {
  color: var(--red);
}
.pnl-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.win-rate-bar-container {
  width: 100%;
}
.win-rate-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.win-rate-track {
  width: 100%;
  height: 8px;
  background: var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
}
.win-rate-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* Metrics Card Specifics */
.metric-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 8px solid rgba(167, 139, 250, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top-color: var(--secondary);
  border-right-color: var(--primary);
  transform: rotate(-45deg);
}
.metric-circle > span {
  transform: rotate(45deg);
}
.metric-val {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}
.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 4px;
  font-weight: 500;
}

/* Referral Card Specifics */
.ref-stat-content {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px;
}

.btn-xs {
  padding: 6px 14px !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.active-promo-card {
  background: rgba(139, 92, 246, 0.05) !important;
  border: 1px dashed var(--primary) !important;
  padding: 20px 15px !important;
  border-radius: 12px !important;
  text-align: center !important;
  position: relative !important;
  margin-top: 5px !important;
}

#deleteCouponBtn {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  color: var(--red) !important;
  opacity: 0.4 !important;
  padding: 5px !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  transition: opacity 0.2s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#deleteCouponBtn:hover {
  opacity: 1 !important;
  background: rgba(239, 68, 68, 0.05) !important;
  border-radius: 6px !important;
}

.code-label {
  font-size: 0.7rem !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  margin-bottom: 6px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

.code-value {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  letter-spacing: 3px !important;
}

.code-desc {
  font-size: 0.72rem !important;
  color: var(--text-secondary) !important;
  margin-top: 10px !important;
  line-height: 1.4 !important;
}
/* Referral Card Redesign */
.ref-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ref-stat {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  transition: var(--transition);
}
.featured-stat {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.04), transparent);
  border-color: rgba(245, 158, 11, 0.15);
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}
.ref-stats-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sub-stat {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: var(--bg-hover);
}
.sub-stat.withdrawn {
  background: linear-gradient(145deg, rgba(74, 222, 128, 0.04), transparent);
  border-color: rgba(74, 222, 128, 0.1);
}

.sub-stat.referrals {
  background: linear-gradient(145deg, rgba(96, 165, 250, 0.04), transparent);
  border-color: rgba(96, 165, 250, 0.1);
}
.stat-icon-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-mini-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-mini-icon.gold { background: rgba(245, 158, 11, 0.1); color: var(--gold); }
.stat-mini-icon.green { background: rgba(74, 222, 128, 0.1); color: var(--green); }
.stat-mini-icon.blue { background: rgba(96, 165, 250, 0.1); color: var(--blue); }

.stat-mini-icon svg {
  stroke: currentColor;
}

#withdrawBtn {
  margin-top: 0 !important;
  min-height: unset !important;
}






/* ---------- RESPONSIVE DESIGN ---------- */
/* Large screens layout overrides */
.plan-card {
  grid-column: span 2;
}
.signal-card {
  grid-column: span 1;
}
.pnl-card {
  grid-column: span 1;
}
.metrics-card {
  grid-column: span 2;
}
.ref-card {
  grid-column: span 2;
}

@media (min-width: 992px) {
  .desktop-hide {
    display: none !important;
  }
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .plan-card {
    grid-column: span 2;
  }
  .signal-card {
    grid-column: span 1;
  }
  .pnl-card {
    grid-column: span 1;
  }
  .metrics-card {
    grid-column: span 1;
  }
  .ref-card {
    grid-column: span 1;
  }
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }
  .main-content {
    margin-left: 0;
    padding-bottom: 120px !important; /* Increased space for bottom nav (65px nav + 55px gap) */
  }
  .hamburger {
    display: flex;
  }
  .dashboard-grid {
    padding: 24px;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .plan-card,
  .signal-card,
  .pnl-card,
  .metrics-card,
  .ref-card {
    grid-column: span 1;
  }
  .top-header {
    padding: 0 16px;
  }
  .header-right {
    gap: 12px;
  }
  .page-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .dashboard-grid {
    padding: 12px;
    gap: 12px;
  }
  .dashboard-card {
    padding: 16px;
  }
  .plan-name {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }
  .plan-desc {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }
  .card-header {
    margin-bottom: 12px;
  }
  .plan-footer {
    padding-top: 12px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .plan-footer .text-sm {
    width: 100%;
    margin-bottom: 2px;
  }
  
  /* Referral Card Mobile Polish */
  .ref-card .ref-stats-sub {
    grid-template-columns: 1fr 1fr;
    gap: 12px !important;
  }
  
  .ref-card .featured-stat {
    padding: 20px !important;
  }
  
  .ref-card .featured-stat .ref-stat-content {
    align-items: baseline !important;
  }

  .ref-card #withdrawBtn {
    padding: 4px 10px !important;
    font-size: 0.68rem !important;
    min-height: auto !important;
    margin-top: 0 !important;
  }

  .ref-card .sub-stat {
    padding: 14px !important;
    text-align: center;
    align-items: center !important;
  }

  .ref-card .sub-stat .stat-mini-icon {
    margin-bottom: 4px;
    width: 36px;
    height: 36px;
  }

  .referral-coupon-wrapper {
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 12px !important;
    background: rgba(139, 92, 246, 0.02) !important;
    padding: 15px !important;
    border-radius: var(--radius-md) !important;
  }
  
  .referral-coupon-wrapper .form-input,
  .referral-coupon-wrapper .btn-sm {
    width: 100% !important;
    height: 46px !important;
    flex: none !important;
  }

  /* Subscription Page Card */
  .sub-overview-card {
    padding: 20px;
    margin-bottom: 24px;
  }
  .sub-title {
    font-size: 1.4rem;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sub-status {
    padding: 3px 10px;
    font-size: 0.75rem;
  }
}

/* ================================================
   SUBSCRIPTION PAGE STYLES
   ================================================ */

/* Active Plan Overview */
.sub-overview-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, #fcfaff 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.04);
  position: relative;
  overflow: hidden;
}
.sub-overview-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}


.sub-info .sub-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.sub-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  word-break: break-word;
  min-width: 0;
}

.sub-status {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(74, 222, 128, 0.15);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sub-status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
}

.sub-meta {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.sub-actions {
  display: flex;
  gap: 16px;
}

/* Upgrade Pricing Grid (Matches Homepage but fits Dashboard) */
.plans-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* Plans grid — CSS grid, no horizontal scroll, all cards fully visible */
.dashboard-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}


/* Panel plan card — mirrors homepage .price-card */
.panel-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.03);
}
.panel-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
  border-color: rgba(167, 139, 250, 0.4);
}
.panel-plan-card.featured {
  background: linear-gradient(160deg, #fff 0%, #faf7ff 100%);
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.08), inset 0 0 0 1px rgba(167, 139, 250, 0.2);
}
.panel-plan-card.current-plan {
  border-color: var(--green);
  background: linear-gradient(160deg, #fff 0%, #f0fff6 100%);
}
.panel-plan-card .plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 18px;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
  max-width: calc(100% - 20px);
  overflow: visible;
  z-index: 2;
}
.panel-plan-card .plan-badge.current-badge {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

.panel-plan-card .plan-icon-box {
  width: 54px;
  height: 54px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary);
  transition: transform 0.3s ease;
}
.panel-plan-card:hover .plan-icon-box {
  transform: scale(1.1) rotate(-5deg);
  border-color: var(--primary-light);
  background: white;
}

.panel-plan-card .plan-name-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  min-height: 24px;
  display: flex;
  align-items: flex-end;
}
.panel-plan-card .plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}
.panel-plan-card .plan-currency {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-top: 8px;
}
.panel-plan-card .plan-price-num {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}
.panel-plan-card .plan-period {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.panel-plan-card .plan-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding-bottom: 20px;
  line-height: 1.65;
  border-bottom: 1px solid var(--border-soft);
}
.panel-plan-card .plan-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  flex: 1;
}
.panel-plan-card .plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.panel-plan-card .plan-features li .feat-check {
  color: var(--green);
  font-weight: 800;
  flex-shrink: 0;
  font-size: 0.9rem;
  margin-top: 2px;
}
.panel-plan-card .plan-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}



/* Billing History Table */
.billing-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.billing-table th {
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-soft);
}

.billing-table td {
  padding: 15px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.billing-table tr:last-child td {
  border-bottom: none;
}

.billing-table td.strong {
  color: var(--text-primary);
  font-weight: 600;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-block;
}
.status-badge.paid {
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
}
.status-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold);
}

.download-link {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}
.download-link:hover {
  opacity: 0.8;
}

/* Overrides for Subscription Mobile Layouts */
@media (max-width: 1200px) {
  .dashboard-plans-grid > * {
    flex: 0 0 240px;
    min-width: 240px;
  }
}


@media (max-width: 768px) {
  .sub-overview-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    overflow: visible; /* allow badge to show above card */
  }
  .sub-info {
    width: 100%;
    min-width: 0;
  }
  .sub-title {
    font-size: 1.3rem;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
  }
  .sub-actions {
    width: 100%;
    flex-direction: column;
  }
  .sub-actions .btn {
    width: 100%;
  }
  /* Give plan cards top spacing so the floating badge is not clipped */
  .dashboard-plans-grid {
    padding-top: 20px;
  }
  .panel-plan-card {
    margin-top: 14px; /* extra space above each card for badge */
  }
  .dashboard-plans-grid > * {
    flex: 0 0 220px;
    min-width: 220px;
  }
}


/* ================================================
   TRADING SIGNALS PAGE STYLES
   ================================================ */

.signals-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 40px;
}

/* Empty State Styling */
.signals-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 18px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.5s ease-out;
}

.signals-empty-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  color: var(--secondary);
}

.signals-empty-icon-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: signalPulse 2s infinite;
}

@keyframes signalPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { opacity: 0.4; }
  100% { transform: scale(1.3); opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.premium-signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.premium-signal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(167, 139, 250, 0.08);
  border-color: var(--primary);
}

.signal-header-box {
  padding: 18px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.03), transparent);
}

.signal-pair-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.signal-badge {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.signal-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.signal-badge.buy {
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.signal-badge.buy::before {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.signal-badge.sell {
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.signal-badge.sell::before {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.signal-data-box {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.signal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--border-soft);
  flex-wrap: wrap;
  row-gap: 6px;
}
.signal-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.signal-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.signal-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-pips {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.signal-value.highlight-green {
  color: var(--green);
}
.signal-value.highlight-red {
  color: var(--red);
}
.signal-value.highlight-primary {
  color: var(--primary);
}

.signal-disclaimer {
  background: rgba(245, 158, 11, 0.05);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  padding: 15px;
  margin-top: auto;
}

.signal-disclaimer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.signal-disclaimer ul {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 4px;
}

.signal-disclaimer ul li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.signal-disclaimer ul li::before {
  content: "•";
  color: var(--gold);
  font-weight: bold;
}

/* Mobile Adjustments for Signals */
@media (max-width: 768px) {
  .signals-feed {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .signal-header-box {
    padding: 20px;
  }
  .signal-data-box {
    padding: 20px;
  }
  .signal-disclaimer {
    padding: 16px;
  }
}

/* ================================================
   EDUCATION PAGE STYLES (VIDEO LIBRARY)
   ================================================ */

/* Hero Action Section */
.edu-hero {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 32px;
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}
.edu-hero-img {
  width: 60%;
  background: linear-gradient(135deg, #2a2a35, #1e1e24);
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edu-hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--bg-card));
}
.edu-hero-play {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(167, 139, 250, 0.4);
  backdrop-filter: blur(8px);
  z-index: 2;
  transition: var(--transition);
  cursor: pointer;
}
.edu-hero-play:hover {
  transform: scale(1.1);
  background: var(--primary);
  border-color: var(--primary);
}
.edu-hero-play svg {
  width: 32px;
  height: 32px;
  color: white;
  margin-left: 6px;
}
.edu-hero-content {
  width: 40%;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}
.edu-hero-badge {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.edu-hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
}
.edu-hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Category Filters */
.edu-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 8px;
  /* hide scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.edu-filters::-webkit-scrollbar {
  display: none;
}

.edu-filter-btn {
  padding: 8px 15px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
}
.edu-filter-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.edu-filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Video Grid */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Video Card */
.video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.video-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1e1e24, #2a2a35);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  transition: var(--transition);
}
.video-card:hover .video-thumbnail {
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.video-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.video-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}
.video-card:hover .video-play-overlay {
  opacity: 1;
}
.video-play-overlay svg {
  width: 48px;
  height: 48px;
  color: white;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.video-card:hover .video-play-overlay svg {
  transform: scale(1);
}

.video-info {
  display: flex;
  flex-direction: column;
}
.video-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.video-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.video-card:hover .video-title {
  color: var(--secondary);
}
.video-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive Education */
@media (max-width: 1024px) {
  .edu-hero {
    flex-direction: column;
  }
  .edu-hero-img {
    width: 100%;
    min-height: 260px;
  }
  .edu-hero-img::after {
    background: linear-gradient(180deg, transparent, var(--bg-card));
  }
  .edu-hero-content {
    width: 100%;
    padding: 32px;
  }
}
@media (max-width: 768px) {
  .edu-hero-title {
    font-size: 1.8rem;
  }
  .edu-hero-content {
    padding: 24px;
  }
  .edu-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   TRADE HISTORY PAGE STYLES
   ================================================ */

/* Performance Stats Grid */
.history-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 32px;
}
.stat-card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}
.stat-card-glass:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(167, 139, 250, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.stat-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.stat-icon.gold {
  background: rgba(251, 191, 36, 0.1);
  color: var(--gold);
}
.stat-details {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
}
.stat-value.profit {
  color: var(--success);
}

/* Trade Data Table Wrapper */
.trade-table-wrapper {
  background: var(--bg-card);
  border: 1px solid rgba(167, 139, 250, 0.15); /* Subtly branded border instead of plain grey */
  border-radius: 20px;
  padding: 18px;
  overflow-x: auto;
  box-shadow: 0 4px 24px rgba(167, 139, 250, 0.05); /* Branded shadow */
}
.trade-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.trade-table-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* The Table */
.trade-history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.trade-history-table th {
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary); /* Inject primary color here */
  background: rgba(167, 139, 250, 0.03);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  border-radius: 8px 8px 0 0; /* Add rounded corners to header row */
}
.trade-history-table td {
  padding: 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.trade-history-table tr:last-child td {
  border-bottom: none;
}
.trade-history-table tbody tr {
  transition: var(--transition);
}
.trade-history-table tbody tr:hover {
  background: rgba(167, 139, 250, 0.04); /* Violet hover state */
  transform: scale(1.002); /* Pop out slightly */
  box-shadow: inset 2px 0 0 var(--primary); /* Left accent bar on hover */
}

/* Table Specific Elements */
.th-pair {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--primary);
}
.th-pair img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.th-type {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.th-type.buy {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.th-type.sell {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}
.th-price-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}
.th-price-arrow {
  color: var(--text-secondary);
}

/* Close Reason Badges */
.reason-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.reason-badge.tp {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.reason-badge.sl {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.history-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--red);
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  font-weight: 600;
}

/* ================================================
   PWA UPDATE & NOTIFICATION PROMPTS
   ================================================ */
.pwa-prompt {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: calc(100% - 48px);
  max-width: 500px;
  background: rgba(15, 10, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 10000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.pwa-prompt.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.pwa-prompt-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.pwa-prompt-icon {
  width: 40px;
  height: 40px;
  background: rgba(167, 139, 250, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.pwa-prompt-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.pwa-prompt-text p {
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.3;
}

.pwa-prompt-actions {
  display: flex;
  gap: 8px;
}

.btn-pwa {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-pwa-primary {
  background: var(--primary);
  color: #fff;
}

.btn-pwa-primary:hover {
  background: var(--secondary);
  transform: scale(1.05);
}

.btn-pwa-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-pwa-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pwa-prompt.forced {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  background: rgba(10, 8, 28, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: none;
  left: 0;
  bottom: 0;
  border: none;
  border-radius: 0;
  z-index: 100000;
  padding: 40px;
  animation: modalFadeIn 0.5s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pwa-prompt.forced .pwa-prompt-content {
  flex-direction: column;
  gap: 24px;
}

.pwa-prompt.forced .pwa-prompt-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
}

.pwa-prompt.forced .pwa-prompt-text h4 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.pwa-prompt.forced .pwa-prompt-text p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 400px;
  margin: 0 auto;
}

.pwa-prompt.forced .pwa-prompt-actions {
  margin-top: 20px;
  width: 100%;
  max-width: 300px;
}

.pwa-prompt.forced .btn-pwa-primary {
  width: 100%;
  padding: 16px 32px;
  font-size: 1.1rem;
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.pwa-prompt.forced .btn-pwa-secondary {
  display: none !important;
}

@media (max-width: 500px) {
  .pwa-prompt {
    bottom: 16px;
    width: calc(100% - 32px);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

.reason-badge.manual {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.th-pl {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}
.th-pl.profit {
  color: var(--success);
}
.th-pl.loss {
  color: var(--danger);
}

/* Date Details */
.th-date-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.th-date-block span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Responsive Mobile Cards for Trade History */
@media (max-width: 768px) {
  .trade-table-wrapper {
    padding: 16px;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .trade-history-table,
  .trade-history-table head,
  .trade-history-table tbody,
  .trade-history-table th,
  .trade-history-table td,
  .trade-history-table tr {
    display: block;
  }
  .trade-history-table thead {
    display: none; /* Hide standard headers */
  }

  .trade-history-table tbody tr {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Layout inside the card */
  .trade-history-table td {
    padding: 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Pseudo-labels for Mobile */
  .trade-history-table td::before {
    content: attr(data-label);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
  }

  /* Specific mobile overrides */
  .trade-history-table td:first-child {
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 12px;
    margin-bottom: 4px;
  }
  .trade-history-table td:first-child::before {
    display: none; /* Don't show "Pair" label, just show the pair itself */
  }
}

/* ================================================
   ACCOUNT SETTINGS PAGE STYLES
   ================================================ */

/* 2-Column Settings Layout */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}
.settings-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.settings-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Settings Card (reusable) */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.settings-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-soft);
}
.settings-card-header svg {
  color: var(--primary);
}
.settings-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Form Elements */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group.full-width {
  grid-column: 1 / -1;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.form-input,
.form-select,
.form-textarea {
  padding: 10px 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  transition: var(--transition);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.form-input:disabled,
.form-input.locked {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(167, 139, 250, 0.04);
  border-style: dashed;
}

/* --- Referral Coupon Branding --- */
.referral-coupon-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  max-width: 380px;
  margin: 0 auto;
}

.referral-coupon-wrapper .form-input,
.referral-coupon-wrapper .btn-sm {
  flex: 1;
  height: 40px;
  font-size: 0.88rem;
  border-radius: 10px;
  box-sizing: border-box;
}

.referral-coupon-wrapper .form-input {
  padding: 0 15px;
  max-width: none;
}

.referral-coupon-wrapper .btn-sm {
  padding: 0;
}

/* Mobile Alignment Polish */
@media (max-width: 768px) {
  .referral-coupon-wrapper {
    gap: 8px;
    padding: 0 10px;
  }
  .referral-coupon-wrapper .form-input,
  .referral-coupon-wrapper .btn-sm {
    height: 38px !important;
    font-size: 0.82rem !important;
    flex: 1;
    min-width: 0;
  }
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}
.form-input-wrapper {
  position: relative;
}
.form-input-wrapper .lock-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Avatar Section */
.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}
.profile-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  position: relative;
  flex-shrink: 0;
}
.avatar-edit-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
}
.avatar-edit-btn:hover {
  background: var(--primary);
  color: white;
}
.avatar-meta h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.avatar-meta p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.edit-shortcut-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: 1px solid var(--border-soft);
}
.edit-shortcut-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* Settings Save Button */
.btn-settings {
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.btn-settings.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}
.btn-settings.primary:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}

/* Toggle Switches */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.toggle-row:last-child {
  border-bottom: none;
}
.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.toggle-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.toggle-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Risk Calculator Widget */
.risk-calc-card {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.08),
    rgba(109, 40, 217, 0.05)
  );
  border: 1px solid rgba(167, 139, 250, 0.2);
}
.risk-calc-card .settings-card-header {
  border-bottom-color: rgba(167, 139, 250, 0.15);
}
.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.calc-result-box {
  background: var(--bg-hover);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 16px;
  padding: 15px;
  text-align: center;
}
.calc-result-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.calc-result-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: "JetBrains Mono", monospace;
}
.calc-result-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Danger Zone */
.danger-zone {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.02);
}
.danger-zone .settings-card-header {
  border-bottom-color: rgba(239, 68, 68, 0.1);
}
.danger-zone .settings-card-header svg {
  color: var(--danger);
}
.danger-zone .settings-card-title {
  color: var(--danger);
}
.btn-danger-outline {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  cursor: pointer;
  transition: var(--transition);
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}
.btn-danger-solid {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--danger);
  border: none;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}
.btn-danger-solid:hover {
  background: #dc2626;
  transform: translateY(-1px);
}
.danger-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Responsive Settings */
@media (max-width: 1024px) {
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 20px !important;
  }
  .settings-main, .settings-sidebar {
    gap: 20px !important;
  }
  .settings-sidebar {
    position: static;
  }
}
@media (max-width: 768px) {
  .settings-layout {
    gap: 16px !important;
  }
  .settings-main, .settings-sidebar {
    gap: 16px !important;
  }
  .settings-card {
    padding: 16px !important;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .profile-avatar-section {
    flex-direction: column;
    text-align: center;
  }
}

/* ================================================
   SUPPORT PAGE STYLES
   ================================================ */

/* Support Layout */
.support-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}
.support-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.support-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Ticket List Items */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ticket-item {
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.ticket-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.02);
  transform: translateY(-2px);
}

.ticket-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ticket-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ticket-id {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
}
.ticket-subject {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ticket-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.ticket-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Status Badges */
.status-badge {
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-open {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-open::before {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}
.status-resolved {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-resolved::before {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.ticket-action .btn-view {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}
.ticket-action .btn-view:hover {
  background: var(--primary);
  color: white;
}

/* Responsive Support */
@media (max-width: 1024px) {
  .support-layout {
    grid-template-columns: 1fr;
    /* Reverse visually so form is first on mobile/tablet */
    display: flex;
    flex-direction: column-reverse;
  }
  .support-sidebar {
    position: static;
    width: 100%;
  }
}
@media (max-width: 768px) {
  .ticket-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .ticket-action {
    width: 100%;
  }
  .ticket-action .btn-view {
    width: 100%;
  }
}

/* ================================================
   NEW: TRIAL BANNER & NOTICE
   ================================================ */

.trial-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(74,222,128,0.12), rgba(34,197,94,0.06));
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 14px;
  padding: 12px 15px;
  margin-bottom: 24px;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 500;
}
.trial-notice button {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
}

.trial-banner-card {
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(167,139,250,0.06));
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 20px;
  padding: 21px 24px;
  margin-bottom: 36px;
}
.trial-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.trial-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(167,139,250,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.trial-banner-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.trial-banner-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.trial-banner-content .btn {
  margin-left: auto;
}

/* ================================================
   NEW: PLAN UPGRADE CARDS
   ================================================ */





/* Coming Soon Plan Card */
.coming-soon-card {
  opacity: 0.65;
  filter: saturate(0.5);
  pointer-events: none;
  user-select: none;
}
.coming-soon-card .plan-upgrade-title,
.coming-soon-card .price-amount {
  color: var(--text-muted);
}
.coming-soon-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, rgba(245,158,11,0.9), rgba(217,119,6,0.9));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Skeleton Loaders */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  min-height: 260px;
  position: relative;
  overflow: hidden;
}
.skeleton-card::after,
.skeleton-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  animation: shimmer 1.5s infinite;
}
.skeleton-line {
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  display: inline-block;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* sub-status colour variants */
.sub-status.danger  { background: rgba(239,68,68,0.12);  color: var(--danger);  }
.sub-status.info    { background: rgba(99,102,241,0.12); color: var(--primary); }
.sub-status.danger::before  { background: var(--danger);  box-shadow: 0 0 8px var(--danger);  }
.sub-status.info::before    { background: var(--primary); box-shadow: 0 0 8px var(--primary); }

/* status badge extras */
.status-badge.success { background: rgba(74,222,128,0.12);  color: var(--green);   }
.status-badge.info    { background: rgba(99,102,241,0.12);  color: var(--primary); }
.status-badge.danger  { background: rgba(239,68,68,0.12);   color: var(--danger);  }

/* ================================================
   NEW: PROP FIRM CHALLENGE DASHBOARD
   ================================================ */

.prop-dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.prop-phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.prop-phase-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}
.phase-tag {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prop-phase-actions {
  display: flex;
  gap: 10px;
}

.prop-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.prop-metric-card {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 15px;
  text-align: center;
  transition: var(--transition);
}
.prop-metric-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.prop-metric-icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.prop-metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 6px;
}
.prop-metric-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.prop-metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.prop-progress-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}
.progress-bar-block { width: 100%; }
.progress-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
.progress-fill.target-fill { background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.progress-fill.dd-fill.safe    { background: linear-gradient(90deg, #22c55e, #16a34a); }
.progress-fill.dd-fill.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-fill.dd-fill.danger  { background: linear-gradient(90deg, #ef4444, #dc2626); }
.progress-label {
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.risk-info-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(167,139,250,0.06);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.risk-info-bar svg { color: var(--primary); flex-shrink: 0; }

.text-green { color: var(--green) !important; }
.text-red   { color: var(--danger) !important; }
.text-gold  { color: var(--gold) !important; }
.profit { color: var(--green) !important; }
.loss   { color: var(--danger) !important; }

/* ================================================
   NEW: CHALLENGE SETUP & PHASE 2 MODALS
   ================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show {
  display: flex !important;
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 27px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-group input {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.2s;
  font-family: var(--font-mono);
  width: 100%;
  box-sizing: border-box;
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.15);
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.modal-actions { margin-top: 8px; }

/* ================================================
   NEW: HISTORY TABS
   ================================================ */

.history-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  width: fit-content;
}
.history-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.history-tab:hover { color: var(--text-primary); }
.history-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}

.challenge-account-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

/* pair dot */
.pair-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.pair-dot.buy  { background: var(--green); }
.pair-dot.sell { background: var(--danger); }
.th-pair { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-primary); }

/* reason-badge additions */
.reason-badge.hit-tp   { background: rgba(74,222,128,0.1);  color: var(--green);   border: 1px solid rgba(74,222,128,0.2); }
.reason-badge.hit-sl   { background: rgba(239,68,68,0.1);   color: var(--danger);  border: 1px solid rgba(239,68,68,0.15); }
.reason-badge.cancelled{ background: rgba(100,100,100,0.1); color: var(--text-muted); border: 1px solid rgba(100,100,100,0.15); }

/* ================================================
   NEW: FORM UTILITIES / INPUT FIXES
   ================================================ */
.w-full { width: 100%; }
.text-center { text-align: center; }

/* Sub status color for 'success' */
.sub-status.success {
  background: rgba(74,222,128,0.15);
  color: var(--green);
}
.sub-status.success::before {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

/* Prop metric icon colours */
.prop-metric-icon.blue   { filter: hue-rotate(220deg); }
.prop-metric-icon.red    { filter: hue-rotate(300deg); }

/* Mobile responsive additions */
@media (max-width: 768px) {
  .prop-dashboard { padding: 24px 20px; }
  .prop-metrics-grid { grid-template-columns: 1fr 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .trial-banner-content { flex-direction: column; align-items: flex-start; }
  .trial-banner-content .btn { width: 100%; }
  .history-tabs { width: 100%; }
  .history-tab { flex: 1; justify-content: center; padding: 10px 12px; font-size: 0.82rem; }
  .prop-phase-header { flex-direction: column; align-items: flex-start; }
  .modal-box { padding: 24px 20px; }

  /* Match plans.html spacing — remove extra top margin and bottom padding
     so all pages feel identical. The .main-content::after spacer (45px)
     plus the 16px container padding already provides the right breathing room. */
  .dashboard-content,
  .education-container,
  .settings-layout,
  .support-layout,
  .history-container,
  .signals-feed {
    margin-top: 10px !important;
    padding-bottom: 30px !important; /* Added internal padding for visibility */
  }
}
@media (max-width: 480px) {
  .prop-metrics-grid { grid-template-columns: 1fr; }

  .dashboard-content,
  .education-container,
  .settings-layout,
  .support-layout,
  .history-container,
  .signals-feed {
    margin-top: 10px !important;
    padding-bottom: 30px !important; /* Added internal padding for visibility */
  }
}

/* ================================================
   MOBILE ALIGNMENT (Match homepage 16px padding)
   ================================================ */
@media (max-width: 768px) {
  .main-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  /* Counteract padding to keep the header full width */
  .top-header {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    width: calc(100% + 32px);
  }

  /* Structural elements inside main-content should let the main padding handle edges */
  .dashboard-grid,
  .education-container,
  .settings-layout,
  .support-layout,
  .history-container,
  .signals-feed,
  .prop-dashboard {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .top-header {
    margin-left: -16px !important;
    margin-right: -16px !important;
    width: calc(100% + 32px) !important;
  }
}
/* =========================================================================
   SPLASH SCREEN (PWA INITIAL LOAD)
   ========================================================================= */
.splash-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #fff 0%, #faf7ff 40%, #f3f0ff 100%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.splash-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo-container {
  text-align: center;
  animation: splashScale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.splash-logo-icon {
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 25px rgba(139, 92, 246, 0.25));
}

.splash-logo-text {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0f0a1e; /* matches var(--text-primary) if available, or static for safety */
  letter-spacing: -0.02em;
}

.splash-logo-accent {
  color: #8b5cf6; /* matches var(--secondary) */
}

@keyframes splashScale {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.splash-bar {
  opacity: 0;
  transform: translateY(-10px);
  animation: splashDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.splash-bar.bar-1 { animation-delay: 0.2s; }
.splash-bar.bar-2 { animation-delay: 0.4s; }
.splash-bar.bar-3 { animation-delay: 0.6s; }

@keyframes splashDrop {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Global Container Spacing Fix for Consistency with Dashboard */
.education-container,
.settings-layout,
.history-container,
.signals-feed,
.support-layout,
.purchase-options,
.plans-container {
  padding: 24px !important;
  margin-top: 0 !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .education-container,
  .settings-layout,
  .history-container,
  .signals-feed,
  .support-layout,
  .support-page-container,
  .purchase-options,
  .plans-container {
    padding: 16px !important;
  }
}

/* Support Page Specifics */
.support-page-container {
  padding: 32px; 
  display: flex; 
  flex-direction: column; 
  gap: 24px;
}

.support-metrics-grid {
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 16px;
}

.support-toolbar {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  background: var(--bg-card); 
  padding: 16px; 
  border-radius: 12px; 
  border: 1px solid var(--border-soft); 
  box-shadow: var(--shadow-sm); 
  flex-wrap: wrap; 
  gap: 16px;
}

.support-toolbar .toolbar-left {
  display: flex; 
  gap: 16px; 
  flex-grow: 1; 
  flex-wrap: wrap;
}

.support-toolbar .search-box {
  display: flex; 
  align-items: center; 
  gap: 10px; 
  background: var(--bg); 
  padding: 10px 16px; 
  border-radius: 8px; 
  border: 1px solid var(--border-soft); 
  flex-grow: 1; 
  max-width: 320px;
}

.support-toolbar .search-box input {
  border: none; 
  background: transparent; 
  outline: none; 
  width: 100%; 
  font-size: 0.9rem;
  color: var(--text-primary);
}

.support-toolbar .filter-select {
  padding: 10px 16px; 
  border-radius: 8px; 
  border: 1px solid var(--border-soft); 
  background: var(--bg); 
  font-size: 0.9rem; 
  outline: none; 
  cursor: pointer; 
  color: var(--text-primary); 
  min-width: 140px;
}

#ticketList {
  display: grid; 
  gap: 16px;
}

.ticket-loading {
  text-align: center; 
  padding: 40px; 
  color: var(--text-muted);
}

.ticket-loading .spinner-lg {
  margin: 0 auto 16px;
}

@media (max-width: 991px) {
  .support-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .support-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }
  
  .support-toolbar .toolbar-left {
    flex-direction: column;
    gap: 12px;
  }
  
  .support-toolbar .search-box {
    max-width: none;
  }
  
  .support-toolbar .btn-new-ticket {
    width: 100%;
    justify-content: center;
  }

  .ticket-item {
    padding: 16px !important;
  }
}

@media (max-width: 480px) {
  .support-metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   MOBILE-FIRST APP EXPERIENCE OVERHAUL (RE-DESIGN)
   ========================================================================= */

/* App-level upgrades for Cards and UI */
:root {
  --radius-app: 20px;
  --shadow-app: 0 10px 40px rgba(139, 92, 246, 0.08); /* Branded soft shadow */
}

/* Apply new rounded glass cards everywhere */
.dashboard-card, 
.settings-card, 
.stat-card-glass, 
.trade-table-wrapper,
.sub-overview-card,
.billing-history-card,
.purchase-card,
.premium-signal-card,
.edu-hero,
.mini-metric {
  border-radius: var(--radius-app) !important;
  box-shadow: var(--shadow-app) !important;
  border: 1px solid rgba(167, 139, 250, 0.1) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Mobile-only Bottom Navigation */
.bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 991px) {
  /* Eliminate old sidebar concepts */
  #sidebar, #sidebarOverlay, .hamburger, .header-right {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding-bottom: 120px !important; /* Increased space for bottom nav (65px nav + 55px gap) */
  }
  
  .top-header {
    justify-content: center; /* Center Dashboard Title */
  }

  /* Bottom Nav styling */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-soft);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px); /* iOS Native App Feel */
    box-shadow: 0 -4px 30px rgba(139, 92, 246, 0.06);
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    width: 100%;
    height: 100%;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .nav-item svg {
    margin-bottom: 2px;
    transition: var(--transition);
    color: var(--text-muted);
  }

  .nav-item.active {
    color: var(--secondary);
  }

  .nav-item.active svg {
    transform: translateY(-2px);
    stroke-width: 2.5;
    color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(167, 139, 250, 0.4));
  }
  
  /* Touch feedback */
  .nav-item:active {
    transform: scale(0.95);
  }

  /* ----------------------------------------------------
     Mobile Table Overrides (Transforms tables -> stacked cards) 
     ---------------------------------------------------- */
  .trade-history-table, .trade-history-table tbody, .trade-history-table tr, .trade-history-table td {
    display: block;
    width: 100%;
  }
  
  .trade-history-table thead {
    display: none; /* Hide table headers completely on mobile */
  }

  .trade-history-table tr {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: var(--radius-md) !important;
    padding: 16px !important;
    margin-bottom: 16px;
    box-shadow: var(--shadow-xs);
  }

  .trade-history-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--border-soft) !important;
    text-align: right; /* Values pushed right */
  }

  .trade-history-table td:last-child {
    border-bottom: none !important;
    padding-bottom: 30px !important; /* Added internal padding for visibility */
  }

  .trade-history-table td:first-child {
    padding-top: 0 !important;
  }

  /* Label creation using pseudo-elements */
  .trade-history-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 20px;
    text-align: left; /* Headers pushed left */
  }

  /* Do the same for billing tables */
  .billing-table, .billing-table tbody, .billing-table tr, .billing-table td {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .billing-table thead { display: none; }
  .billing-table tr {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-xs);
  }
  
  .billing-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-soft);
  }
  .billing-table td:last-child { border-bottom: none; }
  
  .billing-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
  }
}

/* =========================================================================
   MOBILE APP-LEVEL UI ENHANCEMENTS (max-width: 768px)
   ========================================================================= */
@media (max-width: 768px) {
  /* 1. App-Card Padding Adjustments (Optimize screen real estate) */
  .dashboard-card,
  .stat-card-glass, 
  .trade-table-wrapper,
  .sub-overview-card,
  .billing-history-card,
  .purchase-card,
  .premium-signal-card,
  .history-container,
  .settings-layout,
  .purchase-container,
  .plans-wrapper {
    padding: 16px !important;
  }

  /* 2. Typographic Scaling */
  .card-title {
    font-size: 1.15rem !important;
  }
  .page-title {
    font-size: 1.1rem !important;
  }

  /* 3. Button Enhancements (Make them native-app sized for touch) */
  .btn,
  .btn-primary,
  .btn-outline,
  .btn-settings.primary {
    min-height: 52px !important;
    width: 100% !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 12px;
  }

  /* Specific exceptions where buttons shouldn't be full width */
  .btn-ghost-small,
  .tab-btn,
  .header-logout-btn {
    min-height: auto !important;
    width: auto !important;
    font-size: 0.85rem !important;
    margin-top: 0 !important;
  }

  /* 4. Purchase Page Specific Polish */
  .purchase-container {
    padding: 16px !important;
  }
  .purchase-header h2 {
    font-size: 1.4rem !important;
    text-align: center;
  }
  #purchaseSubtitle {
    text-align: center;
    font-size: 0.9rem;
  }
  .plan-badge-display {
    padding: 16px !important;
    margin-bottom: 20px !important;
  }
  .plan-icon-big {
    font-size: 2rem !important;
  }
  #planBadgeName {
    font-size: 1.1rem !important;
  }
  .price-row {
    padding: 14px 0 !important;
  }
  .price-row .label {
    font-size: 1rem !important;
  }
  .price-row .value {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
  }
  .price-row.total {
    padding-top: 18px !important;
    margin-top: 10px !important;
  }
  .price-row.total .value {
    font-size: 1.4rem !important;
    color: var(--primary) !important;
  }
  #razorpayBtn, #paypalBtnContainer {
    margin-top: 24px !important;
  }

  /* 5. Plans Page Polish */
  .plan-card {
    padding: 24px 16px !important;
    border-radius: 20px !important;
  }
  .plan-price-block {
    font-size: 2.2rem !important;
  }
  .plan-title {
    font-size: 1.4rem !important;
  }
  
  /* Current Plan Badge on Plans Page Fix */
  .plans-grid .btn:disabled {
    opacity: 1 !important;
    background: rgba(167, 139, 250, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    font-weight: 800 !important;
    cursor: default !important;
  }
  
  /* Make plans strictly horizontal sliding on mobile user panel */
  .dashboard-plans-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    padding-bottom: 12px !important;
    margin: 0 -16px !important; /* bleed visually past the padding */
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 12px !important;
    touch-action: pan-x pan-y !important;
  }
  .dashboard-plans-grid::-webkit-scrollbar { display: none !important; }
  .dashboard-plans-grid > div {
    min-width: 85% !important; /* Force cards to 85% width so they peek */
    scroll-snap-align: center !important;
    flex-shrink: 0 !important;
  }
  .premium-signal-card .signal-header-box {
    cursor: pointer;
    border-bottom: none;
  }
  .premium-signal-card.mobile-expanded .signal-header-box {
    margin-right: 20px;
    text-align: left; /* Headers pushed left */
  }

  /* Do the same for billing tables */
  .billing-table, .billing-table tbody, .billing-table tr, .billing-table td {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .billing-table thead { display: none; }
  .billing-table tr {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-xs);
  }
  
  .billing-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-soft);
  }
  .billing-table td:last-child { border-bottom: none; }
  
  .billing-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
  }
}

/* =========================================================================
   MOBILE APP-LEVEL UI ENHANCEMENTS (max-width: 768px)
   ========================================================================= */
@media (max-width: 768px) {
  /* 1. App-Card Padding Adjustments (Optimize screen real estate) */
  .dashboard-card,
  .stat-card-glass, 
  .trade-table-wrapper,
  .sub-overview-card,
  .billing-history-card,
  .purchase-card,
  .premium-signal-card,
  .history-container,
  .settings-layout,
  .purchase-container,
  .plans-wrapper {
    padding: 16px !important;
  }

  /* 2. Typographic Scaling */
  .card-title {
    font-size: 1.15rem !important;
  }
  .page-title {
    font-size: 1.1rem !important;
  }

  /* 3. Button Enhancements (Make them native-app sized for touch) */
  .btn,
  .btn-primary,
  .btn-outline,
  .btn-settings.primary {
    min-height: 52px !important;
    width: 100% !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 12px;
  }

  /* Specific exceptions where buttons shouldn't be full width */
  .btn-ghost-small,
  .tab-btn,
  .header-logout-btn {
    min-height: auto !important;
    width: auto !important;
    font-size: 0.85rem !important;
    margin-top: 0 !important;
  }

  /* 4. Purchase Page Specific Polish */
  .purchase-container {
    padding: 16px !important;
  }
  .purchase-header h2 {
    font-size: 1.4rem !important;
    text-align: center;
  }
  #purchaseSubtitle {
    text-align: center;
    font-size: 0.9rem;
  }
  .plan-badge-display {
    padding: 16px !important;
    margin-bottom: 20px !important;
  }
  .plan-icon-big {
    font-size: 2rem !important;
  }
  #planBadgeName {
    font-size: 1.1rem !important;
  }
  .price-row {
    padding: 14px 0 !important;
  }
  .price-row .label {
    font-size: 1rem !important;
  }
  .price-row .value {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
  }
  .price-row.total {
    padding-top: 18px !important;
    margin-top: 10px !important;
  }
  .price-row.total .value {
    font-size: 1.4rem !important;
    color: var(--primary) !important;
  }
  #razorpayBtn, #paypalBtnContainer {
    margin-top: 24px !important;
  }

  /* 5. Plans Page Polish */
  .plan-card {
    padding: 24px 16px !important;
    border-radius: 20px !important;
  }
  .plan-price-block {
    font-size: 2.2rem !important;
  }
  .plan-title {
    font-size: 1.4rem !important;
  }
  
  /* Current Plan Badge on Plans Page Fix */
  .plans-grid .btn:disabled {
    opacity: 1 !important;
    background: rgba(167, 139, 250, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    font-weight: 800 !important;
    cursor: default !important;
  }
  
  /* Make plans strictly horizontal sliding on mobile user panel */
  .dashboard-plans-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    padding-bottom: 12px !important;
    margin: 0 -16px !important; /* bleed visually past the padding */
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 12px !important;
    touch-action: pan-x pan-y !important;
  }
  .dashboard-plans-grid::-webkit-scrollbar { display: none !important; }
  .dashboard-plans-grid > div {
    min-width: 85% !important; /* Force cards to 85% width so they peek */
    scroll-snap-align: center !important;
    flex-shrink: 0 !important;
  }
}

/* Visibility Helper Classes */
.mobile-only-dash-btn { display: none !important; }
@media (max-width: 768px) {
  .mobile-only-dash-btn { 
    display: flex !important; 
    align-items: center !important;
    justify-content: center !important;
  }

  /* Task 4: Trade History Restructure */
  .history-overview-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    padding-bottom: 8px !important;
    margin: 0 -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    gap: 12px !important;
  }
  .history-overview-grid::-webkit-scrollbar { display: none !important; }
  .history-overview-grid > div {
    min-width: 80% !important;
    scroll-snap-align: center !important;
    flex-shrink: 0 !important;
  }
  
  /* Swap out the desktop table for stunning new mobile cards */
  .trade-table-wrapper { display: none !important; }
  .trade-history-table { display: none !important; }
  .mobile-only-flex { display: flex !important; margin-top: 16px; }
  .trade-table-header { 
    border-bottom: none !important; 
    padding-bottom: 8px !important; 
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .trade-table-title {
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
  }

  /* History Card Mobile Polishing */
  /* Mobile Adjustments for Signals - Redesigned to match Dashboard Live Widget */
@media (max-width: 991px) {
  .main-content {
    overflow-x: hidden !important;
  }
  /* Disable fixed scrollbar space on mobile to prevent layout shifting */
  .main-content::-webkit-scrollbar {
    width: 0px !important;
    display: none;
  }
  .signals-feed {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .premium-signal-card {
    border-radius: 16px;
    box-shadow: none !important;
    border: 1px solid var(--border-soft);
    background: var(--bg-card);
    transition: transform 0.2s ease;
  }
  
  .premium-signal-card:active {
    transform: scale(0.98);
  }

  .signal-header-box {
    padding: 16px !important;
    cursor: pointer;
    background: transparent !important;
    border-bottom: none !important;
    display: flex;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .signal-pair-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
  }

  .signal-badge {
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 8px;
    letter-spacing: 0.02em;
  }

  /* Collapsible content handling with sleek, professional transition */
  .premium-signal-card .signal-collapsible-wrapper {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: 
      max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
      opacity 0.4s ease,
      visibility 0.5s;
    padding: 0 16px;
  }

  .premium-signal-card.mobile-expanded .signal-collapsible-wrapper {
    max-height: 500px; /* More realistic max-height for better timing */
    opacity: 1;
    visibility: visible;
    padding: 0 16px 16px 16px;
  }

  /* Interior content 'entry' animation */
  .premium-signal-card.mobile-expanded .signal-data-box {
    animation: fadeInUp 0.5s ease forwards;
  }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Keep header structure static to prevent jumping */
  .premium-signal-card .signal-header-box {
    border-bottom: 1px solid transparent !important;
    transition: border-color 0.3s ease;
  }

  .premium-signal-card.mobile-expanded .signal-header-box {
    border-color: var(--border-soft) !important;
  }

  .signal-data-box {
    padding: 0 !important;
    gap: 12px !important;
  }

  .signal-row {
    padding-bottom: 10px !important;
    border-bottom: 1px dashed var(--border-soft) !important;
    flex-wrap: nowrap !important;
    gap: 10px;
  }

  .signal-row:last-child {
    border-bottom: none !important;
  }

  .signal-label {
    font-size: 0.8rem !important;
    white-space: nowrap;
    color: var(--text-muted);
  }

  .signal-value {
    font-size: 0.82rem !important;
    text-align: right;
    justify-content: flex-end;
    font-family: var(--font-mono);
    font-weight: 700;
  }

  .signal-disclaimer {
    padding: 10px;
    border-radius: 12px;
    margin-top: 15px;
  }


} /* Closing max-width: 991px for signals */

} /* Closing max-width: 768px for history */

/* --- RESPONSIVE HEADER CLASSES --- */
@media (min-width: 992px) {
  .mobile-only { display: none !important; }
  .top-header { display: flex !important; justify-content: space-between !important; }
  .top-header .page-title { text-align: left !important; justify-self: flex-start !important; }
}
@media (max-width: 991px) {
  .desktop-only { display: none !important; }
  
  /* Force flex header on mobile to prevent overlap/overflow */
  .top-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 16px !important;
    gap: 8px !important;
  }
  
  /* Ensure page title is centered and readable on narrow screens */
  .page-title {
    font-size: 1.1rem !important;
    margin: 0 !important;
    flex: 1;
    text-align: center;
  }

  /* Optimize dashboard grid for small devices */
  .dashboard-grid {
    padding: 16px !important;
    gap: 16px !important;
  }

  /* Help small phones (e.g. iPhone SE) by hiding logo text if space is too tight */
  @media (max-width: 380px) {
    .header-logo-link .logo-text { display: none !important; }
    .page-title { font-size: 1rem !important; }
  }
  
  /* Extra tight screens (< 330px) */
  @media (max-width: 330px) {
    .header-logo-link { display: none !important; }
    .page-title { text-align: left !important; }
  }

  /* Support Toolbar Specifics */
  .support-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
  .toolbar-left {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .search-box, .filter-select, .btn-new-ticket {
    width: 100% !important;
  }
}

/* Support CTA Card (Dashboard) */
.support-cta-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.05), transparent) !important;
  border: 1px dashed var(--primary) !important;
  padding: 24px;
  text-align: center;
}

@media (max-width: 768px) {
  .support-cta-card {
    padding: 20px !important;
    margin-bottom: 24px !important; /* Extra bottom margin to ensure it clears the bottom nav */
  }
}

/* Visibility Utilities */
@media (min-width: 992px) {
  .desktop-hide {
    display: none !important;
  }
}

/* =========================================================================
   WITHDRAWAL MODAL STYLES
   ========================================================================= */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
  display: flex !important;
}

.modal-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 0;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  animation: slideUpModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slideUpModal {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
  min-height: unset !important;
  width: auto !important;
  margin-top: 0 !important;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
}

.modal-box .btn {
  min-height: auto !important;
  width: auto !important;
  font-size: 0.9rem !important;
  margin-top: 0 !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
}

.modal-box .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-box .form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-box .form-input,
.modal-box .form-select,
.modal-box .form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.modal-box .form-textarea {
  resize: vertical;
  min-height: 80px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Trade Progress Bar (from Home Page Hero) --- */
.sc-progress-wrap {
  margin: 15px 16px;
  padding: 0;
}
.sc-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.progress-pct {
  color: var(--primary);
  font-weight: 800;
}
.sc-progress-bar {
  height: 8px;
  background: rgba(139, 92, 246, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid var(--border-soft);
}
.sc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  position: relative;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
.progress-glow {
  position: absolute;
  right: -1px;
  top: -2px;
  width: 14px;
  height: 12px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.6) 0%, transparent 70%);
  border-radius: 50%;
}
.sc-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Expanded state for mobile to ensure visibility */
.premium-signal-card.mobile-expanded .sc-progress-wrap {
  display: block;
}

/* --- Referral Card Lock Overlay --- */
.referral-card-relative {
  position: relative;
  overflow: hidden;
}

.referral-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  border-radius: 20px;
  animation: fadeIn 0.3s ease;
}

.lock-icon-box {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.15);
  margin-bottom: 16px;
  color: var(--primary);
}

.lock-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.lock-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 180px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.referral-lock-overlay .btn {
  padding: 8px 16px !important;
  font-size: 0.8rem !important;
  min-height: auto !important;
}

/* ================================================
   TOAST NOTIFICATIONS
   ================================================ */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  max-width: 380px;
  min-width: 280px;
  border: 1px solid var(--border-soft);
  animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-notification.success {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
}

.toast-notification.error {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
}

.toast-notification.info {
  border-left: 4px solid var(--secondary);
  background: #f5f3ff;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast-notification.success .toast-icon { color: #10b981; }
.toast-notification.error .toast-icon { color: #ef4444; }
.toast-notification.info .toast-icon { color: var(--secondary); }

.toast-content {
  flex: 1;
  line-height: 1.4;
}

.toast-close {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  margin-left: 8px;
}

.toast-close:hover { opacity: 1; }

.toast-notification.fade-out {
  animation: toastOut 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards !important;
}

@keyframes toastIn {
  from {
    transform: translateY(100px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .toast-notification {
    left: 16px;
    bottom: 80px; /* Above bottom nav */
    right: 16px;
    min-width: auto;
    max-width: none;
  }
}


/* ================================================
   PWA UPDATE & NOTIFICATION PROMPTS
   ================================================ */
.pwa-prompt {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: calc(100% - 48px);
  max-width: 500px;
  background: rgba(15, 10, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 10000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

.pwa-prompt.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.pwa-prompt-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.pwa-prompt-icon {
  width: 40px;
  height: 40px;
  background: rgba(167, 139, 250, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.pwa-prompt-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.pwa-prompt-text p {
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.3;
}

.pwa-prompt-actions {
  display: flex;
  gap: 8px;
}

.btn-pwa {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pwa-primary {
  background: var(--primary);
  color: #fff;
}

.btn-pwa-primary:hover {
  background: var(--secondary);
  transform: scale(1.05);
}

.btn-pwa-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-pwa-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 500px) {
  .pwa-prompt {
    bottom: 16px;
    width: calc(100% - 32px);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .pwa-prompt-content {
    flex-direction: column;
    text-align: center;
  }
  .pwa-prompt-actions {
    justify-content: center;
  }
}

/* Compounding Account Card Styles */
.comp-acc-card {
  position: relative;
}

.growth-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (min-width: 992px) {
  .comp-acc-card {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .comp-acc-card {
    grid-column: span 1;
    order: 5; /* This will place it between Referral (default) and Support */
  }
  .support-cta-card {
    order: 10; /* Ensure support is last */
  }
  .ref-card {
    order: 4;
  }
}

