/* Dashboard Styles - Simple & Professional */

.dashboard-header {
  margin-bottom: 24px;
}

.welcome-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.welcome-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
}

.welcome-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* KPI Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  padding: 16px 20px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 4px;
}

.metric-trend {
  font-size: 12px;
  color: var(--ok);
  font-weight: 500;
}

.metric-trend.neutral {
  color: var(--muted);
}

/* Section Header */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

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

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-wrap input {
  padding-left: 36px;
  height: 38px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 14px;
}

/* Job Cards List */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job-item {
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.job-item:hover {
  border-color: var(--blue);
}

.job-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.job-title-wrap h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
}

.job-meta {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.job-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Funnel mini-bar */
.pipeline-bar-wrap {
  margin: 12px 0 16px;
  background: var(--bg);
  border-radius: 6px;
  padding: 10px 14px;
}

.pipeline-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.pipeline-stats b {
  color: var(--text);
}

.pipeline-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  display: flex;
  overflow: hidden;
}

.progress-seg {
  height: 100%;
}
.progress-seg.new { background: var(--blue); }
.progress-seg.review { background: #e09b3d; }
.progress-seg.interview { background: var(--ok); }

.job-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  gap: 12px;
  flex-wrap: wrap;
}

.posted-time {
  font-size: 12px;
  color: var(--muted);
}

/* Matches Drawer / Container */
.matches-panel {
  display: none;
  margin: 16px -20px -20px;
  padding: 18px 20px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}

.matches-panel.show {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.matches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.matches-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Match Candidate Card */
.match-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.match-card:hover {
  border-color: #a0c3ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.match-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.match-main-info {
  flex: 1;
  min-width: 0;
}

.match-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.match-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.match-headline {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.match-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 4px;
}

.match-details-grid span b {
  color: var(--text);
}

/* Resume Attachment Box */
.resume-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  margin-top: 10px;
  flex-wrap: wrap;
}

.resume-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resume-icon {
  font-size: 20px;
  line-height: 1;
}

.resume-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.resume-size {
  font-size: 11px;
  color: var(--muted);
}

.resume-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Resume Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.show {
  display: flex;
}

.resume-modal-dialog {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.resume-modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}

.resume-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.resume-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
}

@media (max-width: 768px) {
  .job-top,
  .job-footer,
  .resume-box {
    flex-direction: column;
    align-items: stretch;
  }
}
