:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #000000;
  color: #ffffff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;

  --pure-black: #000000;
  --surface-card: #0d1015;
  --surface-elevated: #151a22;
  --card-border: rgba(255, 255, 255, 0.08);
  --lime-green: #D2F05D;
  --lime-glow: rgba(210, 240, 93, 0.35);
  --emerald: #00E599;
  --text-muted: #959EA8;
  --text-dim: #606873;
  --grey-button-bg: #767E88;
  --danger: #FF5A5F;
  --tabbar-height: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #000000;
  color: #ffffff;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.app-wrapper {
  width: 100%;
  max-width: 480px; /* Chuẩn khung hình điện thoại iOS & Telegram Mini App */
  min-height: 100vh;
  background: #000000;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

/* Scroll Area */
.app-content {
  flex: 1;
  padding: 16px 20px calc(var(--tabbar-height) + 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ================================================================ */
/* 1. TOP HEADER & BRANDING                                         */
/* ================================================================ */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  margin-bottom: 20px;
}

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

.alpha-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #D2F05D 0%, #a4c935 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 14px rgba(210, 240, 93, 0.4);
}

.alpha-mark span {
  color: #000000;
  font-size: 19px;
  font-weight: 900;
  font-family: inherit;
  line-height: 1;
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

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

.icon-btn-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--lime-green);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn-round:hover {
  background: rgba(210, 240, 93, 0.15);
  border-color: var(--lime-green);
}

/* ================================================================ */
/* 2. AUTH VIEW (LOGIN / REGISTER 1:1 VỚI IOS LOGINVIEW)            */
/* ================================================================ */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 10px 40px;
  gap: 22px;
}

.auth-hero-branding {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-logo-halo {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 240, 93, 0.3) 0%, rgba(210, 240, 93, 0.08) 55%, transparent 70%);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.auth-logo-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #D2F05D 0%, #8eb51b 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px rgba(210, 240, 93, 0.6);
}

.auth-logo-circle span {
  color: #000000;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 290px;
  line-height: 1.45;
}

/* Segment Switcher (Đăng nhập / Đăng ký) */
.auth-segment-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  background: #11141a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.segment-btn {
  padding: 10px 0;
  font-size: 14px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.segment-btn.active {
  background: var(--lime-green);
  color: #000000;
  box-shadow: 0 2px 8px rgba(210, 240, 93, 0.25);
}

/* Auth Card & Fields */
.auth-form-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-box {
  display: flex;
  align-items: center;
  background: #000000;
  border: 1px solid #2D333E;
  border-radius: 14px;
  padding: 0 14px;
  min-height: 52px;
  gap: 12px;
  transition: border-color 0.2s;
}

.input-box:focus-within {
  border-color: var(--lime-green);
  box-shadow: 0 0 0 2px rgba(210, 240, 93, 0.15);
}

.input-box svg {
  color: #565F6C;
  flex-shrink: 0;
}

.input-box:focus-within svg {
  color: var(--lime-green);
}

.input-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.input-box input::placeholder {
  color: #565F6C;
}

.eye-toggle-btn {
  background: transparent;
  border: none;
  color: #565F6C;
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
}

.auth-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 0 4px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--lime-green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-pwd-link {
  color: var(--lime-green);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.btn-lime-full {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(180deg, #DDF76A 0%, #D2F05D 100%);
  color: #000000;
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(210, 240, 93, 0.35);
  transition: transform 0.15s, opacity 0.15s;
  display: grid;
  place-items: center;
}

.btn-lime-full:active {
  transform: scale(0.98);
}

.btn-lime-full:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================================================================ */
/* 3. TAB 1: TRANG CHỦ (HOME 1:1 VỚI IOS HOMEVIEW)                  */
/* ================================================================ */
.earnings-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.earnings-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.earnings-label {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 149, 0, 0.12);
  color: #FF9500;
  font-size: 11px;
  font-weight: 700;
}

.pending-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF9500;
}

.earnings-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.earnings-ald-number {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #ffffff;
}

.earnings-ald-unit {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.earnings-usd-convert {
  font-size: 22px;
  font-weight: 700;
  color: var(--lime-green);
}

/* Action Buttons Row (3 nút tròn: Mua Node, Nạp tiền, Kích hoạt) */
.action-buttons-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 24px;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.action-circle {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.action-item:active .action-circle {
  transform: scale(0.92);
}

/* Button 1: Mua Node */
.action-circle-lime {
  background: var(--lime-green);
  color: #000000;
  box-shadow: 0 0 18px rgba(210, 240, 93, 0.35);
}

/* Button 2: Nạp tiền */
.action-circle-deposit {
  background: #1F242B;
  color: var(--lime-green);
  border: 1.5px solid rgba(210, 240, 93, 0.4);
}

/* Button 3: Kích hoạt */
.action-circle-activate {
  background: var(--grey-button-bg);
  color: #2D333E;
}

.action-circle-activate.active {
  background: var(--lime-green);
  color: #000000;
  box-shadow: 0 0 18px rgba(210, 240, 93, 0.4);
}

.action-circle-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FF9500;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.action-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.action-circle-activate:not(.active) + .action-title {
  color: var(--text-muted);
}

/* Claim Section & Cơ chế nhận thưởng */
.claim-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.claim-rules-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 2px;
}

.claim-rules-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--lime-green);
  font-size: 11px;
  font-weight: 900;
  font-family: monospace;
  letter-spacing: 0.8px;
}

.claim-rules-card p {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Nút Claim */
.btn-claim {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1.2px solid rgba(210, 240, 93, 0.8);
  background: linear-gradient(180deg, #DDF76A 0%, #D2F05D 100%);
  color: #000000;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(210, 240, 93, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-claim.claimed {
  background: #23272E;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  box-shadow: none;
  cursor: default;
}

.btn-claim:not(.claimed):active {
  transform: scale(0.98);
}

/* Khung Mining & Countdown chuẩn ảnh mẫu iOS */
.mining-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.mining-rate-header {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.mining-countdown-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: #000000;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.countdown-row-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.countdown-lines-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.countdown-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.countdown-text {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.info-corner-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.countdown-subtext {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-mining-inner {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mining-inner:hover {
  background: rgba(210, 240, 93, 0.12);
  border-color: var(--lime-green);
  color: var(--lime-green);
}

/* ================================================================ */
/* 4. TAB 2: GIỚI THIỆU (REFERRAL 1:1 VỚI IOS MININGVIEW)           */
/* ================================================================ */
.referral-card {
  border: 1px solid var(--card-border);
  background: var(--surface-card);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.vip-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vip-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--lime-green);
}

.vip-commission {
  font-size: 13px;
  font-weight: 700;
  background: rgba(210, 240, 93, 0.15);
  color: var(--lime-green);
  padding: 4px 10px;
  border-radius: 999px;
}

.copy-box {
  display: flex;
  align-items: center;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  justify-content: space-between;
}

.copy-box code {
  color: var(--lime-green);
  font-size: 14px;
  font-weight: 700;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--lime-green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ================================================================ */
/* 5. TAB 3: VÍ (WALLET 1:1 VỚI IOS WALLETVIEW)                     */
/* ================================================================ */
.wallet-balance-card {
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, #12161c 0%, #0d1015 100%);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.wallet-sublabel {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.wallet-total-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wallet-total-number {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1.2px;
}

/* 4 Circular Action Buttons trong Ví (Lịch sử, Nạp tiền, Rút tiền, Đổi) */
.wallet-4actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 4px;
}

.wallet-circle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.wallet-circle-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #14181f;
  border: 1.2px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  color: #ffffff;
  position: relative;
  transition: all 0.2s;
}

.wallet-circle-btn:active .wallet-circle-icon {
  transform: scale(0.92);
}

.wallet-circle-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--lime-green);
  color: #000000;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.wallet-circle-label {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

/* Danh sách tài sản (Assets List) */
.asset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-card);
  border: 1px solid var(--card-border);
  margin-bottom: 10px;
}

.asset-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asset-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
}

.asset-icon-ald {
  background: #00E599;
  color: #000000;
}

.asset-icon-usdt {
  background: #26A17B;
  color: #ffffff;
}

.asset-name {
  font-size: 16px;
  font-weight: 700;
}

.asset-chain {
  font-size: 12px;
  color: var(--text-muted);
}

.asset-right {
  text-align: right;
}

.asset-balance {
  font-size: 16px;
  font-weight: 800;
}

.asset-val {
  font-size: 12px;
  color: var(--lime-green);
}

/* ================================================================ */
/* 6. TAB 4: CÁ NHÂN (PROFILE 1:1 VỚI IOS PROFILEVIEW)              */
/* ================================================================ */
/* ================================================================ */
/* 5.1 ASSET ITEM IOS (WALLETVIEW ROW 1 & 2 CHUẨN XCODE)            */
/* ================================================================ */
.asset-item-ios {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.asset-item-ios:active {
  transform: scale(0.98);
  background: #11141a;
}

.asset-ios-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
}

.asset-ios-name {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.asset-right-ios {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-ios-balance {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  font-family: monospace;
}

/* ================================================================ */
/* 6. TAB 4: CÁ NHÂN (PROFILE 1:1 VỚI IOS PROFILEVIEW)              */
/* ================================================================ */
.profile-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  margin-bottom: 16px;
}

.profile-page-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
}

.profile-pencil-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #14171C;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-hero-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 20px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 62px;
  height: 62px;
}

.profile-avatar-clean {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #14171C;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  color: #ffffff;
}

.profile-camera-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime-green);
  display: grid;
  place-items: center;
}

.profile-info-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.profile-name-clean {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
}

.profile-email-clean {
  font-size: 13px;
  color: var(--text-muted);
}

.profile-vip-pill {
  font-size: 11px;
  font-weight: 800;
  color: var(--lime-green);
  margin-top: 1px;
}

/* Minimal Sleek Rows matching ProfileView.swift */
.profile-minimal-menu {
  display: flex;
  flex-direction: column;
}

.menu-row-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 2px;
  cursor: pointer;
  transition: opacity 0.2s;
  user-select: none;
}

.menu-row-clean:active {
  opacity: 0.65;
}

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

.menu-icon-slot {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.menu-title-clean {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.menu-title-logout {
  font-size: 15px;
  font-weight: 600;
  color: var(--danger);
}

.menu-right-clean {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-val-clean {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.menu-val-lime {
  font-size: 13px;
  font-weight: 700;
  color: var(--lime-green);
}

.menu-chevron {
  font-size: 18px;
  color: #565F6C;
  line-height: 1;
}

.menu-divider-clean {
  height: 1px;
  background: #181B20;
  width: 100%;
}

.support-online-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--lime-green);
}

.dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime-green);
}

.profile-version-footer {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  font-family: monospace;
  color: #4B535F;
  padding-top: 24px;
  padding-bottom: 20px;
}

/* ================================================================ */
/* 7. BOTTOM TAB BAR (CUSTOMTABBAR CHUẨN IOS)                       */
/* ================================================================ */
.custom-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--tabbar-height);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 8px);
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.tab-btn svg {
  width: 22px;
  height: 22px;
  transition: all 0.2s;
}

.tab-btn span {
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--lime-green);
}

.tab-btn.active svg {
  filter: drop-shadow(0 0 6px rgba(210, 240, 93, 0.6));
}

.tab-indicator {
  position: absolute;
  bottom: 6px;
  width: 16px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--lime-green);
  box-shadow: 0 0 6px var(--lime-green);
  display: none;
}

.tab-btn.active .tab-indicator {
  display: block;
}

/* ================================================================ */
/* 8. MODALS & SHEETS (XÁC NHẬN NẠP, RÚT, MUA NODE)                 */
/* ================================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: grid;
  place-items: end center;
  padding: 0 10px 10px;
}

.modal-sheet {
  width: 100%;
  max-width: 460px;
  background: #11141a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* Toast */
.top-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 32, 44, 0.95);
  border: 1px solid var(--lime-green);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  z-index: 300;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 10px rgba(210, 240, 93, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.hidden {
  display: none !important;
}

/* ================================================================ */
/* 9. MODAL LANGUAGE SHEET (1:1 VỚI LANGUAGESELECTIONSHEET TRÊN IOS) */
/* ================================================================ */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  background: #161b22;
  border: 1.2px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.lang-item:hover {
  background: #1c222b;
  border-color: rgba(210, 240, 93, 0.3);
  transform: translateY(-1px);
}

.lang-item.active {
  background: #1f2732;
  border-color: var(--lime-green);
  box-shadow: 0 0 12px rgba(210, 240, 93, 0.15);
}

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

.lang-flag {
  font-size: 28px;
  line-height: 1;
}

.lang-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.lang-item.active .lang-title {
  font-weight: 800;
  color: #ffffff;
}

.lang-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.lang-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lime-green);
  color: #000000;
  display: none;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.lang-item.active .lang-check {
  display: grid;
}

/* ================================================================ */
/* 10. MODAL CLAIM REWARD SHEET (1:1 VỚI CLAIMREWARDSHEET TRÊN IOS) */
/* ================================================================ */
.modal-claim-sheet {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 22px 20px 28px;
}

.claim-earnings-box {
  background: #0d1015;
  border: 1px solid rgba(210, 240, 93, 0.4);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 0 16px rgba(210, 240, 93, 0.12);
}

.claim-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.claim-box-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.claim-status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(210, 240, 93, 0.18);
  color: var(--lime-green);
}

.claim-status-badge.claimed {
  background: rgba(255, 149, 0, 0.18);
  color: #FF9500;
}

.claim-box-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.claim-ald-val {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  font-family: monospace;
}

.claim-ald-unit {
  font-size: 20px;
  font-weight: 800;
  color: var(--lime-green);
}

.claim-box-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.claim-usd-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--lime-green);
}

.claim-rate-note {
  font-size: 11px;
  color: var(--text-muted);
}

.claim-sheet-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.sheet-countdown-content {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--lime-green);
  font-weight: 800;
  font-size: 16px;
  font-family: monospace;
}

.sheet-countdown-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.claim-metrics-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d1015;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
}

.claim-metric-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-val-lime {
  font-size: 16px;
  font-weight: 800;
  color: var(--lime-green);
}

.metric-val-white {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.claim-details-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #0d1015;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
}

.claim-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.detail-label {
  color: var(--text-muted);
}

.detail-value {
  color: #ffffff;
  font-weight: 600;
}

.claim-terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #c0c8b8;
  cursor: pointer;
}

.claim-terms-row input[type="checkbox"] {
  accent-color: var(--lime-green);
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ================================================================ */
/* 11. REFERRAL TAB (MININGVIEW 1:1 VỚI XCODE)                      */
/* ================================================================ */
.ref-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ref-program-sub {
  font-size: 11px;
  font-weight: 900;
  color: var(--lime-green);
  font-family: monospace;
  letter-spacing: 1.2px;
}

.ref-heading {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.ref-badge-capsule {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #000000;
  border: 1px solid rgba(210, 240, 93, 0.35);
  color: var(--lime-green);
  font-size: 13px;
  font-weight: 800;
}

.vip-tier-card {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vip-tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vip-tier-sub {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  font-family: monospace;
  letter-spacing: 0.8px;
}

.vip-tier-name {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  margin-top: 2px;
}

.vip-tier-rate-col {
  text-align: right;
}

.vip-tier-percent {
  font-size: 28px;
  font-weight: 900;
  color: var(--lime-green);
  line-height: 1.1;
}

.vip-progress-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.vip-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

.vip-progress-labels span:last-child {
  font-weight: 800;
  color: #ffffff;
  font-family: monospace;
}

.vip-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #14181f;
  overflow: hidden;
}

.vip-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, rgba(210, 240, 93, 0.7) 0%, #D2F05D 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.vip-progress-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* Stats Grid */
.ref-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.ref-stat-box {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 16px;
}

.ref-stat-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ref-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.ref-stat-val-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
}

.ref-stat-val-lime {
  font-size: 24px;
  font-weight: 900;
  color: var(--lime-green);
}

.ref-stat-unit {
  font-size: 14px;
  font-weight: 800;
  color: var(--lime-green);
}

.btn-dark-neutral {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-dark-neutral:active {
  background: #11141a;
  transform: scale(0.96);
}

.ref-stat-dual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ref-dual-col {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
}

.ref-dual-val {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
}

.ref-customer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000000;
  border: 1px solid rgba(210, 240, 93, 0.35);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
}

.ref-cust-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ref-cust-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(210, 240, 93, 0.16);
  color: var(--lime-green);
  display: grid;
  place-items: center;
}

.ref-badge-lime {
  background: var(--lime-green);
  color: #000000;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
}

/* Copy box dark neutral */
.ref-card-header {
  font-size: 11px;
  font-weight: 900;
  color: var(--lime-green);
  letter-spacing: 1px;
  font-family: monospace;
}

.copy-box-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.copy-code-lg {
  font-size: 18px;
  font-weight: 900;
  color: var(--lime-green);
  letter-spacing: 1.5px;
}

.copy-code-sm {
  font-size: 12px;
  color: #ffffff;
  word-break: break-all;
}

.copy-btn-dark {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn-dark:active {
  background: #1a1e24;
}

/* 5 Tiers Table */
.tier-table-header {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.tier-list-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-row {
  display: flex;
  align-items: center;
  padding: 10px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.tier-row.current-tier {
  background: rgba(210, 240, 93, 0.12);
  border: 1px solid rgba(210, 240, 93, 0.4);
}

.tier-col-name {
  width: 70px;
  font-weight: 700;
}

.tier-col-vol {
  flex: 1;
  color: var(--text-muted);
  font-family: monospace;
}

.tier-row.current-tier .tier-col-vol {
  color: #ffffff;
}

.tier-col-rate {
  width: 100px;
  text-align: right;
  font-weight: 800;
}

.current-pill {
  font-size: 9px;
  background: var(--lime-green);
  color: #000000;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Recent Activity */
.recent-comm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.recent-comm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  gap: 10px;
}

.recent-comm-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(210, 240, 93, 0.15);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}

.recent-comm-mid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.recent-comm-addr {
  font-size: 13px;
  font-weight: 700;
  font-family: monospace;
}

.recent-comm-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.recent-comm-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.recent-comm-earned {
  font-size: 14px;
  font-weight: 800;
  color: var(--lime-green);
}

.recent-comm-tier {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ================================================================ */
/* 12. WALLET TAB (WALLETVIEW 1:1 VỚI XCODE)                        */
/* ================================================================ */
.wallet-top-header {
  text-align: center;
  padding-top: 6px;
  margin-bottom: 12px;
}

.wallet-page-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
}

.wallet-hero-balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0 24px;
}

.wallet-ald-primary-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wallet-ald-big-number {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  font-family: monospace;
  letter-spacing: -0.5px;
}

.wallet-ald-big-unit {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
}

.wallet-usdt-sub-equiv {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.wallet-section-title-row {
  text-align: center;
  padding: 14px 0 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wallet-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.assets-list-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ================================================================ */
/* 13. CUSTOMER LIST & TRANSACTION HISTORY MODALS                   */
/* ================================================================ */
.modal-fullscreen-sheet {
  max-height: 85vh;
  overflow-y: auto;
}

.cust-overview-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px;
}

.cust-stat-item {
  background: #121418;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cust-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.cust-stat-val-lime {
  font-size: 16px;
  font-weight: 800;
  color: var(--lime-green);
}

.cust-stat-val-white {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.cust-search-row {
  display: flex;
  gap: 8px;
}

.filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161a20;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-pill.active {
  background: var(--lime-green);
  color: #000000;
  font-weight: 800;
  border-color: var(--lime-green);
}

.cust-list-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cust-card-item {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cust-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cust-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(210, 240, 93, 0.18);
  color: var(--lime-green);
  font-weight: 900;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.cust-info-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cust-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cust-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.cust-tag-mining {
  font-size: 10px;
  font-weight: 700;
  color: #00E599;
  background: rgba(0, 229, 153, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
}

.cust-tag-pending {
  font-size: 10px;
  font-weight: 700;
  color: #FF9500;
  background: rgba(255, 149, 0, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
}

.cust-sub-email {
  font-size: 11px;
  color: var(--text-muted);
}

.cust-badge-tier {
  font-size: 11px;
  font-weight: 800;
  color: var(--lime-green);
  border: 1px solid rgba(210, 240, 93, 0.4);
  padding: 3px 8px;
  border-radius: 8px;
}

.cust-metrics-grid {
  display: flex;
  justify-content: space-between;
  background: #121418;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
}

.cust-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cust-wallet-short {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
}

.cust-active-state {
  font-size: 11px;
  font-weight: 700;
  color: var(--lime-green);
}

.cust-pending-state {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Transaction History Modal Styles */
.tx-coin-tabs {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.tx-coin-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: #181b20;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.tx-coin-btn.active {
  background: var(--lime-green);
  color: #000000;
  font-weight: 800;
  border-color: var(--lime-green);
}

.tx-list-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.tx-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

.tx-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.tx-icon-claim {
  background: rgba(210, 240, 93, 0.15);
  color: var(--lime-green);
}

.tx-icon-ref {
  background: rgba(0, 229, 153, 0.15);
  color: #00E599;
}

.tx-icon-deposit {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}

.tx-icon-swap {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.tx-item-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tx-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.tx-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.tx-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.tx-amt-lime {
  font-size: 13px;
  font-weight: 800;
  color: var(--lime-green);
}

.tx-amt-white {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.tx-amt-muted {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.tx-status-done {
  font-size: 10px;
  font-weight: 600;
  color: #00E599;
}


