/* ==========================================================================
   ROSCHA SYNERGY - PREMIUM CYBERPUNK WEB3 ECOSYSTEM STYLESHEET
   Design System: Glassmorphism, Deep Dark Cosmic Palette, Neon Cyan & Purple Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Colors */
  --bg-main: #070810;
  --bg-sidebar: #0a0d1a;
  --bg-card: rgba(16, 20, 38, 0.75);
  --bg-card-hover: rgba(23, 29, 54, 0.85);
  --bg-card-solid: #111528;
  --bg-input: rgba(10, 13, 26, 0.8);
  
  /* Primary & Accent Palettes */
  --primary-cyan: #00d2ff;
  --primary-blue: #3a7bd5;
  --primary-purple: #7928ca;
  --primary-pink: #ff0080;
  --accent-gold: #ffb703;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f59e0b;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 50%, #7928ca 100%);
  --grad-button: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
  --grad-button-hover: linear-gradient(90deg, #1d4ed8 0%, #6d28d9 100%);
  --grad-cyan: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --grad-purple: linear-gradient(135deg, #b176f2 0%, #6366f1 100%);
  --grad-card-glow: linear-gradient(180deg, rgba(0, 210, 255, 0.15) 0%, rgba(121, 40, 202, 0.05) 100%);
  
  /* Borders & Shadows */
  --border-glass: 1px solid rgba(255, 255, 255, 0.08);
  --border-glass-cyan: 1px solid rgba(0, 210, 255, 0.3);
  --border-glass-purple: 1px solid rgba(121, 40, 202, 0.3);
  --shadow-neon-cyan: 0 0 25px rgba(0, 210, 255, 0.25);
  --shadow-neon-purple: 0 0 25px rgba(121, 40, 202, 0.25);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
  
  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing & Transitions */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(58, 123, 213, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(121, 40, 202, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(0, 210, 255, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

/* App Container Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: var(--border-glass);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: var(--transition-smooth);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.sidebar-brand {
  padding: 22px 18px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: var(--border-glass);
  position: relative;
}

/* Mobile Sidebar Close Button (Nút X trên đầu Drawer) */
.mobile-sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.mobile-sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
}

/* Mobile Sidebar Toggle Button (Nút Hamburger trên Top Header) */
.mobile-sidebar-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 210, 255, 0.25);
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.mobile-sidebar-toggle-btn:hover,
.mobile-sidebar-toggle-btn:focus {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.35);
}

.mobile-sidebar-toggle-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sidebar-toggle-btn.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--primary-cyan);
}
.mobile-sidebar-toggle-btn.is-active span:nth-child(2) {
  opacity: 0;
}
.mobile-sidebar-toggle-btn.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--primary-cyan);
}

/* Sidebar Backdrop Overlay khi mở drawer trên mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block !important;
  opacity: 1 !important;
}

.brand-logo-img {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.65));
  transition: transform var(--transition-fast);
}

.brand-logo-img:hover {
  transform: rotate(4deg) scale(1.06);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #ffffff 0%, #00d2ff 60%, #9d4edd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.3px;
  margin-top: 3px;
}

/* Navigation Links */
.sidebar-menu {
  list-style: none;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.menu-item a .menu-icon {
  font-size: 1.15rem;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: var(--transition-fast);
}

.menu-item:hover a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.menu-item:hover a .menu-icon {
  color: var(--primary-cyan);
}

.menu-item.active a {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(124, 58, 237, 0.15) 100%);
  border: 1px solid rgba(0, 210, 255, 0.3);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.menu-item.active a .menu-icon {
  color: var(--primary-cyan);
  filter: drop-shadow(0 0 8px var(--primary-cyan));
}

.menu-item.active a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-cyan);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--primary-cyan);
}

/* Sidebar Web3 Card Widget */
.sidebar-widget {
  margin: 12px 14px 20px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(16, 24, 48, 0.8) 0%, rgba(20, 15, 38, 0.8) 100%);
  border: var(--border-glass-cyan);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.sidebar-widget::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.widget-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 6px;
}

.widget-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 10px;
}

.widget-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.price-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.price-change {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Sidebar Footer Links */
.sidebar-footer {
  margin-top: auto;
  padding: 16px 14px;
  border-top: var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.8rem;
  transition: var(--transition-fast);
}

.sidebar-footer a:hover {
  color: #94a3b8;
}

/* ==========================================================================
   MAIN CONTENT AREA & TOP HEADER
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-header {
  height: 72px;
  padding: 0 28px;
  background: rgba(10, 13, 26, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-search {
  position: relative;
  width: 360px;
}

.header-search input {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 0 16px 0 44px;
  color: #ffffff;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fast);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.header-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 1rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-red);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-sidebar);
}

/* Language Selector Dropdown */
.lang-dropdown-wrapper {
  position: relative;
  z-index: 100;
}

.lang-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-selector-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.2);
}

.lang-chevron {
  font-size: 0.75rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.lang-dropdown-wrapper.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: rgba(13, 17, 38, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 210, 255, 0.15);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
  animation: fadeInDown 0.2s ease forwards;
}

.lang-dropdown-wrapper.open .lang-dropdown-menu {
  display: flex;
}

.lang-dropdown-header {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-option.active {
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.lang-flag {
  font-size: 1.15rem;
}

.lang-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lang-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
}

.lang-native {
  font-size: 0.68rem;
  color: #94a3b8;
}

.lang-check {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 800;
}

/* User Profile Chip */
.header-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glass);
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-user-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.3);
}

.user-chip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-cyan);
}

.user-chip-info {
  display: flex;
  flex-direction: column;
}

.user-chip-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-chip-id {
  font-size: 0.7rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

/* Connect Wallet Button (Đã ẩn theo yêu cầu) */
.btn-connect-wallet {
  display: none !important;
}

.btn-connect-wallet:hover {
  background: var(--grad-button-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

/* NÚT ĐĂNG KÝ THAM GIA */
.btn-header-register {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 24px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-header-register:hover {
  background: linear-gradient(90deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* 5 GÓI ĐĂNG KÝ CHO ĐI ($50, $100, $200, $500, $1000) */
.package-selector-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 10px 0 14px;
}

.package-card-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.package-card-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-cyan);
  transform: translateY(-2px);
}

.package-card-btn.active {
  background: linear-gradient(145deg, rgba(0, 210, 255, 0.15) 0%, rgba(121, 40, 202, 0.2) 100%);
  border: 1px solid var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.package-price-val {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.package-daily-gain {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-top: 2px;
}

.package-fee-tag {
  font-size: 0.6rem;
  color: #94a3b8;
  margin-top: 2px;
}

.interest-banner-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 0.78rem;
}

/* ==========================================================================
   CONTENT VIEWS CONTAINER (TABS)
   ========================================================================== */
.content-area {
  padding: 24px 28px 48px;
  flex: 1;
  overflow-x: hidden;
  min-width: 0;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.view-section.active {
  display: block;
}

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

/* ==========================================================================
   DASHBOARD HOME VIEW (TỔNG QUAN DỰ ÁN)
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* Hero Section */
.hero-card {
  grid-column: 1 / 2;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  border: var(--border-glass-cyan);
  box-shadow: var(--shadow-card);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background-size: cover;
  background-position: center;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 11, 24, 0.4) 0%, rgba(8, 11, 24, 0.95) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 10px;
}

.hero-title .highlight-cyan {
  color: var(--primary-cyan);
  text-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

.hero-title .highlight-pink {
  color: #d946ef;
  text-shadow: 0 0 20px rgba(217, 70, 239, 0.5);
}

.hero-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-primary {
  padding: 10px 22px;
  background: var(--grad-button);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.6);
}

.btn-secondary {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: var(--border-glass);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

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

/* Hero Stats Row */
.hero-stats-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-cyan);
  font-size: 1rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-label {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Auth / Quick Login Card */
.auth-quick-card {
  grid-column: 2 / 3;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.auth-card-header {
  margin-bottom: 16px;
}

.auth-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.auth-card-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
}

.auth-tabs-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.auth-tab-btn.active {
  background: var(--grad-button);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.auth-methods-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-method-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.auth-method-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 210, 255, 0.3);
  transform: translateX(3px);
}

.method-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}

.method-icon {
  font-size: 1.15rem;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-method-item.web3-highlight {
  background: linear-gradient(90deg, rgba(235, 115, 37, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
  border: 1px solid rgba(235, 115, 37, 0.4);
}

.auth-method-item.web3-highlight:hover {
  border-color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

/* ==========================================================================
   MIDDLE ROW: MY ACCOUNT & MLM PLAN & WEB3 WALLET
   ========================================================================== */
.middle-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 20px;
  margin-top: 20px;
}

.dash-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.dash-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.card-more-link {
  font-size: 0.75rem;
  color: var(--primary-cyan);
  text-decoration: none;
  cursor: pointer;
}

/* My Account Card Component */
.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-avatar-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.35);
}

.profile-details-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.badge-kol {
  font-size: 0.65rem;
  font-weight: 700;
  background: #7c3aed;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
}

.profile-id-text {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.profile-rank-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
  margin-top: 2px;
}

/* Account 3 mini stats */
.account-metrics-triplet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.triplet-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}

.triplet-num {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.triplet-label {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* MLM Tree Interactive Visual */
.mlm-tree-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.tree-node-root {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tree-branches-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
}

.branch-node {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition-fast);
}

.branch-node:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.branch-node.f1 { border-color: #f59e0b; }
.branch-node.f2 { border-color: #10b981; }
.branch-node.f3 { border-color: #00d2ff; }
.branch-node.f4 { border-color: #8b5cf6; }
.branch-node.f5 { border-color: #ec4899; }

.branch-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
}

.branch-percent {
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 2px;
}

.branch-node.f1 .branch-percent { color: #f59e0b; }
.branch-node.f2 .branch-percent { color: #10b981; }
.branch-node.f3 .branch-percent { color: #00d2ff; }
.branch-node.f4 .branch-percent { color: #8b5cf6; }
.branch-node.f5 .branch-percent { color: #ec4899; }

.mlm-perks-tag {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 6px;
}

/* Web3 Wallet Card */
.wallet-box-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metamask-chip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
}

.metamask-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.wallet-address-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e2e8f0;
}

.btn-disconnect {
  padding: 4px 10px;
  font-size: 0.7rem;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-disconnect:hover {
  background: rgba(239, 68, 68, 0.25);
}

.wallet-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallet-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: var(--transition-fast);
}

.wallet-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

/* ==========================================================================
   BOTTOM ROW: ASSETS, GIVE & TAKE P2P, RECENT TRANSACTIONS
   ========================================================================== */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* Assets Summary Card with Chart */
.asset-total-value {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-change-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
}

.timeframe-selector {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: 8px;
  margin-top: 10px;
  width: fit-content;
}

.tf-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.tf-btn.active {
  background: var(--primary-cyan);
  color: #070810;
}

.asset-chart-svg {
  width: 100%;
  height: 90px;
  margin: 12px 0;
  overflow: visible;
}

.token-list-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.token-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 4px 0;
}

.token-name-col {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #ffffff;
}

.token-symbol-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
}

.token-symbol-badge.roscha { background: linear-gradient(135deg, #00d2ff, #7928ca); color: #fff; }
.token-symbol-badge.usdt { background: #26a17b; color: #fff; }
.token-symbol-badge.bnb { background: #f3ba2f; color: #000; }
.token-symbol-badge.eth { background: #627eea; color: #fff; }

.token-balance-col {
  text-align: right;
  font-family: var(--font-mono);
}

.token-amount {
  font-weight: 700;
  color: #ffffff;
}

.token-usd {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Give & Take (P2P Transfer) Component */
.p2p-tabs-bar {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.p2p-tab-btn {
  flex: 1;
  padding: 7px 0;
  text-align: center;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.p2p-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
}

.p2p-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group-custom label {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 4px;
  display: block;
}

.custom-select-box, .custom-input-box {
  width: 100%;
  height: 38px;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0 12px;
  color: #ffffff;
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition-fast);
}

.custom-select-box:focus, .custom-input-box:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.input-with-max {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-max-pill {
  position: absolute;
  right: 8px;
  background: rgba(0, 210, 255, 0.15);
  color: var(--primary-cyan);
  border: none;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
}

.btn-submit-p2p {
  width: 100%;
  height: 40px;
  margin-top: 6px;
  background: var(--grad-button);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-submit-p2p:hover {
  background: var(--grad-button-hover);
  transform: translateY(-1px);
}

/* Recent Transactions Table */
.tx-list-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 250px;
}

.tx-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
}

.tx-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tx-icon-pill {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.tx-icon-pill.receive { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.tx-icon-pill.transfer { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.tx-info-block {
  display: flex;
  flex-direction: column;
}

.tx-title {
  font-weight: 700;
  color: #ffffff;
}

.tx-sub {
  font-size: 0.68rem;
  color: #64748b;
  font-family: var(--font-mono);
}

.tx-item-right {
  text-align: right;
}

.tx-amount {
  font-family: var(--font-mono);
  font-weight: 700;
}

.tx-amount.positive { color: var(--accent-green); }
.tx-amount.negative { color: var(--accent-red); }

.tx-status-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
  display: inline-block;
}

.tx-status-badge.success { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.tx-status-badge.pending { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }

/* ==========================================================================
   KHỐI THỐNG KÊ TỔNG LỆNH & SUB-TABS P2P (CO GIÃN TỰ ĐỘNG THEO MÀN HÌNH)
   ========================================================================== */
.p2p-volume-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  width: 100%;
}

.p2p-kpi-card {
  padding: 18px 22px;
  border-radius: var(--radius-xl, 16px);
  background: rgba(16, 20, 38, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: all var(--transition-fast, 0.2s ease);
  min-width: 0;
}

.p2p-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.p2p-kpi-card.p2p-kpi-give {
  border-left: 4px solid var(--primary-cyan, #00d2ff);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.05) 0%, rgba(16, 20, 38, 0.85) 100%);
}

.p2p-kpi-card.p2p-kpi-take {
  border-left: 4px solid var(--accent-green, #10b981);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 20, 38, 0.85) 100%);
}

.p2p-kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.p2p-kpi-title {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.p2p-kpi-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.p2p-kpi-val {
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 800;
  font-family: var(--font-heading, sans-serif);
  margin: 4px 0;
  letter-spacing: 0.5px;
  line-height: 1.25;
  word-break: break-word;
}

.p2p-kpi-val-give {
  color: var(--primary-cyan, #00d2ff);
  text-shadow: 0 0 16px rgba(0, 210, 255, 0.25);
}

.p2p-kpi-val-take {
  color: var(--accent-green, #10b981);
  text-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.p2p-kpi-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.74rem;
  margin-top: 2px;
}

.p2p-kpi-give .p2p-kpi-count {
  color: #38bdf8;
  font-weight: 600;
}

.p2p-kpi-take .p2p-kpi-count {
  color: #34d399;
  font-weight: 600;
}

.p2p-kpi-status {
  color: #94a3b8;
}

/* SUB-TABS LỚN CHO ĐI - NHẬN VỀ TRONG VIEW P2P (TỰ ĐỘNG CO GIÃN LINH HOẠT) */
.p2p-main-tabs-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
  flex-wrap: wrap;
}

.p2p-main-tab-btn {
  flex: 1 1 300px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: rgba(16, 20, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl, 16px);
  color: #94a3b8;
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s ease);
  text-align: left;
  min-width: 0;
}

.p2p-main-tab-btn .p2p-tab-content {
  min-width: 0;
  flex: 1;
}

.p2p-main-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.p2p-main-tab-btn.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(124, 58, 237, 0.25) 100%);
  border: 1px solid var(--primary-cyan, #00d2ff);
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.25);
  color: #ffffff;
}

.p2p-main-tab-btn.take-tab.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
  border-color: var(--accent-green, #10b981);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

.p2p-tab-icon-large {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.p2p-main-tab-btn.active .p2p-tab-icon-large {
  background: var(--primary-cyan, #00d2ff);
  color: #070810;
  box-shadow: 0 0 15px var(--primary-cyan, #00d2ff);
}

.p2p-main-tab-btn.take-tab.active .p2p-tab-icon-large {
  background: var(--accent-green, #10b981);
  color: #070810;
  box-shadow: 0 0 15px var(--accent-green, #10b981);
}

.p2p-tab-text-title {
  font-family: var(--font-heading, sans-serif);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 800;
  display: block;
  line-height: 1.3;
}

.p2p-tab-text-desc {
  font-size: clamp(0.7rem, 1.8vw, 0.76rem);
  color: #94a3b8;
  margin-top: 3px;
  display: block;
  line-height: 1.35;
}

.p2p-main-tab-btn.active .p2p-tab-text-desc {
  color: #e2e8f0;
}

.p2p-tab-badge {
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Responsive tinh chỉnh cho màn hình tablet & mobile */
@media (max-width: 768px) {
  .p2p-volume-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .p2p-main-tabs-nav {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .p2p-main-tab-btn {
    width: 100% !important;
    flex: 1 1 100% !important;
    padding: 14px 16px !important;
  }
}

@media (max-width: 480px) {
  .p2p-kpi-card {
    padding: 12px 14px !important;
  }
  .p2p-tab-icon-large {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.25rem !important;
  }
  .p2p-main-tab-btn {
    gap: 12px !important;
    padding: 12px 14px !important;
  }
}

/* ==========================================================================
   VIEW 02: CHÍNH SÁCH TRẢ THƯỞNG (REWARD POLICY & MATRIX)
   ========================================================================== */
.view-header {
  margin-bottom: 24px;
}

.view-heading-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
}

.view-heading-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 4px;
}

.mlm-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .mlm-detail-grid {
    grid-template-columns: 1fr !important;
  }
}

.interactive-tree-card {
  background: var(--bg-card);
  border: var(--border-glass-cyan);
  border-radius: var(--radius-xl);
  padding: clamp(16px, 2.5vw, 28px);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.tree-visual-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  width: 100%;
  box-sizing: border-box;
}

.tree-node-card-lg {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(124, 58, 237, 0.3) 100%);
  border: 1px solid rgba(0, 210, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 14px 28px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.25);
  max-width: min(100%, 540px);
  width: 100%;
  box-sizing: border-box;
}

.tree-tier-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.tier-detail-card {
  background: rgba(255, 255, 255, 0.03);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.tier-detail-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-cyan);
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.15);
}

/* Fluid Table Container & Styling cho Chính Sách Trả Thưởng */
.mlm-table-container {
  width: 100% !important;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 210, 255, 0.18);
  border-radius: 12px;
  padding: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mlm-fluid-table {
  width: 100% !important;
  min-width: 600px;
  border-collapse: collapse;
}

.mlm-fluid-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 13px 18px !important;
  font-weight: 700;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mlm-fluid-table td {
  padding: 13px 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.mlm-fluid-table tbody tr:hover {
  background: rgba(0, 210, 255, 0.05);
}

/* ==========================================================================
   VIEW 03: TÀI KHOẢN & VỊ TRÍ HIỂN THỊ CẤP BẬC
   ========================================================================== */
.account-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 300px) 1fr;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

/* Các cột con phải có min-width: 0 để co lại được */
.account-detail-grid > * {
  min-width: 0;
  overflow: hidden;
}

/* Responsive: tablet vừa */
@media (max-width: 1024px) {
  .account-detail-grid {
    grid-template-columns: minmax(230px, 270px) 1fr !important;
    gap: 18px !important;
  }
}

/* Responsive: tablet nhỏ / mobile landscape - stack 1 cột */
@media (max-width: 900px) {
  .account-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .profile-card-full {
    padding: 20px !important;
  }
  .rank-progression-card {
    padding: 18px !important;
  }
  /* Rank header: xếp dọc */
  .rank-header-display {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .rank-badge-mega {
    font-size: 0.95rem !important;
    padding: 6px 14px !important;
  }
}

@media (max-width: 480px) {
  .account-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .rank-progression-card {
    padding: 14px !important;
  }
  .rank-badge-mega {
    font-size: 0.82rem !important;
    padding: 5px 10px !important;
  }
}

/* Form grid bên trong account (2 cột → 1 cột khi hẹp) */
.account-form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .account-form-grid-2col {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Security card: 2 cột → 1 cột */
.account-security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .account-security-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Telegram preferences: 2 cột → 1 cột */
.tg-prefs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) {
  .tg-prefs-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  /* span toàn bộ */
  .tg-prefs-grid > div[style*="grid-column"] {
    grid-column: 1 / -1 !important;
  }
}

.profile-card-full {
  background: var(--bg-card);
  border: var(--border-glass-purple);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar-massive {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-cyan);
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.5);
  margin-bottom: 14px;
}

/* VỊ TRÍ HIỂN THỊ CẤP BẬC & TIẾN ĐỘ THĂNG HẠNG */
.rank-progression-card {
  background: linear-gradient(145deg, rgba(20, 25, 50, 0.9) 0%, rgba(15, 18, 38, 0.9) 100%);
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(121, 40, 202, 0.2);
  margin-bottom: 24px;
}

.rank-header-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.account-rank-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.account-rank-next-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 16px;
  padding: 10px 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .account-rank-left {
    gap: 14px;
  }
  .account-rank-next-box {
    width: 100%;
    justify-content: space-between;
    padding: 10px 14px;
  }
  .account-rank-next-box > div:first-child {
    text-align: left !important;
  }
}

@media (max-width: 420px) {
  .account-rank-left {
    gap: 10px;
  }
  .account-rank-left .rank-showcase-box {
    width: 72px !important;
    height: 72px !important;
  }
}

.rank-showcase-box {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  cursor: pointer;
}

.rank-showcase-box:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 35px rgba(0, 210, 255, 0.65), inset 0 0 20px rgba(124, 58, 237, 0.5) !important;
}

.rank-showcase-box::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: linear-gradient(135deg, #00d2ff, #a855f7, #ec4899);
  z-index: -1;
  opacity: 0.6;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.rank-showcase-box:hover::after {
  opacity: 1;
}

.rank-badge-mega {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: linear-gradient(90deg, #7c3aed 0%, #db2777 100%);
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(219, 39, 119, 0.4);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  overflow: hidden;
  margin: 8px 0 16px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-cyan) 0%, #9d4edd 100%);
  border-radius: 10px;
  transition: width 0.8s ease;
  box-shadow: 0 0 10px var(--primary-cyan);
}

/* ==========================================================================
   VIEW 08: ĐỘI NHÓM (HIỂN THỊ CÁC TÀI KHOẢN GIỚI THIỆU TRỰC TIẾP F1)
   ========================================================================== */
.team-kpi-banner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.team-kpi-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.team-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 210, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary-cyan);
  flex-shrink: 0;
}

.team-kpi-card > div:last-child {
  min-width: 0;
  flex: 1;
}

.team-kpi-card [id^="kpi-f1-"] {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem) !important;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-table-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.table-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.table-filter-bar > div:first-child {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  flex: 1 1 260px;
  min-width: 0;
}

.table-filter-bar > div:last-child {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1 1 auto;
}

@media (max-width: 992px) {
  .team-kpi-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }
  .table-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .table-filter-bar > div:last-child {
    width: 100%;
  }
  .table-filter-bar > div:last-child input,
  .table-filter-bar > div:last-child select {
    flex: 1 1 calc(50% - 10px);
    width: 100%;
  }
}

@media (max-width: 639px) {
  .team-kpi-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    margin-bottom: 16px;
  }
  .team-kpi-card {
    padding: 12px 14px;
    gap: 10px;
  }
  .team-kpi-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    border-radius: 10px;
  }
  .team-kpi-card [id^="kpi-f1-"] {
    font-size: 1.05rem !important;
  }
  .team-kpi-card div:last-child div:last-child {
    font-size: 0.68rem !important;
    line-height: 1.2;
    margin-top: 2px;
  }
  .team-table-card {
    padding: 16px 12px !important;
    border-radius: 14px !important;
  }
  .table-filter-bar > div:last-child {
    flex-direction: column;
    gap: 8px;
  }
  .table-filter-bar > div:last-child input,
  .table-filter-bar > div:last-child select {
    width: 100% !important;
    flex: 1 1 100% !important;
  }
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.custom-table th {
  padding: 12px 16px;
  color: #94a3b8;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.status-indicator.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.status-indicator.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

/* ==========================================================================
   MODALS & TOASTS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active,
.modal-overlay.open {
  display: flex !important;
}

.modal-box {
  background: #11152a;
  border: var(--border-glass-cyan);
  border-radius: var(--radius-xl);
  padding: 30px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
  animation: modalScale 0.25s ease forwards;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Toast container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  padding: 12px 20px;
  background: #181d38;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  animation: toastIn 0.3s ease forwards;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.info { border-left: 4px solid var(--primary-cyan); }
.toast.error { border-left: 4px solid var(--accent-red); }

@keyframes toastIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   VIEW 06: CÀI ĐẶT HỆ THỐNG & TÍCH HỢP VÍ WEB3 (SETTINGS & SECURITY)
   ========================================================================== */
.settings-network-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.network-pill-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.network-pill-btn:hover {
  border-color: var(--primary-cyan);
  background: rgba(0, 210, 255, 0.05);
}

.network-pill-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(121, 40, 202, 0.15));
  border-color: var(--primary-cyan);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.25);
}

.network-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.cooldown-alert-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  animation: pulseCooldown 3s infinite alternate;
}

@keyframes pulseCooldown {
  0% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.15); }
  100% { box-shadow: 0 0 22px rgba(239, 68, 68, 0.35); }
}

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

.session-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Responsive layout adjustments cơ bản */
@media (max-width: 1280px) {
  .middle-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ADMIN PORTAL STYLES (Roscha Admin Console & Dispatcher Hub)
   ========================================================================== */
.btn-header-admin {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(185, 28, 28, 0.3) 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-header-admin:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(185, 28, 28, 0.5) 100%);
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.admin-header-banner {
  background: linear-gradient(135deg, rgba(17, 21, 40, 0.95) 0%, rgba(30, 20, 50, 0.9) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.admin-header-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #ef4444, #f59e0b);
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .admin-kpi-grid { grid-template-columns: 1fr; }
}

.admin-kpi-card {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  transition: var(--transition-smooth);
}

.admin-kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.admin-kpi-card.urgent {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-card) 100%);
}

.admin-subnav-container {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  overflow-x: auto;
}

.admin-subnav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.admin-subnav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.admin-subnav-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15) 0%, rgba(121, 40, 202, 0.25) 100%);
  border-color: rgba(0, 210, 255, 0.4);
  color: #00d2ff;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.admin-dispatcher-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.admin-panel-box {
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.admin-order-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.admin-order-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 210, 255, 0.3);
}

.admin-order-item.selected {
  border-color: #00d2ff;
  background: rgba(0, 210, 255, 0.08);
}

.admin-countdown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  font-family: var(--font-mono, 'Courier New', Courier, monospace) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
  font-size: 0.72rem;
  font-weight: 700;
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.admin-countdown-badge.normal {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-countdown-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-countdown-badge.emergency {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.split-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.split-item-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.split-item-row.checked {
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.4);
}

@media (max-width: 900px) {
  .admin-dispatch-two-cols {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   ROSCHA ADMIN CONTROL CENTER (EXECUTIVE THEME & LAYOUT - MẪU ẢNH CHUẨN)
   ========================================================================== */
.admin-control-shell {
  display: flex;
  flex-direction: column;
  background: #090d16;
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 210, 255, 0.05);
  overflow: hidden;
  color: #e2e8f0;
  font-family: var(--font-main, sans-serif);
}

/* Admin Header Bar */
.admin-shell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(13, 19, 33, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  gap: 20px;
  flex-wrap: wrap;
}

.admin-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
  border: 1px solid rgba(0, 210, 255, 0.5);
}

.admin-brand-titles h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-brand-titles p {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.admin-search-wrapper {
  flex: 1;
  max-width: 440px;
  position: relative;
  display: flex;
  align-items: center;
}

.admin-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 44px 8px 36px;
  font-size: 0.8rem;
  color: #fff;
  outline: none;
  transition: var(--transition-fast);
}

.admin-search-input:focus {
  border-color: #00d2ff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
  background: rgba(15, 23, 42, 1);
}

.admin-search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  color: #64748b;
  pointer-events: none;
}

.admin-search-shortcut {
  position: absolute;
  right: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #94a3b8;
  pointer-events: none;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.admin-header-slogan {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-bell-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
  color: #cbd5e1;
}

.admin-bell-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  border: 2px solid #090d16;
}

.admin-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-user-text {
  display: flex;
  flex-direction: column;
}

.admin-user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.admin-user-role {
  font-size: 0.68rem;
  color: #94a3b8;
}

/* Admin Main Body Layout (Sidebar + Content) */
.admin-shell-body {
  display: flex;
  min-height: 820px;
}

/* Admin Custom Sidebar (6 Tabs) */
.admin-sidebar-nav {
  width: 200px;
  min-width: 200px;
  background: rgba(11, 15, 25, 0.98);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-side-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.admin-side-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.admin-side-btn.active {
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.35);
  color: #00d2ff;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.15);
}

.admin-side-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
}

.admin-side-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
}

.admin-sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-sidebar-quote {
  font-size: 0.7rem;
  color: #475569;
  line-height: 1.4;
  font-style: italic;
}

/* Admin Main Content Container */
.admin-shell-content {
  flex: 1;
  padding: 22px;
  background: #090d16;
  overflow-y: auto;
}

/* ==========================================================================
   VIEW 1: MÀN HÌNH TỔNG QUAN (EXECUTIVE OVERVIEW DASHBOARD)
   ========================================================================== */
.admin-overview-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 1400px) {
  .admin-overview-kpi-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .admin-overview-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .admin-overview-kpi-row { grid-template-columns: 1fr; }
}

.admin-metric-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.admin-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 210, 255, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.metric-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.metric-card-title {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.metric-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.metric-card-icon.give { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.metric-card-icon.take { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.metric-card-icon.matched { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.metric-card-icon.pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.metric-card-icon.health { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.metric-card-icon.users { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.metric-card-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-card-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-heading, sans-serif);
}

.metric-card-growth {
  font-size: 0.68rem;
  font-weight: 700;
}

.metric-card-growth.up { color: #10b981; }
.metric-card-growth.down { color: #ef4444; }

.metric-card-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* Overview Middle Grid (3 Columns) */
.admin-overview-middle-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .admin-overview-middle-grid { grid-template-columns: 1fr 1fr; }
  .admin-overview-middle-grid > .col-widgets { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 800px) {
  .admin-overview-middle-grid { grid-template-columns: 1fr; }
  .admin-overview-middle-grid > .col-widgets { grid-column: span 1; grid-template-columns: 1fr; }
}

.admin-card-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.admin-card-badge {
  font-size: 0.66rem;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 700;
}

.admin-card-badge.gold {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-card-badge.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.admin-card-badge.red {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-card-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-card-link {
  font-size: 0.72rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-card-link:hover {
  text-decoration: underline;
  color: #00d2ff;
}

/* Mini Queue Tables */
.admin-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.73rem;
  text-align: left;
}

.admin-mini-table th {
  padding: 8px 6px;
  color: #64748b;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-mini-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  vertical-align: middle;
}

.admin-mini-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-user-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #fff;
}

.user-mini-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #38bdf8;
}

.table-action-btn-blue {
  background: #0284c7;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.table-action-btn-blue:hover {
  background: #0369a1;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

/* Dispute List Items */
.dispute-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dispute-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dispute-item-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #f87171;
}

.dispute-item-users {
  font-size: 0.76rem;
  font-weight: 600;
  color: #fff;
}

.dispute-item-meta {
  font-size: 0.66rem;
  color: #64748b;
}

.dispute-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.dispute-tag.high {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.dispute-tag.med {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Ledger Health List Items */
.ledger-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 0.74rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ledger-stat-label {
  color: #94a3b8;
}

.ledger-stat-val {
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
}

.ledger-stat-val.healthy {
  color: #34d399;
}

/* Bottom Grid (Matched Table + Globe Card) */
.admin-overview-bottom-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 16px;
}

@media (max-width: 1100px) {
  .admin-overview-bottom-grid { grid-template-columns: 1fr; }
}

.admin-globe-card {
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.admin-globe-card::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

.globe-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #38bdf8;
  text-transform: uppercase;
}

.globe-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 6px 0;
  line-height: 1.3;
}

.globe-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Quick Dispatch Modal (Ảnh mẫu) */
.admin-quick-dispatch-box {
  background: #0f172a;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(239, 68, 68, 0.15);
  max-width: 440px;
  width: 90%;
  padding: 22px;
  color: #fff;
  position: relative;
}

.quick-dispatch-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.quick-dispatch-alert-icon {
  width: 32px;
  height: 32px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: 1.1rem;
}

.quick-dispatch-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.quick-dispatch-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.4;
}

.quick-dispatch-info-table {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.76rem;
}

.quick-dispatch-info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.quick-dispatch-info-row .label { color: #94a3b8; }
.quick-dispatch-info-row .value { color: #fff; font-weight: 700; }

.quick-dispatch-warning-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.72rem;
  color: #fca5a5;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-dispatch-actions {
  display: flex;
  gap: 10px;
}

.btn-cancel-dark {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-cancel-dark:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-confirm-red {
  flex: 1.4;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 1px solid #ef4444;
  color: #fff;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-confirm-red:hover {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* ==========================================================================
   CHẾ ĐỘ PHÂN QUYỀN TRẠNG THÁI ĐĂNG NHẬP (GUEST LANDING VS MEMBER)
   ========================================================================== */
/* Ẩn hoàn toàn tất cả các màn hình khác khi chưa đăng nhập - Chỉ giữ duy nhất Dashboard Hero Banner */
body.auth-guest-mode .view-section:not(#tab-dashboard),
body.auth-guest-mode #tab-mlm-plan,
body.auth-guest-mode #tab-account,
body.auth-guest-mode #tab-team,
body.auth-guest-mode #tab-give-take,
body.auth-guest-mode #tab-assets,
body.auth-guest-mode #tab-wallet-settings,
body.auth-guest-mode #tab-admin {
  display: none !important;
}

body.auth-guest-mode #tab-dashboard {
  display: block !important;
}

body.auth-guest-mode .dashboard-grid {
  grid-template-columns: 1fr !important;
  display: block !important;
}

body.auth-guest-mode .hero-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-height: 520px !important;
  padding: 48px 40px !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 210, 255, 0.15) !important;
}

body.auth-guest-mode .hero-content {
  max-width: 950px !important;
}

body.auth-guest-mode .hero-title {
  font-size: 2.6rem !important;
  line-height: 1.25 !important;
  margin-bottom: 18px !important;
}

body.auth-guest-mode .hero-desc {
  font-size: 1.05rem !important;
  line-height: 1.7 !important;
  max-width: 850px !important;
  margin-bottom: 28px !important;
}

body.auth-guest-mode .hero-actions {
  gap: 14px !important;
  margin-bottom: 36px !important;
}

body.auth-guest-mode .hero-actions .btn-primary {
  padding: 13px 26px !important;
  font-size: 1.02rem !important;
  border-radius: 12px !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.45) !important;
}

body.auth-guest-mode .hero-stats-row {
  margin-top: 10px !important;
}

body.auth-guest-mode .auth-quick-card,
body.auth-guest-mode .middle-grid {
  display: none !important;
}

/* Hiển thị Biểu đồ giá ROSCHA BEP20 ngoài giao diện khi tài khoản chưa đăng nhập */
body.auth-guest-mode .bottom-grid {
  display: block !important;
  margin-top: 26px !important;
}

body.auth-guest-mode .bottom-grid > .dash-card:not(#card-roscha-chart) {
  display: none !important;
}

body.auth-guest-mode #card-roscha-chart {
  display: block !important;
  max-width: 950px !important;
  margin: 0 auto !important;
  border: 1px solid rgba(0, 210, 255, 0.35) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 210, 255, 0.15) !important;
  border-radius: 20px !important;
  padding: 24px 28px !important;
  backdrop-filter: blur(12px) !important;
}

body.auth-guest-mode #btn-header-profile,
body.auth-guest-mode #btn-header-give-package,
body.auth-guest-mode #btn-notifications,
body.auth-guest-mode #sidebar-logout-item {
  display: none !important;
}

body.auth-guest-mode #btn-header-register {
  display: inline-flex !important;
}

body.auth-guest-mode #btn-header-login {
  display: inline-flex !important;
}

/* Khi chưa đăng nhập (Guest Mode): Ẩn toàn bộ phần menu tác vụ, widget và footer trên sidebar */
body.auth-guest-mode .sidebar-menu .menu-item:not([data-tab="tab-dashboard"]),
body.auth-guest-mode .sidebar-widget,
body.auth-guest-mode .sidebar-footer {
  display: none !important;
}

/* ==========================================================================
   KHI ĐÃ ĐĂNG NHẬP (MEMBER MODE)
   ========================================================================== */
body.auth-member-mode #btn-header-profile {
  display: flex !important;
}

/* Xóa/Ẩn hoàn toàn nút Đăng Xuất và Gói Cho Đi ở trên Top Header khi đã đăng nhập */
#btn-header-give-package,
body.auth-member-mode #btn-header-give-package,
body.auth-member-mode #btn-header-login {
  display: none !important;
}

body.auth-member-mode #sidebar-logout-item {
  display: block !important;
}

/* Nút Đăng Xuất nổi bật trên Menu Sidebar */
.menu-item-logout a {
  color: #f87171 !important;
  margin-top: 6px;
  border: 1px dashed rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  transition: all var(--transition-fast) !important;
}
.menu-item-logout a .menu-icon {
  color: #f87171 !important;
}
.menu-item-logout:hover a {
  color: #ffffff !important;
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.7) !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25) !important;
}
.menu-item-logout:hover a .menu-icon {
  color: #ffffff !important;
}

body.auth-member-mode #btn-notifications {
  display: flex !important;
}

body.auth-member-mode #btn-header-register {
  display: none !important;
}

body.auth-member-mode .auth-quick-card {
  display: none !important;
}

body.auth-member-mode .dashboard-grid {
  grid-template-columns: 1fr !important;
}

body.auth-member-mode .hero-card {
  grid-column: 1 / -1;
  min-height: 280px;
}

body.auth-member-mode .middle-grid,
body.auth-member-mode .bottom-grid {
  display: grid !important;
}

/* ==========================================================================
   ROSCHA SYNERGY - ADAPTIVE MULTI-DEVICE RESPONSIVE SYSTEM
   Tương thích 100% mọi màn hình: 4K, Desktop, Laptop, iPad/Tablet, Mobile
   ========================================================================== */

/* 1. Ngăn chặn tràn ngang (Zero Horizontal Overflow) toàn diện */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  -webkit-text-size-adjust: 100%;
}

.app-layout {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative;
}

.main-wrapper {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

/* 2. Cuộn bảng tự động cho mọi bảng dữ liệu trên thiết bị nhỏ */
.table-responsive,
.custom-table-container,
.p2p-table-wrapper,
.admin-table-wrapper,
div:has(> table) {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 210, 255, 0.3) transparent;
}

div:has(> table)::-webkit-scrollbar,
.custom-table-container::-webkit-scrollbar,
.p2p-table-wrapper::-webkit-scrollbar {
  height: 6px;
}

div:has(> table)::-webkit-scrollbar-thumb,
.custom-table-container::-webkit-scrollbar-thumb,
.p2p-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.35);
  border-radius: 4px;
}

table {
  max-width: 100%;
}

.custom-table th, .custom-table td,
.p2p-table th, .p2p-table td,
.admin-mini-table th, .admin-mini-table td {
  white-space: nowrap;
}

/* 3. Tự động co giãn tất cả Popup Modals */
.modal-overlay {
  padding: 14px !important;
  box-sizing: border-box !important;
}

.modal-box,
.modal-content {
  width: 100% !important;
  max-width: min(94vw, 560px) !important;
  max-height: 88vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
}

.modal-box::-webkit-scrollbar {
  width: 5px;
}
.modal-box::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.3);
  border-radius: 4px;
}

/* 4. Tự động co giãn các khung mã QR Code */
#qrcode-2fa-container,
#buy-roscha-qr-container,
#admin-payment-qr-preview {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#qrcode-2fa-container img,
#qrcode-2fa-container canvas,
#buy-roscha-qr-container img,
#buy-roscha-qr-container canvas,
#admin-payment-qr-preview img,
#admin-payment-qr-preview canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* 5. Cây hệ thống MLM Binary Tree cuộn cảm ứng mượt */
.binary-tree-container,
.mlm-matrix-container,
#mlm-tree-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 16px !important;
}

/* --------------------------------------------------------------------------
   MÀN HÌNH LAPTOP & DESKTOP VỪA (max-width: 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .top-header {
    padding: 0 20px;
  }
  .content-area {
    padding: 20px 20px 40px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }
  .middle-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }
  .bottom-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }
  .admin-dispatcher-layout {
    grid-template-columns: 1fr !important;
  }
  .admin-overview-middle-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --------------------------------------------------------------------------
   MÀN HÌNH IPAD & TABLET (max-width: 992px) - KÍCH HOẠT MOBILE DRAWER
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  /* Hiển thị nút Mobile Hamburger */
  .mobile-sidebar-toggle-btn {
    display: inline-flex !important;
  }

  /* Chuyển Sidebar thành Off-canvas Drawer */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    z-index: 1200 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease !important;
    box-shadow: none !important;
  }

  .sidebar.sidebar-open {
    transform: translateX(0) !important;
    box-shadow: 12px 0 45px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 210, 255, 0.25) !important;
  }

  /* Đảm bảo nội dung sidebar hiển thị đầy đủ và rõ ràng trong drawer */
  .sidebar .brand-text,
  .sidebar .menu-text,
  .sidebar-widget,
  .sidebar-footer {
    display: flex !important;
  }
  .sidebar-widget {
    display: block !important;
  }

  /* Hiển thị nút đóng X trong header sidebar */
  .mobile-sidebar-close-btn {
    display: inline-flex !important;
  }

  /* Khóa cuộn trang khi drawer đang mở */
  body.mobile-drawer-open {
    overflow: hidden !important;
  }

  /* Header adjustments */
  .top-header {
    height: 64px;
    padding: 0 16px;
    gap: 12px;
  }
  .header-search {
    width: auto;
    flex: 1;
    max-width: 280px;
  }
  .header-actions {
    gap: 10px;
  }

  /* Package Selector 5 gói -> 3 nút 1 hàng trên tablet */
  .package-selector-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }

  /* Hero adjustments */
  .hero-card {
    padding: 22px 18px;
    min-height: auto;
  }
  .hero-title {
    font-size: 1.55rem;
  }
  .hero-desc {
    font-size: 0.84rem;
  }
  .hero-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  /* Admin Hub subviews */
  .admin-header-banner {
    padding: 16px 18px !important;
  }
  .admin-nav-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
    flex-wrap: nowrap !important;
  }
  .admin-tab-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   MÀN HÌNH ĐIỆN THOẠI DI ĐỘNG (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .content-area {
    padding: 14px 12px 36px;
  }

  .top-header {
    height: 58px;
    padding: 0 10px;
    gap: 8px;
  }

  /* Tinh gọn Search Bar trên mobile */
  .header-search {
    max-width: 170px;
  }
  .header-search input {
    height: 36px;
    font-size: 0.78rem;
    padding: 0 12px 0 34px;
  }
  .header-search .search-icon {
    left: 10px;
    font-size: 0.85rem;
  }

  /* Thu gọn các nút trên Top Header */
  .btn-header-register,
  .btn-header-admin,
  .btn-header-give-package {
    padding: 7px 12px !important;
    font-size: 0.76rem !important;
  }

  .header-user-chip {
    padding: 4px 8px 4px 4px;
    gap: 8px;
  }
  .user-chip-avatar {
    width: 30px;
    height: 30px;
  }
  .user-chip-id {
    display: none;
  }
  .user-chip-name {
    font-size: 0.78rem;
  }

  .lang-selector-btn {
    padding: 6px 10px;
    font-size: 0.76rem;
    gap: 5px;
  }

  .lang-dropdown-menu {
    right: -10px;
    max-width: calc(100vw - 20px);
    width: 200px;
  }

  /* Cards & Widgets */
  .dash-card {
    padding: 16px 14px;
    border-radius: var(--radius-lg);
  }
  .card-header-bar {
    margin-bottom: 12px;
  }
  .card-header-title {
    font-size: 0.95rem;
  }

  /* Modals */
  .modal-overlay {
    padding: 10px !important;
  }
  .modal-box,
  .modal-content {
    padding: 20px 14px !important;
    border-radius: var(--radius-lg) !important;
  }
  .modal-close-btn {
    top: 14px;
    right: 14px;
    font-size: 1.15rem;
  }

  /* Balance card grid */
  .balance-card-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --------------------------------------------------------------------------
   MÀN HÌNH ĐIỆN THOẠI NHỎ (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .top-header {
    height: 56px;
    padding: 0 8px;
    gap: 6px;
  }

  /* Ẩn search input trên mobile nhỏ để nhường chỗ cho actions */
  .header-search {
    display: none;
  }

  /* Hero title & actions */
  .hero-card {
    padding: 18px 14px;
  }
  .hero-title {
    font-size: 1.3rem;
    line-height: 1.3;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 0.85rem;
  }

  .hero-stats-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Package Selector 5 nút -> 2 nút 1 hàng chữ to rõ */
  .package-selector-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .package-card-btn {
    padding: 12px 6px !important;
  }
  .package-price-val {
    font-size: 1.15rem !important;
  }

  /* Nút bấm cảm ứng thumb-friendly */
  button, input, select, textarea {
    touch-action: manipulation;
  }
  input, select, textarea {
    font-size: 16px !important; /* Chống hiện tượng zoom đột ngột của Safari trên iPhone */
  }

  /* Toast notification */
  .toast-container {
    left: 12px !important;
    right: 12px !important;
    bottom: 16px !important;
  }
  .toast {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    font-size: 0.8rem !important;
  }

  /* Wallet Action Buttons Grid */
  .wallet-actions-row,
  .quick-actions-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* ==========================================================================
   FLEX INPUT & COPY BUTTON GROUP (Chống tràn trên mọi kích thước màn hình)
   ========================================================================== */
.flex-input-copy-group,
div:has(> .custom-input-box + button),
div:has(> .custom-input-box + .btn-secondary),
div:has(> .custom-input-box + .btn-primary) {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.flex-input-copy-group input,
.flex-input-copy-group .custom-input-box,
div:has(> .custom-input-box + button) > .custom-input-box,
div:has(> .custom-input-box + .btn-secondary) > .custom-input-box,
div:has(> .custom-input-box + .btn-primary) > .custom-input-box {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: auto !important;
  box-sizing: border-box !important;
  text-overflow: ellipsis !important;
}

.flex-input-copy-group button,
.flex-input-copy-group .btn-secondary,
.flex-input-copy-group .btn-primary,
div:has(> .custom-input-box + button) > button,
div:has(> .custom-input-box + .btn-secondary) > button,
div:has(> .custom-input-box + .btn-secondary) > .btn-secondary,
div:has(> .custom-input-box + .btn-primary) > button,
div:has(> .custom-input-box + .btn-primary) > .btn-primary {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   P2P ACTION BANNERS & ACTIVE CARDS RESPONSIVE (Zero Overflow & No Clipping)
   ========================================================================== */
#p2p-pane-give,
#p2p-pane-take,
.p2p-pane-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#p2p-pane-give.p2p-pane-active,
#p2p-pane-take.p2p-pane-active,
.p2p-pane-container.p2p-pane-active {
  display: block !important;
}

#p2p-pane-give.p2p-pane-hidden,
#p2p-pane-take.p2p-pane-hidden,
.p2p-pane-container.p2p-pane-hidden {
  display: none !important;
}

.p2p-kpi-card.p2p-kpi-active {
  display: flex !important;
  width: 100% !important;
}

.p2p-kpi-card.p2p-kpi-hidden {
  display: none !important;
}

#p2p-pane-give > .dash-card,
#p2p-pane-take > .dash-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.p2p-header-action-banner {
  grid-column: 1 / -1 !important;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.p2p-header-action-banner > div:first-child {
  flex: 1 1 320px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.p2p-header-action-banner button {
  flex: 0 0 auto !important;
  max-width: 100% !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.p2p-active-take-card,
.p2p-active-give-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.p2p-card-header-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.p2p-card-header-row > div:first-child {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.p2p-take-countdown-badge,
.p2p-take-matched-countdown-badge,
.p2p-give-countdown-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.4 !important;
  text-align: right !important;
}

.p2p-amount-summary-box {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.p2p-amount-summary-box > div:first-child {
  flex: 1 1 220px !important;
  min-width: 0 !important;
}

.p2p-amount-summary-total {
  text-align: right !important;
  flex-shrink: 0 !important;
}

.p2p-72h-status-notice {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.p2p-72h-status-notice > div:first-child {
  flex: 1 1 280px !important;
  min-width: 0 !important;
}

.p2p-72h-badge-tag {
  flex-shrink: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1024px) {
  .p2p-header-action-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px 16px !important;
    gap: 12px !important;
  }
  .p2p-header-action-banner button {
    width: 100% !important;
    justify-content: center !important;
  }

  .p2p-card-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .p2p-take-countdown-badge,
  .p2p-take-matched-countdown-badge,
  .p2p-give-countdown-badge {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
  }

  .p2p-72h-status-notice {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .p2p-72h-badge-tag {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  .app-layout, .main-wrapper, .content-area {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    min-width: 0 !important;
  }
  .dashboard-grid, .dash-card {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .p2p-amount-summary-box {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .p2p-amount-summary-box .p2p-amount-summary-total {
    width: 100% !important;
    text-align: left !important;
    padding-top: 8px !important;
    border-top: 1px dashed rgba(16, 185, 129, 0.25) !important;
  }

  .p2p-partner-item-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .p2p-partner-item-row .partner-amount-col {
    text-align: left !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    border-top: 1px dashed rgba(255, 255, 255, 0.08) !important;
    padding-top: 8px !important;
  }
  .p2p-partner-item-row .partner-actions-col {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .p2p-partner-item-row .partner-actions-col button {
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 14px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .p2p-take-countdown-badge,
  .p2p-take-matched-countdown-badge,
  .p2p-give-countdown-badge {
    font-size: 0.72rem !important;
    padding: 5px 8px !important;
  }
}

/* ==========================================================================
   WEB3 BSCSCAN / ON-CHAIN EXPLORER STYLE TABLE & SCROLLBAR
   ========================================================================== */
.web3-table-scroll-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 15, 29, 0.75);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  margin-top: 14px;
  margin-bottom: 12px;
  position: relative;
}

/* Thanh trượt ngang nổi bật, mượt mà và dễ kéo thả */
.web3-table-scroll-container::-webkit-scrollbar {
  height: 9px;
  display: block !important;
}
.web3-table-scroll-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 6px;
  margin: 0 6px;
}
.web3-table-scroll-container::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #00d2ff 0%, #10b981 100%);
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
  cursor: grab;
}
.web3-table-scroll-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 100%);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.9);
}
.web3-table-scroll-container::-webkit-scrollbar-thumb:active {
  cursor: grabbing;
}

/* Định dạng bảng chuẩn BscScan */
.web3-explorer-table {
  width: 100%;
  min-width: 1120px; /* Đảm bảo đủ không gian xem trọn vẹn tất cả cột */
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
  white-space: nowrap;
}

.web3-explorer-table thead tr {
  background: rgba(18, 25, 48, 0.95);
  border-bottom: 2px solid rgba(0, 210, 255, 0.25);
}

.web3-explorer-table th {
  padding: 13px 14px;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.web3-explorer-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.16s ease;
}

.web3-explorer-table tbody tr:hover {
  background: rgba(0, 210, 255, 0.04);
}

.web3-explorer-table td {
  padding: 13px 14px;
  vertical-align: middle;
  color: #e2e8f0;
}

/* Badge chiều dòng tiền IN / OUT chuẩn BscScan */
.badge-direction-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.45);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.badge-direction-out {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.45);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

/* Badge phương thức / loại giao dịch kiểu BscScan */
.badge-action-pill {
  display: inline-block;
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Nút copy mini: Đã gỡ bỏ theo yêu cầu người dùng */
.btn-copy-mini {
  display: none !important;
}

/* ==================== WEB3 PAGINATION & ADVANCED FILTER TOOLBAR ==================== */
.web3-pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.web3-pagination-info {
  font-size: 0.76rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.web3-page-size-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.web3-page-size-select {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #00d2ff;
  font-weight: 700;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  outline: none;
}

.web3-pagination-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.web3-page-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 32px;
  text-align: center;
}

.web3-page-btn:hover:not(:disabled) {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  border-color: rgba(0, 210, 255, 0.4);
}

.web3-page-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25) 0%, rgba(124, 58, 237, 0.3) 100%);
  color: #00d2ff;
  border-color: #00d2ff;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.web3-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.web3-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   ENLARGED ADMIN AUTO-MATCH & DISPATCH MODAL STYLING
   ========================================================================== */
.admin-automatch-modal-box {
  max-width: 1380px !important;
  width: 96vw !important;
  max-height: 94vh !important;
  box-sizing: border-box;
}

@media (min-width: 1200px) {
  .admin-automatch-modal-box {
    padding: 28px 36px !important;
  }
}

@media (max-width: 1024px) {
  .admin-dispatch-two-cols {
    grid-template-columns: 1fr !important;
  }
  .admin-automatch-modal-box {
    padding: 18px !important;
  }
}

/* ==========================================================================
   ADMIN GIVE QUEUE SCROLLABLE TABLE & CUSTOM SCROLLBAR
   ========================================================================== */
.admin-queue-table-wrapper {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 210, 255, 0.4) rgba(15, 23, 42, 0.6);
}
.admin-queue-table-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.admin-queue-table-wrapper::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.admin-queue-table-wrapper {
  scrollbar-gutter: stable;
}
.admin-queue-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.35);
  border-radius: 4px;
}
.admin-queue-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 210, 255, 0.65);
}
.admin-table-row:hover {
  background: rgba(0, 210, 255, 0.06) !important;
}

/* Nút Thao Tác Bàn Điều Phối Admin: Chống chớp giật, bấm nhạy 100%, không bị đè bởi scrollbar */
.admin-queue-action-btn {
  font-size: 0.72rem !important;
  padding: 4px 10px !important;
  height: 28px !important;
  min-height: 28px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  position: relative !important;
  z-index: 2 !important;
  border: none !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease !important;
}
.admin-queue-action-btn:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-1px) !important;
}
.admin-queue-action-btn:active {
  transform: translateY(0) !important;
  filter: brightness(0.95) !important;
}
.admin-queue-action-btn-take {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #070b16 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}
.admin-queue-action-btn-take:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.55) !important;
}
.admin-queue-action-btn-give {
  background: linear-gradient(135deg, #00d2ff, #0284c7) !important;
  color: #070b16 !important;
  box-shadow: 0 2px 8px rgba(0, 210, 255, 0.35) !important;
}
.admin-queue-action-btn-give:hover {
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.55) !important;
}

/* ==========================================================================
   PHÂN BIỆT THANH MENU CHO THÀNH VIÊN VÀ THANH MENU DÀNH RIÊNG CHO QUẢN TRỊ ADMIN
   ========================================================================== */
body:not(.admin-role-mode) .sidebar-menu > li.menu-item-admin {
  display: none !important;
}

body.admin-role-mode .sidebar-menu > li.menu-item-member {
  display: none !important;
}

body.admin-role-mode .sidebar-menu > li.menu-item-admin {
  display: flex !important;
}

/* Ẩn sidebar con lồng bên trong nội dung trang admin để mở rộng toàn màn hình thoáng đãng */
body.admin-role-mode .admin-sidebar-nav {
  display: none !important;
}

body.admin-role-mode .admin-shell-content {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 24px !important;
}

/* ==========================================================================
   QUẢN LÝ TÀI SẢN & SỔ CÁI KÉP TÀI CHÍNH - MODERN CARDS STYLING
   ========================================================================== */
.asset-ledger-container {
  background-color: #0b0c10;
  color: #c5c6c7;
  border-radius: 16px;
  margin-bottom: 24px;
}
.asset-ledger-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .asset-ledger-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}
.asset-card-item {
  background-color: #1f2833;
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 640px) {
  .asset-card-item {
    padding: 1.5rem;
  }
}
.asset-card-item:hover {
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
}
.asset-btn-withdraw {
  width: 100%;
  margin-top: 1.25rem;
  background: linear-gradient(to right, #2563eb, #9333ea);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}
.asset-btn-withdraw:hover {
  background: linear-gradient(to right, #3b82f6, #a855f7);
  box-shadow: 0 10px 20px -3px rgba(147, 51, 234, 0.4);
}
.asset-btn-withdraw:active {
  transform: scale(0.98);
}
.asset-btn-transfer {
  width: 100%;
  margin-top: 1.25rem;
  background-color: #2c3540;
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.asset-btn-transfer:hover {
  background-color: #374151;
  border-color: rgba(168, 85, 247, 0.6);
  color: #f3e8ff;
}
.asset-btn-transfer:active {
  transform: scale(0.98);
}
.asset-roscha-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.asset-roscha-btn-sub {
  background-color: #1a2332;
  color: #60a5fa;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 0.25rem;
  border: 1px solid rgba(30, 58, 138, 0.5);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.asset-roscha-btn-sub:hover {
  background-color: rgba(23, 37, 84, 0.4);
  border-color: rgba(96, 165, 250, 0.5);
  color: #93c5fd;
}
.asset-roscha-btn-sub:active {
  transform: scale(0.95);
}
.asset-roscha-btn-primary {
  background-color: #2563eb;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 0.25rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}
.asset-roscha-btn-primary:hover {
  background-color: #3b82f6;
  box-shadow: 0 6px 10px -1px rgba(37, 99, 235, 0.5);
}
.asset-roscha-btn-primary:active {
  transform: scale(0.95);
}
@keyframes assetPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.asset-pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #34d399;
  animation: assetPulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   MODERN WEB3 UNIFIED DESIGN SYSTEM (Áp dụng toàn bộ hệ thống)
   ========================================================================== */
.dash-card,
.p2p-active-give-card,
.p2p-active-take-card,
.team-table-card,
.team-kpi-card {
  background-color: #1f2833 !important;
  border: 1px solid #1f2937 !important;
  border-radius: 1rem !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dash-card:hover,
.p2p-active-give-card:hover,
.p2p-active-take-card:hover,
.team-kpi-card:hover {
  border-color: rgba(168, 85, 247, 0.45) !important;
}

/* Khối con bên trong Card */
.p2p-amount-summary-box,
.p2p-partner-item-row,
.p2p-72h-status-notice,
.account-form-grid-2col,
.user-profile-summary {
  background-color: #171e28 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 0.75rem !important;
}

/* Banner Hành Động Đăng Ký Gói & Rút Tiền */
.p2p-header-action-banner {
  background-color: #1f2833 !important;
  border: 1px solid #1f2937 !important;
  border-radius: 1rem !important;
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

/* Nút bấm chuẩn chạm ngón tay Mobile & Web3 Action */
button.btn-primary,
.btn-primary {
  border-radius: 0.5rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
button.btn-primary:active,
.btn-primary:active,
button.btn-secondary:active,
.btn-secondary:active {
  transform: scale(0.98) !important;
}

button.btn-secondary,
.btn-secondary {
  border-radius: 0.5rem !important;
  background-color: #2c3540 !important;
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
  color: #d8b4fe !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
button.btn-secondary:hover,
.btn-secondary:hover {
  background-color: #374151 !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  color: #fff !important;
}

/* Ô nhập liệu Text / Input */
.custom-input-box {
  background-color: #151a22 !important;
  border: 1px solid #1f2937 !important;
  border-radius: 0.5rem !important;
  transition: all 0.2s ease !important;
}
.custom-input-box:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

/* Modal Box chuẩn phong cách Web3 */
.modal-box {
  background-color: #1f2833 !important;
  border: 1px solid #1f2937 !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
}

/* Banner hành động P2P chuẩn Web3 Box */
.p2p-header-action-banner {
  border-radius: 1rem !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  padding: 18px 22px !important;
}




