/* ── Layout ── */
.dashboard {
  display: flex;
  flex-direction: column;
  height: 100vh;
  gap: 1px;
  background: var(--bg-primary);
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.header .title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.3125em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.iso-indicator {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.iso-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan);
}

/* ── Main Content ── */
.main {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 1px;
}

/* ── Map Section ── */
.map-section {
  width: 35%;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.map-container {
  flex: 1;
  padding: 1rem;
  min-height: 0;
  position: relative;
}

.map-container svg {
  width: 100%;
  height: 100%;
}

.map-tooltip {
  position: absolute;
  padding: 4px 8px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  pointer-events: none;
  white-space: nowrap;
  display: none;
  z-index: 10;
}

/* ── Data Panels ── */
.data-panels {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
}

.data-panels .panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.gauges-row {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  padding: 1rem 0.75rem;
  gap: 0.5rem;
}

.chart-container {
  flex: 1;
  padding: 0 0.75rem 0.75rem;
  min-height: 0;
  position: relative;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ── Gauge ── */
.gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.gauge svg {
  width: 100%;
  max-width: 180px;
}

.gauge .readout {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: -0.5rem;
}

.gauge .value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.gauge .unit {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

/* ── Compass ── */
.compass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.compass svg {
  width: 100%;
  max-width: 160px;
}

.compass .readout {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}

.compass .value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.compass .cardinal {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan);
  font-family: var(--font-mono);
}

/* ── Playback ── */
.playback {
  padding: 0.75rem 1rem;
  flex-shrink: 0;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.transport {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.75rem;
  padding: 0 0.625rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.play-btn {
  padding: 0 0.875rem;
}

.scrubber {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timeline-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--bg-surface-2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.4);
}

.timestamp {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 10rem;
}

.speed-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.speed-buttons {
  display: flex;
  gap: 0.25rem;
}

.speed-btn {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0 0.5rem;
}

.speed-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 5px rgba(6, 182, 212, 0.2);
}

/* ── Ticker Banner ── */
.ticker-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 1.25rem;
  background: var(--bg-surface-1);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.ticker-label {
  flex-shrink: 0;
  color: var(--cyan);
}

.ticker-scroll {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-scroll .mono {
  font-size: 0.75rem;
  color: var(--cyan);
}

/* ── Feed Panel ── */
.feed-panel {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.feed-list::-webkit-scrollbar {
  width: 4px;
}

.feed-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.feed-tweet {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.feed-tweet:last-child {
  border-bottom: none;
}

.tweet-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.tweet-handle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
}

.tweet-time {
  font-size: 0.625rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.tweet-body {
  font-size: 0.75rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.tweet-hashtag {
  color: var(--cyan);
}

/* ── News Popup ── */
.news-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.news-popup {
  width: 480px;
  max-width: 90vw;
  padding: 1.5rem;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.15), 0 0 60px rgba(6, 182, 212, 0.05);
}

.news-popup-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.news-icon {
  font-size: 1.25rem;
}

.news-popup-header .micro-label {
  color: var(--cyan);
  font-size: 0.75rem;
}

.news-headline {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}

.news-body {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.news-dismiss {
  display: block;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  border-color: var(--cyan);
  color: var(--cyan);
}

.news-dismiss:hover {
  background: var(--cyan-glow);
}

/* ── Grid Status Panel ── */
.grid-status-panel {
  flex: 0 0 auto !important;
}

.status-row {
  display: flex;
  justify-content: space-evenly;
  padding: 0.625rem 0.75rem;
  gap: 0.5rem;
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.status-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.status-value.warn {
  color: var(--amber);
}

.status-value.critical {
  color: var(--red);
}

.status-unit {
  font-size: 0.625rem;
  color: var(--text-tertiary);
}
