* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
}
.topbar h1 { margin: 0; font-size: 1.25rem; }
.reporter-badge { font-size: 0.9rem; color: #555; }
.reporter-badge button,
.reporter-badge .link-button {
  margin-left: 0.5rem;
  background: none;
  border: 0;
  color: #0366d6;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 0;
  text-decoration: underline;
}
.reporter-badge a { color: #0366d6; text-decoration: underline; font-size: 0.85rem; }
.tabs { display: flex; gap: 0; padding: 0 1.5rem; background: #fff; border-bottom: 1px solid #e2e2e2; }
.tab-btn {
  padding: 0.6rem 1.2rem;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.95rem;
  color: #555;
  border-bottom: 2px solid transparent;
}
.tab-btn.active { color: #222; border-bottom-color: #0366d6; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  gap: 1.5rem;
}
#form-section { background: #fff; padding: 1rem; border-radius: 6px; border: 1px solid #e2e2e2; }
#paste-zone {
  border: 2px dashed #c0c0c0;
  border-radius: 6px;
  padding: 1rem;
  min-height: 110px;
  outline: none;
  cursor: text;
}
#paste-zone:focus { border-color: #0366d6; }
#paste-zone .hint { color: #888; margin: 0 0 0.5rem; font-size: 0.9rem; }
#thumbnails { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.thumb { position: relative; width: 96px; height: 96px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; }
.thumb button {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 0;
  background: #222; color: #fff; cursor: pointer; line-height: 22px; padding: 0;
}
#comment {
  width: 100%;
  margin-top: 0.75rem;
  min-height: 90px;
  padding: 0.6rem;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  font: inherit;
  resize: vertical;
}
.form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.6rem; }
.form-footer button {
  background: #0366d6; color: #fff; border: 0; padding: 0.5rem 1rem;
  border-radius: 4px; cursor: pointer; font-size: 0.95rem;
}
.error { color: #b00020; font-size: 0.85rem; }

#list-section h2 { margin: 0 0 0.5rem; font-size: 1rem; color: #555; }
#bug-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.bug-item { background: #fff; padding: 0.75rem; border: 1px solid #e2e2e2; border-radius: 6px; }
.bug-head { font-size: 0.85rem; color: #777; }
.bug-comment { margin: 0.3rem 0; }
.bug-thumbs { display: flex; gap: 0.5rem; }
.bug-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; }
.empty { color: #888; font-style: italic; }

.bug-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}
.bug-action {
  background: #fff;
  border: 1px solid #c8c8c8;
  color: #333;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}
.bug-action:hover { background: #f0f0f0; }
.bug-action.delete { color: #b00020; border-color: #e0b0b8; }
.bug-action.delete:hover { background: #fff0f2; }
.bug-action.save { background: #0366d6; color: #fff; border-color: #0366d6; }
.bug-action.save:hover { background: #0356be; }
.bug-action.save:disabled { opacity: 0.6; cursor: not-allowed; }
.bug-action.verify { background: #1f883d; color: #fff; border-color: #1f883d; }
.bug-action.verify:hover { background: #1a7333; }
.bug-action.verify:disabled { opacity: 0.6; cursor: not-allowed; }
.bug-edit-input {
  width: 100%;
  margin: 0.3rem 0;
  min-height: 70px;
  padding: 0.5rem;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  font: inherit;
  resize: vertical;
}

.bug-thread {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid #ececec;
}
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: grid;
  gap: 0.25rem;
}
.comment {
  font-size: 0.85rem;
  color: #333;
  line-height: 1.35;
}
.comment-meta {
  color: #666;
  font-weight: 500;
}
.comment.empty-thread {
  color: #999;
  font-style: italic;
}
.comment-form {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
}
.comment-input {
  flex: 1;
  min-height: 32px;
  padding: 0.35rem 0.5rem;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font: inherit;
  font-size: 0.85rem;
  resize: vertical;
}
.bug-action.comment-submit { white-space: nowrap; }

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f5f5f5;
}
.auth-card {
  background: #fff;
  padding: 1.5rem 1.75rem;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  width: 320px;
  max-width: 90vw;
}
.auth-card h1 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.auth-card h2 { margin: 0 0 1rem; font-size: 1rem; color: #555; font-weight: 500; }
.auth-card form { display: grid; gap: 0.6rem; }
.auth-card label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: #444; }
.auth-card input[type="text"],
.auth-card input[type="password"] {
  padding: 0.5rem;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  font: inherit;
}
.auth-card button {
  margin-top: 0.4rem;
  background: #0366d6;
  color: #fff;
  border: 0;
  padding: 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
}
.auth-card .error { margin: 0 0 0.6rem; }
.auth-card .notice { margin: 0 0 0.6rem; color: #1f883d; }

.testers-main { max-width: 900px; margin: 0 auto; padding: 1.5rem; display: grid; gap: 1.25rem; }
.testers-card { background: #fff; padding: 1rem 1.25rem; border: 1px solid #e2e2e2; border-radius: 6px; }
.testers-card h2 { margin: 0 0 0.75rem; font-size: 1rem; color: #333; }
.tester-form { display: flex; gap: 0.6rem; align-items: end; flex-wrap: wrap; }
.tester-form label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: #555; }
.tester-form input { padding: 0.4rem 0.5rem; border: 1px solid #c0c0c0; border-radius: 4px; font: inherit; }
.tester-form button {
  background: #0366d6; color: #fff; border: 0; padding: 0.5rem 0.9rem; border-radius: 4px; cursor: pointer;
}
.tester-form .hint { color: #777; font-size: 0.8rem; margin: 0.5rem 0 0; }
.testers-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.testers-table th, .testers-table td { padding: 0.5rem; text-align: left; border-bottom: 1px solid #f0f0f0; }
.testers-table th { color: #555; font-weight: 500; background: #fafafa; }
.inline-form { display: flex; gap: 0.4rem; }
.inline-form input { padding: 0.3rem 0.45rem; border: 1px solid #d0d0d0; border-radius: 4px; font-size: 0.85rem; }
.inline-form button { padding: 0.3rem 0.6rem; border: 1px solid #c0c0c0; background: #fff; border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
.status-active { color: #1f883d; }
.status-inactive { color: #999; }
.notice { color: #1f883d; padding: 0.5rem 0.75rem; background: #e8f5ed; border-radius: 4px; }

#picker-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
#picker-overlay[hidden] { display: none; }
.picker-card { background: #fff; padding: 1.5rem; border-radius: 8px; min-width: 280px; }
.picker-card h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.picker-card select { width: 100%; padding: 0.5rem; font: inherit; margin-bottom: 0.75rem; }
.picker-card button {
  width: 100%;
  background: #0366d6; color: #fff; border: 0; padding: 0.55rem; border-radius: 4px;
  cursor: pointer; font: inherit;
}
