/* ── Reset & Base ─────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Manrope', -apple-system, sans-serif;
  background: #f5f6fa;
  color: #1a1d26;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: #0d9668; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ──────────────────────── */
.nav {
  background: #fff;
  border-bottom: 1px solid #e2e5ed;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  color: #1a1d26;
  text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-email { font-size: 0.85rem; color: #8b95a8; }
.nav-link { font-size: 0.85rem; color: #8b95a8; }
.nav-link:hover { color: #e8553d; }

/* ── Container ────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.main { padding: 32px 0 60px; }

/* ── Page header ──────────────── */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.page-title { font-size: 1.8rem; font-weight: 800; line-height: 1.2; }
.page-subtitle { color: #8b95a8; font-size: 0.9rem; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: 0.85rem; color: #8b95a8; display: inline-block; margin-bottom: 8px; }
.breadcrumb:hover { color: #0d9668; text-decoration: none; }

/* ── Buttons ──────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: #0d9668; color: #fff; }
.btn-primary:hover { background: #0b7f58; text-decoration: none; }
.btn-outline { background: #fff; color: #555d6e; border: 1px solid #e2e5ed; }
.btn-outline:hover { border-color: #0d9668; color: #0d9668; text-decoration: none; }
.btn-danger { background: #fff; color: #e8553d; border: 1px solid #e2e5ed; }
.btn-danger:hover { background: #fef2f0; border-color: #e8553d; text-decoration: none; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 1.4rem; color: #8b95a8; line-height: 1; padding: 4px; border-radius: 4px; }
.btn-icon:hover { color: #e8553d; background: #fef2f0; }

/* ── Forms ─────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: #555d6e; margin-bottom: 6px; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e5ed;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1a1d26;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.form-input:focus { border-color: #0d9668; }
.form-textarea { resize: vertical; min-height: 80px; }

/* ── Alert ─────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 16px; }
.alert-error { background: #fef2f0; color: #e8553d; border: 1px solid rgba(232, 85, 61, 0.15); }

/* ── Auth ──────────────────────── */
.auth-page { display: flex; justify-content: center; padding-top: 60px; }
.auth-card { background: #fff; border: 1px solid #e2e5ed; border-radius: 16px; padding: 40px 36px; width: 420px; max-width: 100%; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 24px; text-align: center; }
.auth-link { text-align: center; margin-top: 20px; font-size: 0.9rem; color: #8b95a8; }

/* ── Empty state ──────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: #8b95a8; }
.empty-state.small { padding: 32px 20px; }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h2 { color: #1a1d26; font-size: 1.2rem; margin-bottom: 8px; }

/* ── Sites grid ───────────────── */
.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 40px; }
.site-card {
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.site-card:hover { border-color: #0d9668; box-shadow: 0 4px 16px rgba(0,0,0,0.04); text-decoration: none; }
.site-card-domain { font-size: 0.8rem; color: #8b95a8; margin-bottom: 4px; }
.site-card-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.site-card-stat { font-size: 0.85rem; color: #0d9668; font-weight: 600; }

.section-title-sm { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }

/* ── Add site form ────────────── */
.add-site-section { background: #fff; border: 1px solid #e2e5ed; border-radius: 12px; padding: 24px; }
.add-site-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 640px) { .add-site-form { grid-template-columns: 1fr; } }

/* ── Code block ───────────────── */
.code-section { margin-bottom: 24px; }
.code-block {
  background: #1a1d26;
  color: #a5f3c8;
  padding: 16px 20px;
  border-radius: 10px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  overflow-x: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.code-block code { white-space: nowrap; }
.btn-copy {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.btn-copy:hover { background: rgba(255,255,255,0.2); }

/* ── Stats row ────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.stat-box { background: #fff; border: 1px solid #e2e5ed; border-radius: 10px; padding: 20px; text-align: center; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: #0d9668; }
.stat-label { font-size: 0.8rem; color: #8b95a8; margin-top: 2px; }
@media (max-width: 640px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ── Filter tags ──────────────── */
.filter-section { margin-bottom: 20px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555d6e;
  background: #fff;
  border: 1px solid #e2e5ed;
  text-decoration: none;
  transition: all 0.2s;
}
.filter-tag:hover { border-color: #0d9668; color: #0d9668; text-decoration: none; }
.filter-tag.active { background: #0d9668; color: #fff; border-color: #0d9668; }

/* ── Responses list ───────────── */
.responses-list { display: flex; flex-direction: column; gap: 12px; }
.response-card { background: #fff; border: 1px solid #e2e5ed; border-radius: 10px; padding: 18px 20px; }
.response-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 0.82rem; }
.response-page { font-weight: 600; color: #555d6e; }
.response-time { color: #8b95a8; }
.badge { padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: #edfdf6; color: #0d9668; }
.badge-gray { background: #f0f2f8; color: #8b95a8; }
.badge-blue { background: #eef0ff; color: #6366f1; }

.response-answers { display: flex; flex-direction: column; gap: 6px; }
.response-answer { display: flex; gap: 8px; font-size: 0.88rem; }
.answer-question { color: #8b95a8; min-width: 0; flex-shrink: 0; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.answer-value { font-weight: 600; color: #1a1d26; }

/* ── Questions editor ─────────── */
.question-card { background: #fff; border: 1px solid #e2e5ed; border-radius: 12px; padding: 24px; margin-bottom: 16px; }
.question-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.question-number { font-size: 0.85rem; font-weight: 700; color: #0d9668; }
.questions-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }

/* ── Danger zone ──────────────── */
.danger-zone { margin-top: 60px; padding-top: 24px; border-top: 1px solid #e2e5ed; }
