/* ── Dashboard shell ─────────────────────────────────────────────────────── */

.dash-body {
  background: var(--bg-dark);
  min-height: 100vh;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */

.dash-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 60px;
  background: rgba(15, 35, 24, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(154, 176, 154, 0.08);
}

.dash-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.dash-logo span {
  color: var(--accent);
}

.dash-nav-center {
  display: flex;
  gap: 0.5rem;
}

.dash-nav-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg-dim);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.dash-nav-link:hover,
.dash-nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.05);
}

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.dash-biz-name {
  font-size: 0.85rem;
  color: var(--fg-dim);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  text-decoration: none;
}

.dash-badge-connected {
  color: #6fcf97;
  background: rgba(111, 207, 151, 0.1);
  border: 1px solid rgba(111, 207, 151, 0.2);
}

.dash-badge-connect {
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(232, 168, 56, 0.3);
  cursor: pointer;
}

/* ── Main layout ─────────────────────────────────────────────────────────── */

.dash-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}

/* ── Stat row ────────────────────────────────────────────────────────────── */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-tile {
  background: var(--bg-card);
  border: 1px solid rgba(154, 176, 154, 0.1);
  border-radius: 16px;
  padding: 1.6rem 1.8rem;
}

.stat-tile-accent {
  border-color: rgba(232, 168, 56, 0.2);
  background: linear-gradient(135deg, var(--bg-card), rgba(232, 168, 56, 0.04));
}

.stat-tile-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-tile-stars {
  font-size: 0.95rem;
  letter-spacing: 2px;
  margin-bottom: 0.4rem;
}

.star-on  { color: var(--accent); }
.star-off { color: rgba(154, 176, 154, 0.25); }

.stat-tile-label {
  font-size: 0.82rem;
  color: var(--fg-dim);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-tile-progress {
  height: 4px;
  background: rgba(154, 176, 154, 0.12);
  border-radius: 2px;
  margin-top: 0.8rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s ease;
  min-width: 4px;
}

.stat-tile-warning {
  font-size: 0.78rem;
  color: #f07070;
  margin-top: 0.5rem;
}

/* ── Reviews section ─────────────────────────────────────────────────────── */

.reviews-section {
  background: var(--bg-card);
  border: 1px solid rgba(154, 176, 154, 0.1);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.8rem;
  border-bottom: 1px solid rgba(154, 176, 154, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}

.reviews-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.filter-tabs {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.filter-tab {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-dim);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.filter-tab:hover {
  color: var(--white);
  background: rgba(255,255,255,0.04);
}

.filter-tab.active {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: rgba(232, 168, 56, 0.2);
}

.filter-tab-negative.active {
  color: #f07070;
  background: rgba(240, 112, 112, 0.08);
  border-color: rgba(240, 112, 112, 0.2);
}

/* ── Review cards ─────────────────────────────────────────────────────────── */

.review-card {
  padding: 1.6rem 1.8rem;
  border-bottom: 1px solid rgba(154, 176, 154, 0.06);
  transition: background 0.2s;
}

.review-card:last-child {
  border-bottom: none;
}

.review-card:hover {
  background: rgba(255, 255, 255, 0.015);
}

.review-responded {
  opacity: 0.85;
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.9rem;
  gap: 1rem;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.reviewer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(232, 168, 56, 0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f2318;
  flex-shrink: 0;
}

.reviewer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.review-stars {
  font-size: 0.82rem;
  letter-spacing: 1px;
}

.review-date {
  font-size: 0.78rem;
  color: var(--fg-dim);
}

/* Status badges */
.review-status-badge { flex-shrink: 0; }

.badge-published {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: #6fcf97;
  background: rgba(111, 207, 151, 0.08);
  border: 1px solid rgba(111, 207, 151, 0.18);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

.badge-draft {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(232, 168, 56, 0.2);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

.badge-pending {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-dim);
  background: rgba(154, 176, 154, 0.06);
  border: 1px solid rgba(154, 176, 154, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

/* Review text */
.review-text {
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

.review-text-empty {
  color: var(--fg-dim);
}

/* ── Response area ────────────────────────────────────────────────────────── */

.response-area {
  margin-top: 0.4rem;
}

/* Generate button */
.generate-prompt {
  display: flex;
}

.btn-generate {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(232, 168, 56, 0.12), rgba(232, 168, 56, 0.06));
  border: 1px solid rgba(232, 168, 56, 0.22);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-generate:hover {
  background: rgba(232, 168, 56, 0.15);
  border-color: rgba(232, 168, 56, 0.35);
  transform: translateY(-1px);
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-generate-icon {
  font-size: 1rem;
}

/* Draft textarea */
.draft-container {
  background: rgba(22, 45, 31, 0.6);
  border: 1px solid rgba(154, 176, 154, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.draft-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 80px;
  outline: none;
}

.draft-textarea::placeholder {
  color: var(--fg-dim);
  opacity: 0.5;
}

.draft-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-top: 1px solid rgba(154, 176, 154, 0.07);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.draft-actions-right {
  display: flex;
  gap: 0.5rem;
}

.btn-regenerate {
  background: transparent;
  border: 1px solid rgba(154, 176, 154, 0.15);
  color: var(--fg-dim);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-regenerate:hover {
  color: var(--fg);
  border-color: rgba(154, 176, 154, 0.3);
}

.btn-regenerate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-save-draft {
  background: transparent;
  border: 1px solid rgba(154, 176, 154, 0.15);
  color: var(--fg-dim);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-save-draft:hover {
  color: var(--fg);
  border-color: rgba(154, 176, 154, 0.3);
}

.btn-publish {
  background: var(--accent);
  border: none;
  color: #0f2318;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-publish:hover {
  background: #f0b840;
  transform: translateY(-1px);
}

/* Published response */
.published-response {
  background: rgba(111, 207, 151, 0.04);
  border: 1px solid rgba(111, 207, 151, 0.1);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.published-response-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: #6fcf97;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.published-response p {
  color: var(--fg);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--fg-dim);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* ── GBP Connect banner ──────────────────────────────────────────────────── */

.connect-banner {
  background: var(--bg-card);
  border: 1px solid rgba(232, 168, 56, 0.12);
  border-radius: 18px;
  padding: 2rem 2.2rem;
}

.connect-banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.connect-banner-text h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0.4rem 0 0.6rem;
}

.connect-banner-text p {
  color: var(--fg-dim);
  font-size: 0.9rem;
  max-width: 500px;
  line-height: 1.6;
}

.connect-banner-action {
  text-align: center;
  flex-shrink: 0;
}

.btn-connect-gbp {
  background: var(--accent);
  border: none;
  color: #0f2318;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-connect-gbp:hover {
  background: #f0b840;
  transform: translateY(-1px);
}

.connect-note {
  font-size: 0.75rem;
  color: var(--fg-dim);
  margin-top: 0.5rem;
}

/* ── Toast ──────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: 1px solid rgba(154, 176, 154, 0.15);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  z-index: 999;
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-success { border-color: rgba(111, 207, 151, 0.25); color: #6fcf97; }
.toast-error   { border-color: rgba(240, 112, 112, 0.25); color: #f07070; }
.toast-info    { border-color: rgba(232, 168, 56, 0.25);  color: var(--accent); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Disconnect button ────────────────────────────────────────────────────── */

.btn-disconnect {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: rgba(239, 68, 68, 0.8);
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
  transition: border-color 0.15s, color 0.15s;
}

.btn-disconnect:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* ── Review source badge (Google live reviews) ───────────────────────────── */

.review-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(66, 133, 244, 0.12);
  color: #4285F4;
  border: 1px solid rgba(66, 133, 244, 0.2);
}

/* ── Synced banner variant ────────────────────────────────────────────────── */

.connect-banner-synced {
  border-color: rgba(74, 222, 128, 0.15);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(74, 222, 128, 0.04) 100%);
}

@media (max-width: 640px) {
  .dash-main { padding: 1.5rem 1rem 4rem; }
  .dash-nav  { padding: 0 1rem; }
  .stat-row  { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-tile { padding: 1.2rem; }
  .stat-tile-value { font-size: 1.8rem; }

  .reviews-header { flex-direction: column; align-items: flex-start; }
  .filter-tabs    { gap: 0.25rem; }

  .review-card        { padding: 1.2rem 1rem; }
  .review-card-header { flex-direction: column; }

  .connect-banner-inner { flex-direction: column; }

  .draft-actions { flex-direction: column; align-items: flex-start; }
  .draft-actions-right { width: 100%; }
  .btn-publish { width: 100%; text-align: center; }

  .dash-biz-name { display: none; }
}
