:root {
  --color-background-primary: #111315;
  --color-surface: #222527;
  --color-surface-soft: #2a2d30;
  --color-text-primary: #e7e7e4;
  --color-text-muted: #a3a29d;
  --color-border: #3a3d40;
  --color-accent: #378ADD;
}
body {
  margin: 0;
  padding: 14px;
  font-family: Inter, Segoe UI, Roboto, sans-serif;
  background: var(--color-background-primary);
  color: var(--color-text-primary);
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
select {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 8px 10px;
}
.notice { color: var(--color-text-muted); font-size: 0.9rem; }
.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, 292px);
  gap: 8px;
  justify-content: start;
}
.card {
  width: 292px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  overflow: hidden;
  transition: box-shadow 120ms ease, opacity 120ms ease, border-color 120ms ease;
  position: relative;
}
.card.not-interested { filter: grayscale(100%) brightness(0.4); opacity: 0.6; }
.card.contacted { border-left: 3px solid var(--color-accent); }
.card.dragging { opacity: 0.45; }
.card.drop-target { box-shadow: 0 0 0 2px var(--color-accent); border-color: var(--color-accent); }
.card-image {
  height: 132px;
  width: 100%;
  background: #141618;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  display: block;
}
.card-body {
  background: linear-gradient(180deg, #2b2d2f 0%, #252729 100%);
  padding: 9px 10px 10px;
  position: relative;
}
.card-header {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 4px;
}
.title {
  font-size: 1.12rem;
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 6px;
  height: 2.8em;
  display: flex;
  align-items: flex-start;
}
.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
}
.metric {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-weight: 700;
}
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  margin-bottom: 0;
  border: 1px solid transparent;
  font-weight: 600;
  white-space: nowrap;
}
.badge.clean { background: #d4e8bf; border-color: #d4e8bf; color: #3f7427; }
.badge.salvage { background: #c4b8b2; border-color: #c4b8b2; color: #7b3b25; }
.badge.rebuilt { background: #f0d49b; border-color: #f0d49b; color: #8a5810; }
.badge.unknown { background: #a7abb1; border-color: #a7abb1; color: #30343a; }
.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.card-actions .badge { margin-left: auto; }
.meta-grid {
  display: grid;
  gap: 3px 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 0 0 7px;
}
.meta {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.date-stat {
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}
.divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 6px 0 7px;
}
.text-section {}
.text-section + .text-section {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(163, 162, 157, 0.45);
}
.text-label {
  margin: 0 0 4px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8f9498;
  font-weight: 700;
}
.note {
  margin: 0;
  color: #bdbcb7;
  font-size: 0.88rem;
  line-height: 1.32;
  font-weight: 600;
  cursor: pointer;
}
.check-row {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}
.check-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.row { margin: 6px 0 0; font-size: 0.74rem; color: var(--color-text-muted); }
.row a { color: #93c5fd; text-decoration: none; margin-right: 8px; }
.row a:hover { text-decoration: underline; }
.btn {
  display: inline-block;
  background: transparent;
  color: #c2c8d1;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  padding: 3px 7px;
  cursor: pointer;
  font-size: 0.68rem;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { border-color: #93c5fd; color: #93c5fd; }
.btn.secondary { background: transparent; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: stretch;
  justify-content: flex-end;
  z-index: 50;
}
.modal-backdrop.left { justify-content: flex-start; }
.modal {
  width: min(640px, 92vw);
  height: 100vh;
  overflow: auto;
  background: #232629;
  border-left: 1px solid var(--color-border);
  border-radius: 0;
  padding: 18px 18px 20px;
  position: relative;
  transform: translateX(100%);
  transition: transform 180ms ease;
}
.modal-backdrop.left .modal {
  transform: translateX(-100%);
  border-left: 0;
  border-right: 1px solid var(--color-border);
}
.modal-backdrop.open .modal { transform: translateX(0); }
.modal h3 { margin: 0 0 10px; font-size: 1rem; }
.modal p { white-space: pre-wrap; line-height: 1.4; margin: 0; }
.modal textarea {
  width: 100%;
  min-height: 220px;
  background: var(--color-surface-soft);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
}
.modal .save-row {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-close-x {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.modal-close-x:hover { color: var(--color-text-primary); }
