/* ==========================================================================
   INFINITYCLUB (UPID) — PRODUCTION STYLESHEET (INFINITY DAO DARK THEME)
   ========================================================================== */

:root {
  --bg-main: #0f0f12;
  --bg-sidebar: #141418;
  --bg-topbar: #0c0c0f;
  --bg-card: #19191d;
  --bg-card-hover: #202026;
  --bg-input: #111115;
  --border-subtle: #24242b;
  --border-focus: #a855f7;
  
  --primary: #a855f7;
  --primary-glow: rgba(168, 85, 247, 0.4);
  --primary-hover: #9333ea;
  --accent-pink: #d946ef;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --text-main: #ffffff;
  --text-muted: #b0b0b8;
  --text-dim: #71717a;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   APP SHELL LAYOUT (LEFT SIDEBAR + MAIN CONTENT)
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* LEFT SIDEBAR */
.app-sidebar {
  width: 270px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  background: #101013;
  border-bottom: 1px solid #1f1f25;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(217, 70, 239, 0.55));
}

.brand-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: linear-gradient(90deg, #e879f9, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  padding: 20px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.menu-category {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 16px 4px 16px;
  letter-spacing: 0.8px;
  text-align: left;
}

.sidebar-menu .nav-link:not(.hidden),
button.nav-link:not(.hidden) {
  display: flex;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 15px !important;
  padding: 15px 20px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  color: #c4c4ce;
  text-decoration: none;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.3;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  width: 100% !important;
  transition: all 0.2s ease;
}

.sidebar-menu .nav-link:hover,
button.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  transform: none;
}

.sidebar-menu .nav-link.active,
button.nav-link.active {
  color: #ffffff !important;
  font-weight: 700 !important;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.30) 0%, rgba(28, 28, 34, 0.95) 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.40) !important;
  border-left: 5px solid #d946ef !important;
  box-shadow: 0 0 22px rgba(192, 38, 211, 0.35);
}

.nav-link .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: #c4c4ce;
}

.nav-link.active .icon {
  color: #e879f9;
}

.nav-link .badge-tag {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #3b0764;
  color: #d8b4fe;
  border: 1px solid #7e22ce;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.social-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.15s;
}

.social-btn:hover {
  color: #c084fc;
}

/* ==========================================================================
   MAIN VIEWPORT AREA
   ========================================================================== */
.app-main {
  flex: 1;
  margin-left: 270px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.app-topbar {
  background: #0b0b0e;
  border-bottom: 1px solid #1e1e24;
  padding: 16px 28px;
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
  width: auto !important;
  margin: 0 !important;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9998;
  backdrop-filter: blur(2px);
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.show {
  display: block;
}

.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #202028;
  border: 1px solid #333340;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-close-btn:hover {
  background: #2d2d38;
  color: #e879f9;
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#roleBadge {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #f3e8ff;
  white-space: nowrap;
}

.wallet-btn-pill {
  width: auto !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #a855f7;
  border: none;
  color: #ffffff;
  padding: 11px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wallet-btn-pill:hover {
  background: #9333ea;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
}

/* CONTENT CANVAS */
.app-content {
  flex: 1;
  padding: 22px 26px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   CARDS, STATS & GRIDS (MATCHING IMAGE DESIGN)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}

.stat-box:hover {
  transform: translateY(-2px);
  border-color: #3b4256;
}

.stat-box .lbl {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 6px;
}

.stat-box .num {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  letter-spacing: -0.3px;
}

.stat-box .sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* 3D STYLE STAT CARDS FROM REFERENCE IMAGE */
.stat-card-3d {
  background: linear-gradient(145deg, #121622, #181d2c);
  border: 1px solid #232c40;
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.stat-card-3d .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card-3d .card-icon {
  font-size: 30px;
  filter: drop-shadow(0 4px 10px rgba(168, 85, 247, 0.4));
}

.stat-card-3d .card-title {
  font-size: 13px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 10px;
}

.stat-card-3d .card-value {
  font-size: 25px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  margin-top: 4px;
}

.val-purple { color: #c084fc !important; }
.val-green { color: #4ade80 !important; }
.val-cyan { color: #38bdf8 !important; }
.val-amber { color: #fbbf24 !important; }
.val-pink { color: #f472b6 !important; }
.val-red { color: #f87171 !important; }

/* INCOMES GRID */
.income-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.income-card {
  background: linear-gradient(145deg, #111520, #171d2c);
  border: 1px solid #1e2638;
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform 0.15s, border-color 0.15s;
}

.income-card:hover {
  transform: translateY(-2px);
}

.income-card .inc-tag {
  font-size: 13px;
  font-weight: 800;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.income-card .inc-val {
  font-size: 24px;
  font-weight: 800;
  color: #4ade80;
  font-family: var(--font-mono);
  margin: 6px 0 3px 0;
}

.income-card .inc-usd {
  font-size: 13.5px;
  color: #cbd5e1;
  font-family: var(--font-mono);
}

/* GENERAL CONTENT CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 16px 0;
  font-size: 19px;
  font-weight: 800;
  color: #38bdf8;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

.preview-box {
  background: #090c14;
  border: 1px solid #1e2638;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  font-size: 15px;
  gap: 8px;
  flex-wrap: wrap;
}

.label {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}

.val {
  font-family: var(--font-mono);
  color: #f8fafc;
  font-size: 15.5px;
  font-weight: 600;
  word-break: break-all;
}

/* ==========================================================================
   INPUTS & BUTTONS
   ========================================================================== */
input, select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid #28334a;
  background: var(--bg-input);
  color: #ffffff;
  font-size: 15.5px;
  margin: 6px 0 12px 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

button:not(.nav-link) {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:not(.nav-link):hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-purple {
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.35);
}

.btn-blue {
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff;
}

.btn-green {
  background: linear-gradient(90deg, #059669, #047857);
  color: #ffffff;
}

.btn-amber {
  background: linear-gradient(90deg, #d97706, #b45309);
  color: #ffffff;
}

.btn-red {
  background: linear-gradient(90deg, #dc2626, #b91c1c);
  color: #ffffff;
}

.copy-btn {
  width: auto !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  background: #1e2638;
  color: #38bdf8;
  border: 1px solid #334155 !important;
  cursor: pointer;
}

.copy-btn:hover {
  background: #334155;
  color: #fff;
}

/* ==========================================================================
   TABLES & BADGES
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #1a2233;
  text-align: left;
}

th {
  background: #090c14;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: 0.6px;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.act-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

.act-REGISTER, .act-REFERRAL { background: #1e3a8a; color: #93c5fd; }
.act-TOPUP, .act-ROI { background: #065f46; color: #6ee7b7; }
.act-SWAP, .act-LEVEL { background: #78350f; color: #fde68a; }
.act-CLAIM, .act-ACCELERATOR { background: #581c87; color: #e9d5ff; }
.act-WITHDRAW { background: #9a3412; color: #fed7aa; }
.act-TURBO_RELEASE { background: #0e7490; color: #a5f3fc; }
.act-LIQUIDITY, .act-DEPLOY { background: #334155; color: #cbd5e1; }
.act-FLASHED { background: #7f1d1d; color: #fca5a5; }

/* UTILITY */
.hidden { display: none !important; }

/* DEX SCREENER CHART CONTAINER */
.chart-container {
  background: #090c14;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  width: 100%;
  min-height: 480px;
}

.chart-container iframe {
  width: 100%;
  height: 480px;
  border: 0;
  display: block;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE / TABLET)
   ========================================================================== */
@media (max-width: 900px) {
  .app-sidebar {
    transform: translateX(-100%);
    width: 280px;
    max-width: 85vw;
    z-index: 9999;
    box-shadow: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
  }

  .sidebar-close-btn {
    display: inline-flex !important;
  }

  .app-main {
    margin-left: 0;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #191627 !important;
    border: 2px solid #a855f7 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.45) !important;
    z-index: 10 !important;
    touch-action: manipulation !important;
  }

  .mobile-menu-toggle:hover,
  .mobile-menu-toggle:active {
    background: #252038 !important;
    border-color: #d946ef !important;
    box-shadow: 0 0 16px rgba(217, 70, 239, 0.6) !important;
  }

  .mobile-menu-toggle svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #ffffff !important;
    stroke-width: 2.8 !important;
    display: block !important;
  }

  .app-content {
    padding: 16px;
  }
}

/* ==========================================================================
   INFINITY DAO DASHBOARD LAYOUT, ICONS & TYPOGRAPHY (SCREENSHOT MATCH)
   ========================================================================== */
.dao-top-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .dao-top-row {
    grid-template-columns: 1fr;
  }
}

.dao-ref-card {
  background: #19191d;
  border: 1px solid #24242b;
  border-radius: 14px;
  padding: 20px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dao-add-card {
  background: #19191d;
  border: 1px solid #24242b;
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dao-add-btn {
  width: auto !important;
  margin: 0 !important;
  padding: 9px 26px !important;
  border-radius: 999px !important;
  background: #121216 !important;
  border: 1.5px solid #d946ef !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dao-add-btn:hover {
  background: rgba(217, 70, 239, 0.18) !important;
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.45);
}

/* 6-CARD MAIN ROW */
.dao-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1280px) {
  .dao-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dao-grid-6 {
    grid-template-columns: 1fr !important;
  }
}

.dao-stat-card {
  background: #19191d;
  border: 1px solid #24242b;
  border-radius: 14px;
  padding: 24px 14px 22px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  min-height: 225px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dao-stat-card:hover {
  transform: translateY(-3px);
  border-color: #a855f7;
}

.dao-icon-wrap {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.dao-coin-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2a2438, #0f0d14 75%);
  border: 2px solid #9333ea;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), inset 0 0 12px rgba(217, 70, 239, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dao-usdt-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #a1a1aa, #3f3f46 75%);
  border: 2px solid #d4d4d8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), inset 0 0 12px rgba(168, 85, 247, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dao-stat-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #d4d4d8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.dao-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #d946ef;
  letter-spacing: 0.2px;
  line-height: 1.2;
  word-break: break-word;
}

.dao-stat-sub {
  font-size: 12.5px;
  color: #a1a1aa;
  margin-top: 5px;
}

/* 4-CARD SECOND ROW (FEATURE & ACCOUNT STATUS) */
.dao-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .dao-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dao-grid-4 {
    grid-template-columns: 1fr !important;
  }
}

/* ALLIANCE & INCOMES RESPONSIVE GRIDS (DESKTOP) */
.alliance-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.alliance-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.alliance-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.incomes-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 1200px) {
  .alliance-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .alliance-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dao-feature-card {
  background: #19191d;
  border: 1px solid #24242b;
  border-radius: 14px;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 145px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dao-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.dao-switch-on {
  width: 48px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9333ea, #d946ef);
  position: relative;
  display: inline-block;
  box-shadow: 0 0 14px rgba(217, 70, 239, 0.45);
}

.dao-switch-on::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 3px;
  right: 4px;
}

.dao-switch-txt {
  font-size: 14px;
  font-weight: 700;
  color: #d946ef;
  text-transform: uppercase;
}

/* COMPACT GLOWING PILL BUTTONS (LINEAR RELEASE / RESTAKE / CLAIM) */
.dao-pill-btn:not(.hidden) {
  width: 210px !important;
  margin: 0 !important;
  padding: 11px 24px !important;
  border-radius: 999px !important;
  background: #141418 !important;
  border: 2px solid #c026d3 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  font-family: 'Poppins', sans-serif !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: 0 0 14px rgba(192, 38, 211, 0.32), inset 0 0 8px rgba(168, 85, 247, 0.15) !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
}

.dao-pill-btn:hover {
  background: rgba(192, 38, 211, 0.16) !important;
  border-color: #e879f9 !important;
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.55) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   INFINITY DAO SWAP CARD DESIGN (EXACT SCREENSHOT MATCH)
   ========================================================================== */
.dao-swap-card {
  max-width: 610px;
  margin: 16px auto;
  background: #0d0714;
  border: 1.5px solid #9333ea;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 28px rgba(147, 51, 234, 0.18);
}

.dao-swap-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.38);
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.08), transparent);
}

.dao-swap-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: linear-gradient(90deg, #e879f9, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dao-swap-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9333ea 0%, #3b0764 100%);
  border: 1px solid rgba(216, 180, 254, 0.35);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 2px 10px rgba(147, 51, 234, 0.4);
}

.dao-swap-body {
  padding: 28px 32px 34px 32px;
}

.dao-swap-section-lbl {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.dao-swap-box {
  border-radius: 16px;
  padding: 18px 22px;
  background: radial-gradient(circle at 50% 0%, rgba(147, 51, 234, 0.26) 0%, rgba(17, 10, 26, 0.96) 75%);
  transition: border-color 0.2s ease;
}

.dao-swap-box-from {
  border: 1px solid rgba(168, 85, 247, 0.42);
}

.dao-swap-box-to {
  border: 1px solid rgba(71, 85, 105, 0.45);
}

.dao-swap-bal-row {
  text-align: right;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.dao-swap-mid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dao-token-selector {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid #0d9488;
  cursor: pointer;
  min-width: 135px;
  user-select: none;
  transition: all 0.2s ease;
}

.dao-token-selector:hover {
  border-color: #2dd4bf;
  background: rgba(15, 23, 42, 0.9);
}

.dao-token-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.dao-token-sym {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  margin-right: 4px;
}

.dao-swap-input-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}

.dao-swap-input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  text-align: right;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  width: 100%;
  max-width: 210px;
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Poppins', sans-serif;
}

.dao-swap-input::placeholder {
  color: #6b7280;
}

/* Hide number input spinners in Swap input */
.dao-swap-input::-webkit-outer-spin-button,
.dao-swap-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.dao-swap-max-btn {
  width: auto !important;
  margin: 0 !important;
  padding: 5px 15px !important;
  border-radius: 999px !important;
  background: #d946ef !important;
  color: #12061c !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dao-swap-max-btn:hover {
  background: #e879f9 !important;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.5);
}

.dao-swap-out-val {
  font-size: 28px;
  font-weight: 700;
  color: #6b7280;
  text-align: right;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dao-swap-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
}

.dao-swap-addr-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
}

.dao-swap-copy-icon {
  width: auto !important;
  margin: 0 !important;
  padding: 2px 4px !important;
  background: transparent !important;
  border: none !important;
  color: #cbd5e1 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
}

.dao-swap-copy-icon:hover {
  color: #e879f9 !important;
}

.dao-swap-divider {
  position: relative;
  margin: 26px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dao-swap-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 2%, #c026d3 50%, transparent 98%);
}

.dao-swap-switch-btn {
  position: relative;
  z-index: 2;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: #12081c !important;
  border: 1.5px solid #c026d3 !important;
  color: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(192, 38, 211, 0.3);
  transition: all 0.25s ease;
}

.dao-swap-switch-btn:hover {
  transform: rotate(180deg);
  border-color: #e879f9 !important;
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.55);
}

.dao-swap-submit-btn {
  margin-top: 24px !important;
  width: 100% !important;
  padding: 16px !important;
  border-radius: 14px !important;
  background: #222228 !important;
  color: #9ca3af !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dao-swap-submit-btn.ready {
  background: linear-gradient(90deg, #9333ea, #c026d3) !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(192, 38, 211, 0.4);
}

/* ==========================================================================
   ENHANCED MOBILE RESPONSIVENESS & READABILITY (1-BOX PER ROW & LARGER FONTS)
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal overflow ("design bhagna") */
  html, body {
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
  }

  .app-container,
  .app-main,
  .app-content {
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .app-content {
    padding: 14px 12px !important;
  }

  /* Compact topbar on mobile */
  .app-topbar {
    padding: 10px 12px !important;
    min-height: 60px !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 8px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .topbar-left {
    min-width: 44px !important;
    flex: 0 0 auto !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #191627 !important;
    border: 2px solid #a855f7 !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.45) !important;
    z-index: 10 !important;
    touch-action: manipulation !important;
  }

  .mobile-menu-toggle:hover,
  .mobile-menu-toggle:active {
    background: #252038 !important;
    border-color: #d946ef !important;
    box-shadow: 0 0 16px rgba(217, 70, 239, 0.6) !important;
  }

  .mobile-menu-toggle svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #ffffff !important;
    stroke-width: 2.8 !important;
    display: block !important;
  }

  /* Hide heading text on mobile so buttons never get hidden or pushed out */
  .page-title {
    display: none !important;
  }

  .topbar-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 6px !important;
    overflow: hidden !important;
  }

  .wallet-btn-pill {
    padding: 6px 10px !important;
    font-size: 12px !important;
    max-width: 135px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 0 !important;
  }

  .wallet-btn-pill span#topWalletShort {
    max-width: 100px !important;
    display: inline-block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  #roleBadge {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    background: #1e1b2e !important;
    border: 1px solid #7c3aed !important;
    color: #f3e8ff !important;
    max-width: 130px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 1 !important;
  }

  /* Live chart container on mobile */
  .chart-container,
  .chart-container iframe {
    height: 440px !important;
    min-height: 440px !important;
  }

  /* 1-Box Per Row for all grids across all pages */
  .dao-grid-6,
  .dao-grid-4,
  .dao-top-row,
  .stats-grid,
  .main-grid,
  .grid-2,
  .alliance-grid-4,
  .alliance-grid-5,
  .alliance-grid-2,
  .incomes-grid-3,
  .income-grid,
  .responsive-grid-boxes,
  [style*="display:grid"],
  [style*="display: grid"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dao-stat-card,
  .dao-feature-card,
  .stat-box,
  .stat-card-3d,
  .income-card,
  .card,
  .preview-box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .dao-stat-card {
    min-height: 180px !important;
    padding: 20px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .dao-feature-card {
    min-height: auto !important;
    padding: 20px 16px !important;
  }

  /* Larger, legible fonts on mobile */
  .dao-stat-label,
  .stat-box .lbl,
  .stat-card-3d .card-title,
  .income-card .inc-tag {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #e4e4e7 !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
  }

  .dao-stat-value,
  .stat-box .num,
  .stat-card-3d .card-value,
  .income-card .inc-val {
    font-size: 24px !important;
    font-weight: 800 !important;
    margin: 8px 0 4px 0 !important;
    line-height: 1.25 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }

  .dao-stat-sub,
  .stat-box .sub,
  .income-card .inc-usd {
    font-size: 13px !important;
    color: #cbd5e1 !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }

  .card {
    padding: 18px 14px !important;
    margin-bottom: 16px !important;
    border-radius: 12px !important;
  }

  .card h2 {
    font-size: 18px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .card h3 {
    font-size: 16px !important;
  }

  .label, label {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important;
    margin-bottom: 8px !important;
  }

  input, select, textarea {
    font-size: 16px !important;
    padding: 13px 14px !important;
    border-radius: 10px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .preview-box {
    padding: 16px 14px !important;
    border-radius: 10px !important;
  }

  .preview-box .row {
    font-size: 14.5px !important;
    padding: 8px 0 !important;
  }

  .preview-box .row .label {
    font-size: 14px !important;
  }

  .preview-box .row .val,
  .preview-box .row .val-green,
  .preview-box .row .val-cyan,
  .preview-box .row .val-warn {
    font-size: 15.5px !important;
    font-weight: 700 !important;
  }

  /* Buttons on mobile */
  button:not(.nav-link):not(.mobile-menu-toggle):not(.sidebar-close-btn):not(.wallet-btn-pill):not(.copy-btn):not(.dao-swap-max-btn):not(.modal-close-btn),
  .btn-purple, .btn-green, .btn-cyan, .btn-blue, .btn-amber, .btn-red,
  .dao-pill-btn, .dao-swap-submit-btn {
    font-size: 16px !important;
    padding: 14px 18px !important;
    border-radius: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dao-pill-btn:not(.hidden) {
    width: 100% !important;
  }

  /* Referral link card */
  .dao-ref-card {
    padding: 18px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dao-ref-input-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .dao-ref-input-wrap input,
  #myRefLinkInput {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 13.5px !important;
    box-sizing: border-box !important;
  }

  .dao-ref-input-wrap button,
  .dao-ref-input-wrap .dao-pill-btn {
    width: 100% !important;
  }

  .dao-ref-counters {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-around !important;
    gap: 10px !important;
    border-top: 1px solid #282832 !important;
    padding-top: 12px !important;
    margin-top: 12px !important;
    width: 100% !important;
  }

  /* Tables: smooth horizontal scroll without expanding parent card */
  .table-responsive,
  div[style*="overflow-x:auto"],
  div[style*="overflow-x: auto"] {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
  }

  table {
    font-size: 13.5px !important;
    min-width: 520px;
    width: 100% !important;
  }

  th, td {
    padding: 11px 9px !important;
    white-space: nowrap;
  }

  /* MOBILE SWAP INPUT FIX */
  .dao-swap-card {
    padding: 14px 10px !important;
    max-width: 100% !important;
  }

  .dao-swap-mid-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .dao-token-selector {
    min-width: 105px !important;
    padding: 7px 10px !important;
    gap: 6px !important;
  }

  .dao-token-sym {
    font-size: 13.5px !important;
  }

  .dao-swap-input-group {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .dao-swap-input {
    font-size: 20px !important;
    width: 100% !important;
    min-width: 80px !important;
    text-align: right !important;
    display: block !important;
  }

  .dao-swap-max-btn {
    width: auto !important;
    min-width: 44px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    display: inline-block !important;
  }

  .dao-swap-out-val {
    font-size: 20px !important;
  }

  /* MOBILE REPORT MODALS FIX (INCOME, CLAIM, WITHDRAWAL) */
  .modal-backdrop {
    padding: 8px !important;
  }

  .modal-dialog {
    max-height: 94vh !important;
    max-width: 98vw !important;
    border-radius: 12px !important;
  }

  .modal-dialog .modal-header,
  .modal-dialog > div:first-child {
    padding: 12px 14px !important;
  }

  .modal-dialog h3 {
    font-size: 15px !important;
  }

  .modal-dialog .modal-summary-grid,
  .modal-dialog > div:nth-child(2) {
    padding: 10px 14px 0 14px !important;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 8px !important;
  }

  .modal-dialog .modal-summary-grid > div,
  .modal-dialog > div:nth-child(2) > div {
    padding: 8px 10px !important;
  }

  .modal-dialog .modal-summary-grid .num,
  .modal-dialog > div:nth-child(2) > div > div:nth-child(2) {
    font-size: 15px !important;
  }

  .modal-dialog .modal-body,
  .modal-dialog > div:nth-child(3) {
    padding: 10px 12px !important;
  }

  .modal-dialog .modal-footer,
  .modal-dialog > div:last-child {
    padding: 10px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
}

/* ADMIN TAB BUTTONS & TABLE FOOTERS */
.admin-tab-btn {
  background: #181820;
  border: 1px solid #2b2b36;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  background: #23232c;
  color: #fff;
  border-color: #a855f7;
}

.admin-tab-btn.active {
  background: linear-gradient(90deg, #9333ea, #c026d3) !important;
  color: #ffffff !important;
  border-color: #d946ef !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4) !important;
}

table tfoot td {
  padding: 12px 10px;
  background: #131318;
  font-weight: 700;
  border-top: 2px solid #2e2e3a;
}

/* STRICT VISIBILITY OVERRIDE — MUST ALWAYS REMAIN AT END OF FILE */
.hidden,
.sidebar-menu .nav-link.hidden,
button.nav-link.hidden,
button.hidden,
.admin-only-block.hidden,
.auth-menu-block.hidden,
.page-section.hidden {
  display: none !important;
}
