/* ══════════════════════════════════════════════════════
   Lakshmi Dashboard — Design System
   Premium Dark Mode + Glassmorphism
   ══════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Root Variables (Design Tokens) ── */
:root {
  /* Background */
  --bg-primary: #06060b;
  --bg-secondary: #0d0d15;
  --bg-tertiary: #13131e;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  /* Glass */
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-blur: 20px;

  /* Text */
  --text-primary: #e8e6e3;
  --text-secondary: #8b8a88;
  --text-tertiary: #5a5957;
  --text-accent: #d4a853;

  /* Accent Colors */
  --accent-gold: #d4a853;
  --accent-gold-dim: rgba(212, 168, 83, 0.15);
  --accent-purple: #7c5cbf;
  --accent-purple-dim: rgba(124, 92, 191, 0.15);
  --accent-green: #2ecc71;
  --accent-green-dim: rgba(46, 204, 113, 0.15);
  --accent-red: #e74c3c;
  --accent-red-dim: rgba(231, 76, 60, 0.15);
  --accent-blue: #3498db;
  --accent-blue-dim: rgba(52, 152, 219, 0.15);
  --accent-cyan: #00d2d3;
  --accent-cyan-dim: rgba(0, 210, 211, 0.15);

  /* Gradients */
  --gradient-gold: linear-gradient(135deg, #d4a853 0%, #f0c674 100%);
  --gradient-purple: linear-gradient(135deg, #7c5cbf 0%, #a78bfa 100%);
  --gradient-hero: linear-gradient(160deg, #0d0d15 0%, #1a1028 40%, #0d0d15 100%);

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Base Styles ── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Ambient Background ── */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 20%, rgba(124, 92, 191, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(212, 168, 83, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 50%, rgba(0, 210, 211, 0.03) 0%, transparent 70%);
  z-index: -1;
  animation: ambientShift 20s ease-in-out infinite alternate;
}

@keyframes ambientShift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2%, 1%) scale(1.02); }
  100% { transform: translate(1%, -1%) scale(1); }
}

/* ── Dashboard Layout ── */
.dashboard {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
}

/* ── Header ── */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl) 0;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--glass-border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.3);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(212, 168, 83, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(212, 168, 83, 0.5); }
}

.header-title h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.header-title p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header-datetime {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.header-datetime .time {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-green-dim);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--accent-green);
}

.status-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── Metrics Grid ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(var(--glass-blur));
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.metric-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-card:nth-child(1)::before { background: var(--gradient-gold); }
.metric-card:nth-child(2)::before { background: var(--gradient-purple); }
.metric-card:nth-child(3)::before { background: linear-gradient(135deg, var(--accent-green), #6bc5a0); }
.metric-card:nth-child(4)::before { background: linear-gradient(135deg, var(--accent-cyan), #6dd5ed); }

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: var(--space-md);
}

.metric-card:nth-child(1) .metric-icon { background: var(--accent-gold-dim); }
.metric-card:nth-child(2) .metric-icon { background: var(--accent-purple-dim); }
.metric-card:nth-child(3) .metric-icon { background: var(--accent-green-dim); }
.metric-card:nth-child(4) .metric-icon { background: var(--accent-cyan-dim); }

.metric-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.metric-card:nth-child(1) .metric-value { color: var(--accent-gold); }
.metric-card:nth-child(2) .metric-value { color: var(--accent-purple); }
.metric-card:nth-child(3) .metric-value { color: var(--accent-green); }
.metric-card:nth-child(4) .metric-value { color: var(--accent-cyan); }

.metric-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title .icon {
  font-size: 1.1rem;
}

.section-badge {
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  font-weight: 500;
}

/* ── Projects Grid ── */
.projects-section {
  margin-bottom: var(--space-2xl);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(var(--glass-blur));
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-archetype {
  font-size: 0.78rem;
  color: var(--accent-purple);
  margin-top: 4px;
  font-weight: 500;
}

.project-status-tag {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.project-status-tag.active {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.project-meta {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.project-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.project-progress {
  margin-top: var(--space-md);
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.progress-bar-fill.gold { background: var(--gradient-gold); }
.progress-bar-fill.purple { background: var(--gradient-purple); }
.progress-bar-fill.green { background: linear-gradient(135deg, var(--accent-green), #6bc5a0); }
.progress-bar-fill.blue { background: linear-gradient(135deg, var(--accent-blue), #74b9ff); }
.progress-bar-fill.cyan { background: linear-gradient(135deg, var(--accent-cyan), #6dd5ed); }

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.progress-percentage {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
}

.project-areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.area-chip {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.area-chip:hover {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  border-color: rgba(124, 92, 191, 0.2);
}

/* ── Two Column Layout ── */
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

/* ── Deadlines Section ── */
.deadlines-section {
  min-height: 300px;
}

.deadline-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.deadline-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  align-items: center;
}

.deadline-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateX(4px);
}

.deadline-date-box {
  min-width: 52px;
  text-align: center;
  padding: var(--space-sm) var(--space-sm);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.deadline-date-box.urgent {
  background: var(--accent-red-dim);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.deadline-date-box.soon {
  background: var(--accent-gold-dim);
  border: 1px solid rgba(212, 168, 83, 0.2);
}

.deadline-date-box.later {
  background: var(--accent-blue-dim);
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.deadline-day {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.deadline-date-box.urgent .deadline-day { color: var(--accent-red); }
.deadline-date-box.soon .deadline-day { color: var(--accent-gold); }
.deadline-date-box.later .deadline-day { color: var(--accent-blue); }

.deadline-month {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 600;
}

.deadline-info {
  flex: 1;
}

.deadline-event {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.deadline-project {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.deadline-countdown {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.deadline-countdown.urgent {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.deadline-countdown.soon {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}

.deadline-countdown.later {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

/* ── Stories Section ── */
.stories-section {
  min-height: 300px;
}

.story-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.story-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.story-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
}

.story-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.story-status-dot.draft { background: var(--text-tertiary); }
.story-status-dot.ready { background: var(--accent-blue); }
.story-status-dot.progress { background: var(--accent-gold); }
.story-status-dot.review { background: var(--accent-purple); }
.story-status-dot.done { background: var(--accent-green); }

.story-info {
  flex: 1;
  min-width: 0;
}

.story-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-checks {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.story-progress-mini {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
}

.story-progress-mini-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-green);
  transition: width 1s ease;
}

.story-progress-text {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: right;
}

/* ── Timeline Section ── */
.timeline-section {
  margin-bottom: var(--space-2xl);
}

.timeline-container {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-purple), var(--glass-border), transparent);
}

.timeline-item {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.timeline-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateX(4px);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl) - 1px);
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-purple);
  z-index: 1;
}

.timeline-item:first-child::before {
  background: var(--accent-purple);
  box-shadow: 0 0 12px rgba(124, 92, 191, 0.4);
}

.timeline-date {
  font-size: 0.72rem;
  color: var(--accent-purple);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-show-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-purple-dim);
  border: 1px solid rgba(124, 92, 191, 0.2);
  border-radius: var(--radius-full);
  color: var(--accent-purple);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.timeline-show-more:hover {
  background: rgba(124, 92, 191, 0.25);
  transform: translateY(-1px);
}

/* ── Footer ── */
.dashboard-footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.78rem;
}

.dashboard-footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

/* ── Loading State ── */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: var(--space-lg);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-family: var(--font-display);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.empty-state .icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

/* ── Animations (on scroll) ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.2s; }
.fade-in:nth-child(5) { animation-delay: 0.25s; }
.fade-in:nth-child(6) { animation-delay: 0.3s; }

/* ── Progress Ring (SVG) ── */
.progress-ring-container {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 4;
}

.progress-ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .two-columns {
    grid-template-columns: 1fr;
  }

  .dashboard {
    padding: var(--space-md);
  }

  .dashboard-header {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .header-left {
    flex-direction: column;
  }

  .header-right {
    flex-direction: column;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    padding: var(--space-lg);
  }

  .header-title h1 {
    font-size: 1.4rem;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Selection ── */
::selection {
  background: rgba(212, 168, 83, 0.3);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   V2 — SPA Navigation & Views
   ═══════════════════════════════════════════════════════ */

/* ── Breadcrumbs ── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.breadcrumb-link {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.breadcrumb-link:hover { opacity: 0.7; }

.breadcrumb-sep {
  color: var(--text-tertiary);
  font-weight: 400;
  font-size: 1rem;
}

.breadcrumb-current {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
}

/* ── Clickable Cards ── */
.clickable {
  cursor: pointer;
}

.clickable:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.card-arrow {
  position: absolute;
  bottom: var(--space-lg);
  right: var(--space-lg);
  font-size: 1.2rem;
  color: var(--accent-gold);
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition-base);
}

.project-theme {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* ── Project Hero ── */
.project-hero, .area-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
}

.project-hero::before, .area-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-gold);
}

.project-hero-info, .area-hero-info { flex: 1; }

.project-hero-name, .area-hero-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.area-hero-project {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.hero-archetype {
  color: var(--accent-purple);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.hero-theme {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.hero-detail {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
  line-height: 1.5;
}

.hero-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.status-pill {
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 168, 83, 0.2);
  font-weight: 600;
}

.project-hero-stats, .area-hero-stats {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
  flex-shrink: 0;
  margin-left: var(--space-2xl);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

.hero-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Section Block ── */
.section-block {
  margin-bottom: var(--space-2xl);
}

/* ── Areas Grid ── */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.area-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
}

.area-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow);
}

.area-card-header { margin-bottom: var(--space-md); }

.area-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.area-archetype {
  font-size: 0.75rem;
  color: var(--accent-purple);
  margin-top: 4px;
}

.area-card-meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ── Tabs ── */
.tabs-section {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  backdrop-filter: blur(var(--glass-blur));
}

.tabs-nav {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: var(--space-md);
  overflow-x: auto;
  flex-wrap: nowrap;
}

.tab-btn {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-body);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: var(--accent-gold);
  background: var(--accent-gold-dim);
  border-color: rgba(212, 168, 83, 0.2);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.3s ease; }

/* ── Assets Grid ── */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

.asset-card {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: all var(--transition-base);
}

.asset-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow);
}

.asset-ready {
  background: rgba(46, 204, 113, 0.06);
  border-color: rgba(46, 204, 113, 0.15);
}

.asset-empty {
  background: rgba(212, 168, 83, 0.06);
  border-color: rgba(212, 168, 83, 0.15);
}

.asset-pending {
  background: rgba(231, 76, 60, 0.06);
  border-color: rgba(231, 76, 60, 0.15);
}

.asset-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.asset-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.asset-status {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── URLs List ── */
.urls-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.url-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.url-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  min-width: 80px;
}

.url-value {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.url-value a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.url-value a:hover { color: var(--accent-gold); }

/* ── Rendered Markdown ── */
.content-block {
  margin-bottom: var(--space-xl);
}

.content-block h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.rendered-md {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-height: 400px;
  overflow-y: auto;
  padding-right: var(--space-md);
}

.rendered-md h2 { font-size: 1.1rem; color: var(--text-primary); margin: var(--space-lg) 0 var(--space-sm); }
.rendered-md h3 { font-size: 1rem; color: var(--text-primary); margin: var(--space-md) 0 var(--space-sm); }
.rendered-md h4 { font-size: 0.9rem; color: var(--text-primary); margin: var(--space-md) 0 var(--space-xs); }
.rendered-md strong { color: var(--text-primary); }
.rendered-md ul { list-style: none; padding-left: var(--space-md); }
.rendered-md li { position: relative; padding-left: var(--space-md); margin-bottom: var(--space-xs); }
.rendered-md li::before { content: '›'; position: absolute; left: 0; color: var(--accent-gold); font-weight: 700; }

/* ── Stats Grid ── */
.stats-grid {
  display: flex;
  gap: var(--space-xl);
}

.stat-item {
  text-align: center;
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  flex: 1;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Subareas ── */
.subareas-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.subarea-chip {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Timeline Tags ── */
.timeline-tag {
  font-size: 0.65rem;
  padding: 2px 8px;
  margin-left: var(--space-sm);
  border-radius: var(--radius-full);
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  font-weight: 500;
  vertical-align: middle;
}

/* ── Error View ── */
.error-view {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.error-view h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.error-view a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
}

/* ── V2 Responsive ── */
@media (max-width: 900px) {
  .project-hero, .area-hero {
    flex-direction: column;
    padding: var(--space-xl);
  }

  .project-hero-stats, .area-hero-stats {
    margin-left: 0;
    margin-top: var(--space-lg);
  }

  .areas-grid {
    grid-template-columns: 1fr;
  }

  .tabs-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .assets-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .stats-grid {
    flex-wrap: wrap;
  }

  .breadcrumbs {
    font-size: 1rem;
  }

  .project-hero-name, .area-hero-name {
    font-size: 1.4rem;
  }
}

@media (max-width: 600px) {
  .assets-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    gap: var(--space-md);
  }

  .stat-item {
    padding: var(--space-md);
  }
}
