:root {
  --qfx-dark: #0f172a;
  --qfx-card: #1e293b;
  --qfx-border: #334155;
  --qfx-muted: #64748b;
  --qfx-accent: #f59e0b;
  --qfx-blue: #0ea5e9;
  --qfx-green: #10b981;
  --qfx-red: #ef4444;
}
body { background: var(--qfx-dark); color: #e2e8f0; font-family: 'Segoe UI', system-ui, sans-serif; }
.qfx-navbar { background: rgba(15,23,42,0.97); border-bottom: 1px solid var(--qfx-border); backdrop-filter: blur(10px); }
.qfx-navbar .navbar-brand span { color: var(--qfx-accent); font-size: 1.4rem; }
.qfx-navbar .nav-link { color: #94a3b8 !important; transition: color .2s; }
.qfx-navbar .nav-link:hover { color: var(--qfx-accent) !important; }
.qfx-footer { background: #0a1222; border-top: 1px solid var(--qfx-border); padding: 60px 0 0; }
.qfx-card { background: var(--qfx-card); border: 1px solid var(--qfx-border); border-radius: 12px; }
.qfx-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%); min-height: 90vh; display: flex; align-items: center; position: relative; overflow: hidden; }
.qfx-hero::before { content:''; position:absolute; inset:0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.qfx-stat-card { background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px solid var(--qfx-border); border-radius: 16px; padding: 28px; text-align: center; transition: transform .3s, box-shadow .3s; }
.qfx-stat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.qfx-stat-card .icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 16px; }
.qfx-plan-card { background: var(--qfx-card); border: 1px solid var(--qfx-border); border-radius: 16px; padding: 32px; transition: all .3s; position: relative; overflow: hidden; }
.qfx-plan-card:hover { border-color: var(--qfx-accent); transform: translateY(-6px); box-shadow: 0 24px 48px rgba(0,0,0,0.5); }
.qfx-plan-card.featured { border-color: var(--qfx-accent); }
.qfx-plan-card .badge-featured { position: absolute; top: 16px; right: 16px; }
.btn-qfx { background: linear-gradient(135deg, var(--qfx-accent), #d97706); color: #000; font-weight: 700; border: none; border-radius: 8px; padding: 12px 28px; transition: all .3s; }
.btn-qfx:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,158,11,.4); color: #000; }
.btn-qfx-outline { border: 2px solid var(--qfx-accent); color: var(--qfx-accent); background: transparent; font-weight: 600; border-radius: 8px; padding: 10px 26px; transition: all .3s; }
.btn-qfx-outline:hover { background: var(--qfx-accent); color: #000; }
.ticker-bar { background: var(--qfx-card); border-bottom: 1px solid var(--qfx-border); padding: 8px 0; overflow: hidden; }
.ticker-content { display: flex; gap: 40px; animation: ticker 30s linear infinite; white-space: nowrap; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.ticker-item { font-size: .875rem; color: #94a3b8; }
.ticker-item .price { color: #f1f5f9; font-weight: 600; }
.ticker-item .up { color: var(--qfx-green); }
.ticker-item .down { color: var(--qfx-red); }
/* Dashboard */
.dash-sidebar { background: var(--qfx-card); border-right: 1px solid var(--qfx-border); min-height: 100vh; width: 260px; position: fixed; top: 0; left: 0; overflow-y: auto; z-index: 1000; }
.dash-content { margin-left: 260px; padding: 24px; min-height: 100vh; background: var(--qfx-dark); }
.dash-nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: #94a3b8; text-decoration: none; border-radius: 8px; margin: 2px 8px; transition: all .2s; font-size: .925rem; }
.dash-nav-link:hover, .dash-nav-link.active { background: rgba(245,158,11,.1); color: var(--qfx-accent); }
.dash-nav-link i { width: 20px; text-align: center; }
.balance-card { background: linear-gradient(135deg, #1d4ed8, #0ea5e9); border-radius: 16px; padding: 28px; }
.balance-card.profit { background: linear-gradient(135deg, #059669, #10b981); }
.balance-card.bonus { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.metric-card { background: var(--qfx-card); border: 1px solid var(--qfx-border); border-radius: 12px; padding: 20px; }
.metric-card .metric-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.table-qfx { color: #e2e8f0; }
.table-qfx th { background: #1e293b; color: #94a3b8; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; border-color: var(--qfx-border); }
.table-qfx td { border-color: var(--qfx-border); vertical-align: middle; font-size: .9rem; }
.table-qfx tbody tr:hover { background: rgba(255,255,255,.03); }
/* Admin */
.admin-sidebar { background: #0a1222; border-right: 1px solid var(--qfx-border); width: 240px; min-height: 100vh; position: fixed; top: 0; left: 0; overflow-y: auto; z-index: 1000; }
.admin-content { margin-left: 240px; padding: 24px; }
.admin-topbar { background: var(--qfx-card); border-bottom: 1px solid var(--qfx-border); padding: 12px 24px; position: sticky; top: 0; z-index: 100; }
/* Forms */
.form-control, .form-select { background: #0f172a; border: 1px solid var(--qfx-border); color: #e2e8f0; border-radius: 8px; }
.form-control:focus, .form-select:focus { background: #0f172a; border-color: var(--qfx-accent); color: #e2e8f0; box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.form-control::placeholder { color: var(--qfx-muted); }
.form-label { color: #94a3b8; font-size: .875rem; font-weight: 500; }
.qfx-input-group .input-group-text { background: #1e293b; border-color: var(--qfx-border); color: var(--qfx-accent); }
/* Misc */
.section-heading { text-align: center; margin-bottom: 48px; }
.section-heading h2 { font-size: 2.2rem; font-weight: 800; }
.section-heading .accent { color: var(--qfx-accent); }
.section-heading p { color: #64748b; margin-top: 8px; }
.feature-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 20px; }
.profit-label { color: var(--qfx-green); font-weight: 700; }
.loss-label { color: var(--qfx-red); font-weight: 700; }
.step-badge { width: 36px; height: 36px; border-radius: 50%; background: var(--qfx-accent); color: #000; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.alert-qfx-success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.4); color: #6ee7b7; border-radius: 10px; }
.alert-qfx-danger { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4); color: #fca5a5; border-radius: 10px; }
.alert-qfx-warning { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); color: #fcd34d; border-radius: 10px; }
@media(max-width:768px) { .dash-sidebar,.admin-sidebar { width: 100%; position: relative; min-height: unset; } .dash-content,.admin-content { margin-left: 0; } }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
body { display:flex; min-height:100vh; overflow-x:hidden; }

.dash-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--qfx-card);
  border-right: 1px solid var(--qfx-border);
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.dash-content {
  margin-left: 240px;
  padding: 32px;
  flex: 1;
  width: calc(100% - 240px);
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: #94a3b8;
  text-decoration: none;
  font-size: .875rem;
  transition: all .15s;
  border-left: 3px solid transparent;
}
.dash-nav-link:hover,
.dash-nav-link.active {
  color: #fff;
  background: rgba(245,158,11,.08);
  border-left-color: var(--qfx-accent);
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-sidebar {
  width: 220px;
  min-height: 100vh;
  background: var(--qfx-card);
  border-right: 1px solid var(--qfx-border);
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
.admin-content {
  margin-left: 220px;
  padding: 28px;
  flex: 1;
  width: calc(100% - 220px);
}
.admin-topbar {
  background: var(--qfx-card);
  border: 1px solid var(--qfx-border);
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 24px;
}

/* ============================================================
   BALANCE CARDS
   ============================================================ */
.balance-card {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  border-radius: 16px;
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content:'';
  position:absolute;
  right:-20px;top:-20px;
  width:100px;height:100px;
  border-radius:50%;
  background:rgba(255,255,255,.05);
}
.balance-card.profit { background: linear-gradient(135deg,#064e3b 0%,#059669 100%); }
.balance-card.bonus  { background: linear-gradient(135deg,#78350f 0%,#d97706 100%); }

/* ============================================================
   PLAN CARDS
   ============================================================ */
.qfx-plan-card {
  background: var(--qfx-card);
  border: 1px solid var(--qfx-border);
  border-radius: 16px;
  padding: 28px;
  height: 100%;
  transition: all .25s;
}
.qfx-plan-card:hover {
  border-color: var(--qfx-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(245,158,11,.15);
}

/* ============================================================
   METRIC CARDS
   ============================================================ */
.metric-card {
  background: var(--qfx-card);
  border: 1px solid var(--qfx-border);
  border-radius: 12px;
  padding: 20px;
}
.metric-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.bg-purple { background-color: #7c3aed!important; }
.bg-orange  { background-color: #ea580c!important; }

/* ============================================================
   STEP BADGE
   ============================================================ */
.step-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--qfx-accent);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .85rem;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert-qfx-success { background:rgba(16,185,129,.12);border:1px solid rgba(16,185,129,.3);color:#10b981; }
.alert-qfx-danger  { background:rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.3); color:#ef4444; }
.alert-qfx-warning { background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.3);color:#f59e0b; }
.alert-auto { animation: fadeInDown .4s ease; }
@keyframes fadeInDown { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-qfx {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  transition: all .2s;
}
.btn-qfx:hover { background: linear-gradient(135deg,#fbbf24,#f59e0b); transform:translateY(-1px); }
.btn-qfx-outline {
  background: transparent;
  color: var(--qfx-accent);
  border: 1px solid var(--qfx-accent);
  border-radius: 10px;
  font-weight: 700;
  padding: .5rem 1rem;
  transition: all .2s;
}
.btn-qfx-outline:hover { background: var(--qfx-accent); color: #000; }

/* ============================================================
   METHOD CARD SELECTED
   ============================================================ */
.method-card:hover { border-color: var(--qfx-accent)!important; transform: translateY(-2px); }

/* ============================================================
   TRADE DIRECTION ACTIVE
   ============================================================ */
.active-buy { background:#10b981!important;color:#fff!important;border-color:#10b981!important; }
.active-sell { background:#ef4444!important;color:#fff!important;border-color:#ef4444!important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .dash-sidebar, .admin-sidebar { display: none; }
  .dash-content, .admin-content { margin-left: 0; width: 100%; padding: 16px; }
}
