/* =====================================================
   ReviewRadar – Main Stylesheet
   Dark/Light mode, responsive design
   ===================================================== */

/* ---------- CSS Variables (Light mode) ---------- */
:root {
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-nav: rgba(255,255,255,0.95);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --accent: #0d9488;
  --accent-light: #ccfbf1;
  --accent-dark: #0f766e;
  --navy: #1e293b;
  --navy-light: #334155;
  --positive: #10b981;
  --positive-bg: #d1fae5;
  --neutral: #f59e0b;
  --neutral-bg: #fef3c7;
  --negative: #ef4444;
  --negative-bg: #fee2e2;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #263347;
  --bg-nav: rgba(15,23,42,0.97);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --accent-light: #134e4a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --positive-bg: #064e3b;
  --neutral-bg: #78350f;
  --negative-bg: #7f1d1d;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ---------- Page transitions ---------- */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==========================================
   LANDING PAGE
   ========================================== */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.nav-brand i { font-size: 1.4rem; }

.landing-main {
  position: relative;
  min-height: calc(100vh - 130px);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

/* URL Form */
.url-form {
  display: flex;
  gap: 0.75rem;
  max-width: 580px;
  margin-bottom: 1rem;
}
.url-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.2rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.url-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
}
.url-icon { color: var(--text-muted); margin-right: 0.6rem; font-size: 0.9rem; }
.url-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.85rem 0;
}
.url-input-wrap input::placeholder { color: var(--text-muted); }
.btn-analyze {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-analyze:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(13,148,136,0.35);
}
.btn-analyze:active { transform: none; }

.url-error {
  color: var(--negative);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.demo-hints {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.demo-label { font-size: 0.82rem; color: var(--text-muted); }
.demo-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.25rem 0.8rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.demo-pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* Floating cards */
.feature-cards { position: relative; height: 340px; }
.feature-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow);
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.feature-card i { font-size: 1.5rem; color: var(--accent); margin-bottom: 0.3rem; }
.feature-card strong { font-size: 0.9rem; font-weight: 600; }
.feature-card span { font-size: 0.8rem; color: var(--text-secondary); }
.fc-1 { top: 0; left: 20px; animation: float1 4s ease-in-out infinite; }
.fc-2 { top: 100px; right: 10px; animation: float2 5s ease-in-out infinite; }
.fc-3 { bottom: 20px; left: 60px; animation: float3 4.5s ease-in-out infinite; }
@keyframes float1 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes float3 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Benefits strip */
.benefits-strip {
  background: var(--navy);
  color: #fff;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2.5rem 2rem;
}
.benefit {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 320px;
}
.benefit-icon {
  font-size: 1.8rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.benefit strong { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.benefit p { font-size: 0.85rem; color: #94a3b8; }

/* ==========================================
   LOADING PAGE
   ========================================== */
#page-loading.active {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-container {
  text-align: center;
  max-width: 540px;
  padding: 2rem;
  width: 100%;
}
.loading-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2rem;
}
.loading-logo i { font-size: 2rem; animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.4rem; }
.loading-url { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; }

.progress-bar-wrap {
  background: var(--border);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #0ea5e9);
  border-radius: 100px;
  transition: width 0.6s ease;
  width: 0%;
}
.progress-pct { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; }

.loading-steps { text-align: left; margin-bottom: 1.5rem; }
.step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
  transition: all var(--transition);
}
.step.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.step.done {
  color: var(--positive);
  border-color: var(--positive);
}
.step.done i::before { content: "\f058"; /* fa-check-circle */ }
.step-pending { color: var(--border); font-size: 0.65rem; }
.loading-note { font-size: 0.8rem; color: var(--text-muted); }

/* ==========================================
   DASHBOARD
   ========================================== */
#page-dashboard.active { min-height: 100vh; display: flex; flex-direction: column; }

.dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  height: 64px;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 160px;
}
.dash-tabs {
  flex: 1;
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  overflow-x: auto;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.tab-btn.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.dash-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 200px;
  justify-content: flex-end;
}
.dash-business-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-new-analysis {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-new-analysis:hover { background: var(--navy-light); }
[data-theme="dark"] .btn-new-analysis { background: var(--border); color: var(--text-primary); }
[data-theme="dark"] .btn-new-analysis:hover { background: var(--navy-light); }

/* Icon button */
.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-card); color: var(--accent); border-color: var(--accent); }

/* Dashboard sections */
.dash-main {
  flex: 1;
  padding: 1.5rem 2rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}
.dash-section { display: none; }
.dash-section.active { display: block; animation: fadeIn 0.3s ease; }

/* Grid */
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.col-span-2 { grid-column: span 2; }
.col-span-full { grid-column: 1 / -1; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}
.card-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.card-header h3 i { color: var(--accent); }

/* ---- Business card ---- */
.biz-card { grid-column: 1 / -1; }
.biz-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.biz-avatar {
  font-size: 3rem;
  background: var(--accent-light);
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.biz-details h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.biz-details p { font-size: 0.9rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; margin-top: 0.2rem; }
.biz-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.stars-row { display: flex; gap: 0.15rem; justify-content: center; margin-top: 0.3rem; }
.stars-row i { color: #f59e0b; font-size: 0.85rem; }

/* ---- Platforms list ---- */
.platforms-list { display: flex; flex-direction: column; gap: 0.75rem; }
.platform-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
}
.platform-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.plt-google { background: #4285F4; }
.plt-tripadvisor { background: #00af87; }
.plt-booking { background: #003580; }
.plt-yelp { background: #d32323; }
.plt-facebook { background: #1877f2; }
.plt-unknown { background: #64748b; }
.platform-name { flex: 1; font-size: 0.88rem; font-weight: 500; }
.platform-stars { display: flex; gap: 0.1rem; }
.platform-stars i { color: #f59e0b; font-size: 0.75rem; }
.platform-meta { font-size: 0.8rem; color: var(--text-muted); text-align: right; }

/* ---- Sentiment legend ---- */
.sentiment-legend {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---- Chart container ---- */
.chart-container { position: relative; }

/* ---- Reviews section ---- */
.reviews-filter {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.reviews-list { display: flex; flex-direction: column; gap: 0.75rem; max-height: 600px; overflow-y: auto; padding-right: 4px; }
.review-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 1rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.review-item:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.review-platform-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.review-content { min-width: 0; }
.review-header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.review-author { font-weight: 600; font-size: 0.88rem; }
.review-stars i { color: #f59e0b; font-size: 0.75rem; }
.review-date { font-size: 0.78rem; color: var(--text-muted); }
.review-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.review-sentiment {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.sentiment-positive { background: var(--positive-bg); color: var(--positive); }
.sentiment-neutral { background: var(--neutral-bg); color: var(--neutral); }
.sentiment-negative { background: var(--negative-bg); color: var(--negative); }

.btn-reply {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-reply:hover { background: var(--accent); color: #fff; }

/* ---- Strengths / Weaknesses ---- */
.sw-list { display: flex; flex-direction: column; gap: 0.5rem; }
.sw-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.45;
}
.strengths li { background: var(--positive-bg); color: var(--text-primary); }
.strengths li::before { content: "✓"; color: var(--positive); font-weight: 700; flex-shrink: 0; margin-top: 0.05rem; }
.weaknesses li { background: var(--negative-bg); color: var(--text-primary); }
.weaknesses li::before { content: "✗"; color: var(--negative); font-weight: 700; flex-shrink: 0; margin-top: 0.05rem; }

/* ---- Competition ---- */
.table-wrap { overflow-x: auto; }
.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.comp-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}
.comp-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.comp-table tr:last-child td { border-bottom: none; }
.comp-table tr:hover td { background: var(--bg-page); }
.comp-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}
.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank-3 { background: linear-gradient(135deg, #cd7c5a, #a16436); }
.comp-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary);
  font-weight: 600;
}
.comp-rating i { color: #f59e0b; }
.comp-strengths { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
}

/* ---- Radar legend ---- */
.radar-legend {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* ---- Best practices ---- */
.bp-list { display: flex; flex-direction: column; gap: 0.6rem; }
.bp-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  line-height: 1.45;
}
.bp-list li:last-child { border-bottom: none; }
.bp-list li i { color: var(--accent); flex-shrink: 0; margin-top: 0.2rem; }

/* ---- Gap analysis ---- */
.gap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gap-item {
  padding: 1rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
}
.gap-item.priority-high { border-color: var(--negative); }
.gap-item.priority-medium { border-color: var(--neutral); }
.gap-item.priority-low { border-color: var(--positive); }
.gap-label { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; }
.gap-desc { font-size: 0.82rem; color: var(--text-secondary); }
.gap-diff {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--negative);
  margin-top: 0.4rem;
}

/* ---- Reply generator ---- */
.reply-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 600px;
  overflow-y: auto;
}
.reply-review-item {
  padding: 0.85rem 1rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.reply-review-item:hover { border-color: var(--accent); }
.reply-review-item.selected { border-color: var(--accent); background: var(--accent-light); }
.reply-review-item .rr-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.reply-review-item .rr-text { font-size: 0.83rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.reply-generator-card { grid-column: 2 / -1; }
.reply-placeholder {
  grid-column: 2 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  text-align: center;
  color: var(--text-muted);
}
.reply-placeholder i { font-size: 2.5rem; }
.reply-placeholder p { font-size: 0.9rem; }

.reply-style-tabs { display: flex; gap: 0.35rem; }
.style-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.style-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.style-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

.selected-review-preview {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-left: 4px solid var(--accent);
}
.reply-loading { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; }
.reply-loading i { font-size: 1.5rem; margin-right: 0.5rem; color: var(--accent); }
.reply-output {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  min-height: 100px;
  border: 1px solid var(--border);
}
.reply-actions { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.btn-copy, .btn-regenerate {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn-copy { background: var(--accent); color: #fff; border: none; }
.btn-copy:hover { background: var(--accent-dark); }
.btn-regenerate { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-regenerate:hover { background: var(--bg-page); border-color: var(--accent); color: var(--accent); }
.reply-methods-info {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
}
.reply-methods-info i { color: var(--accent); flex-shrink: 0; }

/* ---- Action plan ---- */
.quick-wins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.qw-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.qw-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.qw-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.25rem; }
.qw-desc { font-size: 0.82rem; color: var(--text-secondary); }

.recommendations-list { display: flex; flex-direction: column; gap: 0.75rem; }
.rec-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.rec-num {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.rec-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; }
.rec-desc { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5; }
.rec-impact { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.4rem; }
.priority-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.priority-high { background: var(--negative-bg); color: var(--negative); }
.priority-medium { background: var(--neutral-bg); color: var(--neutral); }
.priority-low { background: var(--positive-bg); color: var(--positive); }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .landing-main { grid-template-columns: 1fr; max-width: 600px; }
  .feature-cards { display: none; }
  .section-grid { grid-template-columns: repeat(2, 1fr); }
  .col-span-2 { grid-column: span 2; }
  .biz-card { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .dash-header { padding: 0 1rem; gap: 0.5rem; flex-wrap: wrap; height: auto; padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .dash-tabs { order: 3; width: 100%; justify-content: flex-start; padding-bottom: 0.25rem; }
  .tab-btn { font-size: 0.78rem; padding: 0.35rem 0.65rem; }
  .tab-btn i { display: none; }
  .dash-main { padding: 1rem; }
  .section-grid { grid-template-columns: 1fr; }
  .col-span-2, .col-span-full { grid-column: span 1; }
  .biz-info { flex-direction: column; align-items: flex-start; }
  .biz-stats { gap: 1rem; }
  .reply-generator-card, .reply-placeholder { grid-column: span 1; }
  .dash-brand span { display: none; }
  .dash-business-name { display: none; }
  .url-form { flex-direction: column; }
  .btn-analyze { padding: 0.85rem 1.5rem; justify-content: center; }
  .landing-main { padding: 2rem 1rem; }
  .hero-title { font-size: 1.75rem; }
  .benefits-strip { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .rec-item { grid-template-columns: 36px 1fr; }
  .priority-badge { grid-column: 2; }
}
