* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fff;
  color: #16191d;
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: #1a5fd6; text-decoration: none; }
a:hover { color: #144dae; text-decoration: underline; }
input, textarea, select, button { font: inherit; }
::placeholder { color: #9aa2ac; }
textarea { resize: vertical; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 32px; }

/* header */
header { border-bottom: 1px solid #e3e6ea; }
.header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: start; padding: 36px 0 30px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #1a5fd6; }
h1 { margin: 10px 0; font-size: 34px; line-height: 1.15; letter-spacing: -.02em; }
.sub { margin: 0; max-width: 58ch; color: #5c6570; font-size: 15.5px; text-wrap: pretty; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.auth-box { font-size: 13.5px; color: #5c6570; }
.actions { display: flex; gap: 8px; }

/* buttons */
.btn { padding: 10px 16px; border-radius: 6px; border: 1px solid #c8d1dd; background: #fff; color: #16191d; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f2f5f9; border-color: #a9b6c7; }
.btn-primary { border-color: #1a5fd6; background: #1a5fd6; color: #fff; }
.btn-primary:hover { background: #144dae; border-color: #144dae; }
.btn-primary:disabled { background: #e6e9ed; border-color: #e6e9ed; color: #9aa2ac; cursor: not-allowed; }
.btn-quiet { font-weight: 400; }

/* filters */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 22px 0 14px; border-bottom: 1px solid #e3e6ea; }
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8b939d; }
.filter-group button { padding: 6px 12px; border-radius: 5px; border: 1px solid #dde2e8; background: #fff; color: #5c6570; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.filter-group button.active { background: #eaf1fd; color: #1a5fd6; border-color: #a9c4f2; }
.count { margin-left: auto; font-size: 12.5px; color: #8b939d; }

/* cards */
#cards { display: flex; flex-direction: column; gap: 6px; padding: 16px 0 80px; }
.card {
  padding: 10px 16px; border: 1px solid #e3e6ea; border-left: 3px solid #1a5fd6; border-radius: 6px;
  background: #fff; cursor: pointer;
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 2px 13px;
}
.card:hover { background: #f6f8fb; border-color: #d3dae2; border-left-color: inherit; }
.card.bug { border-left-color: #b3261e; }
.icon { display: inline-block; border-radius: 5px; border: 1px solid #e3e6ea; background: #eef1f5 center/cover no-repeat; }
.card .icon { grid-row: 1 / 3; width: 38px; height: 38px; }
.card h3 { margin: 0; font-weight: 600; font-size: 15.5px; line-height: 1.3; text-wrap: pretty; }
.card .meta { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #8b939d; white-space: nowrap; }
.card p { grid-column: 2 / 4; margin: 0; color: #5c6570; font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: #5865f2; color: #fff; font-size: 8.5px; font-weight: 700; }
.avatar.lg { width: 18px; height: 18px; font-size: 10px; }
.empty { padding: 54px 24px; text-align: center; border: 1px dashed #d6dbe1; border-radius: 8px; color: #5c6570; }

/* dialogs */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(22,25,29,.42); align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.modal-backdrop.open { display: flex; }
.modal { width: 100%; max-width: 520px; padding: 26px; border: 1px solid #d6dbe1; border-radius: 8px; background: #fff; display: flex; flex-direction: column; gap: 13px; }
.modal.detail { max-width: 620px; max-height: 84vh; overflow: auto; padding: 24px 26px 22px; border-top: 3px solid #1a5fd6; }
.modal.detail.bug { border-top-color: #b3261e; }
.modal h2 { margin: 0; flex: 1; font-size: 21px; letter-spacing: -.01em; }
.modal-head { display: flex; align-items: flex-start; gap: 14px; }
.icon-close { border: none; background: transparent; color: #8b939d; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
.hint { margin: -6px 0 2px; font-size: 14px; color: #5c6570; }
.modal label.field { display: flex; flex-direction: column; gap: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #6d7681; }
.modal .field input, .modal .field select, .modal .field textarea {
  padding: 10px 11px; border-radius: 6px; border: 1px solid #c8d1dd; background: #fff; color: #16191d;
  font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; outline: none;
}
.modal .field textarea { min-height: 120px; line-height: 1.5; }
.modal-actions { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.msg { flex: 1; font-size: 13px; }
.msg.error { color: #b3261e; }
.msg.ok { color: #1a7f45; }

/* attachments */
.attach { display: flex; flex-direction: column; gap: 7px; }
.attach-head { display: flex; align-items: baseline; gap: 8px; }
.attach-tiles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.thumb { position: relative; display: block; width: 56px; height: 56px; border: 1px solid #dde2e8; border-radius: 5px; background: #eef1f5 center/cover no-repeat; }
.thumb button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border: 1px solid #d6dbe1; border-radius: 50%; background: #fff; color: #5c6570; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.thumb-add { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 1px dashed #c8d1dd; border-radius: 5px; font-size: 20px; color: #1a5fd6; cursor: pointer; }
.thumb-add:hover { border-color: #1a5fd6; background: #f5f8ff; }
.attach-note, .attach-count { font-size: 11.5px; color: #8b939d; margin: 0; }
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.attach-grid figure { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.attach-grid .shot { display: block; aspect-ratio: 16 / 10; border: 1px solid #e3e6ea; border-radius: 5px; background: #eef1f5 center/cover no-repeat; }
.attach-grid figcaption { font-size: 11px; color: #8b939d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* detail */
.detail-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11.5px; color: #8b939d; }
.badge { font-size: 9.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; background: #eaf1fd; color: #1a5fd6; }
.badge.bug { background: #fbecea; color: #b3261e; }
.detail-byline { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #5c6570; padding: 10px 0; border-top: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; }
.detail-body { margin: 0; font-size: 15px; line-height: 1.6; color: #2b3138; white-space: pre-wrap; text-wrap: pretty; }

footer { border-top: 1px solid #e3e6ea; padding: 20px 0 40px; font-size: 12.5px; color: #8b939d; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }

@media (max-width: 720px) {
  .header-inner { grid-template-columns: 1fr; }
  .header-right { align-items: flex-start; }
  .card { grid-template-columns: 34px minmax(0, 1fr); }
  .card .meta { grid-column: 2; }
  .card p { grid-column: 2 / 3; }
}

/* --- admin.html: review queue actions --- */
.review-actions { display: flex; gap: 6px; align-self: flex-start; }
.icon-btn {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid #d6dbe1; background: #fff; color: #5c6570; cursor: pointer; padding: 0;
}
.icon-btn.approve:hover { border-color: #1a7f45; color: #1a7f45; background: #ecf8f0; }
.icon-btn.reject:hover { border-color: #b3261e; color: #b3261e; background: #fbecea; }
.icon-btn:disabled { opacity: .5; cursor: not-allowed; }
