* { box-sizing: border-box; margin: 0; }
:root {
  --bg: #101418; --card: #1a2027; --line: #2a323c;
  --text: #e8edf2; --muted: #8b98a5; --accent: #3b82f6; --ok: #22c55e; --err: #ef4444;
}
body { background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: 40px; }
.view { max-width: 640px; margin: 0 auto; padding: 12px; }
.hidden { display: none !important; }
header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0 14px; }
h1 { font-size: 1.25rem; }
.muted { color: var(--muted); font-size: .85rem; }
.err { color: var(--err); }
.ok { color: var(--ok); }
.hint { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }
.empty { color: var(--muted); text-align: center; padding: 48px 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: .95rem; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); font-weight: 600; }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--err); }
.btn:disabled { opacity: .55; }

.login-box { max-width: 320px; margin: 18vh auto 0; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.login-box input { background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 12px; font-size: 1.2rem; text-align: center; letter-spacing: .3em; }

.vehicle-row { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; cursor: pointer; }
.thumb { width: 84px; height: 84px; border-radius: 10px; background: #0c1013; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; overflow: hidden; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.vtitle { font-weight: 600; }
.vsub { color: var(--muted); font-size: .85rem; margin: 2px 0 6px; }
.badge { font-size: .7rem; padding: 2px 8px; border-radius: 99px; background: #22303c; color: var(--muted); margin-right: 4px; }
.badge.s-ready, .badge.a-done { background: #14351f; color: var(--ok); }
.badge.a-error { background: #3a1518; color: var(--err); }
.badge.a-processing { background: #172a46; color: var(--accent); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card-head { font-weight: 600; margin-bottom: 10px; }
.row { display: flex; gap: 8px; margin-top: 10px; }
.row.space { justify-content: space-between; align-items: center; }
.row .btn { flex: 1; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 2px solid transparent; }
.ph.primary { border-color: var(--accent); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .star { position: absolute; top: 4px; left: 4px; color: #ffd75e; text-shadow: 0 1px 3px #000; }
.ph .vintag { position: absolute; bottom: 4px; right: 4px; font-size: .65rem; background: #000a; padding: 1px 6px; border-radius: 6px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.field label, .field-full label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 3px; }
.field input, .field-full textarea { width: 100%; background: #0c1013; border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 9px; font-size: .95rem; }
.field-full { margin-bottom: 10px; }

.syndicate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.btn.syn { padding: 14px 8px; font-weight: 600; }
.btn.syn.cargurus { border-color: #1a6aff44; }
.btn.syn.autotrader { border-color: #ff8a0044; }
.btn.syn.facebook { border-color: #0866ff44; }
.btn.syn.kijiji { border-color: #37317144; }

#export-payload { background: #0c1013; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: .8rem; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; margin-top: 8px; }
