:root {
  /* Exact AX BOT Trader Android Obsidian Black + Neon Cyan / Electric Light Blue Palette */
  --bg: #0b0e14;
  --navy: #111622;
  --surface: #151c28;
  --surface-2: #1c2536;
  --border: #263449;
  --accent: #00e5ff;
  --accent-blue: #0088ff;
  --accent-grad: linear-gradient(135deg, #00e5ff 0%, #0095ff 100%);
  --accent-soft: rgba(0, 229, 255, 0.13);
  --accent-glow: rgba(0, 229, 255, 0.28);
  /* Legacy alias mapped cleanly to Neon Cyan */
  --gold: var(--accent);
  --gold-soft: var(--accent-soft);
  --green: #00c087;
  --green-bg: rgba(0, 192, 135, 0.14);
  --red: #f6465d;
  --red-bg: rgba(246, 70, 93, 0.15);
  --amber: #ff9800;
  --amber-bg: rgba(255, 152, 0, 0.14);
  --text: #eaecef;
  --muted: #8a97ab;
  --radius: 18px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(620px 360px at 50% -60px, rgba(0, 229, 255, 0.11), transparent 72%),
    radial-gradient(480px 320px at 85% 18%, rgba(0, 136, 255, 0.08), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100%;
  overscroll-behavior-y: contain;
}

.hidden { display: none !important; }

.ptr-indicator {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  transition: height 0.2s ease;
}

.app-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 14px calc(88px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

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

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.18);
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.brand small {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

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

.btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.15s;
}
.btn:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-gold, .btn-accent {
  background: var(--accent-grad);
  color: #05111d;
  border: none;
  font-weight: 800;
  letter-spacing: 0.1px;
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.24);
}
.btn-gold:hover:not(:disabled), .btn-accent:hover:not(:disabled) {
  box-shadow: 0 8px 26px rgba(0, 229, 255, 0.38);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border-color: rgba(246, 70, 93, 0.4);
}
.btn-green {
  background: var(--green-bg);
  color: var(--green);
  border-color: rgba(0, 192, 135, 0.4);
}
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 9px; }
.btn-full { width: 100%; }

.card {
  background: rgba(21, 28, 40, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
}

.card-title {
  margin: 0 0 11px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 600px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stat-box {
  background: linear-gradient(180deg, rgba(28, 37, 54, 0.92), rgba(18, 24, 36, 0.96));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
}
.stat-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.stat-val { font-size: 19px; font-weight: 800; }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gold, .badge-cyan { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(0, 229, 255, 0.24); }

.banner {
  border-radius: 13px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid;
}
.banner-warn {
  background: var(--amber-bg);
  border-color: rgba(255, 152, 0, 0.45);
  color: #fde68a;
}
.banner-danger {
  background: var(--red-bg);
  border-color: rgba(246, 70, 93, 0.45);
  color: #fecdd3;
}

.field { margin-bottom: 13px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.input {
  width: 100%;
  background: rgba(11, 14, 20, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.14);
}

.risk-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.risk-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  height: 6px;
}
.risk-row .risk-num {
  width: 92px;
  text-align: center;
  font-weight: 700;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.switch-row:first-of-type { border-top: none; padding-top: 0; }

.toggle {
  width: 44px;
  height: 24px;
  accent-color: var(--accent);
  cursor: pointer;
}

.pos-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.pos-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.pos-sym { font-size: 15px; font-weight: 800; }
.pos-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.pos-meta strong { display: block; color: var(--text); font-size: 13px; margin-top: 2px; }

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold, .text-cyan { color: var(--accent); }
.text-muted { color: var(--muted); }

/* --- Sleek Auth Screen (Obsidian Black + Electric Cyan Glow) --- */
.auth-wrap {
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  padding: 36px 16px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo-frame {
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  border-radius: 26px;
  padding: 4px;
  background: linear-gradient(145deg, rgba(0, 229, 255, 0.55), rgba(0, 136, 255, 0.18));
  box-shadow: 0 0 36px rgba(0, 229, 255, 0.24), 0 14px 30px rgba(0, 0, 0, 0.55);
}

.auth-logo-frame img {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
  display: block;
}

.auth-logo h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.4px;
}
.auth-logo h1 span {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-logo p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-card {
  position: relative;
  border-color: rgba(0, 229, 255, 0.24);
  background: linear-gradient(180deg, rgba(22, 30, 44, 0.94), rgba(14, 19, 29, 0.96));
  padding: 22px 20px;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--accent-grad);
  border-radius: 999px;
  opacity: 0.75;
}

.google-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.google-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
}

.google-btn-shell {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.google-btn-shell:hover {
  border-color: rgba(0, 229, 255, 0.65);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.22);
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 18px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 14, 20, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 229, 255, 0.16);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-btn span.ico { font-size: 17px; }
.nav-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 100;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  max-width: 92vw;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 80;
}
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 20px;
  padding: 20px;
}
.ip-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
}
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.list-row:last-child { border-bottom: none; }
