* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f8;
  color: #1a1a1a;
}
header {
  background: #1739D8;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 { font-size: 18px; margin: 0; }
header button {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
}
main { max-width: 900px; margin: 0 auto; padding: 24px; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  width: 320px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}
.login-card h1 { font-size: 18px; margin: 0 0 16px; }
.login-card input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}
.login-card button {
  width: 100%;
  background: #1739D8;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.login-error { color: #a4341a; font-size: 13px; margin-bottom: 10px; display: none; }

.card {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-row .info a { color: #1739D8; text-decoration: none; font-weight: 600; }
.project-row .info .url { color: #777; font-size: 13px; }
.project-row .counts { font-size: 13px; color: #444; white-space: nowrap; }
.project-row .counts .open { color: #a4341a; font-weight: 700; }
.project-row .actions button {
  border: none;
  background: #eef0fb;
  color: #1739D8;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
}

.add-form { display: flex; gap: 8px; flex-wrap: wrap; }
.add-form input {
  flex: 1;
  min-width: 160px;
  padding: 9px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
}
.add-form button {
  background: #1739D8;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
}

.snippet {
  background: #111;
  color: #d4d4d4;
  padding: 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre;
  margin-top: 8px;
}

.back-link { display: inline-block; margin-bottom: 16px; color: #1739D8; text-decoration: none; font-size: 13px; }

.access-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eee; }
.access-row label { display: block; font-size: 12px; color: #555; margin-bottom: 6px; }
.access-edit { display: flex; gap: 8px; }
.access-edit input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
}
.access-edit button {
  background: #1739D8;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.access-status { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; }
.access-status.ok { color: #2c6e2c; }
.access-status.warn { color: #a4341a; }

.page-group h3 { font-size: 14px; margin: 0 0 8px; color: #444; }
.comment-row {
  border-top: 1px solid #eee;
  padding: 12px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.comment-row:first-child { border-top: none; }
.comment-row > div:not(.shot-thumb) { flex: 1; min-width: 0; }
.shot-thumb {
  flex: 0 0 160px;
  width: 160px;
  height: 110px;
  border-radius: 8px;
  object-fit: cover;
  object-position: top;
  border: 1px solid #e2e4ec;
  background: #f4f5f8;
}
.shot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 8px;
}
.comment-row .text { font-size: 14px; }
.comment-row .meta { font-size: 12px; color: #888; margin-top: 4px; }
.loc-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.loc-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #1739D8;
  background: #eef0fb;
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}
.comment-row .snippet-ctx { font-size: 12px; color: #999; font-style: italic; }
.comment-row .view-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #1739D8;
  text-decoration: none;
}
.comment-row .view-link:hover { text-decoration: underline; }
.comment-row .status-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-badge.open { background: #fde9e2; color: #a4341a; }
.status-badge.resolved { background: #e3f3e3; color: #2c6e2c; }
.comment-row .delete-comment { background: #fdeaea !important; color: #a4341a !important; }
.comment-row .actions { display: flex; flex-direction: column; align-items: flex-start; }
.comment-row .actions button {
  margin-top: 8px;
  border: none;
  background: #eef0fb;
  color: #1739D8;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}
.empty { color: #888; font-size: 13px; padding: 12px 0; }
