/* === DASHBOARD — PrintForceOS Design System === */
:root {
  --ink: #0d0d0d;
  --paper: #f5f0e8;
  --press-red: #c4392d;
  --steel: #3a3a3a;
  --warm-gray: #a39e93;
  --light-gray: #e8e3da;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --surface-3: #242424;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --score-high: #22c55e;
  --score-mid: #f59e0b;
  --score-low: #ef4444;
  --status-suggested: #6366f1;
  --status-active: #06b6d4;
  --status-placed: #22c55e;
  --status-rejected: #64748b;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── NAV ─────────────────────────────────────────── */
.dash-nav {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dash-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-brand-dot {
  width: 8px;
  height: 8px;
  background: var(--press-red);
  border-radius: 50%;
  display: inline-block;
}

.dash-nav-links {
  display: flex;
  gap: 4px;
}

.dash-nav-link {
  font-size: 0.875rem;
  color: var(--warm-gray);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

.dash-nav-link:hover, .dash-nav-link.active {
  color: var(--paper);
  background: var(--surface-2);
}

/* ── LAYOUT ──────────────────────────────────────── */
.dash-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 60px);
}

.dash-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
  padding: 0 20px 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--warm-gray);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  text-decoration: none;
}

.sidebar-item:hover { background: var(--surface-2); color: var(--paper); }
.sidebar-item.active { background: var(--surface-2); color: var(--paper); border-right: 2px solid var(--press-red); }

.sidebar-item svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-item.active svg { opacity: 1; }

.dash-main {
  padding: 32px;
  max-width: 1200px;
}

/* ── PAGE HEADER ─────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--warm-gray);
  font-size: 0.9rem;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--press-red);
  color: white;
}
.btn-primary:hover { background: #a52f24; }

.btn-ghost {
  background: transparent;
  color: var(--warm-gray);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--paper); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ── STATS ROW ───────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); }

.stat-card-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-card-num span { color: var(--press-red); }

.stat-card-label {
  font-size: 0.8rem;
  color: var(--warm-gray);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── MATCH BOARD ─────────────────────────────────── */
.board-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.board-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.board-col-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.board-col-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board-col-count {
  font-size: 0.75rem;
  background: var(--surface-3);
  color: var(--warm-gray);
  border-radius: 12px;
  padding: 2px 8px;
}

.board-cards {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.match-card {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.match-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }

.match-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.match-score {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.score-high { color: var(--score-high); }
.score-mid { color: var(--score-mid); }
.score-low { color: var(--score-low); }

.match-card-name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 2px;
}
.match-card-role {
  font-size: 0.78rem;
  color: var(--warm-gray);
  margin-bottom: 6px;
}
.match-card-company {
  font-size: 0.78rem;
  color: var(--press-red);
  font-weight: 600;
}

.match-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.board-empty {
  text-align: center;
  color: var(--warm-gray);
  font-size: 0.8rem;
  padding: 24px 12px;
}

/* ── TABLES ──────────────────────────────────────── */
.data-table-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-family: var(--font-display);
  color: var(--warm-gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.data-table td {
  padding: 13px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: var(--font-display);
  text-transform: uppercase;
  margin: 2px 2px 0 0;
}

.tag-skill { background: rgba(99,102,241,0.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.2); }
.tag-press { background: rgba(196,57,45,0.12); color: #f87171; border: 1px solid rgba(196,57,45,0.2); }
.tag-cert { background: rgba(34,197,94,0.1); color: #86efac; border: 1px solid rgba(34,197,94,0.2); }

.avail-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.avail-available { background: rgba(34,197,94,0.1); color: #86efac; }
.avail-open_to_offers { background: rgba(245,158,11,0.1); color: #fcd34d; }
.avail-placed { background: rgba(100,116,139,0.2); color: #94a3b8; }

/* ── MODALS ──────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 520px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px;
  transform: translateY(12px);
  transition: transform 0.2s;
}

.modal-backdrop.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-close {
  background: none;
  border: none;
  color: var(--warm-gray);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--paper); }

/* ── FORMS ───────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warm-gray);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-display);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 14px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--press-red);
}

.form-textarea { min-height: 80px; resize: vertical; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--warm-gray); opacity: 0.6; }

.form-hint { font-size: 0.78rem; color: var(--warm-gray); margin-top: 5px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ── STATUS INDICATORS ───────────────────────────── */
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}
.status-suggested { background: var(--status-suggested); }
.status-active { background: var(--status-active); }
.status-placed { background: var(--status-placed); }
.status-rejected { background: var(--status-rejected); }

/* ── SECTION TABS ────────────────────────────────── */
.section-hidden { display: none; }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 14px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  width: 260px;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--press-red); }
.search-input::placeholder { color: var(--warm-gray); }

/* ── FIT SCORE BAR ───────────────────────────────── */
.score-bar {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
  width: 80px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
.score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ── TOAST ───────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.toast-success { border-color: rgba(34,197,94,0.3); color: #86efac; }
#toast.toast-error { border-color: rgba(239,68,68,0.3); color: #fca5a5; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .board-columns { grid-template-columns: 1fr; }
  .dash-main { padding: 20px; }
}
