/* ============================================
   RepRank — Dashboard Styles
   ============================================ */

/* ---- Layout ---- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 60px);
  margin-top: 60px;
}

/* ---- Feed sidebar ---- */
.review-feed {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  background: var(--bg);
}

.feed-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(250,249,247,0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.feed-header h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 12px;
}

.feed-filters {
  display: flex;
  gap: 6px;
}

.filter-btn {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.review-list { padding: 12px; }

.feed-item {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.feed-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.feed-item.selected {
  border-color: var(--accent);
  background: #FFFBEB;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.feed-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.feed-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.feed-item-info { flex: 1; min-width: 0; }
.feed-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-item-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.feed-item-stars {
  color: #F59E0B;
  font-size: 13px;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.star { opacity: 0.2; }
.star.filled { opacity: 1; }

.feed-item-text {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.feed-item-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sentiment-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sentiment-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.status-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
}
.status-pending { background: #F3F4F6; color: #6B7280; }
.status-drafted { background: #FEF3C7; color: #92400E; }
.status-approved, .status-sent { background: #DCFCE7; color: #15803D; }

.draft-indicator {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: #FEF3C7;
  padding: 2px 8px;
  border-radius: 20px;
}

.feed-loading, .feed-empty, .feed-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.feed-error { color: #DC2626; }

/* ---- Response panel ---- */
.response-panel {
  background: #F9F8F5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
}

.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: #9CA3AF;
  flex: 1;
}
.panel-empty h3 {
  font-family: 'Lora', Georgia, serif;
  font-size: 20px;
  color: #6B7280;
}
.panel-empty p { font-size: 14px; max-width: 280px; line-height: 1.6; }

.panel-active {
  width: 100%;
  max-width: 600px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-reviewer { display: flex; align-items: center; gap: 12px; }
.panel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}
.panel-reviewer-name { font-size: 15px; font-weight: 700; color: var(--fg); }
.panel-review-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.panel-platform-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.panel-stars {
  color: #F59E0B;
  font-size: 22px;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.panel-review-text {
  font-size: 15px;
  color: #374151;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 24px;
  padding: 16px;
  background: #F9F8F5;
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

.panel-ai-section {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

.ai-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.ai-badge-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ai-generating {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #92400E;
  font-size: 14px;
}

.ai-response-body { margin-bottom: 16px; }
#ai-response-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
  white-space: pre-wrap;
}

.ai-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-generate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-generate:hover { background: var(--accent-dim); transform: translateY(-1px); }
.btn-generate:active { transform: translateY(0); }

.btn-approve {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #16A34A;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-approve:hover { background: #15803D; }
.btn-approve:disabled { background: #9CA3AF; cursor: not-allowed; }

.btn-skip {
  padding: 10px 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-skip:hover { border-color: #9CA3AF; color: #374151; }

.btn-regenerate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #F3F4F6;
  color: #374151;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-regenerate:hover { background: #E5E7EB; }

/* ---- Nav badge ---- */
.nav-badge {
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Spinner ---- */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner.small {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .review-feed {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 45vh;
  }
  .response-panel { padding: 20px; }
  .panel-active { padding: 20px; }
}