<script setup lang="ts">
import IrisPanel from '../components/dashboard/IrisPanel.vue'
import OperationsFeed from '../components/dashboard/OperationsFeed.vue'
import AgendaPanel from '../components/dashboard/AgendaPanel.vue'
import ActiveInitiatives from '../components/dashboard/ActiveInitiatives.vue'
import RecentlyFinished from '../components/dashboard/RecentlyFinished.vue'
</script>

<template>
  <div class="dashboard">
    <!-- Top Bar -->
    <div class="topbar">
      <span class="eyebrow">MISSION CONTROL</span>
      <h1>Übersicht</h1>
    </div>

    <!-- Three-column row -->
    <div class="columns">
      <IrisPanel />
      <OperationsFeed />
      <AgendaPanel />
    </div>

    <!-- Bottom sections -->
    <ActiveInitiatives />
    <RecentlyFinished />
  </div>
</template>

<style scoped>
.dashboard {
  --panel-bg: rgba(22, 27, 34, 0.8);
  --panel-border: rgba(139, 124, 246, 0.12);
  --text-primary: #e8eaf0;
  --text-secondary: #7e8799;
  --text-muted: #6b7385;
  --iris-accent: #a78bfa;
  --blue: #3b82f6;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --gray: #6b7280;
  --bg-base: #0d1117;

  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);

  animation: dashboard-fade-in 0.4s ease-out;
}

@keyframes dashboard-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom scrollbar */
.dashboard ::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.dashboard ::-webkit-scrollbar-track {
  background: transparent;
}
.dashboard ::-webkit-scrollbar-thumb {
  background: rgba(139, 124, 246, 0.2);
  border-radius: 3px;
}
.dashboard ::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 124, 246, 0.35);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--iris-accent);
  text-transform: uppercase;
}
.topbar h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.columns {
  display: grid;
  grid-template-columns: 280px 1fr 260px;
  gap: 10px;
}

@media (max-width: 900px) {
  .columns {
    grid-template-columns: 1fr;
  }
  .topbar h1 {
    font-size: 16px;
  }
}
</style>
