:root {
  --bg: #f7f7f9;
  --card: #ffffff;
  --border: #e2e2e7;
  --text: #1c1c22;
  --text-muted: #6b6b76;
  --primary: #2f6f4f;
  --primary-dark: #245a3f;
  --danger: #b3432f;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--primary);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

.narrow {
  max-width: 420px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.nav .brand {
  font-weight: 700;
  font-size: 1.1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

h1, h2, h3 {
  margin-top: 0;
}

.auth-card {
  margin: 60px auto;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

button, .btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

button:hover, .btn:hover {
  background: var(--primary-dark);
}

button.secondary, .btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

button.secondary:hover {
  background: var(--bg);
}

button.danger {
  background: var(--danger);
}

.error {
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f3c3ba;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-pending_response { background: #fff4d6; color: #8a6100; }
.status-pending_approval { background: #e4e8ff; color: #33409a; }
.status-published { background: #dff3e6; color: #1f7a45; }
.status-declined { background: #f3e3e3; color: #8a3030; }

.status-new { background: #f0f0f3; color: #4a4a55; }
.status-sent { background: #e4e8ff; color: #33409a; }
.status-converted { background: #dff3e6; color: #1f7a45; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.rating-group + input[type="file"] {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

.testimonial-row-content .quote {
  font-style: italic;
  margin: 0 0 12px;
}

.testimonial-row-content .byline {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.testimonial-row-content .job,
.modal-card .job {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.testimonial-list {
  display: flex;
  flex-direction: column;
}

.testimonial-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.testimonial-row:last-child {
  border-bottom: none;
}

.testimonial-row.featured {
  background: rgba(0, 0, 0, 0.035);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border-bottom: none;
  border-radius: var(--radius);
  padding: 24px 20px;
  margin: 4px 0;
}

.featured-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.held-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px dashed var(--text-muted);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.testimonial-row-photo {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.testimonial-row-content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 600px) {
  .testimonial-row {
    gap: 12px;
    padding: 16px 0;
  }

  .testimonial-row.featured {
    padding: 16px 12px;
  }

  .testimonial-row-photo {
    width: 72px;
    height: 72px;
  }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  z-index: 1000;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal-card {
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  margin-bottom: 0;
}

.rating-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.rating-option {
  flex: 1 1 auto;
  min-width: 90px;
  padding: 14px 10px;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  user-select: none;
}

.rating-option.selected {
  border-color: var(--primary);
  background: #eaf5ee;
  color: var(--primary-dark);
  font-weight: 600;
}

.public-hero {
  text-align: center;
  padding: 40px 16px 20px;
}

.public-hero h1 {
  margin-bottom: 4px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 16px;
}

.actions-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
