:root {
  --bg:#f6f7f9; --surface:#fff; --fg:#1a1a1a; --muted:#6b7280;
  --line:#e5e7eb; --accent:#2563eb; --err:#dc2626; --ok:#16a34a;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, sans-serif; color: var(--fg); background: var(--bg); }
.hidden { display: none !important; }
.view.center, .center { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.muted { color: var(--muted); }
.error { color: var(--err); min-height: 1em; }
.spacer { flex: 1; }
h1 { font-size: 18px; margin: 0 0 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.pad { padding: 20px; width: min(420px, 92vw); }
form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--fg); background: var(--surface);
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; width: 100%; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 7px; padding: 9px 12px; background: var(--accent); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
button.link { background: none; color: var(--muted); padding: 2px 4px; text-decoration: underline; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.controls select { width: auto; }

/* grid */
.grid { display: grid; gap: 14px; padding: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.listing { display: flex; flex-direction: column; overflow: hidden; }
.listing .thumb { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: #eef0f3; }
.listing .thumb.ph { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.listing .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.listing .price { font-size: 17px; font-weight: 600; }
.listing .title { font-weight: 500; line-height: 1.3; }
.listing .title a { color: var(--fg); text-decoration: none; }
.listing .title a:hover { text-decoration: underline; }
.listing .specs, .listing .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; background: #eef0f3; color: var(--muted); padding: 1px 6px; border-radius: 999px; }
.listing textarea { font-size: 12px; min-height: 42px; resize: vertical; }
.listing .foot { display: flex; gap: 8px; align-items: center; }
.listing .foot select { flex: 1; }
.listing .del { background: none; color: var(--muted); border: 1px solid var(--line); padding: 7px 9px; }
.listing .del:hover { color: var(--err); border-color: var(--err); }
.saved-tick { color: var(--ok); font-size: 12px; }
