/* CryptoSense Web — Layout */

/* Master grid */
.app {
  display: grid;
  grid-template-rows: 48px 1fr;
  grid-template-columns: 240px 1fr 320px;
  grid-template-areas:
    "topbar topbar topbar"
    "sidebar main agent";
  height: 100vh;
  width: 100vw;
}

/* ── Top bar ────────────────────────────────────────────────── */
#topbar {
  grid-area: topbar;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  gap: var(--space-3);
  overflow: hidden;
  z-index: 10;
}

/* BTC dump warning banner */
#btc-dump-banner {
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  z-index: 100;
  display: none;
  background: var(--amber-dim);
  border-bottom: 1px solid var(--amber);
  padding: 6px 16px;
  font-size: 12px;
  color: var(--amber);
  text-align: center;
}

/* ── Left sidebar ───────────────────────────────────────────── */
#sidebar {
  grid-area: sidebar;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Main content — 2×2 panel grid ─────────────────────────── */
#main {
  grid-area: main;
  display: grid;
  grid-template-rows: 60fr 40fr;
  grid-template-columns: 55fr 45fr;
  overflow: hidden;
  background: var(--bg-void);
  gap: 1px;
}

/* ── Right agent panel ──────────────────────────────────────── */
#agent-panel {
  grid-area: agent;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Panel base ─────────────────────────────────────────────── */
.panel {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  min-width: 0;
  min-height: 0;
}

.panel-header {
  height: 32px;
  min-height: 32px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-3);
  flex-shrink: 0;
  gap: var(--space-2);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3);
  min-height: 0;
}

/* ── Explicit grid placement by position (no named areas) ───── */
#chart-panel {
  grid-row: 1;
  grid-column: 1;
}

#signal-panel {
  grid-row: 1;
  grid-column: 2;
}

#bottom-left-panel {
  grid-row: 2;
  grid-column: 1;
}

#bottom-right-panel {
  grid-row: 2;
  grid-column: 2;
}
