/* TradeBot – Exact design system from screenshots */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0B0E11;
  --bg-soft: #121212;
  --card: #1A1A1A;
  --card-2: #1E2026;
  --elevated: #2B2F36;
  --border: #2B2F36;
  --border-soft: #1E2329;
  --yellow: #F0B90B;
  --yellow-bright: #FCD535;
  --yellow-dim: rgba(240, 185, 11, 0.12);
  --green: #0ECB81;
  --green-alt: #2EBD85;
  --green-dim: rgba(14, 203, 129, 0.12);
  --red: #F6465D;
  --red-dim: rgba(246, 70, 93, 0.12);
  --blue: #3B82F6;
  --purple: #8B5CF6;
  --orange: #F59E0B;
  --text: #EAECEF;
  --text-muted: #848E9C;
  --text-dim: #5E6673;
  --white: #FFFFFF;
  --black: #000000;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --nav-h: 72px;
  --header-h: 56px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --phone-w: 430px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: #050505;
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; color: inherit; }

/* Desktop phone frame */
.app-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: #050505;
}

.app-frame {
  width: 100%;
  max-width: var(--phone-w);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px #1a1a1a, 0 20px 60px rgba(0,0,0,.6);
}

.app-content {
  padding: 0 16px 96px;
}

/* Top nav */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
  min-height: var(--header-h);
  position: relative;
}
.top-nav-left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.top-nav .back-btn,
.top-nav .icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  flex-shrink: 0;
}
.top-nav .back-btn svg,
.top-nav .icon-btn svg { width: 22px; height: 22px; }

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
}
.brand-logo {
  width: 28px;
  height: 28px;
  background: none;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-logo svg { width: 28px; height: 28px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 17px; font-weight: 700; color: var(--white); letter-spacing: -0.02em; }
.brand-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #C8CDD4;
  font-weight: 500;
}
.brand-live .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.icon-btn { position: relative; }
.icon-btn .badge-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  border: 1.5px solid var(--bg);
}
.icon-btn .badge-dot.red { background: var(--red); }

/* Typography helpers */
.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
}
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
}
.label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-yellow { color: var(--yellow) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--white) !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
}
.card-lg { padding: 16px; border-radius: var(--radius-lg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(0.98); opacity: 0.9; }
.btn-yellow {
  background: var(--yellow);
  color: var(--black);
}
.btn-yellow-outline {
  background: transparent;
  color: var(--yellow);
  border: 1.5px solid var(--yellow);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
}
.btn-block { width: 100%; padding: 14px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { padding: 6px 10px; font-size: 12px; }

/* Pills / badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}
.pill-yellow { background: var(--yellow); color: var(--black); }
.pill-yellow-soft { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(240,185,11,.3); }
.pill-green { background: var(--green-dim); color: var(--green); }
.pill-green-solid { background: rgba(14,203,129,.15); color: var(--green); }
.pill-red { background: var(--red-dim); color: var(--red); }
.pill-gray { background: rgba(132,142,156,.15); color: var(--text-muted); }
.pill-outline-green {
  border: 1px solid var(--green);
  color: var(--green);
  background: transparent;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.pill-outline-red {
  border: 1px solid var(--red);
  color: var(--red);
  background: transparent;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.status-running {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.status-running .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(14,203,129,.12);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

/* Date selector */
.date-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.date-selector svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin: 12px 0 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  white-space: nowrap;
}
.tab.active {
  color: var(--yellow);
  font-weight: 600;
}
.tab.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--yellow);
  border-radius: 2px 2px 0 0;
}

.tabs-icons {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin: 8px 0 16px;
  scrollbar-width: none;
}
.tabs-icons::-webkit-scrollbar { display: none; }
.tab-icon {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  min-width: 64px;
}
.tab-icon svg { width: 18px; height: 18px; }
.tab-icon.active { color: var(--yellow); font-weight: 600; }
.tab-icon.active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 2px;
  background: var(--yellow);
  border-radius: 2px 2px 0 0;
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--phone-w);
  height: var(--nav-h);
  background: rgba(11, 14, 17, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 8px 8px 16px;
  z-index: 100;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 56px;
  padding-top: 4px;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active { color: var(--yellow); }
.bottom-nav-item.bot { color: var(--yellow); }
.bottom-nav-item .nav-bot-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: -10px;
  margin-bottom: 2px;
  background: transparent;
  border: 2px solid var(--yellow);
  color: var(--yellow);
  box-shadow: none;
}
.bottom-nav-item .nav-bot-icon svg { width: 22px; height: 22px; color: var(--yellow); }
.bottom-nav-item .nav-bot-icon svg path,
.bottom-nav-item .nav-bot-icon svg rect { fill: var(--yellow); }
.home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: var(--white);
  border-radius: 4px;
  opacity: 0.9;
}

/* Crypto avatar */
.crypto-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  flex-shrink: 0;
  overflow: hidden;
}
.crypto-avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.crypto-avatar.sm { width: 28px; height: 28px; font-size: 11px; }

/* Stats grids */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat-box {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  min-width: 0;
}
.stat-box .label { margin-bottom: 4px; display: block; }
.stat-box .value {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-box .sub {
  font-size: 11px;
  margin-top: 2px;
  font-weight: 500;
}

.metrics-divider {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 12px 0 4px;
}
.metrics-divider > div {
  text-align: center;
  padding: 0 4px;
  border-right: 1px solid var(--border);
}
.metrics-divider > div:last-child { border-right: none; }
.metrics-divider .label { display: block; margin-bottom: 4px; font-size: 10px; }
.metrics-divider .value { font-size: 12px; font-weight: 600; color: var(--white); }

/* Bot list item */
.bot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}
.bot-item-info { flex: 1; min-width: 0; }
.bot-item-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}
.bot-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}
.bot-item-stats {
  text-align: right;
  flex-shrink: 0;
}
.bot-item-stats .row-label {
  font-size: 10px;
  color: var(--text-muted);
}
.bot-item-stats .row-val {
  font-size: 13px;
  font-weight: 700;
}
.bot-spark {
  width: 56px;
  height: 28px;
  flex-shrink: 0;
}
.more-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* See all link */
.see-all {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 600;
}

/* Progress bars */
.progress-track {
  height: 4px;
  background: var(--elevated);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 4px;
}

/* Pair profit rows */
.pair-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}
.pair-row .pair-name { font-weight: 600; color: var(--white); min-width: 70px; }
.pair-row .pair-bar { flex: 1; }
.pair-row .pair-amt { font-weight: 600; color: var(--white); min-width: 60px; text-align: right; }

/* Modal / bottom sheet */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  width: 100%;
  max-width: var(--phone-w);
  background: var(--card-2);
  border-radius: 20px 20px 0 0;
  padding: 12px 16px 32px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--elevated);
  border-radius: 4px;
  margin: 4px auto 16px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.action-item:last-child { border-bottom: none; }
.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.action-icon svg { width: 18px; height: 18px; color: var(--white); }
.action-icon.green { background: var(--green); }
.action-icon.yellow { background: var(--yellow); }
.action-icon.blue { background: var(--blue); }
.action-icon.purple { background: var(--purple); }
.action-icon.orange { background: var(--orange); }
.action-icon.red { background: var(--red); }
.action-body { flex: 1; }
.action-body .title { font-size: 14px; font-weight: 600; color: var(--white); }
.action-body .desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.action-item.danger .title { color: var(--red); }
.action-chevron { color: var(--text-dim); }

/* Settings list */
.settings-group {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
  overflow: hidden;
}
.settings-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 12px 14px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-soft);
}
.settings-item:first-of-type { border-top: none; }
.settings-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.settings-icon svg { width: 18px; height: 18px; }
.settings-icon.yellow { background: var(--yellow-dim); color: var(--yellow); }
.settings-icon.green { background: var(--green-dim); color: var(--green); }
.settings-icon.purple { background: rgba(139,92,246,.15); color: var(--purple); }
.settings-icon.blue { background: rgba(59,130,246,.15); color: var(--blue); }
.settings-body { flex: 1; min-width: 0; }
.settings-body .title { font-size: 14px; font-weight: 600; color: var(--white); }
.settings-body .desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.settings-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Toggle switch */
.toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--elevated);
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--yellow); }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  transition: transform .2s;
}
.toggle.on::after { transform: translateX(20px); }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.data-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }

/* Position / trade rows mobile */
.pos-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr 0.9fr 1.1fr 24px;
  gap: 4px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 11px;
}
.pos-row-head {
  color: var(--text-muted);
  font-weight: 500;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Charts */
.chart-wrap {
  position: relative;
  width: 100%;
  height: 200px;
}
.chart-wrap > div,
.chart-wrap > canvas {
  width: 100% !important;
  height: 100% !important;
}
.sparkline {
  display: block;
  overflow: visible;
}
.chart-wrap.sm { height: 140px; }
.chart-wrap.xs { height: 80px; }
.chart-wrap.donut { height: 140px; width: 140px; margin: 0 auto; }

/* Promo banner */
.promo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1a1a1a 0%, #252018 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}
.promo-banner .promo-art {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.promo-banner h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 4px;
}
.promo-banner p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Allocation / detail grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-list .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
}
.detail-list .row .k { color: var(--text-muted); }
.detail-list .row .v { color: var(--white); font-weight: 500; text-align: right; }

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* KPI metric cards grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 400px) {
  .kpi-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.kpi-card .label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.kpi-card .value {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}
.kpi-card .sub { font-size: 11px; margin-top: 2px; }

/* Selectable option cards */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.option-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: left;
  transition: border-color .15s;
}
.option-card.selected {
  border-color: var(--yellow);
  background: var(--yellow-dim);
}
.option-card .opt-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.option-card.selected .opt-icon { color: var(--yellow); }
.option-card .opt-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}
.option-card .opt-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}
.checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: transparent;
}
.checkbox-box.checked {
  background: var(--yellow);
  border-color: var(--yellow);
}
.checkbox-box.checked svg { width: 12px; height: 12px; color: var(--black); }

.format-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.format-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.format-card.selected { border-color: var(--yellow); background: var(--yellow-dim); }
.format-card .fmt-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 6px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--white);
}
.format-card .fmt-name { font-size: 12px; font-weight: 600; color: var(--white); }
.format-card .fmt-sub { font-size: 9px; color: var(--text-muted); margin-top: 2px; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.page-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.page-btn.active {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* Filter chips */
.filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.chip.active {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

/* Timeframe toggles */
.tf-toggles {
  display: flex;
  gap: 6px;
}
.tf-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.tf-btn.active {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* Flex helpers */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.p-0 { padding: 0; }
.w-full { width: 100%; }
.min-0 { min-width: 0; }
.shrink-0 { flex-shrink: 0; }

.scroll-x {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* Admin */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  background: var(--bg);
  max-width: none;
}
.admin-sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
}
.admin-sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.admin-sidebar a.active,
.admin-sidebar a:hover {
  background: var(--yellow-dim);
  color: var(--yellow);
}
.admin-main { padding: 24px; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.admin-table th { color: var(--text-muted); font-weight: 600; background: var(--card-2); }

.login-box {
  max-width: 380px;
  margin: 10vh auto;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--yellow);
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}
.alert-success { background: var(--green-dim); color: var(--green); }
.alert-error { background: var(--red-dim); color: var(--red); }

/* Sparkline inline SVG */
.sparkline { display: block; }

/* Info icon tiny */
.info-i {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-dim);
  font-size: 9px;
  color: var(--text-dim);
  font-style: normal;
  font-weight: 600;
}

/* Ring progress */
.ring {
  width: 28px;
  height: 28px;
}

/* Trade history compact */
.trade-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.trade-item:last-child { border-bottom: none; }

/* Two column charts */
.charts-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Section number heading */
.section-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin: 20px 0 12px;
}

/* Link yellow */
.link-yellow {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 500;
}

/* Mobile table scroll */
.table-scroll {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

@media (max-width: 430px) {
  .app-frame { box-shadow: none; }
  .pos-row {
    grid-template-columns: 1.3fr 0.8fr 1fr 0.8fr 1.1fr 20px;
    font-size: 10px;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .charts-2col { grid-template-columns: 1fr; }
}

/* Hide scrollbar utility */
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
