/* Job Matching Styles */

:root {
  --color-primary: #0891b2;
  --color-success: #10b981;
  --color-warn: #f59e0b;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-600: #4b5563;
  --color-gray-900: #0f172a;
}

.matching-breadcrumb {
  max-width: 1100px;
  margin: 1.25rem auto 0;
  padding: 0 1.25rem;
  font-size: 13px;
  color: #64748b;
}
.matching-breadcrumb a {
  color: #0891b2;
  text-decoration: none;
  font-weight: 600;
}
.matching-breadcrumb a:hover { text-decoration: underline; }
.matching-breadcrumb span { margin: 0 0.35rem; opacity: 0.7; }

.matching-container {
  max-width: 1100px;
  margin: 1.25rem auto 3rem;
  padding: 0 1.25rem;
}

/* Project-context banner */
.project-context-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #0e7490 100%);
  color: #fff;
  border-radius: 16px;
  padding: 1.5rem 1.35rem 1.35rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}
.pcb-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 0.45rem;
}
.project-context-banner h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.pcb-lead {
  margin: 0 0 1rem;
  opacity: 0.92;
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 46rem;
}
.pcb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.pcb-chip {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
}
.pcb-chip.phase-pill {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
}
.pcb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pcb-actions .btn {
  width: auto;
  display: inline-flex;
  text-decoration: none;
  padding: 0.6rem 0.95rem;
}
.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover { border-color: #fff; }

.offer-section { margin-bottom: 2rem; }
.section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.section-head p {
  margin: 0 0 1rem;
  color: #64748b;
  font-size: 14px;
}

.roles-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 1rem;
}
@media (max-width: 800px) {
  .roles-grid { grid-template-columns: 1fr; }
}
.card-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
}
.card-panel h3 {
  margin: 0 0 0.65rem;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e3a5f;
}
.card-panel ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}
.card-panel li { margin-bottom: 0.4rem; }
.role-cards-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.role-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.95rem 1rem;
}
.role-card h3 {
  margin: 0 0 0.35rem;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}
.role-rate {
  margin: 0 0 0.65rem;
  font-size: 12px;
  font-weight: 700;
  color: #0891b2;
}
.role-skills, .skill-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.skill-chip {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
}

.match-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}
.status-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill.ok { background: #ecfdf5; color: #059669; }
.status-pill.soon { background: #fffbeb; color: #d97706; }
.match-action-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.match-action-row .btn { width: 100%; text-decoration: none; box-sizing: border-box; }
.match-hint {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}
.btn-link {
  align-self: center;
  font-weight: 700;
  font-size: 13px;
  color: #0891b2;
  text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}
.empty-state h3 { margin: 0 0 0.5rem; color: #0f172a; }
.empty-state p { margin: 0 0 1rem; color: #64748b; }

.matching-header {
  margin-bottom: 2rem;
}

.matching-header h1 {
  font-size: 2rem;
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.matching-header p {
  color: var(--color-gray-600);
  margin-bottom: 1.5rem;
}

/* HR talent directory (default /suite/matching/) */
.talent-kicker {
  margin: 0 0 0.35rem;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0891b2;
}
.talent-header h1 {
  margin-top: 0;
}
.talent-filters {
  align-items: flex-end;
}
.filter-field-inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.filter-field-inline > span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.filter-field-inline .filter-select,
.filter-search-inline input.filter-select {
  min-width: 140px;
}
.filter-search-inline {
  flex: 1 1 160px;
}
.filter-search-inline input.filter-select {
  width: 100%;
  max-width: 240px;
  box-sizing: border-box;
}
.talent-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 0.25rem;
  font-size: 13px;
}
.talent-quick-links a {
  color: #0891b2;
  font-weight: 600;
  text-decoration: none;
}
.talent-quick-links a:hover {
  text-decoration: underline;
}
.talent-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.talent-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: linear-gradient(145deg, #0e7490, #0891b2);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.talent-id {
  flex: 1;
  min-width: 0;
}
.talent-id .match-title {
  margin-bottom: 0.15rem;
}
.talent-role {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}
.talent-summary {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.45;
}
.talent-rate-range {
  font-weight: 700;
  color: #0e7490;
}
.work-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}
.work-mode-chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}
.work-mode-chip.mode-remote {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
}
.work-mode-chip.mode-onsite {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.work-mode-chip.mode-hybrid {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.work-mode-chip.mode-travel {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
.skill-level-chip {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #334155;
}
.skill-level-chip.level-student {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}
.skill-level-chip.level-graduate {
  background: #fdf4ff;
  border-color: #f0abfc;
  color: #a21caf;
}
.skill-level-chip.level-junior {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.skill-level-chip.level-mid {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
}
.skill-level-chip.level-senior {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.skill-level-chip.level-sme {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
.skill-level-chip.level-principal {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.status-pill.busy {
  background: #f1f5f9;
  color: #475569;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  cursor: pointer;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.match-card {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.match-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.match-score {
  display: inline-block;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.match-score-bar {
  background: var(--color-gray-200);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.match-score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-success));
  transition: width 0.3s;
}

.match-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
}

.match-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin-bottom: 1rem;
}

.match-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.match-reasons {
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--color-gray-50);
  border-radius: 4px;
}

.match-reasons-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-gray-600);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.reason-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 20px;
  font-size: 0.75rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.reason-badge.skill {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.reason-badge.availability {
  border-color: var(--color-success);
  color: var(--color-success);
}

.match-action {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-gray-200);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-gray-50);
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--color-gray-600);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.modal-header h2 {
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-gray-600);
}

.modal-close:hover {
  color: var(--color-gray-900);
}

.modal-body {
  padding: 1.5rem;
}

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 1rem 1.5rem;
  background: var(--color-gray-900);
  color: white;
  border-radius: 4px;
  z-index: 2000;
}

.toast.success {
  background: var(--color-success);
}

@media (max-width: 768px) {
  .matches-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-wrap: wrap;
  }
}
