/* style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: #f5f7fb;
  color: #1a1a2e;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  color: #2563eb;
  font-size: 28px;
  margin-bottom: 4px;
}

.subtitle {
  color: #6b7280;
  margin-bottom: 24px;
  font-size: 14px;
}

form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 16px;
  color: #374151;
}

form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

form input:focus {
  outline: none;
  border-color: #2563eb;
}

.btn-primary {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-google {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-google:hover {
  background: #f9fafb;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 13px;
}

.auth-links a {
  color: #2563eb;
  text-decoration: none;
}

.hidden {
  display: none;
}

.notification {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.notification.success {
  background: #d1fae5;
  color: #065f46;
}

.notification.error {
  background: #fee2e2;
  color: #991b1b;
}
/* --- App Layout (Dashboard + Business pages) --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 24px 0;
  flex-shrink: 0;
}

.sidebar-logo {
  font-weight: 700;
  font-size: 18px;
  color: #2563eb;
  padding: 0 24px 24px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.nav-link {
  padding: 12px 24px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-link:hover {
  background: #f3f4f6;
}

.nav-link.active {
  background: #eff6ff;
  color: #2563eb;
  border-right: 3px solid #2563eb;
}

.main-content {
  flex: 1;
  padding: 32px 40px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.main-header h1 {
  font-size: 24px;
}

.btn-inline {
  width: auto;
  margin-top: 0;
  padding: 10px 18px;
  font-size: 14px;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 8px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  color: #6b7280;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

.data-table a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  color: #9ca3af;
  padding: 32px !important;
}

.btn-small {
  display: inline-block;
  padding: 6px 12px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
}
/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: white;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-card h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.business-select-list {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.business-select-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.business-select-item.already-connected {
  cursor: not-allowed;
  opacity: 0.6;
  background: #f9fafb;
}

.already-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.btn-secondary {
  padding: 10px 18px;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Business detail page --- */
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 18px 20px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 600;
  font-size: 14px;
}

.review-rating {
  color: #f59e0b;
  font-size: 14px;
  letter-spacing: 1px;
}

.review-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.review-reply {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 13px;
  color: #4b5563;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-sep {
  margin: 0 6px;
  color: #d1d5db;
}

.business-meta {
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}

.section-heading {
  font-size: 16px;
  font-weight: 700;
  color: #374151;
  margin: 24px 0 12px;
}

.review-count-link {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
}

.review-count-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* --- Status badge --- */
.status-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-replied {
  background: #d1fae5;
  color: #065f46;
}

/* --- Reply section --- */
.reply-section {
  margin-top: 14px;
  border-top: 1px solid #f3f4f6;
  padding-top: 14px;
}

.reply-display {
  background: #f9fafb;
  border-radius: 8px;
  padding: 12px 14px;
}

.reply-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 4px;
}

.reply-display .reply-text {
  font-size: 13px;
  color: #374151;
}

.reply-actions {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
}

.btn-link.btn-danger {
  color: #dc2626;
}

.reply-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-ai-reply {
  align-self: flex-start;
  padding: 6px 12px;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-ai-reply:hover {
  background: #ede9fe;
}

.btn-ai-reply:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.reply-input {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.reply-input:focus {
  outline: none;
  border-color: #2563eb;
}

.reply-compose-actions {
  display: flex;
  gap: 8px;
}

.reply-compose-actions .btn-inline {
  margin-top: 0;
}

/* --- Disconnect buttons --- */
.header-actions {
  display: flex;
  gap: 10px;
}

.header-actions .btn-inline {
  margin-top: 0;
}

.btn-danger-outline {
  color: #dc2626;
  border-color: #fecaca;
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

.actions-cell {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-small-danger {
  background: none;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-family: inherit;
}

.btn-small-danger:hover {
  background: #fef2f2;
}

.btn-small-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}