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

:root {
  --gold: #c9a227;
  --gold-light: #e8c05a;
  --dark: #0d0d0d;
  --dark2: #1a1a1a;
  --dark3: #252525;
  --card: #1e1e1e;
  --border: #2e2e2e;
  --text: #e8e8e8;
  --muted: #888;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}
.nav-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav-link:hover { color: var(--text); }

/* Sections */
.section { display: none; }
.section.active { display: block; }

/* Hero */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.subtitle { font-size: 1.1rem; color: var(--muted); margin-bottom: 60px; }

.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}
@media (max-width: 600px) { .role-cards { grid-template-columns: 1fr; } }

.role-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 28px;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
  text-align: center;
}
.role-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.role-icon { font-size: 3rem; margin-bottom: 16px; }
.role-card h2 { font-size: 1.3rem; margin-bottom: 10px; }
.role-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 24px; }

/* Auth box */
.auth-box {
  max-width: 440px;
  margin: 60px auto;
  padding: 0 24px;
}
.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  margin-bottom: 24px;
}
.back-btn:hover { color: var(--text); }

.auth-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
.auth-toggle-btn {
  padding: 16px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--dark3);
  color: var(--muted);
  transition: all .2s;
  letter-spacing: 0.3px;
}
.auth-toggle-btn:hover { border-color: var(--gold); color: var(--text); }
.auth-toggle-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
}
.auth-toggle-btn.employer:hover { border-color: var(--blue); color: var(--text); }
.auth-toggle-btn.employer.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Forms */
input, textarea, select {
  width: 100%;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 12px 14px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); }
textarea { resize: vertical; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }
.form-group input, .form-group textarea, .form-group select { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .1s;
  text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(.98); }
.btn.full { width: 100%; }
.btn-primary { background: var(--gold); color: #000; }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--muted); }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-ghost { background: var(--dark3); color: var(--text); }

.error { color: var(--red); font-size: 0.85rem; margin-bottom: 10px; min-height: 20px; }
.success { color: var(--green); font-size: 0.85rem; margin-bottom: 10px; }

/* Dashboard */
.dash-layout { display: flex; min-height: calc(100vh - 57px); }
.sidebar {
  width: 220px;
  background: var(--dark2);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.user-info { text-align: center; padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.avatar { font-size: 2.5rem; margin-bottom: 8px; }
.user-name { font-weight: 700; font-size: 0.95rem; }
.user-role { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-link {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.side-link:hover { background: var(--dark3); color: var(--text); }
.side-link.active { background: var(--dark3); color: var(--gold); font-weight: 600; }

.logout-btn { margin-top: 16px; }

.dash-main { flex: 1; padding: 32px; overflow-y: auto; }
.dash-panel { display: none; }
.dash-panel.active { display: block; }
.dash-panel h2 { font-size: 1.6rem; margin-bottom: 24px; }

.profile-form { max-width: 700px; }

/* Cards */
.cards-grid { display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.card-title { font-size: 1.1rem; font-weight: 700; }
.card-meta { font-size: 0.83rem; color: var(--muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 12px; }
.card-meta span::before { content: ''; }
.card-body { font-size: 0.9rem; color: var(--text); line-height: 1.6; }
.card-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-active { background: rgba(34,197,94,.15); color: var(--green); }
.badge-closed { background: rgba(239,68,68,.15); color: var(--red); }
.badge-pending { background: rgba(255,200,0,.12); color: #ffc800; }
.badge-viewed { background: rgba(59,130,246,.15); color: var(--blue); }
.badge-shortlisted { background: rgba(34,197,94,.15); color: var(--green); }
.badge-rejected { background: rgba(239,68,68,.15); color: var(--red); }

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

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.hidden { display: none; }
.modal-box {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}
#modalJobTitle { font-size: 1.3rem; margin-bottom: 20px; }

.applicant-card {
  background: var(--dark3);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.applicant-name { font-weight: 700; margin-bottom: 4px; }
.applicant-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.applicant-skills { font-size: 0.85rem; color: var(--gold); margin-bottom: 8px; }
.applicant-message { font-size: 0.85rem; font-style: italic; color: var(--muted); margin-bottom: 10px; }
.status-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .dash-layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 12px; padding: 16px; }
  .user-info { border-bottom: none; padding-bottom: 0; }
  .side-nav { flex-direction: row; }
  .dash-main { padding: 16px; }
}

/* ===== UPWORK-STYLE COMPONENTS ===== */

/* Skill tags */
.skill-tag {
  display: inline-block;
  background: rgba(201,162,39,.12);
  color: var(--gold);
  border: 1px solid rgba(201,162,39,.25);
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.skill-tag.blue {
  background: rgba(59,130,246,.12);
  color: var(--blue);
  border-color: rgba(59,130,246,.25);
}
.skills-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }

/* Talent card (Upwork style) */
.talent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.talent-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color .2s, transform .15s;
  display: flex;
  flex-direction: column;
}
.talent-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.talent-card-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.talent-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #000;
}
.talent-info { flex: 1; min-width: 0; }
.talent-name { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.talent-title { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.talent-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.talent-rate {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-left: auto;
  white-space: nowrap;
}
.talent-bio {
  font-size: 0.85rem;
  color: #bbb;
  line-height: 1.6;
  margin: 8px 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.talent-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }

/* Avatar color palette */
.av-0 { background: #c9a227; }
.av-1 { background: #3b82f6; }
.av-2 { background: #22c55e; }
.av-3 { background: #a855f7; }
.av-4 { background: #f97316; }
.av-5 { background: #ec4899; }
.av-6 { background: #06b6d4; }

/* Search/filter bar */
.pool-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  align-items: center;
}
.pool-search {
  flex: 1;
  min-width: 200px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  margin-bottom: 0 !important;
}
.pool-search:focus { border-color: var(--gold); }
.pool-filter-select {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
  margin-bottom: 0 !important;
  width: auto;
}
.pool-filter-select:focus { border-color: var(--gold); }
.pool-count { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

/* Job card (Upwork style for seeker view) */
.job-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  transition: border-color .2s;
}
.job-card:hover { border-color: rgba(201,162,39,.5); }
.job-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 12px; }
.job-card-title { font-size: 1.1rem; font-weight: 700; }
.job-card-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.job-card-desc { font-size: 0.88rem; color: #bbb; line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.job-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
.job-posted { font-size: 0.78rem; color: var(--muted); }

/* Availability badge colors */
.avail-full { background: rgba(34,197,94,.15); color: var(--green); }
.avail-part { background: rgba(59,130,246,.12); color: var(--blue); }
.avail-flex { background: rgba(201,162,39,.12); color: var(--gold); }

