/* ── BASE ── */
body {
  background: var(--c-bg);
  color: var(--c-white);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Noise overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.5;
}

/* Ambient glow blobs */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: floatBg 18s ease-in-out infinite;
}
.bg-blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(230,57,70,0.06) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.bg-blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(74,144,217,0.05) 0%, transparent 70%);
  bottom: 0; right: -80px;
  animation-delay: -6s;
}
.bg-blob-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(201,168,76,0.04) 0%, transparent 70%);
  top: 50%; left: 50%;
  animation-delay: -12s;
}

/* ── HEADER ── */
.header {
  position: sticky; top: 0; z-index: 200;
  height: var(--header-h);
  background: rgba(12, 12, 24, 0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--c-border2);
  box-shadow: 0 1px 0 var(--c-border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-8);
}

/* Logo */
.logo { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c-red), #8a0f1a);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 17px; color: #fff;
  box-shadow: var(--shadow-glow-red);
  flex-shrink: 0;
  transition: transform var(--t-mid) var(--ease-spring);
}
.logo-mark:hover { transform: rotate(-5deg) scale(1.05); }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-white); }
.logo-sub  { font-size: 10px; color: var(--c-muted); letter-spacing: 0.04em; }

/* Header center */
.header-center { flex: 1; text-align: center; }
.project-name { font-family: var(--f-display); font-size: 18px; line-height: 1.2; }
.project-sub  { font-size: 11px; color: var(--c-muted); margin-top: 2px; letter-spacing: 0.03em; }

/* Global progress pill */
.global-pill {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--c-bg3);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-pill);
  padding: 7px 14px 7px 10px;
  flex-shrink: 0;
}
.global-pill-label { font-size: 11px; color: var(--c-muted); white-space: nowrap; }
.global-pill-track {
  width: 88px; height: 5px;
  background: var(--c-bg5); border-radius: 3px; overflow: hidden;
}
.global-pill-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--c-red), var(--c-gold));
  transition: width 0.5s var(--ease-out);
  width: 0%;
}
.global-pill-pct {
  font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  color: var(--c-white); min-width: 30px; text-align: right;
}

/* ── PAGES ── */
#app { position: relative; z-index: 1; }

.page { display: none; }
.page.active { display: block; }

/* ── OVERVIEW ── */
.overview {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-8);
}

/* Hero */
.hero { margin-bottom: var(--sp-12); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--f-mono); font-size: 11px; color: var(--c-red);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.hero-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-red); }
.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-4);
}
.hero h1 em { color: var(--c-red); font-style: italic; }
.hero p {
  color: var(--c-muted2); font-size: 16px;
  max-width: 520px; line-height: 1.75;
}
.hero-stats {
  display: flex; gap: var(--sp-8); margin-top: var(--sp-6);
  flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num {
  font-family: var(--f-display); font-size: 32px; color: var(--c-white); line-height: 1;
}
.hero-stat-label { font-size: 12px; color: var(--c-muted); }

/* Scope strip */
.scope-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4); margin-bottom: var(--sp-10);
}
.scope-card {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--sp-5);
  transition: border-color var(--t-mid), transform var(--t-mid) var(--ease-out);
}
.scope-card:hover { border-color: var(--c-border3); transform: translateY(-2px); }
.scope-card-top { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.scope-icon {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.scope-icon.marketing    { background: var(--c-red-dim); }
.scope-icon.operacional  { background: var(--c-gold-dim); }
.scope-icon.compartilhado{ background: var(--c-blue-dim); }
.scope-label { font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.scope-name  { font-size: 13px; font-weight: 600; color: var(--c-white); }
.scope-track { height: 4px; background: var(--c-bg5); border-radius: 2px; overflow: hidden; margin-bottom: var(--sp-2); }
.scope-fill  { height: 100%; border-radius: 2px; transition: width 0.6s var(--ease-out); width: 0%; }
.scope-fill.marketing    { background: linear-gradient(90deg, var(--c-red), var(--c-red-light)); }
.scope-fill.operacional  { background: linear-gradient(90deg, var(--c-gold), var(--c-gold-light)); }
.scope-fill.compartilhado{ background: linear-gradient(90deg, var(--c-blue), var(--c-blue-light)); }
.scope-meta { font-size: 12px; color: var(--c-muted); display: flex; justify-content: space-between; }
.scope-meta-pct { font-family: var(--f-mono); color: var(--c-white); font-size: 12px; }

/* Grid */
.grid-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--c-muted); font-weight: 600; margin-bottom: var(--sp-4);
}
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--sp-3);
}

/* Legend */
.legend {
  display: flex; align-items: center; gap: var(--sp-5);
  flex-wrap: wrap; margin-top: var(--sp-10);
  padding-top: var(--sp-6); border-top: 1px solid var(--c-border);
}
.legend-item { display: flex; align-items: center; gap: var(--sp-2); font-size: 12px; color: var(--c-muted); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }

/* ── DETAIL PAGE ── */
.detail-sticky {
  position: sticky; top: var(--header-h); z-index: 100;
  background: rgba(12, 12, 24, 0.9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border2);
}
.detail-sticky-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: var(--sp-5) var(--sp-8);
}
.back-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  color: var(--c-muted); font-size: 13px; font-weight: 500;
  transition: color var(--t-fast), transform var(--t-fast);
  margin-bottom: var(--sp-4);
  padding: var(--sp-1) 0;
}
.back-btn:hover { color: var(--c-white); transform: translateX(-3px); }
.back-btn svg { width: 15px; height: 15px; }

.detail-head-row {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: var(--sp-6);
  flex-wrap: wrap;
}
.detail-eyebrow {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--c-muted); margin-bottom: var(--sp-2);
}
.detail-title {
  font-family: var(--f-display);
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.2; margin-bottom: var(--sp-3);
}
.detail-badges { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--c-bg4); border: 1px solid var(--c-border2);
  border-radius: var(--r-pill); padding: 4px 10px;
  font-size: 11px; color: var(--c-muted2);
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* Detail progress */
.detail-progress-wrap {
  flex-shrink: 0; min-width: 200px;
}
.detail-progress-label {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--c-muted); margin-bottom: var(--sp-2);
}
.detail-progress-label span:last-child {
  font-family: var(--f-mono); color: var(--c-white);
}
.detail-progress-track {
  height: 6px; background: var(--c-bg5); border-radius: 3px; overflow: hidden;
}
.detail-progress-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.5s var(--ease-out); width: 0%;
}
.detail-progress-fill.marketing    { background: linear-gradient(90deg, var(--c-red), var(--c-red-light)); }
.detail-progress-fill.operacional  { background: linear-gradient(90deg, var(--c-gold), var(--c-gold-light)); }
.detail-progress-fill.compartilhado{ background: linear-gradient(90deg, var(--c-blue), var(--c-blue-light)); }

/* Detail content */
.detail-content {
  max-width: var(--max-w); margin: 0 auto;
  padding: var(--sp-10) var(--sp-8);
}

/* Phase */
.phase-section { margin-bottom: var(--sp-10); }
.phase-header {
  display: flex; align-items: center; gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
}
.phase-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.phase-name {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 600; color: var(--c-muted);
}
.phase-mini-progress {
  margin-left: auto; display: flex; align-items: center; gap: var(--sp-2);
}
.phase-mini-track {
  width: 56px; height: 3px; background: var(--c-bg5); border-radius: 2px; overflow: hidden;
}
.phase-mini-fill {
  height: 100%; border-radius: 2px; transition: width 0.4s var(--ease-out); width: 0%;
}
.phase-mini-label {
  font-family: var(--f-mono); font-size: 10px; color: var(--c-muted);
  white-space: nowrap;
}

/* Toast */
.toast {
  position: fixed; bottom: var(--sp-6); right: var(--sp-6);
  z-index: 9000;
  background: var(--c-bg3); border: 1px solid var(--c-border3);
  border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-5);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: var(--sp-3);
  max-width: 320px; pointer-events: none;
  opacity: 0; transform: translateY(16px) scale(0.96);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-text { font-size: 13px; color: var(--c-white); line-height: 1.4; }

/* Completion banner */
.done-banner {
  background: linear-gradient(135deg, rgba(46,204,113,0.08), rgba(46,204,113,0.03));
  border: 1px solid rgba(46,204,113,0.2);
  border-radius: var(--r-lg); padding: var(--sp-6);
  text-align: center; margin-bottom: var(--sp-8);
  display: none;
}
.done-banner.show { display: block; animation: scaleIn var(--t-mid) var(--ease-out); }
.done-banner-icon { font-size: 36px; margin-bottom: var(--sp-3); }
.done-banner h3 { font-family: var(--f-display); font-size: 22px; color: var(--c-green); margin-bottom: var(--sp-2); }
.done-banner p  { font-size: 14px; color: var(--c-muted2); }

/* Confetti dot */
.confetti-dot {
  position: fixed; pointer-events: none; z-index: 8000;
  width: 7px; height: 7px; border-radius: 2px;
  animation: confettiFall 0.8s var(--ease-out) forwards;
}
