/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:      #1a1a2e;
  --surface: #16213e;
  --border:  #0f3460;
  --accent:  #e94560;
  --text:    #e2e8f0;
  --muted:   #94a3b8;
  --green:   #10b981;
  --yellow:  #f59e0b;
  --radius:  8px;
  --shadow:  0 1px 3px rgba(0,0,0,.4);
  --container: 900px;
}

/* ─── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.main-content {
  flex: 1;
  padding: 32px 0 64px;
}

/* ─── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.logo img { border-radius: 4px; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ─── Flash messages ────────────────────────────────────────────────────────── */
.flash {
  padding: 12px 0;
  text-align: center;
  font-weight: 500;
}
.flash-success { background: #064e3b; color: #6ee7b7; }
.flash-error   { background: #7f1d1d; color: #fca5a5; }
.flash-info    { background: #1e3a5f; color: #93c5fd; }

/* ─── Filter Bar ────────────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.filter-inner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-sticker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.filter-sticker:hover {
  background: var(--accent);
  color: #fff;
}
.filter-sticker.active {
  background: var(--country-color, var(--accent));
  color: #fff;
}

/* ─── Job Feed ──────────────────────────────────────────────────────────────── */
.jobs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.jobs-count {
  color: var(--muted);
  font-size: 14px;
}
.jobs-sort {
  display: flex;
  gap: 8px;
}
.sort-btn {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--border);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  border: none;
}
.sort-btn.active, .sort-btn:hover {
  background: var(--accent);
  color: #fff;
}

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ─── Job Card ──────────────────────────────────────────────────────────────── */
.job-card {
  background: var(--surface);
  border-left: 4px solid var(--country-color, var(--border));
  border-radius: var(--radius);
  transition: background .15s;
}
.job-card:hover { background: #1e2d52; }
.job-card--featured {
  border-left-color: var(--accent);
}
.job-card-link {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
}
.job-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.job-card-logo img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
}
.job-card-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--muted);
}
.job-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.job-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.job-card-company {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.job-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.tag:hover { background: var(--accent); color: #fff; }

.job-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  white-space: nowrap;
}
.job-card-location { font-size: 13px; color: var(--text); }
.job-card-salary   { font-size: 13px; color: var(--green); font-weight: 500; }
.job-card-time     { font-size: 12px; color: var(--muted); }

/* ─── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-featured  { background: var(--accent);  color: #fff; }
.badge-active    { background: var(--green);   color: #fff; }
.badge-pending   { background: var(--yellow);  color: #1a1a2e; }
.badge-expired   { background: #374151;         color: var(--muted); }
.badge-deleted   { background: #7f1d1d;         color: #fca5a5; }
.badge-single    { background: var(--border);  color: var(--muted); }
.badge-bundle    { background: #2d1b69;         color: #c4b5fd; }

/* ─── Page Sections ─────────────────────────────────────────────────────────── */
.page-hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.page-hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.page-hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
}

/* ─── Pricing Cards ─────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
}
.pricing-card.featured-plan {
  border-color: var(--accent);
}
.pricing-card .plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 2px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.pricing-card .plan-name    { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.pricing-card .plan-price   { font-size: 40px; font-weight: 800; color: var(--accent); }
.pricing-card .plan-period  { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.pricing-card .plan-savings { font-size: 13px; color: var(--green); margin-bottom: 20px; }
.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pricing-card ul li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.pricing-card ul li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
}

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  max-width: 680px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
label .required { color: var(--accent); }
input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { min-height: 200px; resize: vertical; }
.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.form-error {
  font-size: 12px;
  color: #f87171;
  margin-top: 4px;
}

/* ─── Job Detail ────────────────────────────────────────────────────────────── */
.job-detail-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.job-detail-logo img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
}
.job-detail-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--muted);
}
.job-detail-info h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}
.job-detail-company { color: var(--muted); margin-bottom: 12px; }
.job-detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.job-detail-meta span { display: flex; align-items: center; gap: 4px; }

.job-detail-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
}
.job-detail-content h2 { font-size: 18px; margin: 24px 0 12px; }
.job-detail-content p  { margin-bottom: 12px; color: var(--muted); }
.job-detail-content ul, .job-detail-content ol {
  padding-left: 20px;
  margin-bottom: 12px;
  color: var(--muted);
}
.job-detail-content li { margin-bottom: 4px; }

.apply-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  position: sticky;
  top: 80px;
}
.apply-box h3 { font-size: 20px; margin-bottom: 16px; }

/* ─── Success / Cancel pages ────────────────────────────────────────────────── */
.status-page {
  text-align: center;
  padding: 80px 20px;
}
.status-icon { font-size: 64px; margin-bottom: 24px; }
.status-page h1 { font-size: 32px; margin-bottom: 12px; }
.status-page p  { color: var(--muted); margin-bottom: 24px; }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 20px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.footer-nav {
  display: flex;
  gap: 20px;
}
.footer-nav a { color: var(--muted); font-size: 14px; }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ─── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2   { font-size: 22px; color: var(--text); margin-bottom: 8px; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .job-card-link {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
  }
  .job-card-meta {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .job-detail-header { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 24px 16px; }
  .pricing-grid { grid-template-columns: 1fr; }
}
