<template>
  <div class="page-shell">
    <!-- Page header -->
    <div class="page-shell__header">
      <div class="page-shell__copy">
        <p v-if="eyebrow" class="page-shell__eyebrow">{{ eyebrow }}</p>
        <h2 class="page-shell__title">{{ title }}</h2>
        <p v-if="description" class="page-shell__desc">{{ description }}</p>
      </div>
      <div v-if="$slots.actions" class="page-shell__actions">
        <slot name="actions" />
      </div>
    </div>

    <!-- Metric summary row -->
    <div v-if="$slots.summary" class="page-shell__summary">
      <slot name="summary" />
    </div>

    <!-- Main content -->
    <div class="page-shell__body">
      <slot />
    </div>
  </div>
</template>

<script setup>
defineProps({
  eyebrow: { type: String, default: '' },
  title: { type: String, required: true },
  description: { type: String, default: '' },
})
</script>

<style scoped>
.page-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-shell__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-shell__copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.page-shell__eyebrow {
  margin: 0;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.page-shell__title {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-shell__desc {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  max-width: 720px;
}

.page-shell__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.page-shell__summary {
  /* metric cards sit here */
}

.page-shell__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
</style>
