:root {
  --green: #25d366;
  --green-dark: #128c7e;
  --red: #e74c3c;
  --bg: #efe7dd;
  --card-bg: #ffffff;
  --text: #111b21;
  --muted: #667781;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

.topbar {
  background: var(--green-dark);
  color: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar .brand { 
  color: white; 
  text-decoration: none; 
  font-weight: 600; 
  font-size: 18px; 
}

.topbar nav { 
  display: flex; 
  gap: 14px; 
  align-items: center; 
  font-size: 14px; 
}

.topbar nav a, .topbar .link-btn { 
  color: white; 
  text-decoration: none; 
  opacity: 0.9; 
  background: none; 
  border: none; 
  cursor: pointer; 
  font: inherit; 
  padding: 0; 
}

.topbar .who { opacity: 0.9; }

.inline-form { display: inline; }

.container { 
  max-width: 640px; 
  margin: 0 auto; 
  padding: 20px 16px 60px; 
}

h1 { 
  font-size: 22px; 
  margin: 8px 0 16px; 
}

h2 { 
  font-size: 17px; 
  margin: 24px 0 10px; 
}

.back-link { 
  display: inline-block; 
  margin-bottom: 10px; 
  color: var(--green-dark); 
  text-decoration: none; 
  font-size: 14px; 
}

.empty { color: var(--muted); }

/* Trader list */
.trader-list { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}

.trader-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  display: block;
}

.trader-card-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 8px; 
}

.trader-card-name { font-weight: 600; }

.bar { 
  height: 6px; 
  background: #eee; 
  border-radius: 4px; 
  overflow: hidden; 
  margin-bottom: 8px; 
}

.bar-fill { 
  height: 100%; 
  background: var(--green); 
}

.trader-card-stats { 
  display: flex; 
  gap: 14px; 
  font-size: 13px; 
  color: var(--muted); 
}

.pos { 
  color: var(--green-dark); 
  font-weight: 600; 
}

.neg { 
  color: var(--red); 
  font-weight: 600; 
}

.badge-banned { 
  color: #e74c3c; 
  font-weight: 600; 
}

.reputation-summary {
  display: flex; 
  gap: 16px; 
  flex-wrap: wrap;
  background: var(--card-bg); 
  padding: 12px 16px; 
  border-radius: var(--radius);
  margin-bottom: 16px; 
  font-size: 14px;
}

.aliases { 
  color: var(--muted); 
  font-size: 13px; 
  margin-top: -10px; 
}

.banner-alert { 
  background: #fee; 
  border-left: 4px solid #e74c3c; 
  padding: 12px 16px; 
  border-radius: 8px; 
  margin: 10px 0; 
}

.banner-box { 
  background: #fee; 
  border-radius: 10px; 
  padding: 12px 16px; 
  margin: 12px 0; 
}

.ban-form { 
  display: flex; 
  gap: 8px; 
  margin: 12px 0; 
  flex-wrap: wrap; 
}

.ban-form input { 
  flex: 1; 
  min-width: 150px; 
  padding: 8px 12px; 
  border: 1px solid #ddd; 
  border-radius: 8px; 
}

.btn-ban, .btn-unban { 
  padding: 8px 14px; 
  border: none; 
  cursor: pointer; 
  border-radius: 8px; 
  font-size: 14px; 
}

.btn-ban { 
  background: #e74c3c; 
  color: white; 
}

.btn-unban { 
  background: #27ae60; 
  color: white; 
}

/* Feedback card */
.feedback-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.feedback-author { 
  color: var(--green-dark); 
  font-weight: 600; 
  font-size: 14px; 
  margin-bottom: 4px; 
}

.feedback-question { 
  font-weight: 600; 
  font-size: 16px; 
  margin-bottom: 14px; 
}

.vote-options { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
  margin-bottom: 8px; 
}

.vote-option {
  position: relative;
  display: block;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.vote-option.selected { border-color: var(--green); }

.vote-option input { 
  position: absolute; 
  top: 12px; 
  left: 12px; 
}

.vote-label { 
  margin-left: 22px; 
  font-weight: 500; 
}

.vote-count { 
  float: right; 
  color: var(--muted); 
  font-size: 14px; 
}

.vote-bar { 
  height: 5px; 
  background: #eee; 
  border-radius: 4px; 
  overflow: hidden; 
  margin-top: 8px; 
}

.vote-bar-fill { height: 100%; }

.vote-bar-fill.pos { background: var(--green); }

.vote-bar-fill.neg { background: var(--red); }

.votes-detail { 
  margin: 10px 0; 
  font-size: 13px; 
  color: var(--green-dark); 
}

.votes-list { 
  margin-top: 8px; 
  font-size: 13px; 
  color: var(--muted); 
}

.feedback-admin-controls { 
  margin: 10px 0; 
  display: flex; 
  gap: 8px; 
}

.edit-btn, .delete-btn { 
  padding: 6px 10px; 
  border: none; 
  border-radius: 6px; 
  cursor: pointer; 
  font-size: 12px; 
  background: #f0f0f0; 
}

.delete-btn { 
  background: #fee; 
  color: #c33; 
}

.edit-form { 
  background: #f9f9f9; 
  padding: 8px; 
  border-radius: 8px; 
  display: flex; 
  gap: 6px; 
  margin-bottom: 10px; 
}

.edit-form input { 
  flex: 1; 
  padding: 6px 10px; 
  border: 1px solid #ddd; 
  border-radius: 6px; 
}

.edit-form button { 
  padding: 6px 12px; 
  border: none; 
  border-radius: 6px; 
  cursor: pointer; 
}

.edit-form button[type="submit"] { 
  background: #25d366; 
  color: white; 
}

.edit-form button[type="button"] { 
  background: #ddd; 
}

/* Comments */
.comments { 
  margin-top: 14px; 
  border-top: 1px solid #eee; 
  padding-top: 10px; 
}

.comment { 
  background: #f7f5f2; 
  border-radius: 10px; 
  padding: 8px 10px; 
  margin-bottom: 8px; 
}

.comment.reply { 
  margin-left: 20px; 
  border-left: 3px solid var(--green); 
}

.comment-author { 
  font-weight: 600; 
  font-size: 13px; 
  color: var(--green-dark); 
}

.comment-body { font-size: 14px; }

.reply-form, .comment-form { 
  display: flex; 
  gap: 6px; 
  margin-top: 6px; 
}

.reply-form input, .comment-form input {
  flex: 1; 
  padding: 6px 10px; 
  border-radius: 20px; 
  border: 1px solid #ddd; 
  font-size: 13px;
}

.reply-form button, .comment-form button {
  border: none; 
  background: var(--green); 
  color: white; 
  border-radius: 20px; 
  padding: 6px 14px; 
  cursor: pointer; 
  font-size: 13px;
}

/* Forms */
.identify-form, .new-feedback-form, .new-trader-form {
  display: flex; 
  gap: 8px; 
  margin-bottom: 16px; 
  flex-wrap: wrap;
}

.identify-form input, .new-feedback-form input, .new-trader-form input {
  flex: 1; 
  min-width: 160px; 
  padding: 10px 14px; 
  border-radius: 10px; 
  border: 1px solid #ddd; 
  font-size: 14px;
}

.identify-form button, .new-feedback-form button, .new-trader-form button {
  border: none; 
  background: var(--green-dark); 
  color: white; 
  border-radius: 10px; 
  padding: 10px 16px; 
  cursor: pointer; 
  font-size: 14px;
}

.admin-trader-list { 
  list-style: none; 
  padding: 0; 
}

.admin-trader-list li { 
  padding: 8px 0; 
  border-bottom: 1px solid #eee; 
}

.admin-trader-list a { 
  color: var(--text); 
  text-decoration: none; 
  font-weight: 500; 
}

.feedback-admin-card { 
  background: var(--card-bg); 
  border-radius: var(--radius); 
  padding: 14px; 
  margin-bottom: 12px; 
}

.feedback-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 8px; 
}

.feedback-question { 
  font-weight: 600; 
  flex: 1; 
}

.vote-badge { 
  background: #eee; 
  padding: 2px 8px; 
  border-radius: 12px; 
  font-size: 12px; 
}

.feedback-actions { 
  display: flex; 
  gap: 8px; 
  margin-bottom: 10px; 
}

.admin-link { 
  display: inline-block; 
  margin-top: 8px; 
  color: #128c7e; 
  font-weight: 600; 
}

.error { 
  color: var(--red); 
  font-size: 14px; 
}
