:root {
  --bg: #f4f2ee; --card: #fff; --ink: #1d2433; --muted: #6b7280; --line: #e5e1d8;
  --accent: #0f3d5c; --gold: #b8913f; --danger: #a33a2b; --ok: #2f6b3a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 16px; background: var(--accent); color: #fff; flex-wrap: wrap; }
.top a { color: #fff; text-decoration: none; }
.top nav { display: flex; gap: 16px; flex: 1; }
.top .brand { font-weight: 700; letter-spacing: .3px; }
.top .logout { display: flex; gap: 8px; align-items: center; }
.top .logout .muted, .top .logout .link { color: #dfe6ee; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.error { color: var(--danger); }
button { font: inherit; padding: 7px 12px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); border-color: #e3c3bd; }
button.link { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; width: 100%; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 6px; }
label.check input { width: auto; }
.login { max-width: 360px; margin: 10vh auto; display: flex; flex-direction: column; gap: 12px; }
.login h1 { margin: 0; font-size: 22px; }
.filters .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 8px; }
.filters .row > label { min-width: 120px; }
.filters .grow { flex: 1; min-width: 200px; }
.pair { display: flex; gap: 4px; } .pair input { width: 90px; }
.summary { margin: 8px 2px 12px; }
.obj { display: flex; gap: 14px; }
.obj .thumb { flex: 0 0 170px; height: 128px; border-radius: 8px; overflow: hidden; background: #ece8df; }
.obj .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.obj.big .thumb { flex-basis: 300px; height: 220px; }
.obj .body { flex: 1; min-width: 0; }
.obj .head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.obj .title { font-weight: 600; font-size: 16px; text-decoration: none; margin: 0; }
.obj h1.title { font-size: 20px; }
.obj .price { font-weight: 700; white-space: nowrap; }
.obj .meta { margin: 2px 0 8px; }
.sources { border-collapse: collapse; margin: 4px 0 8px; font-size: 14px; }
.sources td { padding: 3px 12px 3px 0; vertical-align: middle; }
.sources tr.inactive { opacity: .5; }
.num { text-align: right; white-space: nowrap; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 12px; background: #eef0f3; color: #374151; white-space: nowrap; }
.seller-owner { background: #e3f1e5; color: var(--ok); font-weight: 600; }
.seller-agent { background: #f3ede1; color: #7a5a1c; }
.seller-developer, .seller-pro { background: #e6eef5; color: var(--accent); }
.badge.inactive { background: #f1e3e0; color: var(--danger); }
.badge.dup { background: #fff2cc; color: #7a5a1c; text-decoration: none; }
.status-added { background: #e3f1e5; color: var(--ok); }
.status-rejected { background: #f1e3e0; color: var(--danger); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.comment { margin: 4px 0; font-size: 14px; }
.comment-form { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.comment-form button { align-self: flex-start; }
.dupbox { border-color: #e8d39a; background: #fffbef; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.compare figure { margin: 0; }
.compare img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; display: block; background: #ece8df; }
.compare figcaption { font-size: 13px; margin-top: 6px; }
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
table.plain { border-collapse: collapse; width: 100%; font-size: 14px; }
table.plain td, table.plain th { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.plain tr.warn td { background: #fff5f3; }
.pager { display: flex; gap: 16px; justify-content: center; margin: 16px 0; }
h2, h3 { margin: 6px 0 10px; }
@media (max-width: 700px) {
  .obj { flex-direction: column; }
  .obj .thumb, .obj.big .thumb { flex-basis: auto; height: 180px; }
  .top nav { order: 3; flex-basis: 100%; }
}
.ok { color: var(--ok); }
.top .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: var(--accent); font-size: 12px; font-weight: 700; text-align: center; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 6px 0; }
.inline-form label { min-width: 160px; }
.inline-form select { width: auto; }
.inline-form .grow { flex: 1; min-width: 200px; width: auto; }
.feedback-form { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.feedback-form .row { display: flex; gap: 10px; flex-wrap: wrap; }
.feedback-form .row label { flex: 1; min-width: 180px; }
.feedback-form button { align-self: flex-start; }
.report { margin-top: 14px; }
.report summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.report .feedback-form { margin-top: 8px; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; }
table.plain .inline-form { margin: 0; flex-wrap: nowrap; }
table.plain .inline-form select { padding: 3px 6px; }
.tabs { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.tabs a { text-decoration: none; }
.tabs a.active { font-weight: 700; text-decoration: underline; }
.tabs .right { margin-left: auto; }
.fb { border-top: 1px solid var(--line); padding: 10px 0; }
.fb-head .badge { margin-left: 6px; }
.fb-text { white-space: pre-wrap; margin: 4px 0; }
.fb-answer { background: #f4f6f8; border-radius: 6px; padding: 6px 8px; font-size: 14px; margin-bottom: 4px; }
.fb-new { background: #fff2cc; color: #7a5a1c; }
.fb-accepted { background: #e6eef5; color: var(--accent); }
.fb-done { background: #e3f1e5; color: var(--ok); }
.fb-declined { background: #eef0f3; color: var(--muted); }
