/* ---------- Design tokens ---------- */
:root {
  --bg:          #0E1B2A;   /* ink blue, primary background */
  --panel:       #16283B;   /* card / panel surface */
  --panel-alt:   #1D3348;   /* hover / raised surface */
  --border:      #2A3F55;
  --text:        #E8E6DF;
  --text-muted:  #8FA3B8;
  --accent:      #C98A3E;   /* brass instrument accent */
  --accent-dim:  #8A6431;
  --nav-green:   #4C9A6A;   /* active / go */
  --nav-red:     #B8483F;   /* expired / removed / stop */
  --nav-amber:   #C9A23E;   /* pending */

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-data:    'JetBrains Mono', monospace;

  --radius: 3px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.5em; }

/* numeric / technical data reads like an instrument readout */
.data, .price, .stat-value, input[type="number"] {
  font-family: var(--font-data);
}

/* ---------- Layout shell ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-header .brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
}
.site-header .brand .tag { color: var(--accent); }
.site-header nav a { color: var(--text-muted); margin-left: 1.5rem; font-size: 0.9rem; }
.site-header nav a:hover { color: var(--text); }

main { max-width: 1100px; margin: 0 auto; padding: 2rem; }

.footer-note {
  max-width: 1100px; margin: 3rem auto 2rem; padding: 0 2rem;
  color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--border); padding-top: 1.5rem;
}

/* ---------- Nav-light status indicator (signature element) ---------- */
.status-light {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 0.5em;
  box-shadow: 0 0 6px currentColor;
}
.status-light.active     { background: var(--nav-green); color: var(--nav-green); }
.status-light.pending_verification,
.status-light.pending    { background: var(--nav-amber); color: var(--nav-amber); }
.status-light.expired,
.status-light.unreachable,
.status-light.removed    { background: var(--nav-red); color: var(--nav-red); }
.status-light.sold       { background: var(--text-muted); color: var(--text-muted); }

.status-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  padding: 1rem; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 1.5rem;
}
.filter-bar select, .filter-bar input {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.45rem 0.6rem; font-family: var(--font-body); font-size: 0.85rem;
}

/* ---------- Listing grid / cards ---------- */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.listing-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.15s;
}
.listing-card:hover { border-color: var(--accent-dim); }
.listing-card .thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--panel-alt); display: block; }
.listing-card .thumb.placeholder { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.8rem; }
.listing-card .body { padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.listing-card .type { font-family: var(--font-display); font-size: 1.05rem; }
.listing-card .price { color: var(--accent); font-size: 1.05rem; }
.listing-card .meta { color: var(--text-muted); font-size: 0.8rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.82rem; color: var(--text-muted); }
.field .hint { font-size: 0.75rem; color: var(--text-muted); }
input, select, textarea {
  background: var(--panel); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.6rem 0.7rem; font-family: var(--font-body); font-size: 0.95rem;
  width: 100%;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.checkbox-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-row input { width: auto; }

button, .btn {
  background: var(--accent); color: #16130B; border: none; border-radius: var(--radius);
  padding: 0.65rem 1.2rem; font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  cursor: pointer; display: inline-block;
}
button:hover, .btn:hover { background: #DDA354; text-decoration: none; }
button.secondary, .btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
button.secondary:hover, .btn.secondary:hover { background: var(--panel-alt); }
button.danger { background: var(--nav-red); color: var(--text); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem;
}

.msg { padding: 0.8rem 1rem; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 1rem; }
.msg.error   { background: rgba(184,72,63,0.15); border: 1px solid var(--nav-red); color: #F0B7B0; }
.msg.success { background: rgba(76,154,106,0.15); border: 1px solid var(--nav-green); color: #B8E3C6; }

/* ---------- Listing detail ---------- */
.listing-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .listing-detail { grid-template-columns: 1fr; } }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.photo-strip img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.spec-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.spec-table td { padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.spec-table td:first-child { color: var(--text-muted); width: 45%; }
.spec-table td:last-child { font-family: var(--font-data); }
