/* =========================================================
   AI Individual Trading — Premium Glass Design System
   Poppins · Bootstrap 5.3 · 2 aksen (violet + cyan) · dark/light
   ========================================================= */
:root {
  --bg: #f4f6fb;
  --bg-grad-1: rgba(124, 92, 255, .14);
  --bg-grad-2: rgba(34, 211, 238, .12);
  --surface: rgba(255, 255, 255, .62);
  --surface-strong: rgba(255, 255, 255, .86);
  --border: rgba(20, 28, 58, .09);
  --text: #141a33;
  --muted: #5b6382;
  --accent: #6d4dff;
  --accent-2: #0891b2;
  --accent-soft: rgba(109, 77, 255, .1);
  --up: #0f9d6b;
  --down: #d93c4f;
  --shadow: 0 10px 40px -12px rgba(20, 28, 58, .18);
  --shadow-sm: 0 4px 18px -8px rgba(20, 28, 58, .16);
  --radius: 20px;
  --radius-sm: 12px;
  --blur: 18px;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
}
[data-theme="dark"] {
  --bg: #070a16;
  --bg-grad-1: rgba(124, 92, 255, .22);
  --bg-grad-2: rgba(34, 211, 238, .12);
  --surface: rgba(20, 25, 48, .55);
  --surface-strong: rgba(22, 28, 54, .88);
  --border: rgba(255, 255, 255, .08);
  --text: #e9ecff;
  --muted: #9aa3c7;
  --accent: #8b74ff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(139, 116, 255, .14);
  --up: #34d399;
  --down: #fb7185;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .7);
  --shadow-sm: 0 6px 22px -10px rgba(0, 0, 0, .6);
}

* { -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 12% 8%, var(--bg-grad-1), transparent 60%),
    radial-gradient(38vmax 38vmax at 92% 22%, var(--bg-grad-2), transparent 60%),
    radial-gradient(30vmax 30vmax at 50% 100%, var(--bg-grad-1), transparent 65%);
}
body::after { /* grid halus futuristik */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
.text-muted, .small-muted { color: var(--muted) !important; }
.text-up { color: var(--up) !important; } .text-down { color: var(--down) !important; }
.fw-600 { font-weight: 600; } .fs-xs { font-size: .76rem; } .ls-1 { letter-spacing: .08em; }
.text-gradient { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Glass ---------- */
.glass, .glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glass-card, .navbar-glass, .sidebar { background: var(--surface-strong); }
}
.glass-card { padding: 1.4rem; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.hover-glow:hover { box-shadow: 0 0 0 1px var(--accent-soft), 0 14px 44px -14px var(--accent); }
.gradient-border { position: relative; border: 1px solid transparent; background-clip: padding-box; }
.gradient-border::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 40%, transparent 60%, var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 500; padding: .6rem 1.3rem; transition: all .25s ease; }
.btn-sm { padding: .35rem .85rem; font-size: .82rem; }
.btn-glass { background: var(--grad); color: #fff; border: 0; box-shadow: 0 10px 26px -12px var(--accent); }
.btn-glass:hover, .btn-glass:focus { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px -12px var(--accent); }
.btn-outline-glass { background: var(--surface); color: var(--text); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.btn-outline-glass:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger-soft { background: rgba(217, 60, 79, .12); color: var(--down); border: 1px solid rgba(217, 60, 79, .25); }
.btn-danger-soft:hover { background: var(--down); color: #fff; }
.btn:focus-visible, .form-control:focus, .form-select:focus { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  background: var(--surface-strong); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .62rem .9rem;
}
.form-control:focus, .form-select:focus { background: var(--surface-strong); color: var(--text); border-color: var(--accent); }
.form-control::placeholder { color: var(--muted); opacity: .8; }
.form-label { font-size: .84rem; font-weight: 500; color: var(--muted); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-text { color: var(--muted); }
[data-theme="dark"] .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239aa3c7' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }

/* ---------- Navbar publik ---------- */
.navbar-glass {
  margin: 14px auto 0; max-width: 1200px; border-radius: 999px; padding: .55rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
}
.navbar-glass .nav-link { color: var(--muted); font-weight: 500; font-size: .92rem; }
.navbar-glass .nav-link:hover, .navbar-glass .nav-link.active { color: var(--text); }
.brand { font-weight: 700; color: var(--text); letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .55rem; }
.brand img { width: 34px; height: 34px; }
.brand:hover { color: var(--text); }
@media (max-width: 991px) { .navbar-glass { border-radius: 22px; margin: 10px; } }

/* ---------- Hero ---------- */
.hero { padding: 7rem 0 4rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.08; }
.hero p.lead { color: var(--muted); font-size: 1.12rem; max-width: 560px; }
.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .9rem; border-radius: 999px; font-size: .8rem;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border); font-weight: 500; }
.hero-visual { position: relative; }
.hero-visual .glass-card { padding: 1.2rem; }
.mini-stat { font-size: .78rem; color: var(--muted); }
.mini-stat b { display: block; font-size: 1.25rem; color: var(--text); }
.section { padding: 5rem 0; }
.section-title { font-weight: 700; letter-spacing: -.03em; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.icon-bubble { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.15rem;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border); }
.step-no { font-size: .75rem; font-weight: 600; color: var(--accent); letter-spacing: .12em; }

/* ---------- Pricing ---------- */
.price-card { height: 100%; display: flex; flex-direction: column; }
.price-card.featured { border-color: transparent; box-shadow: var(--shadow); }
.price { font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; }
.price small { font-size: .85rem; color: var(--muted); font-weight: 400; }
.feature-list { list-style: none; padding: 0; margin: 1rem 0 1.4rem; flex: 1; }
.feature-list li { padding: .35rem 0; font-size: .9rem; color: var(--muted); }
.feature-list li i { color: var(--accent); width: 20px; }

/* ---------- App layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 264px; flex-shrink: 0; position: fixed; top: 14px; bottom: 14px; left: 14px; z-index: 1030;
  border-radius: var(--radius); padding: 1.2rem .9rem; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  transition: transform .3s ease;
}
.sidebar { overflow-y: auto; scrollbar-width: thin; }
.sidebar .nav { flex-wrap: nowrap; flex: 0 0 auto !important; overflow: visible !important; }
.sidebar .nav-link { padding: .5rem .85rem; }
.sidebar .nav-section { margin-top: .8rem; }
.sidebar .nav-link { color: var(--muted); border-radius: 12px; padding: .62rem .85rem; font-size: .9rem; font-weight: 500;
  display: flex; align-items: center; gap: .75rem; margin-bottom: 2px; }
.sidebar .nav-link i { width: 18px; text-align: center; }
.sidebar .nav-link:hover { color: var(--text); background: var(--accent-soft); }
.sidebar .nav-link.active { color: #fff; background: var(--grad); box-shadow: 0 8px 22px -12px var(--accent); }
.sidebar .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 1rem .85rem .4rem; opacity: .75; }
.main { flex: 1; margin-left: 292px; padding: 18px 22px 40px 0; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; margin-bottom: 1.4rem; border-radius: 18px;
  position: relative; z-index: 1040; /* di atas kartu glass lain: dropdown akun tidak tertutup */ }
.topbar .dropdown-menu { z-index: 1060; min-width: 230px; }
.sidebar-logout { color: var(--down) !important; }
.sidebar-logout:hover { background: rgba(217,60,79,.12) !important; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 600; font-size: .85rem; }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-120%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding: 12px; }
}

/* ---------- KPI ---------- */
.kpi { padding: 1.15rem 1.25rem; }
.kpi .label { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi .value { font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; margin-top: .2rem; }
.kpi .ico { position: absolute; right: 1rem; top: 1rem; opacity: .9; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }

/* ---------- Tables ---------- */
.table-glass { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border); margin: 0; font-size: .87rem; }
.table-glass thead th { color: var(--muted); font-weight: 500; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; border-bottom-width: 1px; white-space: nowrap; }
.table-glass td { vertical-align: middle; }
.table-glass tbody tr { transition: background .2s ease; }
.table-glass tbody tr:hover { background: var(--accent-soft); }
.badge-soft { padding: .35em .7em; border-radius: 999px; font-weight: 500; font-size: .72rem; border: 1px solid var(--border); background: var(--surface-strong); color: var(--muted); }
.badge-soft.ok, .badge-soft.running, .badge-soft.FILLED, .badge-soft.PAID, .badge-soft.active, .badge-soft.BUY { color: var(--up); border-color: rgba(15,157,107,.3); background: rgba(15,157,107,.1); }
.badge-soft.error, .badge-soft.REJECTED, .badge-soft.ERROR, .badge-soft.FAILED, .badge-soft.suspended, .badge-soft.SELL { color: var(--down); border-color: rgba(217,60,79,.3); background: rgba(217,60,79,.1); }
.badge-soft.paused, .badge-soft.PENDING, .badge-soft.unverified { color: #b7791f; border-color: rgba(183,121,31,.3); background: rgba(183,121,31,.1); }
.badge-soft.live { color: #fff; background: var(--grad); border: 0; }
.pagination .page-link { background: var(--surface-strong); border-color: var(--border); color: var(--text); border-radius: 10px !important; margin: 0 2px; font-size: .85rem; }
.pagination .page-item.active .page-link { background: var(--grad); border: 0; color: #fff; }
.pagination .page-item.disabled .page-link { opacity: .5; background: var(--surface); color: var(--muted); }

/* ---------- Alerts / misc ---------- */
.alert { border-radius: var(--radius-sm); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.alert-glass { background: var(--surface-strong); color: var(--text); }
.empty-state { text-align: center; padding: 2.6rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2rem; color: var(--accent); margin-bottom: .8rem; }
.legal-body h2 { font-size: 1.15rem; font-weight: 600; margin-top: 1.8rem; }
.legal-body p, .legal-body li { color: var(--muted); line-height: 1.8; font-size: .95rem; }
.legal-body strong { color: var(--text); }
.footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; margin-top: 4rem; }
.footer a { color: var(--muted); font-size: .9rem; } .footer a:hover { color: var(--text); }
.risk-strip { font-size: .78rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; padding: .8rem 1rem; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; padding: 0; display: grid; place-items: center; }
.dropdown-menu { --bs-dropdown-link-color: var(--text); background: var(--surface-strong); border: 1px solid var(--border); border-radius: 14px; backdrop-filter: blur(var(--blur)); box-shadow: var(--shadow); }
.dropdown-item { color: var(--text); border-radius: 8px; font-size: .9rem; } .dropdown-item:hover { background: var(--accent-soft); color: var(--text); }
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 2000; max-width: 380px; }
.code-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; padding: .15rem .45rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.accordion-item { background: transparent; border: 0; }
.accordion-button { background: transparent; color: var(--text); font-weight: 500; box-shadow: none !important; }
.accordion-button:not(.collapsed) { color: var(--accent); background: transparent; }
.accordion-body { color: var(--muted); }
[data-theme="dark"] .accordion-button::after { filter: invert(1); }
[data-theme="dark"] .btn-close { filter: invert(1); }
hr { border-color: var(--border); opacity: 1; }

/* ---------- Scroll reveal ---------- */
.scroll-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.scroll-reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .scroll-reveal { opacity: 1; transform: none; }
}
@media (max-width: 575px) {
  .kpi .ico { display: none; }
  .kpi .value { font-size: 1.2rem; }
  .glass-card { padding: 1.1rem; }
  .hero { padding: 5rem 0 3rem; }
}
