/* QuantroFX - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary:    #070b17;
  --bg-secondary:  #0d1220;
  --bg-card:       #101622;
  --bg-card-hover: #161e2e;
  --border:        #1e2736;
  --border-light:  #28364a;
  --gold:          #f59e0b;
  --gold-dark:     #d97706;
  --gold-light:    #fbbf24;
  --green:         #10b981;
  --red:           #ef4444;
  --blue:          #3b82f6;
  --text-primary:  #eef2f7;
  --text-secondary:#a8b4c8;
  --text-muted:    #6e7e96;
  --radius:        10px;
  --radius-lg:     14px;
  --shadow:        0 4px 28px rgba(0,0,0,0.5);
  --shadow-gold:   0 0 30px rgba(245,158,11,0.12);
  --transition:    0.18s ease;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14.5px;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; }
input, textarea, select { font-family: inherit; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* TYPOGRAPHY */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

.text-gold    { color: var(--gold); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* LAYOUT */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.page-content { padding: 30px 0; }

/* NAVBAR */
.navbar {
  background: rgba(7,11,23,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  padding: 0 20px;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center;
  height: 62px; gap: 24px;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 21px; font-weight: 900;
  color: var(--gold); letter-spacing: 0.5px;
  white-space: nowrap;
}
.nav-logo span { color: var(--text-primary); }
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-link {
  color: var(--text-secondary); padding: 7px 13px;
  border-radius: var(--radius); font-size: 13.5px;
  font-weight: 500; transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-link.active { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* NOTIFICATION BELL */
.notif-btn {
  position: relative; background: none; border: none;
  color: var(--text-secondary); cursor: pointer;
  padding: 8px; border-radius: 8px;
  transition: var(--transition); font-size: 18px;
}
.notif-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.notif-dropdown {
  position: absolute; top: 44px; right: 0;
  width: 320px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); display: none; z-index: 999;
}
.notif-dropdown.show { display: block; }
.notif-header { padding: 13px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13.5px; color: var(--text-primary); }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border: none; }
.notif-item.unread { background: rgba(245,158,11,0.04); }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.notif-msg { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* DARK MODE TOGGLE */
.dark-toggle {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  padding: 6px 11px; border-radius: 8px;
  font-size: 15px; transition: var(--transition);
}
.dark-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* USER MENU */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
  color: var(--text-primary); font-size: 13.5px;
  transition: var(--transition); font-family: inherit;
}
.user-btn:hover { border-color: var(--gold); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}
.user-dropdown {
  position: absolute; top: 44px; right: 0;
  width: 200px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); display: none; z-index: 999;
  overflow: hidden;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; color: var(--text-secondary);
  font-size: 13.5px; transition: var(--transition);
}
.user-dropdown a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.user-dropdown .divider { border: none; border-top: 1px solid var(--border); }

/* ANNOUNCEMENT BANNER */
.announcement {
  background: linear-gradient(90deg, #0d1220, #151e32);
  border-bottom: 1px solid rgba(245,158,11,0.4);
  padding: 10px 20px; text-align: center;
  font-size: 13px; color: var(--gold-light);
  font-weight: 500;
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-sm { padding: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.01em; }

/* STAT CARDS */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  position: relative; overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card .stat-icon { font-size: 26px; margin-bottom: 12px; }
.stat-card .stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.03em;
}
.stat-card .stat-label {
  font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em;
}
.stat-card .stat-glow {
  position: absolute; top: -30px; right: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  opacity: 0.07;
}

/* SIGNAL CARD */
.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.signal-card:hover { border-color: var(--border-light); transform: translateY(-1px); box-shadow: var(--shadow); }
.signal-card .pair-name {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
}
.signal-card .direction-badge {
  display: inline-flex; align-items: center;
  padding: 3px 11px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
}
.direction-badge.buy  { background: rgba(16,185,129,0.12); color: #34d399; }
.direction-badge.sell { background: rgba(239,68,68,0.12);  color: #f87171; }
.signal-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.signal-label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.signal-val   { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }

/* BLURRED SIGNAL (free limit) */
.signal-locked { position: relative; pointer-events: none; }
.signal-locked::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(7,11,23,0.72);
  backdrop-filter: blur(7px);
  border-radius: var(--radius-lg);
}
.signal-lock-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 20px;
}
.signal-lock-overlay .lock-icon { font-size: 32px; }

/* BADGES */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
}
.badge-active  { background: rgba(59,130,246,0.13); color: #60a5fa; }
.badge-win     { background: rgba(16,185,129,0.13); color: #34d399; }
.badge-loss    { background: rgba(239,68,68,0.13);  color: #f87171; }
.badge-neutral { background: rgba(107,114,128,0.18); color: var(--text-muted); }
.badge-pending { background: rgba(245,158,11,0.13); color: var(--gold-light); }
.badge-premium { background: rgba(245,158,11,0.13); color: var(--gold-light); }
.badge-free    { background: rgba(107,114,128,0.15); color: var(--text-muted); }

/* RISK LEVEL */
.risk-low    { color: var(--green); }
.risk-medium { color: var(--gold); }
.risk-high   { color: var(--red); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 10px 20px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition); text-decoration: none;
  white-space: nowrap; font-family: inherit; letter-spacing: -0.01em;
}
.btn-primary { background: var(--gold); color: #000; }
.btn-primary:hover { background: var(--gold-light); color: #000; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,158,11,0.3); }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger  { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.btn-danger:hover { background: rgba(239,68,68,0.22); }
.btn-success { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.btn-success:hover { background: rgba(16,185,129,0.22); }
.btn-sm  { padding: 6px 13px; font-size: 12.5px; }
.btn-lg  { padding: 13px 30px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* FORMS */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px; font-size: 12.5px;
  font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.form-control {
  width: 100%; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-primary); padding: 10px 13px;
  font-size: 14px; transition: var(--transition); font-family: inherit;
}
.form-control:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.08);
  background: rgba(245,158,11,0.02);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--bg-card); color: var(--text-primary); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint  { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ALERTS */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13.5px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px; font-weight: 500;
}
.alert-success { background: rgba(16,185,129,0.09); border: 1px solid rgba(16,185,129,0.28); color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,0.09);  border: 1px solid rgba(239,68,68,0.28);  color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.09); border: 1px solid rgba(245,158,11,0.28); color: #fcd34d; }
.alert-info    { background: rgba(59,130,246,0.09);  border: 1px solid rgba(59,130,246,0.28);  color: #93c5fd; }

/* GRID LAYOUTS */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-signals { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }

/* TABLES */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted); font-size: 11px;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255,255,255,0.01);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-secondary); }
.table td strong, .table td b { color: var(--text-primary); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-card-hover); color: var(--text-primary); }

/* PLANS */
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}
.plan-card:hover, .plan-card.popular {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.plan-card .popular-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #000;
  padding: 3px 16px; border-radius: 20px;
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
}
.plan-price {
  font-family: 'Syne', sans-serif;
  font-size: 40px; font-weight: 900;
  color: var(--text-primary); letter-spacing: -0.04em;
}
.plan-price sup { font-size: 18px; vertical-align: super; }
.plan-price sub { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.plan-features { list-style: none; text-align: left; margin: 20px 0; }
.plan-features li {
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13.5px; display: flex; align-items: center; gap: 8px;
  color: var(--text-secondary);
}
.plan-features li:last-child { border: none; }
.plan-features .check { color: var(--green); }

/* REFERRAL */
.ref-link-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
}
.ref-link-box input { flex: 1; background: none; border: none; color: var(--text-primary); font-size: 13.5px; outline: none; font-family: inherit; }

/* PAGINATION */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.page-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: var(--gold); border-color: var(--gold); color: #000; }

/* TABS */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 9px 18px; font-size: 13.5px; font-weight: 600;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: var(--transition); font-family: inherit;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* FILTERS */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 14px 16px; background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}
.filters select, .filters input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  padding: 8px 12px; font-size: 13.5px; font-family: inherit;
}
.filters select:focus, .filters input:focus {
  outline: none; border-color: var(--gold);
}

/* PROGRESS BAR */
.progress { height: 7px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; background: var(--gold); transition: width 0.4s ease; }
.progress-bar.green { background: var(--green); }
.progress-bar.red { background: var(--red); }

/* LANDING PAGE */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 900px; height: 420px;
  background: radial-gradient(ellipse, rgba(245,158,11,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 20px; letter-spacing: -0.03em;
}
.hero h1 .highlight { color: var(--gold); }
.hero p.lead {
  font-size: 17px; color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 32px; line-height: 1.7;
}
.hero-stats {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 48px; padding-top: 48px;
  border-top: 1px solid var(--border);
}
.hero-stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 30px; font-weight: 900; color: var(--gold); letter-spacing: -0.03em;
}
.hero-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

/* AUTH PAGES */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(245,158,11,0.05) 0%, transparent 60%);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%; max-width: 430px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 900; color: var(--gold); letter-spacing: 0.5px;
}
.auth-logo .logo-text span { color: var(--text-primary); }
.auth-logo p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.auth-sub { font-size: 13.5px; color: var(--text-muted); margin-bottom: 26px; }
.auth-divider {
  text-align: center; margin: 20px 0;
  position: relative; color: var(--text-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 20px); height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ==============================
   ADMIN SIDEBAR — IMPROVED
   ============================== */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  background: #090e1c;
  border-right: 1px solid rgba(255,255,255,0.05);
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; z-index: 100;
  display: flex; flex-direction: column;
}

.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo .logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 19px; font-weight: 900; color: var(--gold); letter-spacing: 0.5px;
}
.sidebar-logo .logo-text span { color: var(--text-primary); }
.sidebar-logo small {
  display: block; font-size: 10.5px;
  color: var(--text-muted); margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}

.sidebar-nav { padding: 10px 0 20px; flex: 1; }

.sidebar-section {
  padding: 14px 18px 5px;
  font-size: 9.5px; font-weight: 700;
  color: #4a5568;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; color: #8896a8;
  font-size: 13.5px; font-weight: 500;
  transition: var(--transition); border-radius: 0;
  position: relative; border-left: 2px solid transparent;
  font-family: inherit;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.04);
  color: #c8d3e0;
  border-left-color: rgba(245,158,11,0.3);
}
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(245,158,11,0.12) 0%, rgba(245,158,11,0.03) 100%);
  color: var(--gold);
  border-left-color: var(--gold);
  font-weight: 600;
}
.sidebar-link .icon {
  font-size: 15px; width: 20px; text-align: center; flex-shrink: 0;
}

/* Admin Main */
.admin-main { margin-left: 248px; flex: 1; min-height: 100vh; }

.admin-topbar {
  background: #090e1c;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 24px; height: 58px;
  display: flex; align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 99;
}
.admin-topbar h1 {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.01em;
}
.admin-content { padding: 24px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.page-header h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  z-index: 9998; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 520px;
  box-shadow: var(--shadow); transform: translateY(16px); transition: transform 0.2s;
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal-header { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; line-height: 1; }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* UPLOAD */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 28px; text-align: center; cursor: pointer;
  transition: var(--transition);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--gold); background: rgba(245,158,11,0.03); }
.upload-zone .upload-icon { font-size: 30px; margin-bottom: 10px; }
.upload-zone p { color: var(--text-muted); font-size: 13.5px; }

/* FOOTER (user side) */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 20px 20px;
  margin-top: 60px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px; margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  font-size: 12.5px; color: var(--text-muted);
}
.social-links { display: flex; gap: 10px; }
.social-link {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 15px;
  transition: var(--transition);
}
.social-link:hover { border-color: var(--gold); color: var(--gold); }

/* LIGHT THEME */
body.light-theme {
  --bg-primary:    #f0f4f9;
  --bg-secondary:  #e4eaf2;
  --bg-card:       #ffffff;
  --bg-card-hover: #f7f9fc;
  --border:        #dde5ef;
  --border-light:  #c8d4e4;
  --text-primary:  #0e1525;
  --text-secondary:#3d5166;
  --text-muted:    #7a8fa8;
}
body.light-theme .form-control { background: #f5f8fc; }
body.light-theme select.form-control option { background: #fff; color: #0e1525; }
body.light-theme .sidebar { background: #1a2232; }
body.light-theme .admin-topbar { background: #1a2232; border-bottom-color: rgba(255,255,255,0.08); }

/* UTILITIES */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.p-0   { padding: 0; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.fs-14  { font-size: 14px; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.d-none { display: none; }
.d-flex { display: flex; }

/* RESPONSIVE */
.sidebar-toggle-btn {
  display: none;
  background: rgba(255,255,255,0.06); border: none;
  color: var(--text-primary); font-size: 20px;
  cursor: pointer; padding: 5px 9px;
  border-radius: 7px; line-height: 1;
  transition: var(--transition);
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,0.1); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .sidebar { transform: translateX(-100%); transition: transform 0.28s cubic-bezier(0.4,0,0.2,1); z-index: 200; }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle-btn { display: inline-block; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 24px; }
  .nav-links { display: none; }
  .auth-card { padding: 24px; }
  .admin-content { padding: 14px; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-signals { grid-template-columns: 1fr; }
}

/* LOADING SPINNER */
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.28s ease forwards; }

