/* ProTradeFRX — production stylesheet */
:root {
  --bg-0: #06080f;
  --bg-1: #0c1220;
  --bg-2: #111a2e;
  --bg-3: #182238;
  --line: #1f2a44;
  --line-soft: #1a233a;
  --text: #e6ecf5;
  --muted: #8b97b0;
  --accent: #1efba4;
  --accent-2: #0ea5ff;
  --warn: #f7b500;
  --danger: #ff4d6d;
  --success: #1efba4;
  --gradient: linear-gradient(135deg, #0ea5ff 0%, #1efba4 100%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 700px at 80% -20%, rgba(14,165,255,0.12), transparent 50%),
              radial-gradient(900px 500px at -10% 40%, rgba(30,251,164,0.08), transparent 50%),
              var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
a { color: #9bd6ff; text-decoration: none; }
a:hover { color: #d3edff; }

.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--gradient);
  color: #001a14; font-weight: 800;
}
.brand-mark.admin { background: linear-gradient(135deg, #ff4d6d 0%, #f7b500 100%); color: #1a0904;}
.text-gradient { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;}
.btn-glow {
  background: var(--gradient); color: #001a14; border: 0; font-weight: 600;
  box-shadow: 0 8px 24px rgba(14,165,255,.25);
}
.btn-glow:hover { color: #001a14; filter: brightness(1.07); }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 10px;}
.btn-icon:hover { background: var(--bg-2); color: #fff; }

/* ---------- SITE NAVBAR ---------- */
.site-navbar {
  background: rgba(8, 12, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-navbar .nav-link { color: var(--text); opacity: .85; font-weight: 500; padding: 0.6rem 0.9rem; }
.site-navbar .nav-link.active, .site-navbar .nav-link:hover { color: #fff; opacity: 1; }
.site-main { padding-top: 80px; }

/* ---------- SITE FOOTER ---------- */
.site-footer { background: var(--bg-1); border-top: 1px solid var(--line-soft); }
.site-footer h5, .site-footer h6 { color: #fff; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- HERO ---------- */
.hero {
  position: relative; padding: 80px 0 100px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 360px at 50% 10%, rgba(30,251,164,0.18), transparent 60%);
  pointer-events: none;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); font-weight: 800; line-height: 1.05; }
.hero p.lead { color: var(--muted); font-size: 1.1rem; max-width: 540px; }
.hero-card {
  background: linear-gradient(180deg, rgba(24,34,56,0.85), rgba(12,18,32,0.85));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
}

.feature-card {
  background: linear-gradient(180deg, rgba(24,34,56,0.55), rgba(12,18,32,0.55));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  height: 100%;
  transition: transform .25s, border-color .25s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(30,251,164,.4); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display:inline-flex; align-items:center; justify-content:center;
  background: rgba(30,251,164,0.12); color: var(--accent);
  font-size: 1.4rem; margin-bottom: 12px;
}

/* ---------- APP SHELL ---------- */
.app-body { background: var(--bg-0); }
.app-shell { display:flex; min-height: 100vh; }
.app-sidebar {
  width: 248px; flex-shrink: 0;
  background: linear-gradient(180deg, #0a1020 0%, #060912 100%);
  border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh; overflow-y: auto;
}
.app-sidebar-brand {
  padding: 18px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.app-nav { list-style: none; padding: 12px 8px; margin: 0; flex-grow: 1; }
.app-nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 14px 12px 6px; }
.app-nav li > a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: #cdd5e8; font-weight: 500; font-size: 14px;
  text-decoration: none; margin-bottom: 2px;
}
.app-nav li > a i { font-size: 18px; opacity: .9; }
.app-nav li > a:hover { background: var(--bg-2); color: #fff; }
.app-nav li > a.active {
  background: linear-gradient(90deg, rgba(30,251,164,0.12), rgba(14,165,255,0.04));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}
.app-sidebar-footer { padding: 12px; border-top: 1px solid var(--line-soft); }

.app-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  display:flex; align-items:center; gap: 12px;
  padding: 12px 22px;
  background: rgba(10,14,24,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 100;
}
.topbar-stats .topbar-stat { display: flex; flex-direction: column; line-height: 1.1; }
.topbar-stats .label { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.topbar-stats .value { font-weight: 700; color: #fff; font-size: 14px; font-family: 'Space Grotesk', sans-serif; }

.app-content { padding: 22px; max-width: 100%; }
.avatar-sm { width: 32px; height: 32px; object-fit: cover; }

.sidebar-backdrop { display:none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 998; }
.sidebar-backdrop.show { display:block; }

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed; left: -260px; top: 0; height: 100vh; z-index: 999;
    transition: left .25s;
  }
  .app-sidebar.open { left: 0; }
  .app-content { padding: 16px; }
}

/* ---------- CARDS ---------- */
.card-soft {
  background: linear-gradient(180deg, rgba(24,34,56,0.65), rgba(12,18,32,0.65));
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
}
.card-soft .card-header { background: transparent; border-bottom: 1px solid var(--line-soft); padding: 16px 20px; font-weight: 600; }
.card-soft .card-body { padding: 20px; }

.stat-card {
  background: linear-gradient(180deg, rgba(24,34,56,0.65), rgba(12,18,32,0.65));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: rgba(30,251,164,0.4); transform: translateY(-2px); }
.stat-card .stat-label { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: 1px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.stat-card .stat-delta { font-size: 12px; }
.text-success-soft { color: var(--success); }
.text-danger-soft { color: var(--danger); }

/* ---------- TABLES ---------- */
.table-app {
  width: 100%; border-collapse: separate; border-spacing: 0;
}
.table-app thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); font-weight: 600;
  background: rgba(255,255,255,0.02);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.table-app tbody td {
  padding: 12px 14px; font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.table-app tbody tr:hover { background: rgba(255,255,255,0.02); }

.badge-soft { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge-pending { background: rgba(247,181,0,.12); color: #ffd86b; border: 1px solid rgba(247,181,0,.25); }
.badge-approved, .badge-completed, .badge-success { background: rgba(30,251,164,.10); color: var(--success); border: 1px solid rgba(30,251,164,.25); }
.badge-rejected, .badge-blocked, .badge-danger, .badge-closed { background: rgba(255,77,109,.10); color: var(--danger); border: 1px solid rgba(255,77,109,.25); }
.badge-info { background: rgba(14,165,255,.12); color: #69c8ff; border: 1px solid rgba(14,165,255,.25); }
.badge-open { background: rgba(14,165,255,.12); color: #69c8ff; border: 1px solid rgba(14,165,255,.25); }

/* ---------- FORMS ---------- */
.form-control, .form-select, .input-group-text {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--line);
}
.form-control:focus, .form-select:focus {
  background: var(--bg-2); color: var(--text);
  border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(30,251,164,.15);
}
.form-control::placeholder { color: #6f7d99; }
.form-label { font-weight: 500; font-size: 13px; color: var(--muted); }

/* ---------- TRADING ---------- */
.market-list { max-height: 70vh; overflow-y: auto; }
.market-row {
  display:flex; justify-content:space-between; align-items:center;
  padding: 10px 14px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background .15s;
}
.market-row:hover, .market-row.active { background: rgba(14,165,255,0.08); }
.market-symbol { font-weight: 600; }
.market-price { font-family: 'Space Grotesk', sans-serif; font-weight: 600; }
.tick-up { color: var(--success); }
.tick-down { color: var(--danger); }

.btn-buy { background: var(--success); color: #001a14; font-weight: 700; border: 0; }
.btn-buy:hover { background: #2cffb1; color: #001a14; }
.btn-sell { background: var(--danger); color: #fff; font-weight: 700; border: 0; }
.btn-sell:hover { background: #ff6c87; color: #fff; }

.chart-card {
  position: relative; height: 380px;
  background: linear-gradient(180deg, rgba(12,18,32,0.85), rgba(8,12,22,0.95));
  border-radius: 16px; padding: 16px;
  border: 1px solid var(--line);
}
.chart-card canvas { width: 100% !important; height: 100% !important; }

.notif-list { max-height: 360px; overflow-y: auto; }

/* ---------- AUTH ---------- */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 30px 16px;
  background: radial-gradient(1100px 600px at 70% 0%, rgba(14,165,255,0.18), transparent 60%),
              radial-gradient(900px 600px at 0% 100%, rgba(30,251,164,0.10), transparent 60%),
              var(--bg-0);
}
.auth-card {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, rgba(24,34,56,0.90), rgba(12,18,32,0.95));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

/* ---------- UTILITIES ---------- */
.divider-y { border-top: 1px solid var(--line-soft); margin: 16px 0; }
.kpi { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.tag { padding: 2px 8px; border-radius: 6px; background: var(--bg-2); font-size: 11px; color: var(--muted); border: 1px solid var(--line); }

.dropdown-menu {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
}
.dropdown-item { color: var(--text); }
.dropdown-item:hover { background: rgba(14,165,255,0.08); color: #fff; }

.alert { border: 1px solid transparent; border-radius: 12px; }
.alert-success { background: rgba(30,251,164,0.08); border-color: rgba(30,251,164,0.2); color: #b6ffe1; }
.alert-danger { background: rgba(255,77,109,0.08); border-color: rgba(255,77,109,0.25); color: #ffc4cf; }
.alert-info { background: rgba(14,165,255,0.08); border-color: rgba(14,165,255,0.2); color: #c4e7ff; }

/* ---------- ADMIN BODY accent ---------- */
.admin-body .app-sidebar.admin-sidebar { background: linear-gradient(180deg, #11050b 0%, #060305 100%); border-right-color:#3a1622;}
.admin-body .app-nav li > a.active { box-shadow: inset 3px 0 0 var(--warn);
    background: linear-gradient(90deg, rgba(247,181,0,0.15), rgba(255,77,109,0.05)); }
