/* TACTIS Layout Fix v2 - Remove Empty Space & Fix Panel Scrolling */

/* ============ MAIN GRID FIX ============ */
.main-content {
  grid-template-rows: auto !important;
  align-items: start !important;
  height: calc(100vh - 60px) !important;
  max-height: calc(100vh - 60px) !important;
  overflow: hidden !important;
}

/* ============ LEFT PANEL - Market Scanner + Opportunity Ranking ============ */
.left-panel {
  height: calc(100vh - 76px) !important;
  max-height: calc(100vh - 76px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Market Scanner - takes 55% of left panel, scrollable */
.market-scanner {
  flex: 0 0 55% !important;
  max-height: 55% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Opportunity Board - takes remaining 45%, scrollable */
.opportunity-board {
  flex: 1 1 45% !important;
  min-height: 200px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Asset grid inside market scanner */
.asset-grid {
  overflow: visible !important;
}

/* ============ CENTER PANEL ============ */
.center-panel {
  height: calc(100vh - 76px) !important;
  max-height: calc(100vh - 76px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Main Chart - compact height, no empty space */
.main-chart {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 340px !important;
  max-height: 400px !important;
}

.main-chart .recharts-responsive-container {
  height: 280px !important;
  max-height: 280px !important;
}

/* Center Bottom - Technical Analysis + AI Analysis */
.center-bottom {
  flex: 1 1 auto !important;
  margin-top: 16px !important;
}

/* ============ RIGHT PANEL ============ */
.right-panel {
  height: calc(100vh - 76px) !important;
  max-height: calc(100vh - 76px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* ============ SCROLLBAR STYLING ============ */
.left-panel::-webkit-scrollbar,
.center-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar,
.market-scanner::-webkit-scrollbar,
.opportunity-board::-webkit-scrollbar {
  width: 6px;
}

.left-panel::-webkit-scrollbar-track,
.center-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track,
.market-scanner::-webkit-scrollbar-track,
.opportunity-board::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb,
.center-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb,
.market-scanner::-webkit-scrollbar-thumb,
.opportunity-board::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb:hover,
.center-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover,
.market-scanner::-webkit-scrollbar-thumb:hover,
.opportunity-board::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.8);
}