/* ============================================================
   SmartCV Tanzania — Recruiter Portal Styles
   ============================================================ */

:root {
  --rec-primary:   #1a5276;
  --rec-accent:    #2980b9;
  --rec-success:   #2e7d32;
  --rec-warning:   #e65100;
  --rec-danger:    #c62828;
  --rec-bg:        #f4f6f9;
  --rec-card-bg:   #ffffff;
  --rec-border:    #dce3ec;
  --rec-text:      #1a1a2e;
  --rec-muted:     #6c757d;
}

/* ── Base ───────────────────────────────────────────────── */
body { background: var(--rec-bg); color: var(--rec-text); }

/* ── Nav ────────────────────────────────────────────────── */
.rec-nav {
  background: var(--rec-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.rec-nav-brand a { color: #fff; font-size: 18px; font-weight: 700; text-decoration: none; }
.rec-nav-brand a span { font-weight: 300; opacity: 0.85; }
.rec-nav-links { display: flex; align-items: center; gap: 16px; }
.rec-nav-link   { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14px; }
.rec-nav-link:hover { color: #fff; }

/* ── Container ──────────────────────────────────────────── */
.rec-container { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-recruiter {
  background: var(--rec-primary);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .15s;
}
.btn-recruiter:hover { background: var(--rec-accent); }
.btn-recruiter.btn-sm  { padding: 6px 14px; font-size: 13px; }
.btn-recruiter.btn-lg  { padding: 12px 28px; font-size: 16px; }
.btn-recruiter.btn-full{ width: 100%; text-align: center; }

/* ── Banners ────────────────────────────────────────────── */
.rec-banner {
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rec-banner-warning { background: #fff3e0; border-left: 4px solid #e65100; color: #e65100; }
.rec-banner-success { background: #e8f5e9; border-left: 4px solid #2e7d32; color: #1b5e20; }

/* ── Stats row ──────────────────────────────────────────── */
.rec-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.rec-stat-card {
  background: var(--rec-card-bg);
  border: 1px solid var(--rec-border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.rec-stat-number { font-size: 32px; font-weight: 700; color: var(--rec-primary); }
.rec-stat-label  { font-size: 12px; color: var(--rec-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

/* ── Cards ──────────────────────────────────────────────── */
.rec-card {
  background: var(--rec-card-bg);
  border: 1px solid var(--rec-border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.rec-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.rec-card-header h2 { font-size: 16px; font-weight: 600; color: var(--rec-primary); }

.rec-empty { text-align: center; padding: 32px; color: var(--rec-muted); }
.rec-empty p { margin-bottom: 16px; }

/* ── Table ──────────────────────────────────────────────── */
.rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rec-table th {
  background: #f0f3f8;
  color: var(--rec-primary);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--rec-border);
}
.rec-table td { padding: 10px 14px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.rec-table tr:last-child td { border-bottom: none; }
.rec-table tr:hover td { background: #f8fafc; }
.rec-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge-green  { background: #e8f5e9; color: #2e7d32; }
.badge-blue   { background: #e3f2fd; color: #1565c0; }
.badge-orange { background: #fff3e0; color: #e65100; }
.badge-red    { background: #fce4ec; color: #c62828; }
.badge-grey   { background: #f1f3f4; color: #5f6368; }

/* ── Score badges ───────────────────────────────────────── */
.score-badge {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.score-badge-lg {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 8px 16px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 28px;
  color: #fff;
}
.score-badge-lg small { font-size: 14px; opacity: .85; }
.score-high { background: #2e7d32; }
.score-mid  { background: #f57c00; }
.score-low  { background: #c62828; }

/* ── Candidate card (results page) ─────────────────────── */
.rec-candidate-card {
  background: var(--rec-card-bg);
  border: 1px solid var(--rec-border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}
.cand-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.cand-rank {
  font-size: 28px;
  font-weight: 800;
  color: var(--rec-primary);
  min-width: 40px;
}
.cand-info { flex: 1; }
.cand-info h3 { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.cand-score-wrap { text-align: right; }
.cand-summary { color: #444; line-height: 1.65; margin-bottom: 14px; font-size: 14px; }

.cand-skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.skills-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--rec-muted); letter-spacing: .5px; margin-bottom: 6px; }
.skill-tag { display: inline-block; padding: 3px 10px; border-radius: 14px; font-size: 12px; margin: 2px 2px 0 0; }
.skill-matched { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.skill-missing { background: #fce4ec; color: #c62828; border: 1px solid #f8bbd0; }
.skill-mini    { display: inline-block; background: #e3f2fd; color: #1565c0; border-radius: 10px; padding: 2px 7px; font-size: 11px; margin: 1px; }
.skills-cell   { max-width: 200px; }

.cand-bullets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bullets-title { font-size: 12px; font-weight: 700; color: var(--rec-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.cand-bullets-grid ul { padding-left: 18px; margin: 0; }
.cand-bullets-grid li { font-size: 13px; margin-bottom: 4px; color: #333; }

/* ── Progress bar ───────────────────────────────────────── */
.progress-bar-wrap {
  background: #e8eaf6;
  border-radius: 100px;
  height: 10px;
  margin: 12px 0 8px;
  overflow: hidden;
}
.progress-bar {
  background: linear-gradient(90deg, #1a5276, #2980b9);
  height: 100%;
  border-radius: 100px;
  transition: width .4s ease;
  min-width: 4px;
}
.progress-text { font-size: 13px; color: var(--rec-muted); }

/* ── Auth/login pages ───────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--rec-bg); }
.auth-card  { background: var(--rec-card-bg); border: 1px solid var(--rec-border); border-radius: 14px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 4px 24px rgba(0,0,0,.07); }
.auth-logo  { text-align: center; margin-bottom: 24px; }
.auth-logo a { font-size: 20px; font-weight: 700; color: var(--rec-primary); text-decoration: none; }
.recruiter-badge { display: block; font-size: 11px; color: var(--rec-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.auth-title    { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-subtitle { color: var(--rec-muted); text-align: center; font-size: 14px; margin-bottom: 24px; }
.auth-form     { margin-top: 8px; }
.auth-footer   { text-align: center; margin-top: 20px; font-size: 13px; color: var(--rec-muted); }
.auth-footer a { color: var(--rec-accent); }

/* ── Apply page ─────────────────────────────────────────── */
.apply-card { background: var(--rec-card-bg); border: 1px solid var(--rec-border); border-radius: 14px; padding: 40px; width: 100%; max-width: 560px; margin: 40px auto; box-shadow: 0 4px 24px rgba(0,0,0,.07); }
.apply-header { margin-bottom: 24px; }
.apply-company { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--rec-muted); margin-bottom: 6px; }
.apply-title   { font-size: 24px; font-weight: 700; color: var(--rec-primary); margin-bottom: 6px; }
.apply-subtitle { color: var(--rec-muted); font-size: 14px; }
.apply-description, .apply-skills { background: #f8fafc; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.apply-description h3, .apply-skills h3 { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--rec-primary); }
.apply-desc-text { color: #444; line-height: 1.6; }
.apply-form  { margin-top: 20px; }
.apply-footer { text-align: center; margin-top: 24px; font-size: 12px; color: var(--rec-muted); }

/* ── Package grid ───────────────────────────────────────── */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 20px 0;
}
.pkg-card {
  background: var(--rec-card-bg);
  border: 2px solid var(--rec-border);
  border-radius: 12px;
  padding: 24px 20px;
  position: relative;
  text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.pkg-card:hover { border-color: var(--rec-accent); box-shadow: 0 4px 16px rgba(41,128,185,.12); }
.pkg-featured { border-color: var(--rec-primary); box-shadow: 0 4px 20px rgba(26,82,118,.12); }
.pkg-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--rec-primary); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px; }
.pkg-card h3 { font-size: 15px; font-weight: 700; color: var(--rec-primary); margin-bottom: 8px; }
.pkg-price { font-size: 26px; font-weight: 800; color: var(--rec-text); margin-bottom: 16px; }
.pkg-features { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.pkg-features li { font-size: 13px; padding: 4px 0; color: #444; }
.pkg-features li::before { content: '✓ '; color: var(--rec-success); font-weight: 700; }

/* ── CV upload rows ─────────────────────────────────────── */
.cv-upload-row { border: 1px dashed var(--rec-border); border-radius: 8px; padding: 16px; margin-bottom: 14px; }
.upload-row-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }

/* ── Misc helpers ───────────────────────────────────────── */
.text-muted { color: var(--rec-muted); }
.req        { color: var(--rec-danger); }
.form-hint  { font-size: 12px; color: var(--rec-muted); margin-top: 4px; }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: var(--rec-primary); }
.page-header p  { color: var(--rec-muted); margin-top: 4px; }

/* ── Results page extras ────────────────────────────────── */
.preview-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--rec-border);
  border-radius: 10px;
  background: var(--rec-card-bg);
  color: var(--rec-text);
  line-height: 1.6;
}
.locked-inline-note {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: .82rem;
}
.upgrade-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--rec-border);
  border-radius: 12px;
  background: var(--rec-card-bg);
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
}
.upgrade-box h3 { margin-bottom: 8px; }
.upgrade-box p  { color: var(--rec-muted); margin-bottom: 12px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .pkg-grid          { grid-template-columns: 1fr 1fr; }
  .rec-stats-row     { grid-template-columns: 1fr 1fr; }
  .cand-skills-grid,
  .cand-bullets-grid { grid-template-columns: 1fr; }
  .upload-row-fields { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pkg-grid      { grid-template-columns: 1fr; }
  .rec-stats-row { grid-template-columns: 1fr 1fr; }
  .rec-nav { padding: 0 14px; }
  .rec-container { padding: 16px 12px 40px; }
  .rec-table { font-size: 12px; }
  .rec-table th, .rec-table td { padding: 8px 10px; }
  .auth-card, .apply-card { padding: 24px 16px; margin: 16px; }
}
