/* ===== ChurnSaver — Professional Theme ===== */

:root {
  --bg: #f8f9fb;
  --sidebar-bg: #0c1425;
  --sidebar-text: #8896ab;
  --sidebar-heading: #e8ecf2;
  --panel: #ffffff;
  --line: #e5e7eb;
  --line-light: #f1f3f5;
  --text: #111827;
  --text-secondary: #374151;
  --muted: #6b7280;
  --accent: #4338ca;
  --accent-light: #6366f1;
  --accent-subtle: rgba(67, 56, 202, 0.06);
  --green: #059669;
  --green-bg: rgba(5, 150, 105, 0.08);
  --yellow: #d97706;
  --yellow-bg: rgba(217, 119, 6, 0.08);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.06);
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --transition: 180ms ease;
}

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

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, textarea, input { font: inherit; }
img { display: block; max-width: 100%; }

/* ===== Layout ===== */
.page-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 28px 20px 24px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255,255,255,0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--sidebar-heading);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.brand-text p {
  font-size: 11px;
  color: var(--sidebar-text);
  opacity: 0.5;
  line-height: 1.3;
}

.nav-list {
  display: grid;
  gap: 2px;
  flex: 1;
}

.nav-section-label {
  display: block;
  padding: 20px 12px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
  color: var(--sidebar-text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #c9d1db; }
.nav-item:hover svg { opacity: 1; }
.nav-item.active { color: white; background: rgba(99,102,241,0.2); }
.nav-item.active svg { opacity: 1; }

.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: white;
  font-size: 10px; font-weight: 700; margin-left: auto;
}
.nav-secondary { opacity: 0.65; font-size: 12px; }
.nav-secondary:hover { opacity: 0.9; }
.nav-secondary.active { opacity: 1; }

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.sidebar-card .eyebrow { color: var(--accent-light); opacity: 0.7; font-size: 10px; }
.sidebar-card h2 { color: var(--sidebar-heading); font-size: 14px; margin: 6px 0 4px; font-weight: 600; }
.sidebar-card p { font-size: 11px; opacity: 0.5; }
.sidebar-rating { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; opacity: 0.6; }
.stars { color: #fbbf24; letter-spacing: 1px; }

/* ===== Eyebrow ===== */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ===== Content Area ===== */
.content {
  padding: 36px 32px;
  overflow-y: auto;
}

/* ===== Buttons ===== */
.primary-btn, .ghost-btn, .chip {
  padding: 10px 20px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.primary-btn {
  color: white;
  background: var(--accent);
  box-shadow: 0 1px 3px rgba(67,56,202,0.25);
}
.primary-btn:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 14px rgba(67,56,202,0.25);
  transform: translateY(-1px);
}

.ghost-btn {
  color: var(--text-secondary);
  background: white;
  border: 1px solid var(--line);
}
.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip {
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { color: white; background: var(--accent); border-color: var(--accent); }

/* ===== Hero ===== */
.hero {
  padding: 40px 44px;
  border-radius: var(--radius-lg);
  background: white;
  border: 1px solid var(--line);
  margin-bottom: 28px;
}

.hero h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text);
}

.hero p {
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.hero-actions { display: flex; gap: 12px; }

/* ===== Pipeline ===== */
/* ===== Onboarding Section ===== */
.onboarding-section {
  margin-bottom: 32px;
}
.onboarding-header {
  margin-bottom: 20px;
}
.onboarding-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 6px;
}
.onboarding-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.onboarding-steps.three-col { grid-template-columns: repeat(3, 1fr); }
.onboarding-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.onboarding-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(99,102,241,0.08);
}
.onboarding-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
}
.onboarding-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.onboarding-card strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.onboarding-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.onboarding-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16,185,129,0.1);
  color: var(--green);
  width: fit-content;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.onboarding-tag.coming-soon {
  background: rgba(99,102,241,0.1);
  color: var(--accent);
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card .eyebrow { font-size: 10px; margin-bottom: 4px; }
.stat-card strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 4px 0;
}
.stat-card p { font-size: 12px; color: var(--muted); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-accent { color: var(--accent); }

/* ===== Panels ===== */
.panel { display: none; }
.panel.active { display: block; }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.panel-header h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

/* ===== Cards ===== */
.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.card h4 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.subtle { color: var(--muted); font-size: 11px; }

/* ===== Dashboard Grid ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

/* ===== Bar Chart (dashboard) ===== */
.empty-state-hint { color: var(--muted); font-size: 13px; line-height: 1.6; padding: 8px 0; }
.bars { display: grid; gap: 16px; }
.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 36px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.bar { height: 6px; border-radius: 999px; overflow: hidden; background: var(--line-light); }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); opacity: 0.75; }
.bar-row strong { font-size: 13px; color: var(--muted); font-weight: 600; text-align: right; }

/* ===== Conversation List ===== */
.conversation-list { display: grid; gap: 8px; }
.conversation-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  transition: all var(--transition);
}
.conversation-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(67,56,202,0.06);
}
.conversation-item.active { border-color: var(--accent); background: var(--accent-subtle); }
.conversation-item strong { font-size: 13px; }
.conversation-item p { margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.conversation-meta {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
}
.review-stars { color: #fbbf24; font-size: 12px; letter-spacing: 1px; }

/* ===== Risk Pills ===== */
.risk-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.risk-pill.risk-high { color: var(--red); background: var(--red-bg); }
.risk-pill.risk-medium { color: var(--yellow); background: var(--yellow-bg); }
.risk-pill.risk-low { color: var(--green); background: var(--green-bg); }

/* ===== Reviews Feed ===== */
.reviews-list { display: grid; gap: 12px; }
.review-card { transition: all var(--transition); }
.review-card:hover { box-shadow: var(--shadow); }
.review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.review-source-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.review-time { font-size: 11px; color: var(--muted); }
.review-body strong { font-size: 13px; }
.review-body p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.review-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.review-responded { font-size: 11px; font-weight: 600; color: var(--green); }
.review-respond-btn { font-size: 12px !important; padding: 7px 14px !important; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== Analyzer Layout ===== */
.analyzer-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 20px;
  align-items: start;
  min-width: 0; /* prevent grid blowout */
}

.analyzer-input-section { display: grid; gap: 14px; align-content: start; position: sticky; top: 36px; min-width: 0; }
.analysis-results { display: grid; gap: 16px; min-width: 0; }

textarea {
  width: 100%;
  min-height: 160px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
  background: var(--bg);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  transition: all var(--transition);
}
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67,56,202,0.08); }
textarea::placeholder { color: var(--muted); opacity: 0.6; }
.upload-options { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.upload-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ===== Alert List ===== */
.alerts-card { border-left: 3px solid var(--red); }
.alert-list { display: grid; gap: 6px; }
.alert-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: white;
}
.alert-item:hover { border-color: var(--red); background: var(--red-bg); }
.alert-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.alert-item p { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ===== Verdict Card ===== */
.verdict-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  padding: 28px;
}

.verdict-top-row {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
}

.cri-gauge-wrap { position: relative; flex-shrink: 0; }
.cri-score {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.verdict-main { flex: 1; }
.verdict-label {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
  color: var(--text);
}
.verdict-meaning {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 0;
}
.cri-level { margin: 6px 0 0; }

/* CRI Factors */
.cri-factors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--line-light);
  margin-bottom: 14px;
}
.cri-factor { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cri-factor span:nth-child(2) { color: var(--muted); flex: 1; }
.cri-factor strong { font-size: 16px; font-weight: 700; }
.cri-factor-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-red { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green { background: var(--green); }

.cri-explain {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
  opacity: 0.8;
}

/* ===== Quick Facts ===== */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quick-fact {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.quick-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
.quick-fact strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* ===== Reply Card ===== */
.reply-card {
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
}

.reply-text {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.75;
  min-height: 80px;
  margin-bottom: 14px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.reply-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67,56,202,0.08); }
.reply-text:hover { border-color: var(--accent); cursor: text; }
.reply-text { margin-bottom: 14px; }
.reply-bottom-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.reply-actions { display: flex; gap: 8px; }
.reply-edit-hint {
  font-size: 11px; color: var(--accent); opacity: 0.7;
  display: flex; align-items: center; gap: 4px;
}
.edit-icon { font-size: 13px; }
.copy-btn, .regen-btn { font-size: 12px !important; padding: 8px 16px !important; }

/* ===== Authenticity Badge ===== */
.authenticity-badge {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin-top: 14px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.authenticity-badge.is-suspect { border-color: #ef4444; background: #fef2f2; }
.authenticity-badge.is-authentic { border-color: #059669; background: #f0fdf4; }
.auth-icon { font-size: 20px; flex-shrink: 0; }
.auth-info { flex: 1; }
.auth-info strong { display: block; font-size: 13px; color: var(--text-primary); }
.auth-detail { font-size: 11px; color: var(--muted); }
.auth-score { font-size: 18px; font-weight: 700; color: var(--text-primary); }

/* ===== Reviewer Profile ===== */
.reviewer-profile {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.reviewer-profile-header {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-primary); margin-bottom: 8px;
}
.reviewer-profile-header svg { color: var(--accent); }
.reviewer-profile-body {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px;
}
.reviewer-stat { display: flex; flex-direction: column; gap: 2px; }
.reviewer-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 600; }
.reviewer-stat-value { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.reviewer-profile-note { font-size: 11px; color: var(--muted); margin: 0; line-height: 1.5; }
.reviewer-influence-high { color: #ef4444; }
.reviewer-influence-medium { color: #f59e0b; }
.reviewer-influence-low { color: #059669; }

/* ===== Business Type Selector ===== */
.business-type-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.input-label { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.business-select {
  flex: 1; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 12px; color: var(--text-primary);
  background: var(--bg); font-family: inherit; cursor: pointer;
}
.business-select:focus { outline: none; border-color: var(--accent); }

.optional-meta-row {
  display: flex; align-items: flex-end; gap: 16px; margin-bottom: 10px;
}
.meta-field { display: flex; flex-direction: column; gap: 4px; }
.optional-hint { font-weight: 400; color: #9ca3af; font-size: 10px; }
.rating-input-row {
  display: flex; align-items: center; gap: 4px;
}
.rating-number-input {
  width: 56px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 14px; font-weight: 700;
  text-align: center; font-family: inherit; color: var(--text);
  background: var(--bg);
}
.rating-number-input:focus { outline: none; border-color: var(--accent); }
.rating-number-input::-webkit-inner-spin-button { opacity: 1; }
.rating-scale {
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.platform-select {
  padding: 6px 10px; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 12px; color: var(--text-primary);
  background: var(--bg); font-family: inherit; cursor: pointer;
}
.platform-select:focus { outline: none; border-color: var(--accent); }
.upload-hint {
  font-size: 11px; color: #9ca3af; flex: 1;
}

/* ===== Summary Section ===== */
.summary-section { margin-bottom: 28px; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.summary-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.summary-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}
.summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.summary-platforms {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.summary-platforms .plat-tag {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}
.suggestions-heading {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ===== Suggestions Page ===== */
.section-desc { color: var(--muted); font-size: 14px; margin-bottom: 20px; max-width: 600px; line-height: 1.6; }
.suggestions-filters { display: flex; gap: 8px; margin-bottom: 20px; }
.suggestions-list { display: grid; gap: 16px; }
.suggestions-empty {
  text-align: center; padding: 60px 24px;
  color: var(--muted); border: 2px dashed var(--line);
  background: var(--bg); border-radius: var(--radius);
}
.suggestions-empty .placeholder-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.suggestions-empty h3 { color: var(--text-primary); font-size: 18px; margin-bottom: 8px; }
.suggestions-empty p { font-size: 14px; max-width: 440px; margin: 0 auto 16px; line-height: 1.6; }

.suggestions-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
  border: 1px solid #c7d2fe;
}
.suggestions-banner-icon { font-size: 24px; flex-shrink: 0; }
.suggestions-banner-text { flex: 1; font-size: 13px; color: var(--text-primary); }
.suggestions-banner-text strong { color: var(--accent); }

.suggestion-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: box-shadow 0.2s;
}
.suggestion-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.suggestion-card.priority-high { border-left: 4px solid #ef4444; }
.suggestion-card.priority-medium { border-left: 4px solid #d97706; }
.suggestion-card.priority-low { border-left: 4px solid #059669; }
.suggestion-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.suggestion-priority { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.suggestion-priority.high { background: #fef2f2; color: #dc2626; }
.suggestion-priority.medium { background: #fffbeb; color: #d97706; }
.suggestion-priority.low { background: #f0fdf4; color: #059669; }
.suggestion-category { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.suggestion-time { font-size: 11px; color: var(--muted); margin-left: auto; }
.suggestion-body { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 12px; }
.suggestion-source { font-size: 12px; color: var(--muted); padding: 10px 14px; background: var(--bg); border-radius: var(--radius); }
.suggestion-source strong { color: var(--text-primary); }
.suggestion-meta { display: flex; gap: 16px; font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ===== Analysis Placeholder ===== */
.analysis-placeholder {
  text-align: center; padding: 60px 24px;
  color: var(--muted); border: 2px dashed var(--line);
  background: var(--bg);
}
.analysis-placeholder .placeholder-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.analysis-placeholder h3 { color: var(--text-primary); font-size: 18px; margin-bottom: 8px; }
.analysis-placeholder p { font-size: 14px; max-width: 400px; margin: 0 auto; line-height: 1.6; }

/* ===== History ===== */
.history-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.history-empty p { line-height: 1.5; }
.alert-item { cursor: pointer; transition: background 0.15s; }
.alert-item:hover { background: rgba(67,56,202,0.04); }
.alert-item .alert-source { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ===== Patterns & Traps ===== */
.patterns-grid { display: grid; gap: 8px; }
.pattern-item {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.pattern-item.pattern { background: var(--accent-subtle); border-color: rgba(67,56,202,0.12); }
.pattern-item.trap { background: var(--red-bg); border-color: rgba(220,38,38,0.12); }
.pattern-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pattern-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
}
.pattern-badge.pattern { color: var(--accent); background: rgba(67,56,202,0.1); }
.pattern-badge.trap { color: var(--red); background: rgba(220,38,38,0.1); }
.pattern-item strong { font-size: 13px; }
.pattern-item p { font-size: 12px; line-height: 1.5; color: var(--muted); }

/* ===== Detail Expander ===== */
.detail-expander { margin: 0; }
.detail-expander summary {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--transition);
  list-style: none;
}
.detail-expander summary::-webkit-details-marker { display: none; }
.detail-expander summary::before { content: "\25B6\00a0\00a0"; font-size: 9px; }
.detail-expander[open] summary::before { content: "\25BC\00a0\00a0"; }
.detail-expander summary:hover { color: var(--accent); border-color: var(--accent); }
.detail-expander .card { margin-top: 8px; }

/* ===== Emotion Bars ===== */
.emotion-bars { display: grid; gap: 10px; }
.emo-row { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 10px; }
.emo-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.emo-bar-track { height: 6px; border-radius: 999px; background: var(--line-light); overflow: hidden; }
.emo-bar-fill { height: 100%; border-radius: inherit; transition: width 600ms ease; }
.emo-pct { font-size: 11px; font-weight: 600; color: var(--muted); text-align: right; }
.emotion-summary {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--line-light);
}
.emotion-summary p { font-size: 12px; line-height: 1.6; color: var(--text-secondary); }

/* ===== Dimensions ===== */
.dimensions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dim-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.dim-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dim-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.dim-score { font-size: 18px; font-weight: 700; }
.dim-bar-track { height: 4px; border-radius: 999px; background: var(--line-light); overflow: hidden; margin-bottom: 8px; }
.dim-bar-fill { height: 100%; border-radius: inherit; transition: width 600ms ease; }
.dim-insight { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ===== Tracking Status Bar ===== */
.tracking-status-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.tracking-stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  text-align: center;
}
.tracking-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}
.tracking-stat span:last-child { font-size: 11px; color: var(--muted); }

/* ===== Timeline Layout ===== */
.timeline-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
.timeline-charts { display: grid; gap: 16px; }
.timeline-sidebar { display: grid; gap: 16px; align-content: start; }
canvas { display: block; width: 100%; height: auto; }

/* ===== Improvements & Actions ===== */
.improvement-list { display: grid; gap: 8px; }
.improvement-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line-light);
}
.improvement-item.positive .improvement-icon { color: var(--green); }
.improvement-item.neutral .improvement-icon { color: var(--yellow); }
.improvement-icon { font-size: 11px; flex-shrink: 0; margin-top: 3px; }
.improvement-item strong { font-size: 12px; font-weight: 600; }
.improvement-item p { margin-top: 2px; font-size: 11px; color: var(--muted); line-height: 1.5; }

.action-plans { display: grid; gap: 8px; }
.action-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line-light);
}
.action-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.action-item.done .action-check { background: var(--green-bg); color: var(--green); }
.action-item.active .action-check { background: var(--accent-subtle); color: var(--accent); }
.action-item.pending .action-check { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.action-item strong { font-size: 12px; font-weight: 600; }
.action-item p { margin-top: 2px; font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ===== Monthly Report ===== */
.report-grid { display: grid; gap: 16px; }
.report-hero-card { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.report-hero-stat { text-align: center; padding: 12px; }
.report-big-num {
  display: block;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 8px 0;
}
.report-hero-stat p { font-size: 12px; color: var(--muted); }

.report-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.report-metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
}
.report-metric span:first-child {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: block;
}
.report-metric strong {
  font-size: 24px;
  font-weight: 700;
  display: block;
  margin: 6px 0 4px;
}
.report-delta { font-size: 11px; font-weight: 600; }
.report-delta.positive { color: var(--green); }
.report-delta.neutral { color: var(--yellow); }
.report-delta.negative { color: var(--red); }

/* Report Summary */
.report-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.report-summary-section h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.report-bullets { list-style: none; padding: 0; display: grid; gap: 10px; }
.report-bullets li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}
.report-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.report-bullets.wins li::before { background: var(--green); }
.report-bullets.focus li::before { background: var(--yellow); }
.report-next-steps { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; font-style: italic; }

/* ===== Pricing ===== */
.pricing-section { max-width: 900px; margin: 0 auto; }

.promo-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  margin-bottom: 20px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.pricing-header { text-align: center; margin-bottom: 36px; }
.pricing-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 8px 0 6px;
}
.pricing-header p { color: var(--muted); font-size: 15px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.pricing-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.pricing-tier { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.pricing-original { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pricing-strikethrough { font-size: 15px; color: var(--muted); text-decoration: line-through; font-weight: 600; }
.pricing-save-badge { font-size: 10px; font-weight: 800; color: white; background: var(--red); padding: 2px 8px; border-radius: 999px; letter-spacing: 0.02em; }
.pricing-price {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}
.pricing-dollar { font-size: 22px; vertical-align: top; }
.pricing-period { font-size: 14px; color: var(--muted); font-weight: 500; }
.pricing-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }

.pricing-custom {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pricing-card.featured .pricing-price { color: var(--accent); }
.pricing-features { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pricing-features li { padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line-light); color: var(--text-secondary); }
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: "\2713 "; color: var(--green); font-weight: 700; margin-right: 8px; }
.pricing-cta { width: 100%; text-align: center; }

.pricing-enterprise {
  margin-top: 32px;
  padding: 0 8px;
}
.pricing-enterprise-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.pricing-enterprise-inner strong { font-size: 16px; display: block; margin-bottom: 4px; }
.pricing-enterprise-inner p { font-size: 13px; color: var(--muted); margin: 0; max-width: 500px; }
.pricing-enterprise-inner .pricing-cta { width: auto; flex-shrink: 0; }

/* ===== Settings / Login ===== */
.login-card {
  max-width: 400px;
  margin: 40px auto;
  text-align: center;
}
.login-icon { font-size: 48px; margin-bottom: 16px; }
.login-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.login-card > p { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.login-form { text-align: left; }
.form-group { margin-bottom: 14px; }
.form-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 14px; font-family: inherit;
  color: var(--text); background: var(--bg);
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input:disabled { opacity: 0.6; cursor: not-allowed; }
.login-alt {
  text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px;
}
.login-alt a { color: var(--accent); font-weight: 600; text-decoration: none; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.settings-card { padding: 24px; }
.settings-card h4 { margin-bottom: 16px; }

.subscription-info { display: flex; flex-direction: column; gap: 12px; }
.current-plan { display: flex; align-items: center; gap: 10px; }
.plan-badge {
  padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  background: rgba(99,102,241,0.1); color: var(--accent);
}
.plan-name { font-size: 15px; font-weight: 700; }
.plan-details { display: flex; flex-direction: column; gap: 8px; }
.plan-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-secondary);
  padding: 6px 0; border-bottom: 1px solid var(--line);
}
.plan-detail-row strong { color: var(--text); }

/* Sidebar user */
.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: auto;
}
.login-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: var(--radius);
  cursor: pointer; width: 100%; font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.login-btn:hover { background: rgba(255,255,255,0.08); color: white; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: white;
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
}
.user-name {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.8);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }

/* (Industry badges removed) */

/* ===== Responsive ===== */

/* Wide content adjustments */
@media (max-width: 900px) {
  .analyzer-layout { grid-template-columns: 1fr; }
  .analyzer-input-section { position: static; }
  .dimensions-grid, .report-hero-card, .report-summary { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; }
  .quick-facts { grid-template-columns: 1fr; }
  .cri-factors { grid-template-columns: repeat(2, 1fr); }
  .tracking-status-bar { grid-template-columns: repeat(2, 1fr); }
}

/* Sidebar collapses to icon-only — stays on the left */
@media (max-width: 1100px) {
  .page-shell { grid-template-columns: 60px 1fr; }

  .sidebar {
    padding: 16px 8px;
    align-items: center;
    width: 60px;
    overflow: visible;
  }

  /* Brand: show only icon */
  .brand { margin-bottom: 20px; }
  .brand-text { display: none; }

  /* Nav items: icon only, centered */
  .nav-section-label { display: none; }
  .nav-item {
    justify-content: center;
    padding: 10px;
    font-size: 0;          /* hide text */
    gap: 0;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    position: relative;
  }
  .nav-item svg { opacity: 0.8; }

  /* Tooltip on hover */
  .nav-item::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--sidebar-bg);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .nav-item:hover::after { opacity: 1; }

  .nav-secondary { opacity: 0.5; }
  .nav-secondary.active { opacity: 1; }

  /* Hide sidebar card */
  .sidebar-card { display: none; }

  /* Content adjusts */
  .content { padding: 24px 20px; }
  .dashboard-grid, .stats-grid, .timeline-layout { grid-template-columns: 1fr; }
  .onboarding-steps, .onboarding-steps.three-col { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .optional-meta-row { flex-wrap: wrap; }
}

/* Small screens — sidebar stays as icon bar */
@media (max-width: 720px) {
  .page-shell { grid-template-columns: 52px 1fr; }

  .sidebar { padding: 12px 6px; width: 52px; }
  .nav-item { width: 36px; height: 36px; }
  .brand-mark { width: 32px; height: 32px; font-size: 11px; }

  .content { padding: 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cri-factors { grid-template-columns: 1fr; }
  .tracking-status-bar { grid-template-columns: repeat(2, 1fr); }
  .report-metrics { grid-template-columns: 1fr; }
  .verdict-top-row { flex-direction: column; text-align: center; }
  .hero { padding: 24px 20px; }
  .hero h2 { font-size: 20px; }
  .onboarding-steps { grid-template-columns: 1fr; }
  .consent-banner { flex-direction: column; text-align: center; }
  .consent-actions { justify-content: center; }
  .pricing-enterprise-inner { flex-direction: column; text-align: center; }
}

/* ===== Privacy Consent Banner ===== */
.consent-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.consent-overlay.hidden { display: none; }
.consent-banner {
  background: white;
  border-radius: 12px;
  padding: 24px 32px;
  max-width: 720px;
  width: 100%;
  display: flex; align-items: center; gap: 24px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.consent-text strong { display: block; font-size: 15px; margin-bottom: 6px; }
.consent-text p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.consent-link { color: var(--accent); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-btn { white-space: nowrap; font-size: 13px; padding: 10px 18px; }
