/* ============================================================
   intensefxTRADES — design tokens
   ============================================================ */
:root {
  /* surfaces */
  --bg-app: #08090d;
  --bg-sidebar: #0b0d12;
  --bg-card: #11141b;
  --bg-card-alt: #0e1117;
  --bg-elevated: #161a24;
  --bg-input: #161a24;
  --bg-hover: #1a1e2a;

  /* borders */
  --border: #1d2230;
  --border-soft: #181c27;

  /* text */
  --text-primary: #e7e9ee;
  --text-secondary: #8b91a3;
  --text-tertiary: #5b6175;

  /* accents */
  --blue: #3d7fff;
  --blue-dim: rgba(61, 127, 255, 0.14);
  --blue-bright: #5b93ff;
  --green: #1ec98b;
  --green-dim: rgba(30, 201, 139, 0.12);
  --red: #f23645;
  --red-dim: rgba(242, 54, 69, 0.12);
  --amber: #d9a441;
  --amber-dim: rgba(217, 164, 65, 0.14);

  /* type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --sidebar-w: 248px;
  --sidebar-w-collapsed: 76px;
}

body.light-mode {
  --bg-app: #f4f6f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-alt: #f8fafc;
  --bg-elevated: #eef2f7;
  --bg-input: #ffffff;
  --bg-hover: #e8edf5;
  --border: #d9e0eb;
  --border-soft: #e5eaf2;
  --text-primary: #151923;
  --text-secondary: #566071;
  --text-tertiary: #8993a3;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
::selection { background: var(--blue-dim); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232838; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2c3247; }

.dim { opacity: 0.55; }
.mono { font-family: var(--font-mono); }
.up { color: var(--green); }
.down { color: var(--red); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: relative;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background:
    radial-gradient(circle at 12% 0%, rgba(61, 127, 255, .16), transparent 28%),
    linear-gradient(180deg, rgba(11, 13, 18, .98), rgba(7, 9, 14, .99));
  border-right: 1px solid rgba(69, 82, 112, .34);
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  transition: width .18s ease, min-width .18s ease, padding .18s ease;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 147, 255, .42) transparent;
  box-shadow: 12px 0 36px rgba(0,0,0,.2), 1px 0 0 rgba(255,255,255,.025) inset;
}
.sidebar::before {
  content: "";
  position: sticky;
  top: -16px;
  display: block;
  height: 1px;
  margin: -16px -14px 15px;
  background: linear-gradient(90deg, rgba(61,127,255,.8), rgba(30,201,139,.38), transparent);
  opacity: .72;
  pointer-events: none;
}
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(91,147,255,.66), rgba(30,201,139,.34));
  border-radius: 999px;
}
.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
  min-width: var(--sidebar-w-collapsed);
  padding: 16px 10px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 18px;
  flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 9px; overflow: hidden; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; flex: 0 0 auto;
  background: linear-gradient(135deg, #4f83ff, #1ec98b);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
  letter-spacing: -0.5px;
  box-shadow: 0 12px 26px rgba(61,127,255,.24), 0 1px 0 rgba(255,255,255,.18) inset;
}
.brand-mark span { color: #cfe0ff; }
.brand-name { font-weight: 700; font-size: 15.5px; letter-spacing: -0.2px; }
.badge-beta {
  font-size: 9px; font-weight: 700; color: var(--blue-bright);
  background: var(--blue-dim); border: 1px solid rgba(61,127,255,.3);
  padding: 2px 5px; border-radius: 4px; letter-spacing: .5px;
}
.sidebar.collapsed .brand-name, .sidebar.collapsed .badge-beta { display: none; }

.sidebar-collapse {
  background: linear-gradient(180deg, rgba(30,36,51,.92), rgba(14,18,29,.95));
  border: 1px solid rgba(82,98,132,.56);
  color: var(--text-secondary);
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset;
  transition: transform .18s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.sidebar-collapse:hover {
  transform: translateX(-1px);
  background: linear-gradient(180deg, rgba(45,57,86,.98), rgba(23,32,52,.98));
  border-color: rgba(91,147,255,.72);
  color: var(--text-primary);
  box-shadow: 0 10px 22px rgba(37,99,235,.16), 0 1px 0 rgba(255,255,255,.08) inset;
}
.sidebar.collapsed .sidebar-collapse svg { transform: rotate(180deg); }

.account-card {
  flex: 0 0 auto;
  position: relative;
  background:
    linear-gradient(145deg, rgba(28,35,52,.92), rgba(12,16,26,.96) 52%),
    var(--bg-card);
  border: 1px solid rgba(77,91,123,.56);
  border-radius: 12px;
  padding: 11px;
  margin-bottom: 18px;
  box-shadow: 0 14px 34px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.025) inset;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.account-card:hover {
  transform: translateY(-1px);
  border-color: rgba(91,147,255,.54);
  box-shadow: 0 18px 42px rgba(37,99,235,.13), 0 0 0 1px rgba(255,255,255,.035) inset;
}
.account-row { display: flex; align-items: center; gap: 10px; }
.account-avatar {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(135deg, #3d7fff, #1ec98b);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: #fff;
}
.account-info { overflow: hidden; white-space: nowrap; }
.account-name { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.tag-elite {
  font-size: 8.5px; font-weight: 800; color: #1a1306;
  background: linear-gradient(135deg, #f3c969, #d9a441);
  padding: 1.5px 5px; border-radius: 4px; letter-spacing: .3px;
}
.account-email { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.account-controls {
  display: grid;
  grid-template-columns: 1fr 28px 28px;
  gap: 6px;
  margin-top: 10px;
}
.account-controls select {
  min-width: 0;
  height: 31px;
  background: linear-gradient(180deg, rgba(21,27,41,.96), rgba(12,16,26,.98));
  border: 1px solid rgba(82,98,132,.58);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 11.5px;
  padding: 0 9px;
  outline: none;
}
.account-action {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  border: 1px solid rgba(82,98,132,.58);
  background: linear-gradient(180deg, rgba(30,36,51,.94), rgba(14,18,29,.94));
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,.055) inset;
}
.account-action:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(45,57,86,.98), rgba(23,32,52,.98));
  border-color: rgba(91,147,255,.72);
  color: var(--text-primary);
}
.account-action.danger:hover { border-color: rgba(242,54,69,.55); color: var(--red); }
.account-manage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 7px;
}
.account-manage button {
  border: 1px solid rgba(77,91,123,.5);
  background: rgba(255,255,255,.015);
  color: var(--text-tertiary);
  border-radius: 7px;
  height: 26px;
  font-size: 10.5px;
  font-weight: 600;
}
.account-manage button:hover {
  transform: translateY(-1px);
  background: rgba(61,127,255,.1);
  border-color: rgba(91,147,255,.5);
  color: var(--text-primary);
}
.sidebar.collapsed .account-card { display: none; }

.nav {
  flex: 0 0 auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 6px;
}
.nav-label {
  font-size: 10.5px; font-weight: 800; color: #71809d;
  text-transform: uppercase; letter-spacing: .6px;
  padding: 14px 10px 6px;
}
.sidebar.collapsed .nav-label { opacity: 0; height: 6px; padding: 6px 0 0; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  min-height: 36px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px; font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .15s cubic-bezier(.16,1,.3,1), background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5b93ff, #1ec98b);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .16s ease, transform .16s ease;
}
.nav-item:hover {
  transform: translateX(3px);
  background: linear-gradient(90deg, rgba(61,127,255,.11), rgba(255,255,255,.025));
  border-color: rgba(82,98,132,.38);
  color: var(--text-primary);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.nav-item:hover::before,
.nav-item.active::before {
  opacity: 1;
  transform: translateX(0);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(61,127,255,.24), rgba(61,127,255,.08));
  border-color: rgba(91,147,255,.46);
  color: #dfe9ff;
  box-shadow: 0 10px 24px rgba(37,99,235,.13), 0 0 0 1px rgba(91,147,255,.06) inset;
}
.nav-item.active .nav-icon { color: var(--blue-bright); }
.nav-item.disabled { opacity: .42; cursor: default; }
.nav-item.disabled:hover { transform: none; background: transparent; color: var(--text-secondary); border-color: transparent; box-shadow: none; }
.nav-item.disabled::before { display: none; }
.nav-icon {
  flex: 0 0 auto;
  color: var(--text-secondary);
  width: 17px;
  height: 17px;
  transition: transform .15s ease, color .15s ease;
}
.nav-item:hover .nav-icon { transform: scale(1.08); }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: inherit; }
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-bright);
  margin-left: auto;
  box-shadow: 0 0 0 4px rgba(61,127,255,.12), 0 0 16px rgba(91,147,255,.8);
  animation: sidebarNavPulse 1.9s ease-in-out infinite;
}
.nav-item span:not(.nav-dot):not(.tag-soon) { overflow: hidden; }
.sidebar.collapsed .nav-item span:not(.nav-dot), .sidebar.collapsed .chev { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; }

.tag-soon {
  font-size: 8.5px; font-weight: 700; color: var(--blue-bright);
  background: var(--blue-dim); border: 1px solid rgba(61,127,255,.3);
  padding: 1.5px 5px; border-radius: 4px; margin-left: auto;
}

.nav-group-toggle .chev { width: 13px; height: 13px; margin-left: auto; color: var(--text-tertiary); transition: transform .15s ease; }
.nav-group-toggle.open .chev { transform: rotate(180deg); }
.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 30px;
  overflow: hidden;
  max-height: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .24s cubic-bezier(.16,1,.3,1), opacity .18s ease, transform .18s ease;
}
.nav-sub.open { max-height: 220px; visibility: visible; opacity: 1; transform: translateY(0); }
.nav-item.sub { font-size: 13px; padding: 7px 10px; }
.sidebar.collapsed .nav-sub { display: none; }

.sidebar-bottom {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-bottom: 12px;
}
.upgrade-card {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, rgba(61,127,255,.18), rgba(30,201,139,.1));
  border: 1px solid rgba(61,127,255,.38);
  border-radius: 12px;
  padding: 9px 10px; margin-bottom: 6px;
  font-size: 12px; font-weight: 600; color: var(--blue-bright);
  white-space: nowrap; overflow: hidden;
  box-shadow: 0 14px 28px rgba(37,99,235,.12), 0 1px 0 rgba(255,255,255,.06) inset;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.upgrade-card:hover {
  transform: translateY(-1px);
  border-color: rgba(91,147,255,.7);
  box-shadow: 0 18px 34px rgba(37,99,235,.18), 0 1px 0 rgba(255,255,255,.08) inset;
}
.sidebar.collapsed .upgrade-card span:not(.tag-soon) { display: none; }
@keyframes sidebarNavPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .72; }
}
.sidebar.collapsed .upgrade-card { justify-content: center; }

/* ============================================================
   MAIN AREA / TOPBAR
   ============================================================ */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}

.topbar {
  position: relative;
  height: 64px; flex: 0 0 auto;
  display: flex; align-items: center;
  padding: 0 clamp(12px, 1.25vw, 24px);
  border-bottom: 1px solid rgba(69, 82, 112, .34);
  gap: clamp(10px, 1.35vw, 22px);
  background:
    radial-gradient(circle at 18% -80%, rgba(61, 127, 255, .18), transparent 34%),
    linear-gradient(180deg, rgba(17, 22, 34, .9), rgba(9, 12, 19, .86));
  box-shadow: 0 12px 32px rgba(0,0,0,.2), 0 1px 0 rgba(255,255,255,.035) inset;
  backdrop-filter: blur(14px);
  z-index: 30;
  overflow: hidden;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61,127,255,.7), rgba(30,201,139,.35), transparent);
  opacity: .55;
}
.topbar-left {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 1px;
  min-width: 0;
  flex: 1 1 560px;
  max-width: min(680px, 48vw);
  position: relative;
  z-index: 1;
}
.page-title {
  grid-column: 1;
  grid-row: 1;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0;
  text-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.page-date {
  grid-column: 1;
  grid-row: 2;
  font-size: 11.5px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.topbar-center { flex: 0 1 440px; min-width: 190px; display: flex; justify-content: center; position: relative; z-index: 1; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, rgba(22, 28, 42, .94), rgba(13, 17, 27, .94));
  border: 1px solid rgba(84, 99, 132, .56);
  border-radius: 12px;
  padding: 8px 12px;
  width: 100%; max-width: 420px;
  color: var(--text-tertiary);
  box-shadow: 0 10px 26px rgba(0,0,0,.18), 0 1px 0 rgba(255,255,255,.055) inset;
  transition: max-width .22s cubic-bezier(.16, 1, .3, 1), border-color .16s ease, box-shadow .16s ease, transform .16s ease, color .16s ease;
}
.search-box:hover,
.search-box:focus-within {
  max-width: 480px;
  color: #b8c6df;
  border-color: rgba(91, 147, 255, .86);
  box-shadow: 0 14px 34px rgba(37,99,235,.16), 0 0 0 3px rgba(61,127,255,.11), 0 1px 0 rgba(255,255,255,.07) inset;
  transform: translateY(-1px);
}
.search-box input {
  background: transparent; border: none; outline: none;
  color: var(--text-primary); font-size: 13px; flex: 1;
}
.search-box input::placeholder { color: var(--text-tertiary); }
.search-box kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(122, 141, 176, .38);
  border-radius: 6px; padding: 2px 6px; color: #8fa2c3;
}

.topbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; position: relative; z-index: 1; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(30, 36, 51, .92), rgba(15, 19, 29, .92));
  border: 1px solid rgba(82, 98, 132, .52);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 8px 18px rgba(0,0,0,.16);
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.icon-btn:hover {
  background: linear-gradient(180deg, rgba(42, 51, 73, .98), rgba(20, 27, 44, .98));
  border-color: rgba(91, 147, 255, .66);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37,99,235,.15), 0 1px 0 rgba(255,255,255,.08) inset;
}
.icon-btn.primary {
  background: linear-gradient(180deg, #4f83ff, #2463eb);
  border-color: rgba(118, 163, 255, .82);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37,99,235,.26), 0 1px 0 rgba(255,255,255,.18) inset;
}
.icon-btn.primary:hover { background: linear-gradient(180deg, #6898ff, #2f70ff); }
.notif-dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 1.5px solid var(--bg-app);
  box-shadow: 0 0 0 4px rgba(242,54,69,.12);
  animation: navPulse 1.8s ease-in-out infinite;
}
.clock {
  font-family: var(--font-mono); font-size: 12.5px; color: #b7c0d2; white-space: nowrap;
  padding: 0 4px;
}
.user-pill {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, rgba(30, 36, 51, .92), rgba(15, 19, 29, .92));
  border: 1px solid rgba(82, 98, 132, .52);
  border-radius: 999px; padding: 4px 9px 4px 4px;
  color: var(--text-tertiary);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 8px 18px rgba(0,0,0,.13);
  transition: transform .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.user-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 201, 139, .55);
  color: var(--text-primary);
  box-shadow: 0 12px 24px rgba(30,201,139,.12), 0 1px 0 rgba(255,255,255,.08) inset;
}
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #3d7fff, #1ec98b);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
@keyframes navPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: .72; }
}

/* ============================================================
   PAGE CONTAINER
   ============================================================ */
.page-container {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px 16px;
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  height: 30px; flex: 0 0 auto;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center;
  font-size: 11.5px; color: var(--text-secondary);
  overflow: hidden;
}
.ticker-label {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 0 14px; font-weight: 700; color: var(--text-tertiary);
  border-right: 1px solid var(--border-soft); height: 100%;
  letter-spacing: .5px;
}
.ticker-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.ticker-track {
  display: flex; gap: 36px; white-space: nowrap;
  padding-left: 14px;
  animation: ticker-scroll 32s linear infinite;
}
.ticker-track span.t-time { color: var(--text-tertiary); margin-right: 6px; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   SHARED: CARDS / GRID / KPIs
   ============================================================ */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.row-12-4 { grid-template-columns: 2.6fr 1fr; }
.row-2-1 { grid-template-columns: 1.5fr 1fr; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.card-flat { background: var(--bg-card-alt); }

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 108px;
  position: relative;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.kpi-icon.blue { background: var(--blue-dim); color: var(--blue-bright); }
.kpi-icon.amber { background: var(--amber-dim); color: var(--amber); }
.kpi-icon.green { background: var(--green-dim); color: var(--green); }
.kpi-pill {
  font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
  padding: 3px 7px; border-radius: 5px;
  background: var(--bg-elevated); color: var(--text-tertiary);
}
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); letter-spacing: .3px; text-transform: uppercase; }
.kpi-value { font-size: 23px; font-weight: 700; font-family: var(--font-mono); letter-spacing: -0.5px; }
.kpi-sub { font-size: 11.5px; color: var(--text-tertiary); }
.kpi-bar { height: 5px; border-radius: 3px; background: var(--bg-elevated); overflow: hidden; margin-top: 2px; }
.kpi-bar-fill { height: 100%; background: var(--blue); border-radius: 3px; }

.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.section-title { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-title svg { color: var(--blue-bright); width: 17px; height: 17px; }
.section-sub { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }

.pill {
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-secondary); background: transparent;
}
.pill.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.live-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; color: var(--green);
  background: var(--green-dim); border: 1px solid rgba(30,201,139,.3);
  padding: 3px 8px; border-radius: 999px;
}
.live-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.btn {
  font-size: 12.5px; font-weight: 600; padding: 8px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text-primary);
}
.btn:hover { background: var(--bg-hover); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-bright); }
.btn-ghost { background: transparent; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
  text-align: left; font-size: 10.5px; font-weight: 700; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: .4px;
  padding: 8px 10px; border-bottom: 1px solid var(--border-soft);
}
table.data-table td { padding: 10px 10px; border-bottom: 1px solid var(--border-soft); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--bg-hover); }

.symbol-chip { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.symbol-dot { width: 8px; height: 8px; border-radius: 50%; }
.dir-pill { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: .3px; }
.dir-pill.long { background: var(--blue-dim); color: var(--blue-bright); }
.dir-pill.short { background: var(--amber-dim); color: var(--amber); }
.result-pill { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.result-pill.win { background: var(--green-dim); color: var(--green); }
.result-pill.loss { background: var(--red-dim); color: var(--red); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-tertiary); }
.empty-state svg { margin-bottom: 10px; opacity: .5; }
.empty-state h4 { color: var(--text-secondary); font-size: 14px; margin: 0 0 4px; }
.empty-state p { font-size: 12.5px; margin: 0; }

/* Calendar (dashboard) */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: 10px; color: var(--text-tertiary); text-align: center; font-weight: 700; padding-bottom: 4px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 7px; background: var(--bg-elevated);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-secondary); gap: 2px;
  border: 1px solid transparent;
}
.cal-cell.empty { background: transparent; }
.cal-cell.profit { background: var(--blue-dim); border-color: rgba(61,127,255,.35); color: var(--blue-bright); }
.cal-cell.loss { background: var(--red-dim); border-color: rgba(242,54,69,.3); color: var(--red); }
.cal-pnl { font-size: 9px; font-weight: 700; font-family: var(--font-mono); }
.cal-legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; font-size: 11px; color: var(--text-tertiary); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.profit { background: var(--blue-bright); }
.legend-dot.loss { background: var(--red); }

.scroll-x { overflow-x: auto; }

@media (max-width: 1300px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .row-12-4 { grid-template-columns: 1fr; }
}
