/* Elmer Playbook — Design System
   Extracted from mockups 01-08. Orange brand, Inter font, Lucide icons. */

:root {
  --brand-h: 18;
  --brand-s: 78%;
  --brand-l: 55%;
  --brand: hsl(var(--brand-h), var(--brand-s), var(--brand-l));
  --brand-light: hsl(var(--brand-h), var(--brand-s), 95%);
  --brand-dark: hsl(var(--brand-h), var(--brand-s), 42%);
  --brand-hover: hsl(var(--brand-h), var(--brand-s), 48%);

  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --surface-alt: #F5F3F0;
  --border: #E8E4DF;
  --border-light: #EFECE8;
  --text: #2D2A26;
  --text-secondary: #6B6560;
  --text-muted: #9C9590;

  --success: #3D9A5F;
  --success-bg: #E8F5ED;
  --warning: #D4920A;
  --warning-bg: #FFF8E6;
  --danger: #C44040;
  --danger-bg: #FDECEC;
  --info: #3B82C4;
  --info-bg: #EBF2FA;
  --purple: #7C3AED;
  --purple-bg: #F0EAFD;
  --teal: hsl(185, 45%, 38%);

  --cat-attendance: #D4920A;
  --cat-attendance-bg: #FFF8E6;
  --cat-behavior: #C44040;
  --cat-behavior-bg: #FDECEC;
  --cat-reading: #3B82C4;
  --cat-reading-bg: #EBF2FA;
  --cat-math: #3D9A5F;
  --cat-math-bg: #E8F5ED;
  --cat-culture: #7C5CBF;
  --cat-culture-bg: #F3EFF8;
  --cat-sel: #2A9D8F;
  --cat-sel-bg: #E6F5F3;

  --radius: 8px;
  --radius-lg: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);

  --sidebar-bg: #FFFFFF;
  --sidebar-hover: #F5F3F0;
  --sidebar-active: hsl(18, 50%, 93%);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ── Public Nav (56px sticky) ── */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand i { color: var(--brand); width: 22px; height: 22px; }

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links .active { color: var(--text); font-weight: 600; }
.nav-links .btn-signin {
  background: var(--brand);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
}
.nav-links .btn-signin:hover { opacity: 0.9; color: #fff; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn i { width: 16px; height: 16px; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-primary i { width: 18px; height: 18px; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); }
.btn-secondary i { width: 18px; height: 18px; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

.btn-ghost {
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-alt); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { opacity: 0.9; }

.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 11px 24px; font-size: 15px; }

/* ── Badges & Pills ── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.badge-muted { background: var(--surface-alt); color: var(--text-muted); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  line-height: 1.4;
}
.pill-strategy { background: var(--success-bg); color: var(--success); }
.pill-coming { background: var(--surface-alt); color: var(--text-muted); }

/* Category pills */
.cat-pill {
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  width: fit-content;
}
.cat-attendance { background: var(--cat-attendance-bg); color: var(--cat-attendance); }
.cat-behavior { background: var(--cat-behavior-bg); color: var(--cat-behavior); }
.cat-reading { background: var(--cat-reading-bg); color: var(--cat-reading); }
.cat-math { background: var(--cat-math-bg); color: var(--cat-math); }
.cat-culture { background: var(--cat-culture-bg); color: var(--cat-culture); }
.cat-sel { background: var(--cat-sel-bg); color: var(--cat-sel); }

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-planning { background: var(--info-bg); color: var(--info); }
.status-active { background: var(--success-bg); color: var(--success); }
.status-paused { background: var(--warning-bg); color: var(--warning); }
.status-completed { background: var(--success-bg); color: var(--success); }
.status-archived { background: var(--surface-alt); color: var(--text-muted); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer a { color: var(--text-secondary); text-decoration: none; }

/* ── Hero (Landing) ── */
.hero {
  text-align: center;
  padding: 80px 24px 64px;
  max-width: 680px;
  margin: 0 auto;
}
.hero h1 { font-size: 36px; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.hero p { font-size: 18px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.6; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Section containers ── */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.section-header p { font-size: 15px; color: var(--text-secondary); }

/* ── Needs Grid (Landing) ── */
.needs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.needs-column h3 {
  font-size: 14px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.needs-column h3 i { width: 16px; height: 16px; }

.need-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.need-card:hover { box-shadow: var(--shadow); border-color: #D8D4CF; }

.need-icon {
  width: 40px; height: 40px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.need-icon i { width: 20px; height: 20px; }
.need-icon.orange { background: var(--brand-light); color: var(--brand); }
.need-icon.blue { background: var(--info-bg); color: var(--info); }
.need-icon.green { background: var(--success-bg); color: var(--success); }
.need-icon.red { background: var(--danger-bg); color: var(--danger); }
.need-icon.purple { background: var(--cat-culture-bg); color: var(--cat-culture); }

.need-body { flex: 1; min-width: 0; }
.need-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; display: flex; align-items: center; gap: 8px; }
.need-desc { font-size: 13px; color: var(--text-secondary); }
.need-arrow { color: var(--text-muted); flex-shrink: 0; }
.need-arrow i { width: 16px; height: 16px; }

/* ── Showcase Cards (Landing + Catalog) ── */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.showcase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.showcase-card:hover { box-shadow: var(--shadow); border-color: #D8D4CF; }

.showcase-cat { margin-bottom: 12px; }
.showcase-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.showcase-summary { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.showcase-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.showcase-meta i { width: 14px; height: 14px; }
.showcase-metric {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px; font-size: 13px;
}
.showcase-metric i { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }
.showcase-metric .metric-label { color: var(--text-secondary); }
.showcase-metric .metric-values { font-weight: 600; }
.showcase-link { font-size: 13px; font-weight: 600; color: var(--brand); display: flex; align-items: center; gap: 4px; margin-top: auto; text-decoration: none; }
.showcase-link i { width: 16px; height: 16px; }

/* ── How It Works (Landing) ── */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { text-align: center; padding: 32px 24px; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-light); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.step-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--surface-alt); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--text-secondary); }
.step-icon i { width: 24px; height: 24px; }
.step-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ── Page Header (Catalog) ── */
.page-header {
  max-width: 1080px; margin: 0 auto; padding: 40px 24px 0;
}
.page-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.page-header p { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }

/* ── Search Bar (Catalog) ── */
.search-bar { max-width: 1080px; margin: 0 auto; padding: 0 24px 20px; }
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-input-wrap i { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.search-input {
  width: 100%; padding: 11px 14px 11px 42px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; background: var(--surface);
  color: var(--text); outline: none; transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--brand); }

/* ── Filters Bar (Catalog) ── */
.filters-bar {
  max-width: 1080px; margin: 0 auto; padding: 0 24px 24px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.filter-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; font-family: inherit; background: var(--surface);
  color: var(--text); outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239C9590' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--brand); }
.results-count { margin-left: auto; font-size: 13px; color: var(--text-muted); }

/* ── Catalog container ── */
.catalog { max-width: 1080px; margin: 0 auto; padding: 0 24px 40px; }

/* ── Pagination ── */
.pagination {
  max-width: 1080px; margin: 0 auto; padding: 0 24px 48px;
  display: flex; justify-content: center; align-items: center; gap: 4px;
}
.page-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  color: var(--text-secondary); font-size: 13px; font-weight: 500; font-family: inherit;
  text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.page-btn:hover { background: var(--surface-alt); border-color: #D8D4CF; }
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-btn.disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.page-btn i { width: 16px; height: 16px; }

/* ── Showcase Detail — Dark Hero ── */
.back-link-bar { max-width: 880px; margin: 0 auto; padding: 20px 32px 0; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--text-secondary);
  font-size: 14px; font-weight: 500; transition: color 0.15s;
}
.back-link:hover { color: var(--brand); }

.showcase-hero {
  width: 100%; min-height: 380px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.showcase-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1C1D2E 0%, #2A2C48 50%, #1E2235 100%);
  z-index: 0;
}
.hero-watermark {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: 340px; height: 340px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.04); background: rgba(255,255,255,0.025);
  z-index: 1; display: flex; align-items: center; justify-content: center;
}
.hero-watermark-inner {
  width: 220px; height: 220px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.04); background: rgba(255,255,255,0.02);
  display: flex; align-items: center; justify-content: center;
}
.hero-watermark-text { font-size: 48px; font-weight: 800; color: rgba(255,255,255,0.06); letter-spacing: 2px; text-transform: uppercase; }

.hero-content {
  position: relative; z-index: 2; max-width: 880px; width: 100%; padding: 48px 32px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.hero-pills { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px;
  font-size: 12px; font-weight: 600; border-radius: 100px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.08);
}
.hero-pill i { width: 13px; height: 13px; opacity: 0.7; }

.hero-lead { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.hero-avatar {
  width: 130px; height: 130px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 42px; color: #fff; flex-shrink: 0;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 4px rgba(255,255,255,0.1);
  letter-spacing: 1px;
}
.hero-avatar-anon { background: linear-gradient(145deg, #3A3D56, #4A4E6A); }
.hero-avatar-anon i { width: 52px; height: 52px; opacity: 0.7; }
.hero-lead-info { display: flex; flex-direction: column; gap: 4px; }
.hero-lead-name { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -0.3px; line-height: 1.2; }
.hero-lead-title { font-size: 16px; font-weight: 500; color: rgba(255,255,255,0.65); line-height: 1.4; }
.hero-lead-school { font-size: 14px; font-weight: 400; color: rgba(255,255,255,0.45); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.hero-lead-school i { width: 14px; height: 14px; opacity: 0.6; }
.hero-title { font-size: 36px; font-weight: 800; color: #fff; letter-spacing: -0.8px; line-height: 1.2; max-width: 680px; }

/* ── Impact Metrics (Showcase Detail) ── */
.metrics-row {
  max-width: 880px; margin: 0 auto; padding: 32px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.metric-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.metric-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 12px; }
.metric-values { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.metric-before { font-size: 22px; font-weight: 700; color: var(--text-muted); }
.metric-arrow { color: var(--text-muted); flex-shrink: 0; }
.metric-arrow i { width: 16px; height: 16px; }
.metric-after { font-size: 22px; font-weight: 700; color: var(--text); }
.metric-change { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 100px; background: var(--success-bg); color: var(--success); }

/* ── Content Area (Showcase Detail) ── */
.content-area { max-width: 880px; margin: 0 auto; padding: 0 32px 48px; }
.content-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

/* ── Story Sections (Showcase Detail + Strategy Detail) ── */
.story-section { padding: 28px 32px; border-bottom: 1px solid var(--border); }
.story-section:last-child { border-bottom: none; }
.story-section-inner { border-left: 3px solid var(--border); padding-left: 24px; }
.story-section-inner.border-danger { border-left-color: var(--danger); }
.story-section-inner.border-purple { border-left-color: var(--purple); }
.story-section-inner.border-info { border-left-color: var(--info); }
.story-section-inner.border-success { border-left-color: var(--success); }
.story-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; }
.story-label i { width: 14px; height: 14px; }
.story-label-danger { color: var(--danger); }
.story-label-purple { color: var(--purple); }
.story-label-info { color: var(--info); }
.story-label-success { color: var(--success); }
.story-heading { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.story-text { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }
.story-text:last-child { margin-bottom: 0; }

/* ── Section Panels (Strategy Detail left-border) ── */
.section-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
  border-left: 4px solid var(--border);
}
.section-panel.danger { border-left-color: var(--danger); }
.section-panel.purple { border-left-color: var(--purple); }
.section-panel.info { border-left-color: var(--info); }
.section-panel.success { border-left-color: var(--success); }
.section-panel .section-body { padding: 18px 18px 18px 22px; }
.section-panel .section-body p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 10px; }
.section-panel .section-body p:last-child { margin-bottom: 0; }
.section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.section-label.danger { color: var(--danger); }
.section-label.purple { color: var(--purple); }
.section-label.info { color: var(--info); }
.section-label.success { color: var(--success); }

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--text-muted); padding: 10px 14px;
  border-bottom: 2px solid var(--border); background: var(--surface-alt);
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-alt); }
.data-table .val-positive { color: var(--success); font-weight: 600; }

/* Mermaid flowchart */
.flowchart-wrapper { margin-top: 20px; background: var(--surface-alt); border-radius: var(--radius); padding: 24px; overflow-x: auto; }
.flowchart-wrapper .mermaid { display: flex; justify-content: center; }

/* ── Resources (Showcase Detail) ── */
.resources-section { max-width: 880px; margin: 0 auto; padding: 0 32px 32px; }
.resources-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.resources-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.resources-header h3 { font-size: 16px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.resources-header h3 i { width: 18px; height: 18px; color: var(--text-muted); }

.resource-item { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--border); transition: background 0.1s; }
.resource-item:last-child { border-bottom: none; }
.resource-item:hover { background: var(--surface-alt); }
.resource-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.resource-icon i { width: 18px; height: 18px; }
.resource-icon-pdf { background: var(--danger-bg); color: var(--danger); }
.resource-icon-xlsx { background: var(--success-bg); color: var(--success); }
.resource-icon-pptx { background: var(--warning-bg); color: var(--warning); }
.resource-icon-default { background: var(--info-bg); color: var(--info); }
.resource-info { flex: 1; min-width: 0; }
.resource-name { font-size: 14px; font-weight: 600; color: var(--text); }
.resource-meta { font-size: 12px; color: var(--text-muted); }
.resource-action { flex-shrink: 0; }
.resource-lock-msg { font-size: 12px; font-weight: 500; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.resource-lock-msg i { width: 14px; height: 14px; }

.resource-item.partial { opacity: 0.75; }
.resource-item.locked { opacity: 0.5; }

/* ── CTA (Showcase Detail) ── */
.showcase-cta { max-width: 880px; margin: 0 auto; padding: 24px 32px 48px; text-align: center; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-secondary); }
.empty-state h2 { font-size: 20px; margin-bottom: 8px; color: var(--text); }
.empty-state a { color: var(--brand); text-decoration: none; }

/* ── Workspace Sidebar (240px fixed) ── */
.workspace-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; background: var(--sidebar-bg);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
}
.sidebar-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; height: 56px; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.sidebar-logo-icon { width: 32px; height: 32px; background: var(--brand); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; }
.sidebar-logo-text { font-size: 16px; font-weight: 700; color: var(--text); }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 6px; color: var(--text-secondary); text-decoration: none;
  font-size: 13px; font-weight: 500; transition: all 0.15s;
}
.sidebar-link:hover { background: var(--sidebar-hover); color: var(--text); }
.sidebar-link.active { background: var(--sidebar-active); color: var(--brand-dark); }
.sidebar-link i { width: 20px; height: 20px; opacity: 0.7; flex-shrink: 0; }
.sidebar-link.active i { opacity: 1; }

.sidebar-divider { height: 1px; background: var(--border-light); margin: 12px 0; }

.sidebar-return { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 500; }
.sidebar-return:hover { color: var(--text); }

.sidebar-footer { border-top: 1px solid var(--border-light); padding: 12px 10px; display: flex; align-items: center; gap: 10px; }
.sidebar-avatar { width: 32px; height: 32px; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); }

/* ── Main Content (next to sidebar) ── */
.main { margin-left: 240px; flex: 1; min-width: 0; }

.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }

.page { padding: 28px; max-width: 1100px; }

/* ── Stats Row (Strategy List) ── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-card:nth-child(1) .stat-value { color: var(--success); }
.stat-card:nth-child(2) .stat-value { color: var(--info); }
.stat-card:nth-child(3) .stat-value { color: var(--brand); }
.stat-card:nth-child(4) .stat-value { color: var(--success); }

/* ── Strategy Cards (Strategy List) ── */
.strategy-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }

.strategy-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 22px 24px; transition: box-shadow 0.15s; text-decoration: none; color: inherit; display: block;
}
.strategy-card:hover { box-shadow: var(--shadow); }

.sc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sc-title { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.3; letter-spacing: -0.3px; }

.sc-metrics { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sc-metric { flex: 1; min-width: 130px; background: var(--surface-alt); border-radius: var(--radius-sm); padding: 14px 16px; }
.sc-metric-top { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.sc-metric-value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1; }
.sc-metric-change { font-size: 13px; font-weight: 600; }
.sc-metric-change.positive { color: var(--success); }
.sc-metric-change.negative { color: var(--danger); }
.sc-metric-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.sc-metric-from { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.sc-meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted);
  padding-top: 14px; border-top: 1px solid var(--border);
}
.sc-meta-item { display: flex; align-items: center; gap: 5px; }
.sc-meta-item i { width: 14px; height: 14px; opacity: 0.6; }
.sc-meta-sep { width: 1px; height: 14px; background: var(--border); }
.sc-meta-source a { color: var(--brand); text-decoration: none; font-weight: 500; }
.sc-meta-source a:hover { text-decoration: underline; }
.sc-meta-actions { margin-left: auto; display: flex; gap: 4px; }
.sc-action { font-size: 12px; font-weight: 500; color: var(--brand); text-decoration: none; padding: 4px 10px; border-radius: 6px; transition: background 0.15s; }
.sc-action:hover { background: var(--brand-light); }

/* Team avatar stack */
.team-avatars { display: flex; align-items: center; }
.team-av { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; border: 2px solid var(--surface); margin-left: -5px; flex-shrink: 0; }
.team-av:first-child { margin-left: 0; }
.team-av.c1 { background: #5B8DB8; }
.team-av.c2 { background: #D4805A; }
.team-av.c3 { background: #7BA66E; }
.team-av.c4 { background: #9B7BB8; }
.team-av.c5 { background: #C4A44A; }
.team-av.c6 { background: #6DA5A5; }

/* Quick links bar */
.quick-links {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 24px; box-shadow: var(--shadow-sm); display: flex; gap: 24px; align-items: center;
}
.quick-links a { font-size: 13px; font-weight: 500; color: var(--brand); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.quick-links a:hover { color: var(--brand-dark); text-decoration: underline; }
.quick-links a i { width: 16px; height: 16px; }
.ql-sep { width: 1px; height: 20px; background: var(--border); }

/* ── Strategy Detail ── */
.strategy-banner { background: var(--surface-alt); border-bottom: 1px solid var(--border); padding: 24px 28px 20px; }
.sb-back { font-size: 12px; color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.sb-back:hover { color: var(--text-secondary); }
.sb-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.sb-info { flex: 1; min-width: 0; }
.sb-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.3; margin-bottom: 8px; }
.sb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sb-badge { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
.sb-badge.active { background: var(--success-bg); color: var(--success); }
.sb-badge.planning { background: var(--info-bg); color: var(--info); }
.sb-badge.paused { background: var(--warning-bg); color: var(--warning); }
.sb-badge.completed { background: var(--success-bg); color: var(--success); }
.sb-source { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.sb-source a { color: var(--brand); text-decoration: none; font-weight: 500; }
.sb-source a:hover { text-decoration: underline; }
.sb-actions { display: flex; gap: 8px; flex-shrink: 0; align-self: center; }

/* ── Two-Column Strategy Content ── */
.strategy-content { display: grid; grid-template-columns: 1fr 340px; gap: 20px; padding: 20px 28px 28px; align-items: start; }
.left-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.right-col { display: flex; flex-direction: column; gap: 16px; }

/* ── Panel ── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-title { font-size: 14px; font-weight: 600; }
.panel-link { font-size: 12px; color: var(--brand); font-weight: 500; cursor: pointer; text-decoration: none; }
.panel-link:hover { text-decoration: underline; }
.panel-body { padding: 18px; }

/* Status panel rows */
.status-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.status-row:last-child { border-bottom: none; }
.status-row-label { color: var(--text-muted); font-weight: 500; }
.status-row-val { font-weight: 600; }

/* Team compact (right sidebar) */
.team-compact-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.team-compact-item:last-child { border-bottom: none; }
.tc-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 11px; color: white; flex-shrink: 0; }
.tc-name { font-size: 13px; font-weight: 600; }
.tc-role { font-size: 11px; color: var(--text-muted); }

/* Quick actions (right sidebar) */
.qa-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none; }
.qa-item:last-child { border-bottom: none; }
.qa-item:hover { background: var(--surface-alt); }
.qa-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qa-icon i { width: 14px; height: 14px; }
.qa-arrow { margin-left: auto; color: var(--text-muted); }

/* ── Comment Thread ── */
.comment-thread { margin-top: 16px; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.comment-meta strong { color: var(--text); }
.comment-text { font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.comment-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Timeline (Activity) ── */
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 14px; top: 8px; bottom: 40px; width: 2px; background: var(--border); border-radius: 1px; }
.tl-item { position: relative; margin-bottom: 24px; }
.tl-dot { position: absolute; left: -40px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); z-index: 2; }
.tl-dot.brand { background: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.tl-dot.info { background: var(--info); box-shadow: 0 0 0 2px var(--info); }
.tl-dot.success { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.tl-dot.warning { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.tl-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tl-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: white; flex-shrink: 0; }
.tl-author { font-size: 13px; font-weight: 600; }
.tl-role { font-size: 11px; color: var(--text-muted); }
.tl-time { font-size: 11px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }
.tl-text { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ── Composer (Activity) ── */
.composer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.composer-top { display: flex; gap: 12px; margin-bottom: 12px; }
.composer-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.composer-textarea { flex: 1; min-width: 0; }
.composer-textarea textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; font-family: inherit; font-size: 13px; line-height: 1.5;
  resize: vertical; color: var(--text); min-height: 52px;
}
.composer-textarea textarea::placeholder { color: var(--text-muted); }
.composer-textarea textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px hsla(18,78%,55%,0.12); }
.composer-actions { display: flex; align-items: center; gap: 8px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label, .form-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px;
}
.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--text); background: var(--surface);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.form-control { min-height: 120px; resize: vertical; line-height: 1.6; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px hsla(18,78%,55%,0.12); }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ── Editor Section Panels (Strategy Form) ── */
.editor-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; margin-bottom: 20px; box-shadow: var(--shadow-sm); position: relative;
}
.editor-panel::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; }
.editor-panel.basics::before { background: var(--brand); }
.editor-panel.symptom::before { background: var(--danger); }
.editor-panel.people::before { background: var(--purple); }
.editor-panel.data-section::before { background: var(--info); }
.editor-panel.plan::before { background: var(--success); }
.editor-panel.source::before { background: var(--text-muted); }

.editor-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.editor-label.basics { color: var(--brand); }
.editor-label.symptom { color: var(--danger); }
.editor-label.people { color: var(--purple); }
.editor-label.data-section { color: var(--info); }
.editor-label.plan { color: var(--success); }
.editor-label.source { color: var(--text-muted); }
.editor-helper { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.5; }

/* Source note */
.source-note { font-size: 12px; color: var(--text-secondary); background: var(--surface-alt); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 12px; line-height: 1.5; }

/* Bottom action bar (editor) */
.bottom-bar {
  position: fixed; bottom: 0; left: 240px; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px 28px; display: flex; justify-content: flex-end; align-items: center;
  gap: 12px; z-index: 5; box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}

/* ── Team Members (partial) ── */
.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-member { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface-alt); border-radius: var(--radius-sm); }
.team-member-info { display: flex; align-items: center; gap: 10px; }
.team-member-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex-shrink: 0; }
.team-member-name { font-size: 13px; font-weight: 600; }
.team-member-role { font-size: 11px; color: var(--text-muted); }

/* ── Lead Card (editor People section) ── */
.lead-card { background: var(--purple-bg); border: 1px solid rgba(124,58,237,0.15); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }

/* ── Admin layout (same sidebar system) ── */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h1 { font-size: 24px; font-weight: 700; }

/* ── Error Page ── */
.error-page { text-align: center; padding: 80px 20px; max-width: 600px; margin: 0 auto; }
.error-code { font-size: 72px; font-weight: 700; color: var(--text-muted); }
.error-title { font-size: 24px; margin: 16px 0 8px; }
.error-desc { color: var(--text-muted); margin-bottom: 24px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .strategy-content { grid-template-columns: 1fr; }
  .right-col { order: 1; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero { padding: 56px 24px 48px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .needs-grid { grid-template-columns: 1fr; gap: 40px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .page-header { padding: 32px 24px 0; }
  .page-header h1 { font-size: 24px; }
  .metrics-row { grid-template-columns: 1fr; padding: 24px 20px; gap: 12px; }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .bottom-bar { left: 0; }
  .topbar { padding: 0 16px; }
  .page { padding: 16px; }
  .strategy-banner { padding: 16px; }
  .sb-row { flex-direction: column; gap: 14px; }
  .sb-actions { align-self: flex-start; }
  .strategy-content { padding: 16px; }
  .showcase-hero { min-height: 320px; }
  .hero-content { padding: 36px 20px; }
  .hero-avatar { width: 100px; height: 100px; font-size: 34px; }
  .hero-lead-name { font-size: 22px; }
  .hero-title { font-size: 28px; }
  .hero-watermark { width: 240px; height: 240px; right: -60px; }
}

@media (max-width: 480px) {
  .nav { padding: 0 16px; }
  .hero { padding: 40px 16px 36px; }
  .hero h1 { font-size: 24px; }
  .section { padding: 0 16px 56px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .filters-bar { flex-direction: column; align-items: stretch; padding: 0 16px 20px; }
  .filter-select { width: 100%; }
  .catalog { padding: 0 16px 32px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .topbar { height: 48px; padding: 0 12px; }
  .page { padding: 12px; }
  .stats-row { grid-template-columns: 1fr; }
  .showcase-hero { min-height: 280px; }
  .hero-content { padding: 28px 16px; }
  .hero-lead { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-avatar { width: 80px; height: 80px; font-size: 28px; }
  .hero-title { font-size: 22px; }
  .hero-watermark { display: none; }
  .bottom-bar { padding: 8px 12px; flex-wrap: wrap; }
}
