﻿:root {
  --bg: #0b1220;
  --bg-soft: #111a2e;
  --card: #141f36;
  --card-2: #182646;
  --border: #1f2c47;
  --text: #e8eefb;
  --text-dim: #93a3c3;
  --accent: #22d3a7;
  --accent-dark: #16a179;
  --blue: #1b9ff5;
  --danger: #ff5d6c;
  --warning: #f5b942;
  --radius: 14px;
  --font: "Tajawal", "Segoe UI", "Noto Sans Arabic", "Cairo", "Amiri", Tahoma, Arial, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.light {
  --bg: #eef2f9;
  --bg-soft: #e2e8f2;
  --card: #ffffff;
  --card-2: #f4f7fd;
  --border: #d5ddee;
  --text: #12203c;
  --text-dim: #64748f;
  --shadow: 0 10px 30px rgba(15, 40, 90, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(34, 211, 167, 0.14), transparent 60%),
    radial-gradient(900px 400px at -10% 110%, rgba(27, 159, 245, 0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.8;
  direction: rtl;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  word-spacing: normal;
  letter-spacing: normal;
}

body.light {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(34, 211, 167, 0.18), transparent 60%),
    radial-gradient(900px 400px at -10% 110%, rgba(27, 159, 245, 0.15), transparent 60%),
    var(--bg);
}

.app {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 0px) 20px calc(env(safe-area-inset-bottom) + 24px);
  display: flex;
  flex-direction: column;
}

/* ===== Top bar ===== */
.topbar {
  padding: 16px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #06121f;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 6px 18px rgba(34, 211, 167, 0.35);
}

.brand-name {
  font-size: 19px;
  font-weight: 500;
}

.brand-name b {
  font-weight: 700;
  color: var(--accent);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}

.icon-btn:active { transform: scale(0.94); }

/* ===== Auth section ===== */
.auth {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 0 8px;
}

.auth-hero h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.5;
}

.auth-hero p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 22px;
}

/* ===== Form ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.field .hint {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 11px;
  opacity: 0.8;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder { color: var(--text-dim); opacity: 0.6; }

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 167, 0.15);
}

.field select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 167, 0.15);
}

.field input.error-input { border-color: var(--danger); }

.field input[readonly] {
  background: var(--bg-soft);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: default;
}

.field input[readonly]:focus {
  border-color: var(--border);
  box-shadow: none;
}

.input-group { position: relative; }

.input-group input { padding-left: 50px; }

.input-group input[dir="ltr"] { padding-left: 50px; padding-right: 16px; }

.toggle-pass {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  border-radius: 10px;
}

.toggle-pass:active { background: var(--bg-soft); }

.error {
  font-size: 12px;
  color: var(--danger);
  min-height: 0;
}

/* ===== Rows ===== */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-dim);
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.link:active { opacity: 0.7; }

/* ===== Buttons ===== */
.btn {
  width: 100%;
  height: 52px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #06121f;
  box-shadow: 0 8px 22px rgba(34, 211, 167, 0.3);
  margin-top: 4px;
}

.btn-primary:hover { background: linear-gradient(135deg, var(--accent-dark), #1579d8); }

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-social {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
}

.btn-social:active { background: var(--bg-soft); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  font-weight: 700;
}

.btn-danger {
  background: rgba(255, 93, 108, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 93, 108, 0.4);
}

.btn-sm { height: 44px; font-size: 14px; }

/* ===== Switch + divider ===== */
.switch {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  margin: 18px 0 4px;
}

.switch a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  margin: 12px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.terms {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 16px;
}

.terms a,
.terms-check a { color: var(--accent); text-decoration: none; }

.terms-check { font-size: 12px; align-items: flex-start; padding: 4px 0; }

.terms-check span { line-height: 1.7; }

/* ===== OTP ===== */
.otp-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0 4px;
}

.otp-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 24px;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 8px;
  direction: ltr;
  margin-bottom: 20px;
}

.otp-inputs input {
  width: 48px;
  height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--accent);
  font-family: var(--font);
}

.otp-inputs input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 167, 0.15);
}

.otp-inputs input.error-input { border-color: var(--danger); }

.otp-timer {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 16px;
}

.otp-timer button {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.otp-timer button:disabled { color: var(--text-dim); cursor: not-allowed; }

.demo-code {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(34, 211, 167, 0.1);
  border: 1px dashed var(--accent);
  color: var(--accent);
  font-size: 13px;
  text-align: center;
}

.demo-code b { letter-spacing: 3px; font-size: 16px; }

/* ===== Cards / Dashboard ===== */
.dash-hello { margin-bottom: 16px; }

.dash-hello h1 { font-size: 24px; font-weight: 700; }

.dash-hello p { color: var(--text-dim); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.balance-card {
  background: linear-gradient(135deg, #16a179, #1b9ff5);
  color: #06121f;
  border: none;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.balance-card .label { font-size: 13px; font-weight: 500; opacity: 0.8; }

.balance-card .value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance-card .eyeball {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 16px;
  cursor: pointer;
}

/* ===== Daily trading start (inside balance card) ===== */
.trade-start {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 12px;
  background: rgba(6, 18, 31, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.trade-start-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.trade-start-ico { font-size: 20px; }

.trade-start-main { flex: 1; min-width: 0; }

.trade-start-main b { display: block; font-size: 14px; color: #fff; }

.trade-start-main small { font-size: 11px; color: rgba(255, 255, 255, 0.75); line-height: 1.5; }

.trade-start-amt {
  font-size: 15px;
  font-weight: 700;
  color: #a7f3d0;
  white-space: nowrap;
}

.row { display: flex; align-items: center; justify-content: space-between; }

.row h3 { font-size: 15px; font-weight: 700; }

.row p { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.switch-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.switch-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.switch-toggle.active { background: var(--accent); }

.switch-toggle.active::after { transform: translateX(22px); }

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

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.stat .s-label { font-size: 12px; color: var(--text-dim); }

.stat .s-value { font-size: 18px; font-weight: 700; margin-top: 2px; }

.stat .s-value.up { color: var(--accent); }
.stat .s-value.down { color: var(--danger); }

.info-list { font-size: 14px; }

.info-list .row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.info-list .k { color: var(--text-dim); font-size: 13px; }

.info-list .v { font-weight: 700; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge.ok { background: rgba(34, 211, 167, 0.15); color: var(--accent); }

.badge.off { background: rgba(255, 93, 108, 0.12); color: var(--danger); }
.badge.dim { background: rgba(147, 163, 195, 0.14); color: var(--text-dim); }
.badge.warn { background: rgba(245, 185, 66, 0.15); color: var(--warning); }

/* --- USDT wallet --- */
.usdt-box {
  background: var(--card-2);
  border: 1px dashed rgba(27, 159, 245, 0.4);
  border-radius: 12px;
  padding: 12px;
}
.usdt-addr {
  direction: ltr;
  text-align: center;
  font-family: "Segoe UI", monospace;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 8px;
  margin-top: 8px;
  word-break: break-all;
  color: var(--blue);
}
.usdt-note {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.7;
}
.proof-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 6px;
  background: var(--bg);
}

.actions-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

/* ===== Risk page ===== */
.risk-box {
  background: var(--card);
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  padding: 18px;
}

.risk-box h2 {
  color: var(--warning);
  font-size: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-box ul {
  list-style: none;
  font-size: 14px;
}

.risk-box li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-dim);
  line-height: 1.7;
}

.risk-box li:last-child { border-bottom: none; }

.risk-box li b { color: var(--text); }

/* ===== Success page ===== */
.success-icon {
  width: 84px;
  height: 84px;
  margin: 10px auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 40px;
  background: rgba(34, 211, 167, 0.15);
  border: 2px solid var(--accent);
}

.success-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.success-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ===== Demo accounts ===== */
.demo-accounts h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.demo-accounts .demo-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.demo-hint b { color: var(--accent); }

.demo-account {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  text-align: right;
  transition: border-color 0.2s, transform 0.1s;
}

.demo-account:active { transform: scale(0.98); border-color: var(--accent); }

.demo-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #06121f;
  font-weight: 700;
  font-size: 16px;
}

.demo-account b { display: block; font-size: 14px; }

.demo-account small { color: var(--text-dim); font-size: 11px; }

/* ===== Quick actions ===== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.quick-actions .qa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.1s;
}

.quick-actions .qa:active { transform: scale(0.96); border-color: var(--accent); }

.quick-actions .qa span { font-size: 20px; }

.quick-actions .qa small { font-size: 11px; color: var(--text-dim); font-weight: 700; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 80px);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 100;
  max-width: 90%;
  text-align: center;
}

.toast.show { transform: translate(-50%, 0); opacity: 1; }

.toast.success { border-color: var(--accent); }

.toast.error { border-color: var(--danger); }

/* ===== PWA install button ===== */
#pwaInstallBtn {
  position: fixed;
  bottom: 84px;
  right: 16px;
  background: linear-gradient(135deg, #f0b90b, #ffd65a);
  color: #0b1220;
  border: none;
  padding: 12px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(240, 185, 11, 0.4);
  cursor: pointer;
  z-index: 150;
  animation: pwaPulse 2.2s infinite;
}
#pwaInstallBtn:hover { transform: scale(1.04); }
@keyframes pwaPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(240, 185, 11, 0.4); }
  50% { box-shadow: 0 6px 26px rgba(240, 185, 11, 0.75); }
}
body.light #pwaInstallBtn { background: linear-gradient(135deg, #e6a800, #ffd65a); }
@media (min-width: 640px) { #pwaInstallBtn { right: auto; left: 16px; } }


/* ===== Real-time notifications ===== */
#notifStack {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(94vw, 360px);
  z-index: 120;
  pointer-events: none;
}

.notif-card {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: 4px solid var(--accent);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 0.3s, transform 0.3s;
}

.notif-card.in { opacity: 1; transform: translateY(0); }

.notif-card.notif-negative { border-right-color: var(--danger); }

.notif-ico { font-size: 22px; line-height: 1.2; }

.notif-body { flex: 1; min-width: 0; }

.notif-body b { display: block; font-size: 13.5px; color: var(--text); }

.notif-body p { margin: 2px 0 4px; font-size: 12px; color: var(--text-dim); line-height: 1.5; }

.notif-body small { font-size: 10.5px; color: var(--text-dim); opacity: 0.7; }

.notif-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
}

.notif-close:hover { color: var(--danger); }

/* ===== Notification bell + panel ===== */
.bell-wrap { position: relative; }

.bell-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--card);
}

.notif-panel {
  position: absolute;
  top: 46px;
  inset-inline-end: 0;
  width: min(92vw, 340px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 130;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.notif-panel-head span { font-size: 11px; color: var(--accent); font-weight: 700; }

.notif-list { overflow-y: auto; max-height: 55vh; }

.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.notif-item:last-child { border-bottom: none; }

.notif-item.unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }

.notif-item-ico { font-size: 18px; line-height: 1.3; }

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-body b { display: block; font-size: 12.5px; color: var(--text); }

.notif-item-body p { margin: 2px 0 3px; font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }

.notif-item-body small { font-size: 10px; color: var(--text-dim); opacity: 0.7; }

.notif-item.unread b::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-inline-start: 6px;
  vertical-align: 1px;
}

.notif-empty { padding: 26px 14px; text-align: center; color: var(--text-dim); font-size: 12.5px; }

.hidden { display: none !important; }

/* ===== App pages (with bottom nav) ===== */
.app.app-nav { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }

.main-content { flex: 1; }

/* ===== Bottom navigation ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(66px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(13, 20, 36, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 90;
}

body.light .bottom-nav { background: rgba(255, 255, 255, 0.92); }

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-item .nav-icon {
  font-size: 21px;
  line-height: 1;
  filter: grayscale(0.6);
  opacity: 0.85;
  transition: filter 0.2s, opacity 0.2s, transform 0.2s;
}

.nav-item.active { color: var(--accent); font-weight: 700; }

.nav-item.active .nav-icon {
  filter: none;
  opacity: 1;
  transform: translateY(-2px);
}

/* ===== Markets ===== */
.search-box {
  position: relative;
  margin-bottom: 14px;
}

.search-box input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-box .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 16px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip.active {
  background: rgba(34, 211, 167, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Status chips (non-clickable) --- */
.status-chip {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.status-chip.ok { color: #2fd17c; border-color: rgba(47, 209, 124, 0.4); background: rgba(47, 209, 124, 0.08); }
.status-chip.no { color: var(--danger); border-color: rgba(255, 92, 122, 0.4); background: rgba(255, 92, 122, 0.08); }
.status-chip.wait { color: #f5b94a; border-color: rgba(245, 185, 74, 0.4); background: rgba(245, 185, 74, 0.08); }

/* --- Agent charge mini list --- */
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}
.mini-row .sub { color: var(--text-dim); font-size: 11px; margin-top: 3px; }

.asset-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.asset-symbol {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #06121f;
  background: linear-gradient(135deg, var(--accent), var(--blue));
}

.asset-info { flex: 1; min-width: 0; }

.asset-info b { display: block; font-size: 14px; }

.asset-info small { color: var(--text-dim); font-size: 11px; }

.asset-price { text-align: left; }

.asset-price .p { display: block; font-weight: 700; font-size: 14px; direction: ltr; }

.asset-price .c { font-size: 11.5px; font-weight: 700; direction: ltr; }

.asset-price .c.up { color: var(--accent); }
.asset-price .c.down { color: var(--danger); }

.fav-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--warning);
  border-radius: 10px;
}

.fav-btn:active { background: var(--bg-soft); }

/* ===== Trade ===== */
.trade-type {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.trade-type button {
  flex: 1;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.trade-type button.buy.active {
  background: rgba(34, 211, 167, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.trade-type button.sell.active {
  background: rgba(255, 93, 108, 0.13);
  border-color: var(--danger);
  color: var(--danger);
}

.trade-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.trade-summary .s-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.trade-summary .s-cell .sl { font-size: 11px; color: var(--text-dim); }

.trade-summary .s-cell .sv { font-size: 16px; font-weight: 700; margin-top: 2px; }

.trade-summary .s-cell .sv.margin { color: var(--warning); }

/* ===== Team ===== */
.team-hero {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  margin-bottom: 14px;
}

.team-hero h2 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }

.team-hero p { font-size: 12.5px; color: var(--text-dim); margin-bottom: 12px; }

.ref-code {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.ref-code code {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 8px 18px;
  direction: ltr;
}

.copy-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}

.copy-btn:active { transform: scale(0.94); }

.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.team-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.team-stat .n { font-size: 18px; font-weight: 700; color: var(--accent); }

.team-stat .l { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 9px;
}

/* ===== Profile ===== */
.profile-banner {
  background: linear-gradient(135deg, rgba(34, 211, 167, 0.22), rgba(27, 159, 245, 0.22)), var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 16px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}

.profile-banner::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 167, 0.3), transparent 70%);
}

.profile-banner::after {
  content: "";
  position: absolute;
  bottom: -50px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 159, 245, 0.3), transparent 70%);
}

.profile-banner > * { position: relative; }

.profile-avatar-wrap {
  display: inline-block;
  position: relative;
}

.profile-avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
  color: #06121f;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: 0 8px 22px rgba(34, 211, 167, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.25);
}

.profile-online {
  position: absolute;
  bottom: 6px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--card);
}

.edit-profile-btn {
  position: absolute;
  top: -4px;
  left: -6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--card);
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.profile-banner h2 { font-size: 19px; font-weight: 700; }

.profile-banner .uname { color: var(--text-dim); font-size: 13px; }

.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(34, 211, 167, 0.12);
  border: 1px solid rgba(34, 211, 167, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.profile-stats .ps {
  flex: 1;
  max-width: 110px;
  background: rgba(11, 18, 32, 0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 6px;
}

body.light .profile-stats .ps { background: rgba(255, 255, 255, 0.5); }

.profile-stats .ps .n { font-size: 17px; font-weight: 700; color: var(--text); }

.profile-stats .ps .l { font-size: 10.5px; color: var(--text-dim); }

.profile-list .row {
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
}

.profile-list .row:last-child { border-bottom: none; }

.profile-list .k { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }

.profile-list .k span { font-size: 18px; }

.profile-list .v { color: var(--text-dim); font-size: 13px; display: flex; align-items: center; gap: 8px; }

.profile-list .v .copy-sm {
  border: none;
  background: var(--card-2);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.section-sub-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 2px 10px;
  font-size: 14px;
  font-weight: 700;
}

.section-sub-title .bar {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--blue));
}

.setting-card .row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting-card .row:last-child { border-bottom: none; }
.setting-card .k { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; }
.setting-card .k .s-ico {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: var(--card-2);
  border: 1px solid var(--border);
}
.setting-card .k small { display: block; font-weight: 400; color: var(--text-dim); font-size: 11px; margin-top: 2px; }

/* ===== Modal / Sheet ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 18px 20px calc(env(safe-area-inset-bottom) + 20px);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  margin: 0 auto 14px;
}

.modal-sheet h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; text-align: center; }

@media (min-width: 480px) {
  .auth-hero h1 { font-size: 30px; }
}

/* ============================================================
   POLISH / ENHANCEMENTS
   ============================================================ */

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* --- Entrance animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.85); }
  70% { transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 22px rgba(34, 211, 167, 0.25); }
  50% { box-shadow: 0 8px 28px rgba(34, 211, 167, 0.45); }
}

.main-content > * ,
.auth > * {
  animation: fadeUp 0.45s ease both;
}

.main-content > *:nth-child(2) { animation-delay: 0.05s; }
.main-content > *:nth-child(3) { animation-delay: 0.1s; }
.main-content > *:nth-child(4) { animation-delay: 0.15s; }
.main-content > *:nth-child(5) { animation-delay: 0.2s; }

.asset-row, .card, .member-row, .demo-account {
  animation: fadeUp 0.4s ease both;
}

/* --- Sticky topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: 12px;
}

body.light .topbar { background: color-mix(in srgb, #eef2f9 82%, transparent); }

/* --- Buttons hover --- */
.btn { transition: transform 0.12s, opacity 0.2s, background 0.2s, box-shadow 0.2s; }

.btn-primary:hover {
  box-shadow: 0 10px 26px rgba(34, 211, 167, 0.4);
  transform: translateY(-1px);
}

/* --- Bottom nav active pill --- */
.nav-item {
  position: relative;
}

.nav-item .nav-icon {
  transition: transform 0.2s, filter 0.2s, opacity 0.2s;
}

.nav-item.active .nav-icon {
  transform: translateY(-3px);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 4px;
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

/* --- Toast with icon --- */
.toast { display: flex; align-items: center; justify-content: center; gap: 8px; }

.toast::before { font-size: 18px; }

.toast.success::before { content: "✅"; }
.toast.error::before { content: "⚠️"; }

/* --- Password strength meter --- */
.strength { margin-top: 6px; }

.strength-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.strength-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--danger);
  transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

/* --- Section header --- */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 2px 10px;
}

.section-title h2 { font-size: 16px; font-weight: 700; }

.section-title .meta { font-size: 11.5px; color: var(--text-dim); }

/* --- Empty states --- */
.empty-state {
  text-align: center;
  padding: 34px 16px;
  color: var(--text-dim);
}

/* --- Daily profit button (inside balance card) --- */
.profit-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 167, 0.45);
  background: linear-gradient(135deg, rgba(34, 211, 167, 0.16), rgba(34, 211, 167, 0.05));
  color: var(--text);
  cursor: pointer;
  text-align: right;
  transition: border-color 0.2s, transform 0.1s;
}

.profit-btn:active { transform: scale(0.98); }

.profit-btn:disabled { opacity: 0.55; cursor: default; }

body.light .profit-btn { background: rgba(34, 211, 167, 0.1); }

.profit-ico {
  font-size: 19px;
  flex-shrink: 0;
}

.profit-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profit-main b { font-size: 13px; font-weight: 700; }

.profit-main small {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profit-amt {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

/* --- Announcements --- */
.ann-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s;
}

.ann-mini:hover { border-color: var(--warning); }

.ann-mini-pin {
  font-size: 17px;
  flex-shrink: 0;
}

.ann-mini-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ann-mini-main b {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ann-mini-main small {
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ann-mini-arrow {
  color: var(--warning);
  font-size: 13px;
  flex-shrink: 0;
}

.ann-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.ann-card.pinned {
  border-color: var(--warning);
  box-shadow: 0 0 0 1px var(--warning), 0 10px 30px rgba(0, 0, 0, 0.4);
}

.ann-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.ann-pin {
  font-size: 11px;
  font-weight: 700;
  color: var(--warning);
  background: rgba(245, 185, 66, 0.12);
  border: 1px solid rgba(245, 185, 66, 0.35);
  padding: 2px 9px;
  border-radius: 999px;
}

.ann-date {
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
}

.ann-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
}

.ann-body {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-top: 6px;
  white-space: pre-line;
}

.ann-img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.empty-state .icon { font-size: 42px; margin-bottom: 10px; display: block; }

.empty-state p { font-size: 13.5px; }

/* --- Skeleton shimmer (loading) --- */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 12px;
  height: 70px;
  margin-bottom: 10px;
}

/* --- Balance card decoration --- */
.balance-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #10b981 0%, #0ea5e9 55%, #6366f1 100%);
  border: none;
  border-radius: 18px;
  color: #fff;
  padding: 20px;
  animation: pulseGlow 3s ease-in-out infinite;
}

.balance-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.28), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(0, 0, 0, 0.15), transparent 50%);
  pointer-events: none;
}

.balance-card > * { position: relative; }

.balance-card .label { color: rgba(255, 255, 255, 0.85); }
.balance-card .value { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); }
.balance-card .value .unit { color: rgba(255, 255, 255, 0.9); font-size: 14px; }

/* --- Flash highlight (price change) --- */
.flash-up { animation: popIn 0.5s ease; color: var(--accent) !important; }
.flash-down { animation: popIn 0.5s ease; color: var(--danger) !important; }

/* --- Copy button feedback --- */
.copy-btn.done { border-color: var(--accent); color: var(--accent); }

/* --- Countdown --- */
.otp-countdown-ring {
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  color: var(--accent);
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Larger tap targets --- */
button, .nav-item { touch-action: manipulation; }

/* --- Market strip (login hero) --- */
.market-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  margin-bottom: 6px;
  scrollbar-width: none;
}

.market-strip::-webkit-scrollbar { display: none; }

.market-strip .ms-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
}

.market-strip .ms-item b { font-size: 15px; }

.market-strip .ms-item small { font-size: 12px; font-weight: 700; color: var(--text); }

.market-strip .ms-item em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  direction: ltr;
}

.market-strip .ms-item em.up { color: var(--accent); }
.market-strip .ms-item em.down { color: var(--danger); }

/* --- Investment packages --- */
.packages-list { display: flex; flex-direction: column; gap: 14px; }

.pkg-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pkg-balance-btn {
  background: rgba(255, 255, 255, 0.22);
  color: #06121f;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 15px;
  border-radius: 11px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.pkg-balance-btn:hover { background: rgba(255, 255, 255, 0.35); }

.pkg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.pkg-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}
.pkg-stat span { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 3px; }
.pkg-stat b { font-size: 15px; font-weight: 700; }

.pkg-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.pkg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 167, 0.4);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.pkg-hero {
  position: relative;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 167, 0.3), rgba(27, 159, 245, 0.18) 55%, rgba(13, 22, 36, 0.35));
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.pkg-hero-glow {
  position: absolute;
  top: -70px;
  left: -40px;
  width: 190px;
  height: 190px;
  background: radial-gradient(circle, rgba(34, 211, 167, 0.35), transparent 70%);
  pointer-events: none;
}
.pkg-hero-orb {
  position: absolute;
  bottom: -55px;
  right: -35px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 167, 0.25);
  pointer-events: none;
}
.pkg-hero-row { position: relative; display: flex; align-items: center; gap: 12px; }
.pkg-ico {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  background: rgba(6, 18, 31, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.pkg-hero-txt { min-width: 0; }
.pkg-hero-txt b { display: block; font-size: 17px; font-weight: 800; line-height: 1.3; }
.pkg-hero-txt small {
  display: block;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pkg-flag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #06121f;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 6px;
}
.pkg-hero-profit {
  position: relative;
  margin-top: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.pkg-profit-num {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #4af3bd, #4db8ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 14px rgba(34, 211, 167, 0.35));
}
.pkg-profit-num span { font-size: 20px; font-weight: 800; }
.pkg-profit-label { font-size: 11px; color: var(--text-dim); text-align: left; line-height: 1.5; padding-bottom: 4px; }

.pkg-body { padding: 14px 16px 16px; }
.pkg-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pkg-meta div { text-align: center; }
.pkg-meta span { display: block; font-size: 10.5px; color: var(--text-dim); margin-bottom: 3px; }
.pkg-meta b { display: block; font-size: 13px; font-weight: 700; }
.pkg-meta b small { font-size: 10px; color: var(--text-dim); font-weight: 400; }
.pkg-meta-bar {
  margin: 12px 0 14px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.pkg-meta-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 0.5s ease;
}

.pkg-expected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(34, 211, 167, 0.08);
  border: 1px solid rgba(34, 211, 167, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 13px;
}
.pkg-expected span { display: block; font-size: 11.5px; color: var(--text-dim); }
.pkg-vip-note { display: block; font-size: 10px; color: var(--accent); font-weight: 600; margin-top: 2px; }
.pkg-expected b { font-size: 16px; font-weight: 800; color: var(--accent); white-space: nowrap; }

.pkg-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pkg-price { display: flex; align-items: baseline; gap: 5px; }
.pkg-price b { font-size: 22px; font-weight: 900; }
.pkg-price small { font-size: 11.5px; color: var(--text-dim); }
.pkg-btn {
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  color: #06121f;
  background: linear-gradient(135deg, #2fd19c, #1fa0f5);
  padding: 11px 22px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(34, 211, 167, 0.3);
  transition: transform .12s, box-shadow .12s, filter .12s;
  flex-shrink: 0;
}
.pkg-btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.pkg-btn:active { transform: translateY(0); }
.pkg-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.6); }

.pkg-card.featured {
  border-color: rgba(245, 185, 66, 0.5);
  box-shadow: 0 10px 30px rgba(245, 185, 66, 0.14);
}
.pkg-card.featured .pkg-hero {
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.32), rgba(245, 140, 66, 0.16) 55%, rgba(13, 22, 36, 0.35));
}
.pkg-card.featured .pkg-hero-glow { background: radial-gradient(circle, rgba(245, 185, 66, 0.4), transparent 70%); }
.pkg-card.featured .pkg-hero-orb { border-color: rgba(245, 185, 66, 0.3); }
.pkg-card.featured .pkg-profit-num {
  background: linear-gradient(135deg, #ffd479, #ff9d4d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 14px rgba(245, 185, 66, 0.4));
}
.pkg-card.featured .pkg-flag { background: linear-gradient(135deg, #ffd479, #ff9d4d); }

body.light .pkg-hero {
  background: linear-gradient(135deg, rgba(34, 211, 167, 0.35), rgba(27, 159, 245, 0.25) 55%, rgba(13, 22, 36, 0.05));
  border-bottom-color: rgba(13, 22, 36, 0.08);
}
body.light .pkg-card.featured .pkg-hero {
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.38), rgba(245, 140, 66, 0.2) 55%, rgba(13, 22, 36, 0.05));
}
body.light .pkg-ico {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(13, 22, 36, 0.15);
  box-shadow: 0 6px 18px rgba(13, 22, 36, 0.12);
}
body.light .pkg-meta-bar { background: rgba(13, 22, 36, 0.1); }

.pkg-empty { text-align: center; color: var(--text-dim); padding: 30px 0; }

.pkg-skeleton {
  height: 250px;
  background: linear-gradient(100deg, var(--card) 40%, var(--card-2) 50%, var(--card) 60%);
  background-size: 200% 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  animation: pkgShimmer 1.4s ease infinite;
}
@keyframes pkgShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- VIP system --- */
.vip-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(34, 211, 167, 0.07);
}

.vip-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.vip-card {
  background: linear-gradient(135deg, rgba(34, 211, 167, 0.12), rgba(13, 22, 36, 0.4));
  border: 1px solid rgba(34, 211, 167, 0.35);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.vip-head { display: flex; align-items: center; gap: 12px; }
.vip-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.vip-info b { display: block; font-size: 16px; }
.vip-sub { font-size: 12px; color: var(--text-dim); display: block; margin-top: 2px; }
.vip-progress { margin-top: 12px; }
.vip-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.vip-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.5s ease; }
.vip-progress-txt { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-dim); }
.vip-perks { margin-top: 10px; font-size: 12.5px; color: var(--accent); font-weight: 600; }

.vip-ladder { padding: 14px; }
.ladder-title { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.ladder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
  border: 1px solid transparent;
}
.ladder-row.current { border-color: var(--accent); background: rgba(34, 211, 167, 0.07); }
.ladder-row.locked { opacity: 0.45; }
.ladder-ico {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border-radius: 9px;
  flex-shrink: 0;
}
.ladder-mid { flex: 1; }
.ladder-mid b { display: block; font-size: 13px; }
.ladder-mid small { font-size: 11px; color: var(--text-dim); display: block; margin-top: 1px; }
.ladder-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.team-vip-wrap { margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.member-vip { font-size: 12px; }
.vip-bonus { color: var(--accent); font-size: 10.5px; font-weight: 600; }

/* --- My investments (home) --- */
.inv-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.inv-stats { display: flex; align-items: stretch; padding: 15px 6px 13px; }
.inv-stat { flex: 1; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.inv-stat b { font-size: 17px; font-weight: 800; letter-spacing: 0.2px; }
.inv-stat b.pos { color: var(--accent); }
.inv-stat span { font-size: 11px; color: var(--text-dim); }
.inv-div { width: 1px; background: var(--border); margin: 4px 0; flex-shrink: 0; }
.inv-list { border-top: 1px dashed var(--border); padding: 0 14px; }
.inv-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.inv-row:last-child { border-bottom: none; }
.inv-ico {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 167, 0.35);
  background: linear-gradient(135deg, rgba(34, 211, 167, 0.16), rgba(34, 211, 167, 0.04));
}
.inv-row:nth-child(3n+2) .inv-ico {
  border-color: rgba(27, 159, 245, 0.35);
  background: linear-gradient(135deg, rgba(27, 159, 245, 0.16), rgba(27, 159, 245, 0.04));
}
.inv-row:nth-child(3n+3) .inv-ico {
  border-color: rgba(245, 185, 66, 0.4);
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.16), rgba(245, 185, 66, 0.04));
}
.inv-main { flex: 1; min-width: 0; }
.inv-main b { display: block; font-size: 13.5px; font-weight: 700; }
.inv-main small { display: block; font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.inv-main small .up { color: var(--accent); font-weight: 700; }
.inv-end { text-align: left; flex-shrink: 0; }
.inv-end b { display: block; font-size: 13.5px; font-weight: 700; }
.inv-end small { display: block; font-size: 11px; margin-top: 2px; }
.inv-end small.pos { color: var(--accent); font-weight: 700; }

.empty-inv {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.empty-inv span { font-size: 28px; }

.pos { color: var(--accent); }
.neg { color: var(--danger); }

/* ===== i18n ===== */
.icon-btn.lang-toggle {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent);
  padding: 0 10px;
  min-width: 40px;
}
html[dir="ltr"] body { direction: ltr; }
html[dir="ltr"] .ann-mini-arrow { transform: scaleX(-1); }
html[dir="ltr"] #username { text-align: left !important; }
html[dir="ltr"] #fullName, html[dir="ltr"] #phone { text-align: left; }
html[dir="ltr"] .otp-sub { direction: ltr; }
html[dir="ltr"] .team-vip-wrap small { direction: ltr; }
html[dir="ltr"] .divider span { direction: ltr; }


