/* ========== DASHBOARD / APP LAYOUT ========== */

.app-body {
  background: #131316;
  min-height: 100vh;
  display: flex;
}

/* ========== SIDEBAR ========== */
.app-sidebar {
  width: 240px;
  min-width: 240px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: #15151a;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-sidebar::-webkit-scrollbar {
  width: 4px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
}

/* Sidebar Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 24px;
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-logo .logo-mark {
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: 17px;
  font-weight: 700;
  color: #e0e0e8;
  letter-spacing: 1.5px;
}

/* Sidebar Sections */
.sidebar-section {
  padding: 0 12px;
  margin-bottom: 4px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  color: #4a4a5a;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 8px 12px 6px;
}

/* Collapsible Section Header */
.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  border-radius: 6px;
}

.sidebar-group-header:hover {
  background: rgba(255,255,255,0.02);
}

.sidebar-group-header .sidebar-section-label {
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.sidebar-group-chevron {
  width: 14px;
  height: 14px;
  color: #4a4a5a;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.sidebar-group.collapsed .sidebar-group-chevron {
  transform: rotate(-90deg);
}

/* Collapsible Group Items */
.sidebar-group-items {
  max-height: 800px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  opacity: 1;
}

.sidebar-group.collapsed .sidebar-group-items {
  max-height: 0;
  opacity: 0;
}

/* Sidebar Nav Items */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin: 1px 0;
  border-radius: 8px;
  color: #8a8a9a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border-left: 2px solid transparent;
}

.sidebar-nav-item:hover {
  color: #c8c8d4;
  background: rgba(255,255,255,0.04);
}

.sidebar-nav-item.active {
  color: #5cb8e6;
  background: rgba(92, 184, 230, 0.08);
  border-left-color: #5cb8e6;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-nav-item.active svg {
  opacity: 1;
}

/* Coin wallet items */
.sidebar-coin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  margin: 1px 0;
  border-radius: 8px;
  color: #8a8a9a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border-left: 2px solid transparent;
}

.sidebar-coin-item:hover {
  color: #c8c8d4;
  background: rgba(255,255,255,0.04);
}

.sidebar-coin-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-coin-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-coin-ticker {
  font-size: 11px;
  color: #4a4a5a;
  font-weight: 400;
}

.sidebar-coin-expand {
  width: 14px;
  height: 14px;
  color: #4a4a5a;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar-coin-item.expanded .sidebar-coin-expand {
  transform: rotate(90deg);
}

/* Coin sub-items (Send, Receive, Trade) */
.sidebar-coin-subitems {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 0;
}

.sidebar-coin-subitems.open {
  max-height: 120px;
  opacity: 1;
}

.sidebar-coin-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 46px;
  color: #6a6a7a;
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  transition: all 0.15s;
  cursor: pointer;
  border-radius: 6px;
}

.sidebar-coin-subitem:hover {
  color: #c8c8d4;
  background: rgba(255,255,255,0.03);
}

.sidebar-coin-subitem svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* Sidebar Spacer */
.sidebar-spacer {
  flex: 1;
  min-height: 8px;
}

/* Sidebar nav scrollable area */
.sidebar-nav-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
}

.sidebar-nav-scroll::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
}

/* Sidebar Bottom Section */
.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5cb8e6, #4a9cd4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 11px;
  color: #6a6a7a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #e65c5c;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.sidebar-logout:hover {
  background: rgba(230, 92, 92, 0.08);
}

.sidebar-logout svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ========== SLIM TOP BAR ========== */
.app-topbar {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 52px;
  background: #1a1a1f;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.topbar-breadcrumb a {
  color: #6a6a7a;
  text-decoration: none;
  transition: color 0.15s;
}

.topbar-breadcrumb a:hover {
  color: #a8a8b8;
}

.topbar-breadcrumb svg {
  color: #4a4a5a;
}

.topbar-breadcrumb span {
  color: #e0e0e8;
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger toggle (mobile only) */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: #8a8a9a;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s;
}

.sidebar-toggle:hover {
  color: #e0e0e8;
  background: rgba(255,255,255,0.04);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

/* Notification bell in topbar */
.app-icon-btn {
  position: relative;
  background: none;
  border: none;
  color: #8a8a9a;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.app-icon-btn:hover {
  color: #e0e0e8;
  background: rgba(255,255,255,0.04);
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: #5cb8e6;
  border-radius: 50%;
  border: 2px solid #1a1a1f;
}

/* ========== APP CONTENT WRAPPER ========== */
.app-content-wrapper {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  padding-top: 52px;
}

/* ========== MARKET TICKER ========== */
.market-ticker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 32px;
  height: 40px;
  background: rgba(26, 26, 31, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  white-space: nowrap;
}

.ticker-symbol {
  font-size: 11px;
  font-weight: 700;
  color: #8a8a9a;
  letter-spacing: 0.5px;
}

.ticker-price {
  font-size: 12px;
  font-weight: 500;
  color: #e0e0e8;
}

.ticker-change {
  font-size: 11px;
  font-weight: 600;
}

.ticker-change.positive { color: #4ecb71; }
.ticker-change.negative { color: #e65c5c; }

.ticker-divider {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* ========== MAIN CONTENT ========== */
.app-main {
  padding: 28px 32px 80px;
}

/* Welcome */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.dash-welcome h1 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #e0e0e8;
  margin-bottom: 4px;
}

.dash-welcome h1 span {
  color: #5cb8e6;
}

.dash-date {
  font-size: 13px;
  color: #6a6a7a;
}

.dash-welcome-actions {
  display: flex;
  gap: 10px;
}

.btn-sm {
  font-size: 13px;
  padding: 10px 24px;
}

/* ========== CARD BASE ========== */
.dash-card {
  background: #1a1a1f;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 24px;
}

/* Card background variations for visual distinction */
.dash-balance-hero {
  background: #1d1b22;
  border-left: 3px solid rgba(168, 130, 230, 0.3);
}

.dash-chart-card {
  background: #191b22;
  border-left: 3px solid rgba(92, 184, 230, 0.2);
}

.account-card .wallet-icon ~ .wallet-icon,
.dash-card.account-card:first-child {
  /* handled below */
}

.dash-accounts-row .account-card:nth-child(1) {
  background: #191c23;
  border-left: 3px solid rgba(92, 184, 230, 0.25);
}

.dash-accounts-row .account-card:nth-child(2) {
  background: #191e1c;
  border-left: 3px solid rgba(78, 203, 113, 0.25);
}

.dash-positions {
  background: #1c1a21;
  border-left: 3px solid rgba(230, 168, 92, 0.2);
}

.dash-holdings {
  background: #1a1c21;
  border-left: 3px solid rgba(92, 184, 230, 0.15);
}

.dash-activity {
  background: #1c1a1e;
  border-left: 3px solid rgba(168, 130, 230, 0.2);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-card-label {
  font-size: 12px;
  font-weight: 500;
  color: #6a6a7a;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.dash-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #e0e0e8;
}

.dash-card-link {
  font-size: 12px;
  color: #5cb8e6;
  text-decoration: none;
  font-weight: 500;
}

.dash-card-link:hover {
  text-decoration: underline;
}

.dash-badge {
  font-size: 11px;
  font-weight: 600;
  color: #5cb8e6;
  background: rgba(92, 184, 230, 0.1);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ========== TOP 3 CARDS ========== */
.dash-top-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

/* ========== COMPACT CHART ========== */
.dash-chart-compact {
  margin-bottom: 20px;
  padding: 16px 24px;
}

.dash-chart-compact .perf-chart {
  min-height: 80px;
  max-height: 100px;
}

/* ========== PORTFOLIO HERO (legacy) ========== */
.dash-portfolio-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* Balance Hero Card */
.dash-balance-hero {
  display: flex;
  flex-direction: column;
}

.dash-balance-value {
  font-size: 36px;
  font-weight: 700;
  color: #e0e0e8;
  letter-spacing: -1px;
  margin: 12px 0 8px;
  line-height: 1;
}

.dash-balance-value .cents {
  font-size: 22px;
  font-weight: 500;
  color: #8a8a9a;
}

.dash-balance-change {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.dash-balance-change.positive { color: #4ecb71; }
.dash-balance-change.negative { color: #e65c5c; }

.dash-timeframe {
  color: #6a6a7a;
  font-weight: 400;
}

/* Balance Breakdown */
.balance-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-dot.wallet { background: #5cb8e6; }
.breakdown-dot.bank { background: #4ecb71; }

.breakdown-row.breakdown-sub {
  padding-left: 18px;
  font-size: 12px;
}

.breakdown-row.breakdown-sub .breakdown-label {
  color: #5a5a6a;
  font-size: 12px;
}

.breakdown-row.breakdown-sub .breakdown-value {
  font-weight: 500;
  font-size: 12px;
  color: #a8a8b8;
}

.breakdown-label {
  color: #8a8a9a;
  flex: 1;
}

.breakdown-value {
  color: #e0e0e8;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.breakdown-pct {
  color: #6a6a7a;
  font-size: 12px;
  min-width: 42px;
  text-align: right;
}

/* ========== CHART CARD ========== */
.dash-chart-card {
  display: flex;
  flex-direction: column;
}

.chart-timeframes {
  display: flex;
  gap: 4px;
}

.tf-btn {
  background: none;
  border: none;
  color: #6a6a7a;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.3px;
}

.tf-btn:hover {
  color: #e0e0e8;
  background: rgba(255,255,255,0.04);
}

.tf-btn.active {
  color: #5cb8e6;
  background: rgba(92, 184, 230, 0.1);
}

.chart-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.perf-chart {
  flex: 1;
  width: 100%;
  min-height: 80px;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #4a4a5a;
  padding-top: 8px;
}

/* ========== ACCOUNT CARDS ROW ========== */
.dash-accounts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.dash-accounts-row.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.account-card {
  padding: 20px 24px;
}

.account-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.account-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-icon.wallet-icon {
  background: rgba(92, 184, 230, 0.1);
  color: #5cb8e6;
}

.account-icon.bank-icon {
  background: rgba(78, 203, 113, 0.1);
  color: #4ecb71;
}

.account-card-label {
  font-size: 12px;
  color: #6a6a7a;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 500;
  margin-bottom: 6px;
}

.account-card-value {
  font-size: 24px;
  font-weight: 700;
  color: #e0e0e8;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.account-card-detail-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.account-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6a6a7a;
}

.detail-val {
  color: #a8a8b8;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.detail-val.positive { color: #4ecb71; }

.account-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6a6a7a;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.account-card-footer .positive { color: #4ecb71; }

/* ========== HOLDINGS ========== */
.dash-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.holdings-list {
  display: flex;
  flex-direction: column;
}

.holding-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.holding-row:last-child {
  border-bottom: none;
}

.holding-asset {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 140px;
}

.holding-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.holding-icon.btc { background: linear-gradient(135deg, #f7931a, #e8830e); }
.holding-icon.eth { background: linear-gradient(135deg, #627eea, #4c6bdf); }
.holding-icon.sol { background: linear-gradient(135deg, #9945ff, #14f195); }
.holding-icon.usdc { background: linear-gradient(135deg, #2775ca, #1a5fb4); }

.holding-name {
  font-size: 14px;
  font-weight: 500;
  color: #e0e0e8;
}

.holding-ticker {
  font-size: 12px;
  color: #6a6a7a;
  margin-top: 1px;
}

.holding-mid {
  flex: 1;
  padding: 0 16px;
}

.spark-chart {
  width: 80px;
  height: 30px;
  display: block;
}

.holding-values {
  text-align: right;
  min-width: 100px;
}

.holding-amount {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e8;
  font-variant-numeric: tabular-nums;
}

.holding-change {
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

.holding-change.positive { color: #4ecb71; }
.holding-change.negative { color: #e65c5c; }
.holding-change.neutral { color: #6a6a7a; }

/* ========== ACTIVITY ========== */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.activity-row:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon.deposit {
  background: rgba(78, 203, 113, 0.1);
  color: #4ecb71;
}

.activity-icon.trade {
  background: rgba(92, 184, 230, 0.1);
  color: #5cb8e6;
}

.activity-icon.card-tx {
  background: rgba(168, 168, 184, 0.08);
  color: #8a8a9a;
}

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 14px;
  font-weight: 500;
  color: #e0e0e8;
}

.activity-desc {
  font-size: 12px;
  color: #6a6a7a;
  margin-top: 1px;
}

.activity-values {
  text-align: right;
  flex-shrink: 0;
}

.activity-amount {
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e8;
  font-variant-numeric: tabular-nums;
}

.activity-amount.positive { color: #4ecb71; }

.activity-time {
  font-size: 12px;
  color: #6a6a7a;
  margin-top: 2px;
}

/* ========== VERIFICATION BANNER ========== */
.dash-verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(92, 184, 230, 0.06), rgba(92, 184, 230, 0.02));
  border-color: rgba(92, 184, 230, 0.12);
}

.verify-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.verify-content svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.verify-title {
  font-size: 15px;
  font-weight: 600;
  color: #e0e0e8;
  margin-bottom: 4px;
}

.verify-desc {
  font-size: 13px;
  color: #8a8a9a;
  line-height: 1.5;
}

/* ========== OPEN POSITIONS ========== */
.dash-positions {
  margin-bottom: 20px;
}

.positions-tabs {
  display: flex;
  gap: 4px;
}

.pos-tab {
  background: none;
  border: none;
  color: #6a6a7a;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.3px;
}

.pos-tab:hover {
  color: #e0e0e8;
  background: rgba(255,255,255,0.04);
}

.pos-tab.active {
  color: #5cb8e6;
  background: rgba(92, 184, 230, 0.1);
}

.positions-panel {
  display: none;
}

.positions-panel.active {
  display: block;
}

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

.positions-scroll::-webkit-scrollbar {
  height: 4px;
}

.positions-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.positions-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}

.positions-header,
.position-row {
  display: flex;
  align-items: center;
  min-width: 820px;
}

.positions-header {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
  margin-bottom: 2px;
}

.positions-header .pcol {
  font-size: 11px;
  font-weight: 600;
  color: #4a4a5a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.position-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
  cursor: pointer;
}

.position-row:last-child {
  border-bottom: none;
}

.position-row:hover {
  background: rgba(255,255,255,0.015);
}

/* Position columns */
.pcol {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.pcol-inst {
  width: 180px;
}

.pcol-side {
  width: 70px;
}

.pcol-size {
  width: 95px;
  font-size: 13px;
  color: #a8a8b8;
}

.pcol-entry {
  width: 95px;
  font-size: 13px;
  color: #6a6a7a;
}

.pcol-mark {
  width: 95px;
  font-size: 13px;
  color: #e0e0e8;
  font-weight: 500;
}

.pcol-liq {
  width: 95px;
  font-size: 13px;
  color: #6a6a7a;
}

.pcol-lev {
  width: 60px;
}

.pcol-pnl {
  flex: 1;
  text-align: right;
  min-width: 120px;
}

.pcol-type {
  width: 70px;
}

.pcol-strike {
  width: 85px;
  font-size: 13px;
  color: #a8a8b8;
}

.pcol-iv {
  width: 65px;
  font-size: 13px;
  color: #a8a8b8;
}

.pcol-delta {
  width: 65px;
  font-size: 13px;
  color: #a8a8b8;
}

.pcol-expiry {
  width: 60px;
  text-align: right;
  font-size: 12px;
  color: #6a6a7a;
}

/* Instrument cell */
.inst-name {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e8;
  letter-spacing: 0.2px;
}

.inst-exchange {
  font-size: 11px;
  color: #4a4a5a;
  margin-top: 2px;
}

/* Side tags */
.side-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.side-tag.long {
  color: #4ecb71;
  background: rgba(78, 203, 113, 0.1);
}

.side-tag.short {
  color: #e65c5c;
  background: rgba(230, 92, 92, 0.1);
}

/* Leverage tag */
.lev-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #e6a85c;
  background: rgba(230, 168, 92, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Type tags (Call/Put) */
.type-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.type-tag.call {
  color: #4ecb71;
  background: rgba(78, 203, 113, 0.1);
}

.type-tag.put {
  color: #e65c5c;
  background: rgba(230, 92, 92, 0.1);
}

/* PnL values */
.pnl-val {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pnl-val.positive { color: #4ecb71; }
.pnl-val.negative { color: #e65c5c; }

.pnl-roe {
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
}

.pnl-roe.positive { color: rgba(78, 203, 113, 0.7); }
.pnl-roe.negative { color: rgba(230, 92, 92, 0.7); }

/* Positions summary footer */
.positions-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.positions-count {
  font-size: 12px;
  color: #4a4a5a;
}

.positions-total {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #6a6a7a;
}

.positions-total .pnl-val {
  font-size: 14px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle {
    display: flex;
  }
  .app-topbar {
    left: 0;
  }
  .app-content-wrapper {
    margin-left: 0;
  }
  .app-main { padding: 24px 20px 60px; }
  .dash-top-cards { grid-template-columns: 1fr; }
  .dash-portfolio-hero { grid-template-columns: 1fr; }
  .dash-accounts-row { grid-template-columns: 1fr; }
  .dash-columns { grid-template-columns: 1fr; }
  .dash-welcome { flex-direction: column; align-items: flex-start; gap: 16px; }
  .dash-verify-banner { flex-direction: column; align-items: flex-start; }
  .market-ticker { padding: 0 16px; justify-content: flex-start; }
  .positions-scroll { margin: 0 -20px; padding: 0 20px; }
}

@media (max-width: 600px) {
  .dash-balance-value { font-size: 28px; }
  .app-main { padding: 20px 16px 60px; }
  .app-topbar { padding: 0 16px; }
  .market-ticker { height: 36px; }
  .ticker-item { padding: 0 12px; }
}
