:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: #ecfdf5;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --rose: #e11d48;
  --rose-soft: #fff1f2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, #0d9488 55%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.36);
}

.btn-emerald {
  background: var(--brand);
  color: #fff;
}

.btn-emerald:hover {
  background: var(--brand-dark);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #4338ca;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* Hero */
.hero {
  background:
    radial-gradient(circle at 12% 15%, rgba(5, 150, 105, 0.11), transparent 36%),
    radial-gradient(circle at 88% 10%, rgba(79, 70, 229, 0.12), transparent 38%),
    #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 36px 24px 28px;
}

.hero-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid rgba(5, 150, 105, 0.2);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 820px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 680px;
}

/* Search Bar */
.search-shell {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-md);
  max-width: 980px;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg);
}

.input-group svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.input-group input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 14.5px;
  color: var(--text);
  outline: none;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.category-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

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

.filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.sort-select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  outline: none;
}

/* Main Split Workspace */
.workspace {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
}

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.results-meta strong {
  color: var(--text);
}

.board-grid {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 20px;
  align-items: start;
}

/* Job List */
.job-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.job-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.job-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.16), var(--shadow-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fffc 100%);
}

.job-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.company-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.job-card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.job-card-company {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: var(--amber);
  font-size: 12.5px;
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.pill-salary {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.pill-remote {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-source {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.job-card-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.ai-ready-tag {
  color: var(--brand-dark);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Detail Panel */
.job-detail {
  position: sticky;
  top: 78px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.detail-header {
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
}

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-title-wrap {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.detail-title-wrap .company-avatar {
  width: 52px;
  height: 52px;
  font-size: 17px;
  border-radius: 12px;
}

.detail-title {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.detail-company-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* AI Copilot Banner inside Job Detail */
.copilot-bar {
  margin: 18px 26px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e1b4b 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.copilot-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.copilot-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6ee7b7;
}

.copilot-bar p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #cbd5e1;
}

.copilot-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.copilot-tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 10px;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copilot-tool-btn:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(110, 231, 183, 0.6);
  transform: translateY(-1px);
}

.copilot-tool-btn strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.copilot-tool-btn span {
  display: block;
  font-size: 11.5px;
  color: #cbd5e1;
}

/* Detail Body */
.detail-body {
  padding: 22px 26px 28px;
}

.detail-section {
  margin-bottom: 22px;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.detail-section p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
}

.detail-list li {
  margin-bottom: 7px;
}

.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.step-num {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

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

/* Pricing / Unlimited Pass Section */
.pricing-section {
  max-width: 1320px;
  margin: 28px auto 48px;
  padding: 0 24px;
}

.pricing-card-banner {
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a 0%, #111827 50%, #1e1b4b 100%);
  color: #fff;
  padding: 40px 36px;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 32px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.pricing-banner-copy h2 {
  margin: 10px 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pricing-banner-copy p {
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: 15.5px;
}

.perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  font-size: 13.5px;
  color: #e2e8f0;
}

.perk-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.perk-check {
  color: #34d399;
  font-weight: 900;
}

.pass-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 26px;
  text-align: center;
}

.billing-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
}

.billing-toggle button {
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.billing-toggle button.active {
  background: #fff;
  color: #0f172a;
}

.pass-price {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pass-price span {
  font-size: 16px;
  font-weight: 600;
  color: #94a3b8;
}

.pass-sub {
  margin: 8px 0 20px;
  font-size: 13px;
  color: #94a3b8;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  border: none;
  background: var(--surface-muted);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 22px 24px 26px;
}

.textarea {
  width: 100%;
  min-height: 130px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14);
}

.score-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.score-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg);
}

.score-box .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.score-box .val {
  font-size: 30px;
  font-weight: 800;
  margin-top: 4px;
}

.kw-matched {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: rgba(5, 150, 105, 0.25);
}

.kw-missing {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: rgba(225, 29, 72, 0.22);
}

.upsell-strip {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5 0%, #eef2ff 100%);
  border: 1px solid rgba(5, 150, 105, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.question-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.question-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 24px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 120;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .board-grid {
    grid-template-columns: 1fr;
  }
  .job-detail {
    position: static;
    max-height: none;
  }
  .pricing-card-banner {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }
  .copilot-tools {
    grid-template-columns: 1fr;
  }
  .search-shell {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
