/* AtlasFX - integration fixes & gap coverage (loads after style.css) */

/* ===== Modal base fix ===== */
.modal {
  position: relative;
}

/* ===== Login screen ===== */
.login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  gap: 18px;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(41, 98, 255, 0.14), transparent 60%),
    radial-gradient(800px 400px at 90% 110%, rgba(0, 192, 118, 0.08), transparent 60%),
    var(--bg);
}

.logo-inline,
.logo-inline-sm {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-inline .logo-icon {
  width: 34px;
  height: 34px;
  color: var(--primary);
}

.logo-inline-sm .logo-icon {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
}

.logo-inline-sm .logo-text {
  font-size: 17px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.login-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input,
.login-card input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  transition: border-color 150ms ease;
}

.field input:focus,
.login-card input:focus {
  border-color: var(--primary);
  outline: none;
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 150ms ease;
}

.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-outline {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 150ms ease;
}

.btn-outline:hover { background: var(--surface2); }
.btn-outline:active { transform: scale(0.97); }

.btn-ghost {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 150ms ease;
}

.btn-ghost:hover { color: var(--text); background: var(--surface2); }

.link-btn {
  display: block;
  margin: 4px auto 0;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
}

.login-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}

.feature-item svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

/* ===== Topbar extras ===== */
.topbar-center {
  display: flex;
  align-items: center;
}

.acc-switcher {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.acc-pill {
  padding: 6px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 150ms ease;
}

.acc-pill.active {
  background: var(--primary);
  color: #fff;
}

.btn-deposit-sm {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 150ms ease;
}

.btn-deposit-sm:hover { filter: brightness(1.08); }

.btn-deposit-sm svg {
  width: 15px;
  height: 15px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.avatar-menu {
  position: absolute;
  top: 48px;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 160px;
  z-index: 70;
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.menu-item:hover { background: var(--surface2); }

.menu-item svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

/* ===== Sidebar search ===== */
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.sidebar-search input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
}

/* ===== Chart titlebar ===== */
.titlebar-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

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

/* ===== Trade panel ===== */
.panel-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.trade-field {
  margin-bottom: 16px;
}

.trade-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

#trade-amount {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font);
  margin-bottom: 8px;
  transition: border-color 150ms ease;
}

#trade-amount:focus {
  border-color: var(--primary);
  outline: none;
}

.qty-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}

.btn-up-text,
.btn-down-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.payout-tag {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}

/* Active trade rows */
.at-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.at-row2 {
  margin-bottom: 4px;
}

.at-row3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 8px;
}

.at-row3 #at-progress {
  flex: 1;
}

.at-row4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.at-dir-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-up {
  background: rgba(0, 192, 118, 0.14);
  color: var(--up);
}

.badge-down {
  background: rgba(246, 70, 93, 0.14);
  color: var(--down);
}

.badge-open {
  background: rgba(41, 98, 255, 0.14);
  color: var(--primary);
}

.badge-draw {
  background: rgba(148, 155, 173, 0.16);
  color: #949bad;
}

.pos { color: var(--up) !important; }
.neg { color: var(--down) !important; }
.zero { color: var(--muted) !important; }

/* ===== History extras ===== */
.h-row .badge-up,
.h-row .badge-down,
.h-row .badge-open {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 32px 0;
}

/* ===== Profile ===== */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}

.profile-card h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.profile-card p {
  font-size: 13px;
  color: var(--muted);
}

.balance-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.balance-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.bc-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bc-eye {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  line-height: 0;
}
.bc-eye:hover { color: var(--text); background: var(--surface2, rgba(255,255,255,0.06)); }
.bc-eye svg { width: 17px; height: 17px; }
.bc-eye .eye-closed { display: none; }
.bc-eye.is-hidden .eye-open { display: none; }
.bc-eye.is-hidden .eye-closed { display: block; }

.bc-value.hidden-val, .stat-mini-value.hidden-val {
  letter-spacing: 2px;
  color: var(--muted);
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.profile-section-head .profile-section-title { margin-bottom: 0; }

.bc-value {
  font-size: 18px;
  font-weight: 700;
}

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.profile-section-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

/* ===== Modal extras ===== */
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-head .modal-title {
  margin-bottom: 0;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.method-opt input[type="radio"] {
  accent-color: var(--primary);
}

.result-modal {
  text-align: center;
  padding: 32px 24px;
}

.result-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

#result-icon {
  width: 64px;
  height: 64px;
  color: var(--up);
}

#modal-result .result-modal h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

#modal-result .result-modal p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

#modal-deposit .modal-close,
#modal-withdraw .modal-close,
#modal-register .modal-close {
  position: static;
  flex-shrink: 0;
}

/* ===== Views ===== */
#view-history,
#view-profile {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

/* ===== Toast base ===== */
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 200ms ease;
}

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

.toast.fade-out {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 300ms ease, transform 300ms ease;
}

/* ===== Mobile refinements ===== */
@media (max-width: 767px) {
  .topbar-center {
    order: 3;
    margin-left: auto;
  }

  .topbar-right {
    gap: 8px;
  }

  #btn-deposit {
    display: none;
  }

  .balance-box {
    text-align: right;
  }

  .quote {
    text-align: right;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Polish pass ===== */
.balance-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
  margin-right: 4px;
}

.balance-label {
  font-size: 10px;
  letter-spacing: 0.05em;
}

#balance-label {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chart-change {
  font-size: 13px;
  font-weight: 700;
}

.sidebar-search input {
  line-height: 20px;
  padding: 2px 0;
}

.trade-field {
  margin-bottom: 18px;
}

#chart-change {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
}

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

.stat-mini {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-mini-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-mini-value {
  font-size: 18px;
  font-weight: 700;
}

#profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-group {
  display: contents;
}

.stat-acc-label {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary, #2dd4bf);
  margin-top: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border, #262a35);
}

.hint {
  font-size: 12px;
  color: var(--gold);
  text-align: center;
  margin: 8px 0;
}

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

.asset-row .asset-sym {
  font-size: 13px;
  font-weight: 700;
}

.asset-row .asset-name {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.asset-row .asset-price {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.asset-row .asset-chg,
.asset-row .chg {
  font-size: 11px;
  text-align: right;
}



/* AtlasFX - fixes.css */
/* Sembunyikan teks logo pada layar kecil agar header lebih lega */

@media (max-width: 767px) {
  .logo-inline-sm .logo-text {
    display: none;
  }
}


/* TUGAS 1: Teks hint tampil sebagai blok penuh di atas tombol UP/DOWN */
.hint,
.hint-real-empty {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 0 10px 0;
  color: var(--gold);
  font-size: 12.5px;
  background: rgba(255, 183, 0, 0.08);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 183, 0, 0.25);
  box-sizing: border-box;
}

/* TUGAS 2: Navigasi desktop di dalam topbar (tampil >=768px) */
.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
}
.top-nav .tn-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 150ms ease;
}
.top-nav .tn-btn:hover {
  color: var(--text);
  background: var(--surface2);
}
.top-nav .tn-btn.active {
  color: var(--primary);
  background: rgba(41, 98, 255, 0.12);
}
.top-nav .tn-btn svg {
  width: 17px;
  height: 17px;
}
@media (max-width: 767px) {
  .top-nav {
    display: none;
  }
}

/* TUGAS 3: View history & profile di desktop */
.view.active {
  display: block;
}
#view-history,
#view-profile {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 20px 24px;
  box-sizing: border-box;
}
#view-history .stats-cards {
  grid-template-columns: repeat(4, 1fr);
}

/* History di HP: stat cards 2 kolom + tab wrap biar gak ada scroll kanan-kiri */
@media (max-width: 767px) {
  #view-history .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .hist-filters {
    flex-wrap: wrap;
  }
  .hf-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 10px 8px;
  }
}

/* AtlasFX - Real-time win/loss di active-trade box */

.at-live-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}

.at-live-label {
  color: var(--muted);
  font-size: 11px;
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.at-live-price {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.at-live-pnl {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.at-live-pnl.live-win {
  color: #00C076;
  background: rgba(0, 192, 118, 0.12);
}

.at-live-pnl.live-loss {
  color: #F6465D;
  background: rgba(246, 70, 93, 0.12);
}

.at-live-pnl.live-draw {
  color: var(--muted);
  background: rgba(138, 148, 166, 0.12);
}

/* Menu avatar di atas layer lain */
.avatar-menu {
  z-index: 80;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* AtlasFX - Styling scrollbar & elemen scrollable (dark theme) */

/* 1. Global scrollbar halus & modern */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(41,98,255,0.35), rgba(41,98,255,0.15)); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(41,98,255,0.55); }
html { scrollbar-width: thin; scrollbar-color: rgba(41,98,255,0.35) transparent; }

/* 2. Scroll behavior halus */
.asset-list, .cat-tabs, .history-list { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }

/* 3. Cat-tabs modern */
.cat-tabs { border-bottom: none; padding: 10px 12px; gap: 8px; display: flex; flex-wrap: wrap; overflow: visible; }
.cat-tab { padding: 7px 14px; font-size: 12px; font-weight: 600; border: 1px solid transparent; background: var(--surface2); border-radius: 999px; transition: all 200ms cubic-bezier(0.4,0,0.2,1); }
.cat-tab:hover { border-color: rgba(41,98,255,0.4); color: var(--text); transform: translateY(-1px); }
.cat-tab.active { background: linear-gradient(135deg, rgba(41,98,255,0.9), rgba(41,98,255,0.65)); color: #fff; box-shadow: 0 4px 14px rgba(41,98,255,0.35); border-color: transparent; }

/* 4. Asset-row */
.asset-row { border-radius: 10px; padding: 10px 12px; transition: 180ms ease; box-sizing: border-box; display: flex; justify-content: space-between; }
.asset-row:hover { background: var(--surface2); cursor: pointer; }
.asset-row.active { background: rgba(41,98,255,0.12); border: 1px solid rgba(41,98,255,0.35); }

/* 5. Tombol UP/DOWN */
.btn-up { border-radius: 10px; height: 58px; font-size: 16.5px; box-shadow: 0 6px 18px rgba(0,192,118,0.25); }
.btn-down { border-radius: 10px; height: 58px; font-size: 16.5px; box-shadow: 0 6px 18px rgba(246,70,93,0.25); }
.btn-up:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(0,192,118,0.35); }
.btn-down:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(246,70,93,0.35); }

/* 6. Qty-btn & Exp-chip */
.qty-btn, .exp-chip { background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; transition: 180ms cubic-bezier(0.4,0,0.2,1); }
.qty-btn:hover, .exp-chip:hover { border-color: var(--primary); transform: translateY(-1px); }
.qty-btn.active, .exp-chip.active { background: linear-gradient(135deg, rgba(41,98,255,0.9), rgba(41,98,255,0.65)); color: #fff; box-shadow: 0 4px 12px rgba(41,98,255,0.3); }

/* 7. Acc-switcher & pill */
.acc-switcher, .pill { box-shadow: inset 0 1px 3px rgba(0,0,0,0.25); }
/* AtlasFX - Topbar layout (dark theme) */

/* ===== DESKTOP (>=768px) ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 60px;
}

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

.topbar-center {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
}

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

/* Balance-box dipindah ke topbar-left, teks rata kiri */
.balance-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
  padding-left: 2px;
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

/* Timpa aturan lama: hapus text-align:right / align-items:flex-end */
.balance-box {
  text-align: left;
  align-items: flex-start;
}

/* ===== MOBILE (max-width: 767px) ===== */
@media (max-width: 767px) {
  .topbar {
    padding: 0 12px;
  }

  .topbar-left {
    gap: 10px;
    order: 1;
  }

  /* Teks AtlasFX disembunyikan, hanya ikon yang tampil */
  .logo-inline-sm .logo-text {
    display: none;
  }

  .topbar-center {
    flex: 1;
    justify-content: center;
    margin-left: 0;
    order: 2;
  }

  .topbar-right {
    order: 3;
    margin-left: auto;
    gap: 8px;
  }

  /* Tombol deposit disembunyikan di mobile */
  #btn-deposit {
    display: none;
  }

  .balance-box {
    align-items: flex-start;
    text-align: left;
    border-left: 1px solid var(--border);
    padding-left: 10px;
    margin-right: 0;
  }

  .balance-label {
    font-size: 9px;
  }

  #balance-label {
    font-size: 14px;
  }

  .avatar {
    width: 30px;
    height: 30px;
  }
}

/* ===== Language selector ===== */
.profile-lang {
  margin-top: 20px;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 150ms ease;
}

.lang-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.lang-btn.active {
  background: rgba(41, 98, 255, 0.22);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 4px 12px rgba(41, 98, 255, 0.25);
}
.lang-btn.active .lang-name {
  color: var(--primary);
}

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

.lang-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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


/* AtlasFX - View Pengaturan (dark theme) */

#view-settings {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  padding: 20px 24px;
  box-sizing: border-box;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.settings-desc {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
}

#view-settings .lang-grid {
  margin-top: 14px;
}

.settings-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

/* ===== Bank Combo (searchable dropdown) ===== */
.bank-combo {
  position: relative;
  width: 100%;
}
.bank-combo-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  text-align: left;
}
.bank-combo-trigger:hover {
  border-color: var(--primary, #2dd4bf);
  background: var(--surface2, rgba(255,255,255,0.08));
}
.bank-combo-trigger:focus {
  border-color: var(--primary, #2dd4bf);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}
.bank-combo-trigger .bank-combo-value {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.bank-combo-trigger .bank-combo-value.placeholder {
  color: var(--muted, #8a94a6);
}
.bank-combo-trigger .select-arrow {
  color: var(--muted, #8a94a6);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.bank-combo-trigger[aria-expanded="true"] .select-arrow {
  transform: rotate(180deg);
  color: var(--primary, #2dd4bf);
}
.bank-combo-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: #1a1d27;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: comboIn 0.15s ease;
}
@keyframes comboIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.bank-combo-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.bank-combo-search svg {
  width: 16px;
  height: 16px;
  color: var(--muted, #8a94a6);
  flex-shrink: 0;
}
.bank-combo-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  padding: 2px 0;
}
.bank-combo-search input::placeholder {
  color: var(--muted, #8a94a6);
}
.bank-combo-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}
.bank-combo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.bank-combo-item:hover {
  background: rgba(45, 212, 191, 0.1);
  color: var(--primary, #2dd4bf);
}
.bank-combo-item.selected {
  background: rgba(45, 212, 191, 0.15);
  color: var(--primary, #2dd4bf);
  font-weight: 600;
}
.bank-combo-item .combo-check {
  margin-left: auto;
  opacity: 0;
  width: 16px;
  height: 16px;
  color: var(--primary, #2dd4bf);
  flex-shrink: 0;
}
.bank-combo-item.selected .combo-check {
  opacity: 1;
}
.bank-combo-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted, #8a94a6);
  font-size: 13px;
}

/* ===== Offline Splash ===== */
.offline-splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #160a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.offline-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  max-width: 300px;
}
.offline-wifi {
  width: 84px;
  height: 84px;
  color: #f85149;
  animation: offlineBlink 0.9s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(248, 81, 73, 0.55));
}
@keyframes offlineBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.offline-title {
  font-size: 18px;
  font-weight: 700;
  color: #f85149;
  letter-spacing: 0.02em;
}
.offline-sub {
  font-size: 13.5px;
  color: var(--muted, #8a94a6);
  line-height: 1.6;
}

/* ===== Download APK button ===== */
.btn-download-apk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-download-apk svg {
  width: 18px;
  height: 18px;
}

/* ===== Share P&L Modal ===== */
.share-modal {
  max-width: 380px;
}
@media (max-width: 480px) {
  .share-modal {
    max-height: 92vh;
    overflow-y: auto;
    padding: 16px;
  }
  .share-preview {
    margin: 8px 0 12px;
  }
  .share-preview-img {
    max-height: 62vh;
    object-fit: contain;
    background: #0b0e14;
  }
}
.share-preview {
  margin: 12px 0 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b0e14;
}
.share-preview-img {
  width: 100%;
  height: auto;
  display: block;
}
.share-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-actions .btn-share-native,
.share-actions .btn-share-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.share-actions svg { width: 18px; height: 18px; }
.btn-share-download {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-share-download:hover { border-color: var(--primary, #2dd4bf); color: var(--primary, #2dd4bf); }

/* ===== History share button ===== */
.hist-share-btn {
  background: none;
  border: none;
  padding: 6px;
  margin-left: 6px;
  cursor: pointer;
  color: var(--muted, #8a94a6);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s, transform 0.1s;
  vertical-align: middle;
}
.hist-share-btn svg {
  width: 16px;
  height: 16px;
}
.hist-share-btn:hover {
  color: var(--primary, #2dd4bf);
  background: rgba(45, 212, 191, 0.1);
}
.hist-share-btn:active {
  transform: scale(0.9);
}

/* ===== Register modal error ===== */
#reg-err {
  font-size: 13px;
  margin: 16px 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(248, 81, 73, 0.08);
  border: 1px solid rgba(248, 81, 73, 0.25);
  color: #f85149;
  line-height: 1.5;
  min-height: 0;
}
#reg-err.hidden {
  display: none;
}
#modal-register .btn-register {
  margin-top: 14px;
}

/* ===== Custom Select (Bank WD) ===== */
.select-wrap {
  position: relative;
  width: 100%;
}
.select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 13px 42px 13px 14px;
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}
.select-wrap select:hover {
  border-color: var(--primary, #2dd4bf);
  background: var(--surface2, rgba(255,255,255,0.08));
}
.select-wrap select:focus {
  border-color: var(--primary, #2dd4bf);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}
.select-wrap select option {
  background: #171a23;
  color: #e2e8f0;
  padding: 10px;
  font-size: 14px;
}
.select-wrap .select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted, #8a94a6);
  width: 18px;
  height: 18px;
  transition: color 0.2s, transform 0.2s;
}
.select-wrap:hover .select-arrow {
  color: var(--primary, #2dd4bf);
}
.select-wrap select:focus + .select-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: var(--primary, #2dd4bf);
}

/* ===== Tx History balance ===== */
.tx-bal {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  line-height: 1.4;
}
.tx-bal-label {
  color: var(--muted);
  white-space: nowrap;
}
.tx-bal-label b {
  color: var(--text);
  font-weight: 600;
}
.tx-warn {
  color: #f85149;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}
/* Grid history: 5 kolom untuk deposits/withdrawals */
#history-list.tx-list {
  grid-template-columns: 110px 1fr 90px 130px 90px;
}

/* ===== Withdraw ===== */
/* Form withdraw lebih lega: jarak label-input & antar field dilonggarkan */
#modal-withdraw .field {
  gap: 10px;
  margin-bottom: 16px;
}
#modal-withdraw .field:last-of-type {
  margin-bottom: 4px;
}
#modal-withdraw .field-label {
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text);
}
#modal-withdraw .field input {
  padding: 13px 14px;
  border-radius: 8px;
}
#modal-withdraw .wd-balance-row {
  margin-bottom: 18px;
}
#modal-withdraw .btn-withdraw-confirm {
  margin-top: 8px;
}
.wd-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.wd-balance-label {
  font-size: 12.5px;
  color: var(--muted);
}
.wd-balance-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.wd-amount-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.wd-amount-wrap input {
  flex: 1;
}
.wd-max-btn {
  background: var(--surface2, rgba(255,255,255,0.06));
  border: 1px solid var(--border);
  color: var(--primary, #2dd4bf);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
}
.wd-max-btn:hover {
  background: var(--surface2, rgba(255,255,255,0.12));
}

/* ===== PIN Settings ===== */
.pin-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pin-title-row .profile-section-title {
  margin-bottom: 0;
}
.pin-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
}
.pin-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.pin-status-dot.on { background: #3fb950; box-shadow: 0 0 6px rgba(63,185,80,0.6); }
.pin-status-dot.off { background: #f85149; box-shadow: 0 0 6px rgba(248,81,73,0.6); }
.pin-status-text.on { color: #3fb950; }
.pin-status-text.off { color: #f85149; }

.pin-current-wrap {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(248,81,73,0.25);
  background: rgba(248,81,73,0.05);
  border-radius: 10px;
}
.pin-current-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.pin-setting-body {
  margin-top: 14px;
}
.pin-set-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.pin-input {
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 18px;
  letter-spacing: 6px;
  text-align: center;
  font-family: inherit;
  width: 100%;
}
.btn-pin-save {
  width: 100%;
}
.btn-pin-disable {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(248,81,73,0.35);
  color: #f85149;
  background: transparent;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}
.btn-pin-disable:hover {
  background: rgba(248,81,73,0.1);
}
.btn-pin-disable:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pin-msg {
  font-size: 12.5px;
  margin-top: 10px;
  min-height: 16px;
}
.pin-msg.ok { color: #3fb950; }
.pin-msg.err { color: #f85149; }

/* ===== PIN Lock Modal ===== */
.pinlock-modal {
  max-width: 320px;
  text-align: center;
}

/* ===== Ban Block ===== */
.banblock-modal {
  max-width: 360px;
  text-align: center;
}
.banblock-modal .pinlock-head svg {
  color: #f85149;
  width: 40px;
  height: 40px;
}
.banblock-msgs {
  margin: 14px 0 18px;
  max-height: 200px;
  overflow-y: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.banblock-msg {
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* ===== Freeze Block timer ===== */
.freezeblock-timer {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  color: #f0b429;
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid rgba(240,180,41,0.3);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0 4px;
  text-align: center;
}
.pinlock-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.pinlock-head svg { width: 34px; height: 34px; color: var(--primary, #2dd4bf); }
.pinlock-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: background 0.12s, border-color 0.12s;
}
.pin-dot.filled {
  background: var(--primary, #2dd4bf);
  border-color: var(--primary, #2dd4bf);
}
.pinlock-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.pinpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.pin-key {
  background: var(--surface2, rgba(255,255,255,0.06));
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  font-family: inherit;
  height: 54px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, transform 0.06s;
  user-select: none;
  -webkit-user-select: none;
}
.pin-key:hover { background: var(--surface2, rgba(255,255,255,0.12)); }
.pin-key:active { transform: scale(0.94); }
.pin-key svg { width: 22px; height: 22px; }
.pin-key-blank { background: transparent; border-color: transparent; cursor: default; }
.pin-key-blank:hover { background: transparent; }
.pinlock-err {
  font-size: 12.5px;
  color: #f85149;
  min-height: 16px;
  margin-bottom: 8px;
}
.btn-pinlock-logout {
  width: 100%;
}
@media (max-width: 480px) {
  .pin-set-fields { grid-template-columns: 1fr; }
}

.settings-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 20px 0;
}

.settings-group {
  margin-bottom: 20px;
}

.settings-group-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row-label {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}

.settings-row-desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.settings-row-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 7px 10px;
  cursor: pointer;
  min-width: 140px;
}

.settings-select:focus {
  outline: none;
  border-color: var(--accent);
}

.settings-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
}

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

.settings-switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 22px;
  transition: 0.2s ease;
}

.settings-switch .slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: var(--text);
  border-radius: 50%;
  transition: 0.2s ease;
}

.settings-switch input:checked + .slider {
  background: var(--accent);
}

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

.settings-switch input:focus + .slider {
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.settings-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: 0.2s ease;
}

.settings-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.settings-btn:hover {
  border-color: var(--accent);
}

.settings-btn-primary:hover {
  background: var(--accent-hover);
}


/* Tombol pilih aset - tampil hanya di mobile (<768px), disembunyikan di desktop */
.pick-asset-btn {
  display: none;
}
@media (max-width: 767px) {
  .pick-asset-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    margin-top: 6px;
  }

  .pick-asset-btn svg {
    width: 14px;
    height: 14px;
  }

  .pick-asset-btn:hover {
    border-color: var(--primary);
  }
}

/* Modal pemilihan aset */
.asset-modal {
  max-width: 480px;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 767px) {
  .asset-modal {
    width: calc(100% - 32px);
    max-width: 480px;
  }
}

/* Kotak pencarian aset */
.asset-modal-search {
  margin: 12px 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-modal-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

/* Tab kategori dalam modal */
#cat-tabs-modal {
  padding: 4px 0 10px;
  border-bottom: none;
  overflow-x: auto;
}

/* Daftar aset dalam modal */
.asset-list-modal {
  flex: 1;
  overflow-y: auto;
  margin-top: 8px;
}

.asset-list-modal .asset-row {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.asset-list-modal .asset-row:hover {
  background: var(--surface2);
}

.asset-list-modal .asset-row.active {
  background: rgba(41, 98, 255, 0.12);
  border: 1px solid rgba(41, 98, 255, 0.35);
}


/* AtlasFX - Dark Theme */
:root {
  --bg: #0B0E14;
  --surface: #141926;
  --surface-2: #1c2333;
  --primary: #2962FF;
  --text: #EAF0FF;
  --text-muted: #8A93A6;
  --border: #232b3d;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html, body {
  overflow-x: hidden;
}

body {
  background: #000000;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* 1. SPLASH SCREEN */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}
.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.splash-logo svg {
  width: 56px;
  height: 56px;
  animation: splashPulse 1.2s ease-in-out infinite;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}
.splash-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  font-family: var(--font);
}

/* 2. LOGIN SCREEN FULL-SCREEN TANPA SCROLL */
.login-screen {
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000000;
  padding: 24px 20px;
  box-sizing: border-box;
}
.login-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0;
  margin: 0;
}
.login-title {
  font-size: 22px;
  margin: 4px 0 0 0;
  color: var(--text);
  font-weight: 700;
}
.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ELEMEN FORM LOGIN */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s ease;
}
.field input:focus {
  border-color: var(--primary);
}
.login-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.login-btn:hover {
  opacity: 0.9;
}

/* ===== Login pure black (Boss request) ===== */
.login-card {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
.login-wrap .logo-inline .logo-text,
.login-title {
  color: #ffffff;
}
.field-label {
  color: rgba(255, 255, 255, 0.6);
}
.login-card .field input {
  background: #0d0d0d;
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.login-features {
  display: none !important;
}

/* Login no-scroll: hilangkan padding-bottom body saat login */
.login-screen {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}

/* AtlasFX - Dark Theme */
/* 1. Kunci scroll saat splash screen tampil */
html:has(.splash-screen:not(.fade-out)) {
  overflow: hidden;
  height: 100%;
}

body:has(.splash-screen:not(.fade-out)) {
  overflow: hidden;
  height: 100%;
}

/* 2. Pastikan splash screen tidak bisa di-scroll */
.splash-screen {
  overflow: hidden;
}


.splash-img {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(41, 98, 255, 0.35);
  animation: splashPulse 1.2s ease-in-out infinite;
}

.splash-logo .splash-img + .splash-brand {
  font-size: 24px;
  margin-top: 16px;
}

@keyframes splashPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.85;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}


: tooltip CSS =====
.chart-tooltip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11,14,20,0.92);
  border: 1px solid var(--border);
  color: #E6Eaf2;
  font-size: 11px;
  font-family: monospace;
  padding: 6px 10px;
  border-radius: 6px;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  white-space: nowrap;
}
/* AtlasFX - Styling info bar candle */

.chart-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
}

.ci-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ci-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ci-value {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .chart-info {
    font-size: 10px;
    padding: 6px 10px;
    flex-wrap: wrap;
  }
}
/* AtlasFX - styling tooltip mengambang di chart */

.chart-tooltip {
  position: absolute;
  z-index: 25;
  display: none;
  background: rgba(19, 25, 38, 0.95);
  border: 1px solid rgba(41, 98, 255, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: var(--font);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  backdrop-filter: blur(6px);
  min-width: 130px;
}

.ct-time {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ct-grid {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 2px 8px;
  font-size: 10px;
  line-height: 1.5;
}

.ct-grid span {
  color: var(--muted);
}

.ct-grid b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Sembunyikan info bar permanen di bawah chart */
#chart-info {
  display: none !important;
}
/* ===== Fix: login fit-to-screen tanpa scroll (native app feel) ===== */
/* Pastikan root dan body memenuhi viewport */
html {
  height: 100%;
}
body {
  min-height: 100dvh;
}

/* Saat layar login tampil: kunci scroll dan hilangkan padding bawah body */
.login-screen {
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  box-sizing: border-box;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap {
  max-height: 100%;
  overflow: visible;
  padding: 0;
  margin: 0;
}
.login-screen:not(.hidden) {
  position: relative;
}

/* Timpa padding-bottom 70px dari style.css hanya saat login */
body:has(.login-screen:not(.hidden)) {
  padding-bottom: 0 !important;
  overflow: hidden;
  height: 100dvh;
}

/* Setelah login (app-shell aktif), body kembali normal untuk bottom-nav */
body:has(.app-shell:not(.hidden)) {
  height: auto;
  overflow: auto;
}

/* ===== Payment info modal ===== */
.payinfo-body {
  padding: 8px 4px;
}
.pay-amount-box {
  text-align: center;
  margin-bottom: 14px;
}
.pay-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.pay-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
}
.pay-method-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.pay-tab {
  flex: 1;
  padding: 8px 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: 150ms ease;
}
.pay-tab.active {
  background: rgba(41, 98, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}
.pay-panel {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.pay-panel.active {
  display: block;
}
.pay-inst {
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 10px;
}
.pay-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.pay-detail:last-child {
  border-bottom: none;
}
.pd-label {
  color: var(--muted);
  font-size: 11.5px;
}
.pd-value {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pay-qris-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
}
.pay-qris-svg {
  width: 140px;
  height: 140px;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
}
.pay-qris-id {
  font-size: 12px;
  color: var(--muted);
}
.pay-qris-img {
  width: 160px;
  height: 160px;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  object-fit: contain;
}
.pay-qris-empty {
  width: 140px;
  height: 140px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 14px;
  font-weight: 700;
}
.pay-crypto-addr {
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 12px;
  word-break: break-all;
  user-select: all;
}
.pay-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.pay-none {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 10px 0;
}
.pay-wait {
  font-size: 12px;
  color: var(--gold);
  text-align: center;
  margin: 12px 0;
  line-height: 1.4;
}
.pay-confirm {
  width: 100%;
  padding: 12px;
}

/* Chart tooltip positioning context */
.chart-area {
  position: relative;
}
.chart-canvas {
  position: relative;
  z-index: 1;
}
.chart-tooltip {
  position: absolute;
  z-index: 30;
  pointer-events: none;
}
/* Empty state - tampil di tengah area history (horizontal + vertikal) */
.history-list .empty,
.history-list .empty-hist {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 40px 20px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  /* history-list itu grid 7 kolom - empty state harus bentang penuh biar di tengah */
  grid-column: 1 / -1;
}

/* Kalau cuma header doang (history kosong), sembunyikan header agar rapi */
.history-list.no-data .h-row.h-head {
  display: none;
}

/* Asset list & tempat lain yang pakai .empty juga di tengah */
.empty {
  text-align: center;
  width: 100%;
  margin: 0;
}

/* ===== History transaksi (Deposits & Withdrawals) ===== */
/* Grid 5 kolom: Time | Method | Amount | Balance (Before/After) | Result */
#history-list.tx-list {
  grid-template-columns: 110px 1fr 90px 130px 90px;
}
#history-list.tx-list .h-row > span:first-child {
  color: var(--muted);
}
@media (max-width: 767px) {
  /* HP / perangkat kecil: header kolom disembunyiin, tiap transaksi jadi kartu */
  #history-list.tx-list {
    display: block;
  }
  #history-list.tx-list .h-row.h-head {
    display: none;
  }
  #history-list.tx-list .h-row {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
  }
  #history-list.tx-list .h-row > span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    gap: 12px;
  }
  #history-list.tx-list .h-row > span:empty {
    display: none;
  }
  /* Label kecil sebelum value di tiap baris kartu (HP) */
  #history-list.tx-list .h-row > span::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
  }
}

/* ===== Active trade: multi posisi (max 10) ===== */
#active-trade .at-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}
#active-trade .at-card:last-child {
  margin-bottom: 0;
}

/* QRIS SMART: 1 barcode + nominal unik */
.pay-qris-smart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}
.pay-qris-single .pay-qris-img {
  width: 180px;
  height: 180px;
}
.pay-qris-nominal-box {
  background: #0f172a;
  border: 1px solid var(--border, #334155);
  border-radius: 10px;
  padding: 12px 20px;
  text-align: center;
  width: 100%;
  max-width: 300px;
}
.pay-qris-nominal-lbl {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted, #94a3b8);
  margin-bottom: 4px;
}
.pay-qris-nominal {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
}
.pay-qris-sub {
  display: block;
  font-size: 11px;
  color: var(--muted, #94a3b8);
  margin-top: 4px;
}
.pay-qris-loading {
  font-size: 13px;
  color: var(--muted, #94a3b8);
  padding: 10px 0;
}

/* ===== Modal payinfo compact (full di HP) ===== */
.modal-overlay {
  padding: 10px;
  align-items: flex-start;
  overflow-y: auto;
}
.modal-overlay .modal {
  margin: auto;
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px;
}
#modal-payinfo.modal {
  max-width: 400px;
}
#modal-payinfo .pay-amount-box {
  margin-bottom: 10px;
}
#modal-payinfo .pay-amount {
  font-size: 22px;
}
#modal-payinfo .pay-method-content .pay-panel {
  padding: 10px;
}
#modal-payinfo .pay-qris-single .pay-qris-img {
  width: 150px;
  height: 150px;
}
#modal-payinfo .pay-qris-nominal-box {
  padding: 8px 14px;
}
#modal-payinfo .pay-qris-nominal {
  font-size: 18px;
}
#modal-payinfo .pay-wait {
  margin: 8px 0;
  font-size: 11px;
}
#modal-payinfo .pay-confirm {
  padding: 10px;
}

/* Countdown timer deposit pending */
.dep-timer {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.dep-timer-expired {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}
.pay-qris-expire {
  margin-top: 8px;
  text-align: center;
}
.pay-qris-expire .dep-timer {
  margin-left: 0;
  padding: 3px 12px;
  font-size: 12px;
}


/* ===== Referral ===== */
.btn-referral { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.btn-referral svg { width: 18px; height: 18px; }
.referral-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; }
.referral-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ref-stat { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 12px 10px; text-align: center; transition: border-color .2s ease; }
.ref-stat-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; line-height: 1.3; }
.ref-stat-value { display: block; font-size: 18px; font-weight: 800; color: var(--text); }
.ref-stat-value.pos { color: var(--up); }

/* Modal referral - lebar pas di tablet/desktop, full di HP */
#modal-referral .modal { max-width: 420px; width: 100%; }
@media (max-width: 480px) {
  #modal-referral .modal { max-width: none; }
  .referral-stats { gap: 8px; }
  .ref-stat { padding: 10px 8px; }
  .ref-stat-value { font-size: 16px; }
}

/* Card copy (link + template) - tap untuk copy */
.ref-copy-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background .2s ease, transform .1s ease;
  user-select: none;
  -webkit-user-select: none;
}
.ref-copy-card:active { transform: scale(0.99); background: rgba(255,255,255,0.06); }
.ref-copy-card.copied { border-color: var(--up, #00c076); background: rgba(0,192,118,0.06); }
.ref-copy-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.ref-copy-value {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
.ref-copy-value span {
  font-size: 13px; color: var(--text); word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ref-copy-icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.ref-copy-card.copied .ref-copy-icon { color: var(--up, #00c076); }
.ref-copy-feedback {
  position: absolute; top: 10px; right: 12px;
  font-size: 11px; font-weight: 700; color: var(--up, #00c076);
  background: rgba(0,192,118,0.12); padding: 3px 10px; border-radius: 999px;
}
.ref-template-text { font-size: 13px; line-height: 1.55; color: var(--text); margin: 0 0 10px; font-weight: 600; }
.referral-hint { font-size: 12px; color: var(--muted); line-height: 1.5; text-align: center; margin-top: 2px; }


/* Referral transfer */
.ref-transfer-box {
  background: rgba(0,192,118,0.05);
  border: 1px solid rgba(0,192,118,0.2);
  border-radius: 14px;
  padding: 14px;
}
.ref-transfer-info { font-size: 12px; color: var(--muted); margin: 6px 0 10px; line-height: 1.5; }
.ref-transfer-info b { color: var(--up, #00c076); }
.ref-transfer-row { display: flex; gap: 8px; }
.ref-transfer-row .form-input { flex: 1; min-width: 0; }
.ref-transfer-msg { font-size: 12px; margin-top: 8px; min-height: 16px; }
.ref-transfer-msg.ok { color: var(--up, #00c076); }
.ref-transfer-msg.err { color: #f85149; }
