/* -------------------------------------------------------
   Quintessential Farming — Portal Stylesheet
   Brand: Primary #2c5e1a | Secondary #a3d977 | Accent #f9b824
------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
  --primary:   #2c5e1a;
  --primary-dk:#1e4011;
  --secondary: #a3d977;
  --accent:    #f9b824;
  --text:      #333333;
  --muted:     #6b7280;
  --light:     #f4f9ee;
  --border:    rgba(44,94,26,.15);
  --card:      #ffffff;
  --surface:   #f7faf3;
  --danger:    #d9534f;
  --success:   #3a8a2e;
  --radius:    10px;
  --shadow:    0 2px 16px rgba(44,94,26,.10);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- NAV ---- */
.portal-nav {
  background: var(--primary);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.portal-nav .logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.portal-nav .logo span {
  color: var(--accent);
}

.portal-nav .logo-leaf {
  font-size: 22px;
}

.nav-link {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all .2s;
}

.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-link.active { background: var(--accent); color: var(--primary-dk); font-weight: 500; }

/* ---- AUTH LAYOUT ---- */
.auth-wrapper {
  min-height: calc(100vh - 60px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-hero {
  background: var(--primary-dk);
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: var(--secondary);
  opacity: .07;
}

.auth-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .07;
}

.hero-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-h {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-p {
  font-size: 14px;
  color: rgba(255,255,255,.55);
  line-height: 1.75;
  max-width: 320px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
}

.stat-block .num {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: #fff;
}

.stat-block .lbl {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  margin-top: 2px;
}

.hero-footer {
  font-size: 11px;
  color: rgba(255,255,255,.2);
}

/* ---- AUTH FORM ---- */
.auth-form-wrap {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 4px;
}

.form-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.tabs-toggle {
  display: flex;
  background: var(--light);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 1.5rem;
  gap: 3px;
}

.tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  transition: all .2s;
  font-family: 'DM Sans', sans-serif;
}

.tab-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* ---- FORM FIELDS ---- */
.field { margin-bottom: 1rem; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 5px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: var(--text);
  transition: border .2s, box-shadow .2s;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44,94,26,.1);
}

.field textarea { resize: vertical; min-height: 88px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }

/* ---- BUTTONS ---- */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .2s;
  margin-top: .5rem;
  letter-spacing: .2px;
}

.btn-primary:hover { background: var(--primary-dk); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  padding: 10px 22px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  transition: all .2s;
}

.btn-secondary:hover { background: var(--light); border-color: var(--primary); }

.btn-accent {
  padding: 10px 26px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  color: var(--primary-dk);
  transition: all .2s;
}

.btn-accent:hover { background: #e8a910; transform: translateY(-1px); }

/* ---- ALERTS ---- */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 1rem;
}

.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* ---- RESUME / MULTI-STEP ---- */
.portal-container { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.5rem; }

.page-heading { margin-bottom: 2rem; }
.page-heading h2 { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--primary); margin-bottom: 4px; }
.page-heading p  { font-size: 13px; color: var(--muted); }

.progress-wrap { margin: 1rem 0 .5rem; }
.progress-bar  { background: #dde8d4; border-radius: 99px; height: 5px; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--primary); transition: width .4s ease; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }

.steps-nav {
  display: flex;
  gap: .5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.step-pill {
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
}

.step-pill.done { background: var(--secondary); border-color: var(--secondary); color: var(--primary-dk); }
.step-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.card-title { font-family: 'Playfair Display', serif; font-size: 16px; color: var(--primary); }

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: .75rem;
}

.form-actions-right { display: flex; gap: .75rem; margin-left: auto; }

/* Skills tags */
.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  min-height: 44px;
  cursor: text;
  align-items: center;
}

.tag {
  background: rgba(44,94,26,.1);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tag .rm {
  cursor: pointer;
  opacity: .5;
  font-size: 11px;
  line-height: 1;
  padding: 0 2px;
}

.tag .rm:hover { opacity: 1; }

.tag-input {
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  outline: none;
  font-family: 'DM Sans', sans-serif;
  min-width: 120px;
  flex: 1;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border .2s, background .2s;
}

.upload-zone:hover { border-color: var(--primary); background: var(--light); }
.upload-zone p { font-size: 13px; color: var(--muted); margin-top: .4rem; }
.upload-zone span { font-size: 12px; color: var(--primary); font-weight: 500; }
.upload-zone input[type=file] { display: none; }

/* ---- ADMIN DASHBOARD ---- */
.admin-wrap { padding: 2rem; max-width: 1200px; margin: 0 auto; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.admin-header h2 { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--primary); }
.admin-header p  { font-size: 13px; color: var(--muted); margin-top: 3px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.metric-card .val  { font-family: 'Playfair Display', serif; font-size: 30px; color: var(--primary); line-height: 1; }
.metric-card .lbl  { font-size: 12px; color: var(--muted); margin-top: 5px; }
.metric-card .delta { font-size: 11px; font-weight: 500; margin-top: 8px; color: var(--success); }
.metric-card .delta.down { color: var(--danger); }

.table-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table-toolbar {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

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

.search-wrap input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border .2s;
}

.search-wrap input:focus { border-color: var(--primary); }
.search-wrap::before { content: '🔍'; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; }

.filter-chip {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
  transition: all .2s;
}

.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

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

th {
  padding: .75rem 1.25rem;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

td {
  padding: .9rem 1.25rem;
  font-size: 13px;
  border-bottom: 1px solid rgba(44,94,26,.06);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--light); }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}

.candidate-cell { display: flex; align-items: center; gap: .75rem; }
.c-name  { font-weight: 500; font-size: 13px; }
.c-email { font-size: 11px; color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-pending    { background: #fefce8; color: #a16207; }
.badge-reviewing  { background: #eff6ff; color: #1d4ed8; }
.badge-shortlisted{ background: #f0fdf4; color: #15803d; }
.badge-rejected   { background: #fef2f2; color: #b91c1c; }
.badge-hired      { background: #f0fdf4; color: var(--primary); border: 1px solid var(--secondary); }

.action-btn {
  padding: 5px 13px;
  border-radius: 6px;
  font-size: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  transition: all .2s;
}

.action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 16px;
  width: 600px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

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

.modal-name { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--primary); }
.modal-role { font-size: 13px; color: var(--muted); margin-top: 2px; }

.modal-close {
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  color: var(--muted); line-height: 1;
}

.modal-section { margin-bottom: 1.25rem; }

.modal-section h4 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}

.modal-section p { font-size: 13px; line-height: 1.75; }

.modal-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ---- SUCCESS ---- */
.success-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 4rem 2rem; text-align: center;
}

.success-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(44,94,26,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin-bottom: 1.5rem;
  border: 2px solid var(--secondary);
}

.success-wrap h2 { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--primary); margin-bottom: .5rem; }
.success-wrap p  { font-size: 14px; color: var(--muted); max-width: 400px; line-height: 1.75; }

/* ---- UTILITY ---- */
.link-muted { font-size: 13px; color: var(--muted); text-align: center; margin-top: 1rem; }
.link-muted a { color: var(--primary); text-decoration: none; font-weight: 500; }
.link-muted a:hover { text-decoration: underline; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .portal-nav { padding: 0 1rem; }
}

/* ---- MODAL GRID ---- */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem 1.25rem;
  margin-top: .25rem;
}

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

/* ---- CANDIDATE PROFILE VIEW ---- */
.cand-profile-hero {
  background: var(--primary);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.cand-profile-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--secondary);
  opacity: .07;
}

.cand-avatar-wrap {
  width: 80px; height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.3);
  flex-shrink: 0;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
}

.cand-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.cand-avatar-initials {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.cand-hero-info { flex: 1; }

.cand-hero-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: #fff;
  line-height: 1.2;
}

.cand-hero-nick {
  font-size: 16px;
  opacity: .7;
}

.cand-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
}

.cand-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}

.cand-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cand-full-width { grid-column: 1 / -1; }

.cand-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.cand-card-head {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.cand-card-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--light);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.cand-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--primary);
}

.pr-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: .3rem 1rem;
  padding: .4rem 0;
  border-bottom: 1px solid rgba(44,94,26,.05);
  font-size: 13px;
}

.pr-row:last-child { border-bottom: none; }

.pr-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  padding-top: 2px;
}

.pr-value { color: var(--text); line-height: 1.5; }

@media (max-width: 768px) {
  .cand-profile-grid { grid-template-columns: 1fr; }
  .cand-profile-hero { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .pr-row { grid-template-columns: 1fr; gap: 2px; }
}

