/* Layout: Topbar, Ticker Marquee, 3 Resizable Columns */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Header Navbar */
.navbar {
  height: 48px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 10;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.nav-brand .brand-badge {
  background: var(--accent-blue);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-markets {
  display: flex;
  align-items: center;
  gap: 4px;
}

.market-tab {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.market-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.market-tab.active {
  background: var(--bg-card);
  color: var(--accent-blue);
  font-weight: 600;
  border-bottom: 2px solid var(--accent-blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
}

.search-box input {
  padding-left: 28px;
  width: 180px;
}

.search-box .icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Ticker Marquee Bar */
.ticker-bar {
  height: 30px;
  background-color: #0d1018;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 20px;
  animation: marquee 35s linear infinite;
  padding-left: 100%;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.ticker-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Main Dashboard Container with Resizable Columns */
.dashboard-grid {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
  background-color: var(--bg-dark);
  position: relative;
  height: calc(100vh - 78px);
}

.dashboard-grid.resizing {
  user-select: none;
  cursor: col-resize;
}

/* Column Dimensions (Default: 40% / 30% / 30%, Min: 20%) */
#col-1 {
  flex: 0 0 var(--col1-width, 40%);
  min-width: 20%;
  max-width: 60%;
  height: 100%;
  border-right: 1px solid var(--border-color);
}

#col-2 {
  flex: 0 0 var(--col2-width, 30%);
  min-width: 20%;
  max-width: 60%;
  height: 100%;
  border-right: 1px solid var(--border-color);
}

#col-3 {
  flex: 1 1 0;
  min-width: 20%;
  height: 100%;
  border-right: none;
}

/* Resizer Divider Handles */
.resizer {
  width: 5px;
  cursor: col-resize;
  background-color: var(--border-color);
  position: relative;
  z-index: 5;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.resizer:hover,
.resizer.active {
  background-color: var(--accent-blue);
}

/* Column Base Styling */
.column {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  overflow: hidden;
}

/* Responsive fallback on small mobile screens */
@media (max-width: 768px) {
  .dashboard-grid {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  .resizer {
    display: none;
  }
  #col-1, #col-2, #col-3 {
    flex: none !important;
    width: 100% !important;
    min-height: 400px;
    border-bottom: 1px solid var(--border-color);
  }
}
