/* ===== DASHBOARD LAYOUT ===== */
.dash-body { overflow: hidden; height: 100vh; }

.dash-layout {
  display: flex; height: 100vh; overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 24px 16px;
  height: 100vh; overflow-y: auto;
}
.sidebar__logo { margin-bottom: 36px; }
.sidebar__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar__bottom { display: flex; flex-direction: column; gap: 4px; }

.snav__link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: all 0.2s; cursor: pointer;
}
.snav__link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.snav__link--active { background: rgba(245,166,35,0.1); color: var(--accent); }
.snav__link--danger:hover { background: rgba(248,113,113,0.1); color: #f87171; }
.snav__icon { font-size: 18px; }

/* MAIN */
.dash-main {
  flex: 1; overflow-y: auto;
  padding: 32px 40px;
  display: flex; flex-direction: column; gap: 0;
}
.dash-topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 32px;
}
.dash-title { font-size: 28px; font-weight: 800; }
.dash-sub { font-size: 14px; color: var(--text2); margin-top: 4px; }
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-user__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}
.dash-user__name { font-size: 15px; font-weight: 700; }
.dash-user__status { font-size: 12px; color: var(--green); }

/* CARDS */
.dash-cards {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 28px;
}
.dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.dash-card--accent {
  background: linear-gradient(135deg, rgba(245,166,35,0.1), var(--surface));
  border-color: rgba(245,166,35,0.3);
}
.dc__icon { font-size: 28px; }
.dc__label { font-size: 12px; color: var(--text3); font-weight: 500; }
.dc__value { font-size: 26px; font-weight: 800; margin: 4px 0; }
.dc__btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dc__btn-row .btn { flex: 1; min-width: 0; }
.btn--sm { padding: 8px 16px; font-size: 13px; }

/* SECTION ROW */
.dash-section-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.ds__title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

/* INVESTMENT ITEM */
.inv-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 10px;
}
.inv-item__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.inv-item__plan { font-size: 14px; font-weight: 700; }
.inv-item__status {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 100px; background: rgba(34,197,94,0.15); color: var(--green);
}
.inv-item__stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 10px; }
.inv-stat { text-align: center; }
.inv-stat__val { font-size: 15px; font-weight: 700; }
.inv-stat__lbl { font-size: 11px; color: var(--text3); }
.inv-item__progress { height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.inv-item__progress-bar { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.5s; }

/* TRANSACTIONS */
.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border: none; }
.tx-item__icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.tx-item__icon--invest { background: rgba(245,166,35,0.15); }
.tx-item__icon--earn   { background: rgba(34,197,94,0.15); }
.tx-item__icon--withdraw{ background: rgba(96,165,250,0.15); }
.tx-item__icon--bonus  { background: rgba(168,85,247,0.15); }
.tx-item__desc { flex: 1; font-size: 13px; }
.tx-item__date { font-size: 11px; color: var(--text3); }
.tx-item__amount { font-size: 14px; font-weight: 700; }

/* INVEST PLANS */
.invest-plans {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 20px;
}

/* EMPTY STATE */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text2); }
.empty-state__icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; font-size: 14px; }

/* TAB CONTENT */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* REFERRAL */
.ref-hero { text-align: center; padding: 40px 0 32px; }
.ref-hero h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.ref-hero p { font-size: 16px; color: var(--text2); }
.ref-link-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px;
}
.ref-link-box label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 10px; }
.ref-link-wrap { display: flex; gap: 12px; }
.ref-link-wrap input {
  flex: 1; padding: 12px 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text2); font-size: 13px; outline: none;
}
.ref-code-display { margin-top: 12px; font-size: 14px; color: var(--text2); }
.ref-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.ref-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; text-align: center;
}
.rs__value { font-size: 32px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.rs__label { font-size: 14px; color: var(--text2); }

/* USDT ADDRESS BOX */
.usdt-address-box {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 4px;
}
.uab__label { font-size: 12px; color: var(--text2); margin-bottom: 10px; }
.uab__address-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.uab__address {
  flex: 1; font-family: 'Courier New', monospace; font-size: 13px;
  color: var(--accent); word-break: break-all; background: none; border: none;
  user-select: all;
}
.uab__copy-icon {
  flex-shrink: 0; background: none; border: 1px solid var(--border);
  border-radius: 6px; color: var(--text2); cursor: pointer;
  padding: 5px 7px; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.uab__copy-icon:hover { border-color: var(--accent); color: var(--accent); background: rgba(245,166,35,0.08); }
.uab__network { font-size: 12px; color: var(--text2); margin-top: 10px; }
.uab__qr-wrap { display: flex; justify-content: center; margin-top: 16px; }
.uab__qr { width: 148px; height: 148px; border-radius: var(--radius); overflow: hidden; }
.uab__qr canvas, .uab__qr img { display: block; }

/* WITHDRAW METHOD BADGE */
.withdraw-method-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.25);
  border-radius: var(--radius); padding: 8px 14px; margin-bottom: 16px;
  font-size: 14px; font-weight: 600; color: #38bdf8;
}

/* PAY METHODS */
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
.pay-method {
  padding: 8px 16px; border-radius: var(--radius);
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.pay-method--active { border-color: var(--accent); color: var(--accent); background: rgba(245,166,35,0.08); }
.pay-notice {
  background: rgba(245,166,35,0.08); border: 1px solid rgba(245,166,35,0.2);
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 13px; color: var(--accent); margin-top: 12px;
}

/* CREDENTIALS METHOD TOGGLE */
.cred-method-toggle {
  display: flex; gap: 8px; margin-top: 16px;
}
.cred-method-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.cred-method-btn--active {
  border-color: var(--accent); color: var(--accent); background: rgba(245,166,35,0.08);
}
.cred-method-btn__icon { font-size: 18px; }

/* INV-ITEM EXIT BUTTONS */
.inv-item__exit {
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}

/* DC SUB */
.dc__sub { font-size: 12px; color: var(--green); margin-top: 4px; }

/* INVEST SINGLE FORM */
.invest-single { max-width: 480px; }
.invest-single__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.isc__header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.isc__title { font-size: 18px; font-weight: 800; }
.isc__balance { font-size: 13px; color: var(--text2); }
.isc__balance strong { color: var(--text); }

.isc__model {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.isc__stat {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; text-align: center;
}
.isc__stat-val { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.isc__stat-lbl { font-size: 11px; color: var(--text2); }

.isc__input-row { margin-bottom: 12px; }
.isc__input-wrap { position: relative; }
.isc__currency {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text2); font-size: 15px; pointer-events: none;
}

.isc__preview {
  background: var(--bg3); border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px;
}
.isc__prev-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--border);
}
.isc__prev-row:last-child { border-bottom: none; }
.isc__prev-row span { color: var(--text2); }

/* Mobile nav — hidden on desktop */
.dash-mobile-topnav { display: none; }
.dash-mobile-nav    { display: none; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .dash-cards { grid-template-columns: repeat(2,1fr); }
  .dash-section-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .dash-body { display: flex; flex-direction: column; overflow: hidden; }
  .dash-layout { flex: 1; height: auto; min-height: 0; }
  .sidebar { display: none; }
  .dash-mobile-topnav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
    flex-shrink: 0; z-index: 100;
  }
  .dmtn__btn {
    background: none; border: none; color: var(--text2); cursor: pointer;
    font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: var(--radius);
  }
  .dmtn__btn:hover { color: var(--text1); }
  .dmtn__btn--danger { color: var(--danger, #ef4444); }
  .dmtn__logo { font-size: 16px; }
  .dash-mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 8px 0 env(safe-area-inset-bottom);
  }
  .dmn__link {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 2px; font-size: 11px; color: var(--text2); text-decoration: none;
    padding: 6px 4px;
  }
  .dmn__link--active { color: var(--accent); }
  .dash-main { padding: 16px 16px 80px; }
  .dash-cards { grid-template-columns: 1fr 1fr; }
  .dash-topbar { display: none; }
}
@media (max-width: 480px) {
  .dash-cards { grid-template-columns: 1fr; }
  .ref-stats { grid-template-columns: 1fr; }
  .invest-single__card { padding: 16px; }
  .isc__model {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .isc__model-sep { display: none; }
  .isc__model-item { padding: 4px 0; border-bottom: 1px solid var(--border); }
  .isc__model-item:last-child { border-bottom: none; }
}
