@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --primary: #14b8a6;
  --primary-dark: #0d9488;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-elevated: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --success: #22c55e;
  --danger: #ef4444;
  --sidebar-w: 260px;
  --bottom-h: 64px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6,.font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.sidebar {
  width: var(--sidebar-w);
  background: #0f172a;
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 1040;
  overflow-y: auto;
}
.sidebar .logo {
  padding: 1.35rem 1.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.sidebar .logo span { color: var(--primary); }
.sidebar .nav-link {
  color: var(--text-muted);
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #fff;
  background: rgba(20, 184, 166, 0.12);
  border-left-color: var(--primary);
}
.sidebar .nav-link.active i { color: var(--primary); }

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding-bottom: 2rem;
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-h);
  background: #0f172a;
  border-top: 1px solid var(--border);
  z-index: 1050;
  justify-content: space-around;
  align-items: center;
  margin: 0; padding: 0;
}
.bottom-nav .nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.5rem 0;
  text-decoration: none;
  height: 100%;
  max-width: 80px;
}
.bottom-nav .nav-link i { font-size: 1.25rem; }
.bottom-nav .nav-link.active,
.bottom-nav .nav-link.active i { color: var(--primary); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.stat-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}
.stat-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}
.stat-card .label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 10px;
}
.btn-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}
.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  border-radius: 10px;
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}

.text-profit { color: var(--success) !important; }
.text-loss { color: var(--danger) !important; }
.text-primary { color: var(--primary) !important; }

.table-dark {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
}
.table-dark th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.top-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.form-control, .form-select {
  background: #0f172a !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  border-radius: 10px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2) !important;
}

.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
.goog-te-gadget { font-size: 0 !important; }
.goog-te-gadget .goog-te-combo {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.8rem !important;
}

@media (max-width: 991.98px) {
  .sidebar { display: none !important; }
  .main-content {
    margin-left: 0 !important;
    padding-bottom: calc(var(--bottom-h) + 12px);
  }
  .bottom-nav { display: flex !important; }
  .desktop-only { display: none !important; }
}
@media (min-width: 992px) {
  .mobile-only { display: none !important; }
  .bottom-nav { display: none !important; }
}


/* Fix mobile nav clickability */
.bottom-nav {
  z-index: 1080 !important;
  pointer-events: auto !important;
}
.bottom-nav .nav-link {
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
  -webkit-tap-highlight-color: rgba(20,184,166,0.3);
}
.offcanvas {
  z-index: 1090 !important;
}
.offcanvas-backdrop {
  z-index: 1085 !important;
}
.offcanvas .nav-link {
  display: block !important;
  width: 100%;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
  cursor: pointer !important;
  color: #e2e8f0 !important;
  text-decoration: none !important;
  padding: 0.85rem 1.25rem !important;
  border: none;
  background: transparent;
}
.offcanvas .nav-link:active,
.offcanvas .nav-link:hover {
  background: rgba(20, 184, 166, 0.12) !important;
  color: #fff !important;
}
.top-bar {
  z-index: 1070 !important;
  position: sticky;
}
.top-bar button,
.top-bar a {
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}
/* Google translate can overlay - push it back */
#google_translate_element,
.goog-te-gadget,
.skiptranslate {
  z-index: 1 !important;
  max-width: 120px;
  overflow: hidden;
}

.lux-hero {
  background: linear-gradient(160deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 1.1rem 1.15rem 0.8rem;
}
.lux-balance {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.lux-chart { width: 100%; height: 70px; display: block; }
.lux-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; background: #1e293b; border: 1px solid #334155; border-radius: 14px;
  color: #e2e8f0; text-decoration: none; min-height: 78px; font-size: 0.72rem; font-weight: 600;
}
.lux-action i { font-size: 1.35rem; color: #14b8a6; }
.trader-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.trader-mini {
  min-width: 132px; background: #1e293b; border: 1px solid #334155; border-radius: 16px;
  padding: 12px; text-align: center;
}
.trader-mini img, .trader-mini .ini {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,184,166,.18); color: #14b8a6; font-weight: 700;
}
.trader-mini .name { font-size: 0.82rem; font-weight: 600; }
.trader-mini .roi { font-weight: 700; font-size: 0.85rem; }
.translate-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid #334155;
  background: #0f172a; color: #e2e8f0; display: inline-flex; align-items: center; justify-content: center;
}
#gt-wrap { position: relative; }
#gt-wrap .goog-te-gadget { position: absolute; opacity: 0; width: 36px; height: 36px; overflow: hidden; left: 0; top: 0; }
#gt-wrap select.goog-te-combo { width: 36px; height: 36px; }

/* Shared page motion */
@keyframes ic-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ic-fade { from { opacity: 0; } to { opacity: 1; } }
.main-content, .admin-main, .container, .card, .stat-card, .lux-hero, .lux-action {
  animation: ic-rise .55s ease both;
}
.card:nth-child(2), .stat-card:nth-child(2) { animation-delay: .06s; }
.card:nth-child(3), .stat-card:nth-child(3) { animation-delay: .12s; }
.sidebar .nav-link, .admin-sidebar a, .bottom-nav .nav-link {
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.bottom-nav .nav-link:active, .btn:active { transform: scale(.97); }
.btn, .lux-action, .card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.translate-btn{position:relative;display:inline-flex;align-items:center;justify-content:center}
.gt-select{position:absolute;inset:0;opacity:0;cursor:pointer;width:36px;height:36px}
@media(min-width:992px){.translate-btn{display:inline-flex!important}}


/* Modal above bottom nav — prevents mobile "dark freeze" */
.modal {
  z-index: 1200 !important;
}
.modal-backdrop {
  z-index: 1190 !important;
}
.modal-dialog {
  z-index: 1201 !important;
  pointer-events: auto !important;
}
.modal-content {
  pointer-events: auto !important;
}
.modal.show {
  display: block !important;
}
