:root {
  --sky: #A4DBE8;
  --space: #302952;
  --cream: #FAF6EF;
  --blood-orange: #DC572B;
  --pink-lemonade: #DDB7A1;
  --passion-fruit: #A63B64;
  --blueberry: #416CA9;
  --lime: #88BE00;
  --bright-berry: #BD475A;
  --mango: #C9B631;
  --watermelon: #EF4B60;
  --sidebar-w: 280px;
  --header-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--space);
  line-height: 1.6;
}

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--space);
  display: flex; align-items: center; padding: 0 24px;
  gap: 16px;
}
.header h1 { color: #fff; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.header .tag { background: var(--sky); color: var(--space); padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.header .menu-btn {
  display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; line-height: 1;
}

/* Sidebar */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w); background: #fff;
  border-right: 1px solid #e5e0d8;
  overflow-y: auto; padding: 16px 0;
  z-index: 90;
  transition: transform 0.3s ease;
}
.sidebar h3 {
  padding: 8px 20px 4px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 1.2px; color: #888; font-weight: 600;
}
.sidebar a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 20px; text-decoration: none; color: var(--space);
  font-size: 13px; font-weight: 500; transition: background 0.15s;
  border-left: 3px solid transparent;
}
.sidebar a:hover { background: #f5f0ea; }
.sidebar a.active { background: #eee8df; border-left-color: var(--space); font-weight: 700; }
.sidebar .fmt {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0;
}
.fmt-static { background: var(--blueberry); }
.fmt-gif { background: var(--lime); }
.fmt-video { background: var(--blood-orange); }
.fmt-doc { background: var(--space); }
.sidebar .scores {
  margin-left: auto; font-size: 11px; color: #999; font-weight: 400; white-space: nowrap;
}

/* Main */
.main {
  margin-left: var(--sidebar-w); margin-top: var(--header-h);
  padding: 32px 40px 80px;
  max-width: 960px;
}

/* Sections */
.section { display: none; }
.section.active { display: block; }

/* Brief header card */
.brief-header {
  background: #fff; border-radius: 12px; padding: 24px 28px;
  margin-bottom: 24px; border: 1px solid #e5e0d8;
  box-shadow: 0 1px 3px rgba(48,41,82,0.06);
}
.brief-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.4px; }
.brief-header .meta-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
}
.pill-format { background: var(--sky); color: var(--space); }
.pill-persona { background: #f0e6ff; color: #5b21b6; }
.pill-angle { background: #fef3c7; color: #92400e; }
.pill-funnel { background: #dcfce7; color: #166534; }
.brief-header .perf-basis {
  font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 16px; padding: 12px 16px;
  background: #faf8f5; border-radius: 8px; border-left: 3px solid var(--sky);
}
.brief-header .scores-row {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.score-badge {
  display: flex; flex-direction: column; align-items: center; padding: 8px 14px;
  background: var(--cream); border-radius: 8px; min-width: 72px;
}
.score-badge .num { font-size: 22px; font-weight: 800; color: var(--space); }
.score-badge .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: #888; font-weight: 600; }

/* Content blocks */
.block {
  background: #fff; border-radius: 12px; padding: 24px 28px;
  margin-bottom: 20px; border: 1px solid #e5e0d8;
}
.block h3 {
  font-size: 15px; font-weight: 700; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--space);
  padding-bottom: 8px; border-bottom: 1px solid #eee;
}
.block p, .block li { font-size: 14px; line-height: 1.7; }
.block ul { padding-left: 20px; margin-top: 4px; }
.block li { margin-bottom: 4px; }
.block code {
  background: #f5f0ea; padding: 1px 6px; border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px;
}
.block pre {
  background: var(--space); color: #e0ddd5; padding: 16px 20px;
  border-radius: 8px; overflow-x: auto; font-size: 12px; line-height: 1.6;
  margin-top: 8px;
}

/* Tables */
table {
  width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px;
}
th {
  text-align: left; padding: 8px 12px; background: var(--space); color: #fff;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600;
}
td { padding: 8px 12px; border-bottom: 1px solid #eee; vertical-align: top; }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 600; white-space: nowrap; }
.source-col { color: #888; font-size: 12px; font-style: italic; }

/* Compliance table */
.compliance-table td:nth-child(2) { text-align: center; font-size: 16px; }

/* Overview page */
.overview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 20px;
}
.overview-card {
  background: #fff; border-radius: 12px; padding: 20px; cursor: pointer;
  border: 1px solid #e5e0d8; transition: all 0.2s;
}
.overview-card:hover { border-color: var(--sky); box-shadow: 0 4px 12px rgba(164,219,232,0.3); transform: translateY(-2px); }
.overview-card h4 { font-size: 15px; margin-bottom: 8px; }
.overview-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* Stats row on overview */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: #fff; border-radius: 12px; padding: 20px; text-align: center;
  border: 1px solid #e5e0d8;
}
.stat-card .big { font-size: 32px; font-weight: 800; color: var(--space); }
.stat-card .desc { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 4px; }

/* Warning / note callouts */
.callout {
  padding: 12px 16px; border-radius: 8px; font-size: 13px; margin: 12px 0;
}
.callout-warn { background: #fef3c7; border-left: 3px solid #f59e0b; }
.callout-info { background: #eff6ff; border-left: 3px solid var(--blueberry); }
.callout-danger { background: #fef2f2; border-left: 3px solid #ef4444; }

/* Status checkboxes */
.status-row {
  display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap;
}
.status-check {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: #888;
  padding: 4px 12px 4px 6px; border-radius: 6px;
  border: 1px solid #e5e0d8; background: #fff;
  transition: all 0.2s; user-select: none;
}
.status-check:hover { border-color: #ccc; }
.status-check input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--space);
  cursor: pointer; margin: 0;
}
.status-check.checked { background: #dcfce7; border-color: #86efac; color: #166534; }
.status-check.checked-asana { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }

/* Overview card status pills */
.overview-card .status-pills {
  display: flex; gap: 6px; margin-top: 8px;
}
.status-pill {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; padding: 2px 8px; border-radius: 99px;
}
.status-pill-asana { background: #dbeafe; color: #1e40af; }
.status-pill-complete { background: #dcfce7; color: #166534; }
.status-pill-pending { background: #f3f4f6; color: #9ca3af; }

/* Sidebar status indicators */
.sidebar a .status-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-left: 2px;
}
.dot-complete { background: #16a34a; }
.dot-asana { background: #3b82f6; }
.dot-pending { background: #e5e7eb; }

/* Progress bar in overview */
.progress-bar-wrap {
  background: #e5e0d8; border-radius: 99px; height: 8px; width: 100%;
  margin-top: 12px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 99px; transition: width 0.4s ease;
  background: linear-gradient(90deg, #3b82f6 0%, #3b82f6 var(--asana-pct), #16a34a var(--asana-pct), #16a34a var(--complete-pct), #e5e0d8 var(--complete-pct));
}

/* Scene table (video briefs) */
.scene-table td:first-child { width: 80px; font-family: 'SF Mono', monospace; font-size: 12px; }
.scene-table td:nth-child(2) { width: 200px; font-size: 12px; color: #666; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 260px; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.15); }
  .main { margin-left: 0; padding: 20px 16px 60px; }
  .header .menu-btn { display: block; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .brief-header .scores-row { gap: 8px; }
  .overview-grid { grid-template-columns: 1fr; }
}
