:root {
  --navy: #16324f;
  --orange: #ef9a3d;
  --text-gray: #6b7280;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: #fafbfc;
  color: #1f2937;
}

a { color: inherit; }

/* Header */
.site-header {
  text-align: center;
  padding: 40px 20px 24px;
  position: relative;
}

.lang-switch {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 13px;
}

.lang-switch a { color: var(--text-gray); text-decoration: none; padding: 0 4px; }
.lang-switch a.active { color: var(--navy); font-weight: 700; }

.logo {
  font-size: 2.3rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 26px;
  letter-spacing: -0.5px;
}

.logo-dark { color: var(--navy); }
.logo-orange { color: var(--orange); }

.search-form { display: flex; justify-content: center; }

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  background: white;
}

.search-box input[type=text] {
  border: none;
  outline: none;
  flex: 1;
  font-size: 15px;
  padding: 6px 10px;
  background: transparent;
}

.search-icon { color: #9ca3af; margin-right: 6px; }

.search-submit {
  background: var(--orange);
  border: none;
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  flex-shrink: 0;
}

.tagline { margin-top: 16px; color: #3b82f6; font-size: 14px; }

.country-toggle { display: flex; justify-content: center; gap: 12px; margin: 4px 0 30px; }
.btn-country {
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 11px 30px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  opacity: 0.55;
}
.btn-country.active { opacity: 1; box-shadow: 0 4px 14px rgba(239, 154, 61, 0.35); }
.btn-country:hover { opacity: 0.85; }
.btn-country.active:hover { opacity: 1; }

/* Star rating widget (front page, above search) */
.site-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.site-rating .stars {
  display: flex;
  gap: 2px;
}

.site-rating .star {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  font-size: 32px;
  color: #d1d5db;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.1s ease;
}

.site-rating .star:hover,
.site-rating .star:focus {
  transform: scale(1.08);
  outline: none;
}

.site-rating .star.is-filled { color: var(--orange); }

.site-rating.is-voted .star { cursor: default; }
.site-rating.is-voted .star:hover { transform: none; }

.rating-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-gray);
  min-width: 18px;
}

/* About section (front page, above footer) */
.about-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 10px 0 30px;
}

.about-section h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1.4rem;
}

.about-section p {
  margin: 0 0 16px;
  line-height: 1.65;
  color: #374151;
}

.about-section p:last-child { margin-bottom: 0; }

.text-orange { color: var(--orange); }

/* Layout */
.site-main { max-width: 920px; margin: 0 auto; padding: 10px 20px 20px; }

.job-section { margin-bottom: 42px; }
.job-section h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.muted { color: var(--text-gray); font-size: 14px; margin-bottom: 14px; }

.btn-outline {
  display: inline-block;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 18px;
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
}

.job-section-footer { text-align: center; margin-top: 18px; }

.btn-view-all {
  display: inline-block;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 11px 26px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.btn-view-all:hover { opacity: 0.9; }

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

.job-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px 20px;
  background: white;
  box-shadow: 0 8px 24px rgba(149, 157, 165, 0.15);
}

.job-card-featured { border-color: var(--navy); border-width: 2px; }

.badge-new, .badge-featured {
  position: absolute;
  top: 0;
  left: 16px;
  background: var(--navy);
  color: white;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 0 0 8px 8px;
}

.badge-featured { left: auto; right: 16px; background: var(--orange); }

.job-card-body { flex: 1; min-width: 0; }
.job-title { margin: 0 0 4px; }
.job-title a { font-size: 1.15rem; font-weight: 700; color: var(--navy); text-decoration: none; }
.job-title a:hover { text-decoration: underline; }

.job-meta { font-size: 13px; color: var(--text-gray); margin: 2px 0; display: flex; align-items: center; gap: 6px; }

.job-tags { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; font-weight: 600; }
.job-tags li:before { content: "• "; color: var(--navy); }

.job-badges { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: #f3f4f6; border-radius: 999px; padding: 4px 12px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }

.job-desc { margin-top: 12px; font-size: 12.5px; color: #9ca3af; line-height: 1.5; }
.job-desc-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 12px; }
.job-desc-row .job-desc { margin-top: 0; flex: 1; min-width: 0; }
.job-readmore { white-space: nowrap; font-size: 12.5px; font-weight: 700; color: var(--navy); text-decoration: none; }
.job-readmore:hover { text-decoration: underline; }

.job-card-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; min-width: 90px; }
.job-logo { max-width: 100px; max-height: 70px; object-fit: contain; }
.save-icon { color: var(--navy); opacity: 0.4; font-size: 20px; }

/* Pagination */
.pagination { margin-top: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--navy); font-size: 13px; }
.pagination a.active { background: var(--navy); color: white; border-color: var(--navy); }
.pagination .page-gap { padding: 6px 4px; color: var(--text-gray); font-size: 13px; }
.pagination .page-nav { font-weight: 600; }
.pagination span.page-nav.disabled { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: #c1c6cf; }

/* Footer */
.site-footer { max-width: 920px; margin: 20px auto 0; padding: 32px 20px 50px; border-top: 1px solid var(--border); color: var(--text-gray); font-size: 14px; }
.site-footer h2 { color: var(--navy); font-size: 1.1rem; margin-bottom: 8px; }
.site-footer .copyright { margin-top: 16px; font-size: 12px; }

/* Job detail page */
.job-detail { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.job-detail h1 { color: var(--navy); margin-top: 0; }
.job-detail .job-meta { font-size: 14px; margin: 6px 0; }
.job-detail .job-desc { font-size: 14px; color: #4b5563; margin-top: 20px; line-height: 1.7; }
.job-detail .btn-outline { margin-top: 24px; }

.job-desc-html h2, .job-desc-html h3, .job-desc-html h4 { color: var(--navy); margin: 20px 0 8px; }
.job-desc-html p { margin: 0 0 12px; }
.job-desc-html ul, .job-desc-html ol { margin: 0 0 12px; padding-left: 22px; }
.job-desc-html li { margin-bottom: 4px; }
.job-desc-html a { color: var(--navy); font-weight: 600; }
.job-desc-html blockquote { margin: 12px 0; padding: 8px 16px; border-left: 3px solid var(--orange); color: var(--text-gray); }

/* Admin */
.admin-body { background: #f3f4f6; }
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 30px 20px 60px; }
.admin-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-nav h1 { color: var(--navy); font-size: 1.5rem; margin: 0; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-stats { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-box { background: white; border-radius: 10px; padding: 16px 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.stat-box .stat-value { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.stat-box .stat-label { font-size: 13px; color: var(--text-gray); }

.admin-panel { background: white; border-radius: 12px; padding: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); overflow-x: auto; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { border-bottom: 1px solid #eee; padding: 10px 8px; text-align: left; white-space: nowrap; }
.admin-table td.wrap { white-space: normal; }
.tag-featured { color: var(--orange); font-weight: 700; }

.btn {
  display: inline-block;
  background: var(--navy);
  color: white;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-secondary { background: #6b7280; }
.btn-danger { background: #dc2626; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }

.admin-form { background: white; border-radius: 12px; padding: 28px; max-width: 640px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.form-group input[type=text], .form-group input[type=password], .form-group input[type=url], .form-group textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit; box-sizing: border-box;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-hint { margin: 4px 0 0; font-size: 12px; color: var(--text-gray); }
.form-checkbox { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 10px; }

.admin-search-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-search-input {
  flex: 1; min-width: 320px; padding: 12px 14px; border: 1px solid #b9bfc9; border-radius: 8px; font-size: 15px; font-family: inherit;
}
.admin-search-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,50,79,0.08); }
.admin-search-count { font-size: 13px; color: var(--text-gray); margin: 0 0 12px; }

.richtext-wrap { border: 1px solid #b9bfc9; border-radius: 6px; overflow: hidden; background: white; }
.richtext-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #f3f4f6; border-bottom: 1px solid #b9bfc9; }
.richtext-toolbar button {
  border: 1px solid #d1d5db; background: white; border-radius: 4px; padding: 5px 9px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.richtext-toolbar button:hover { background: #eef0f3; }
.richtext-editor {
  min-height: 180px; padding: 12px; font-size: 14px; line-height: 1.6; outline: none; background: white;
}
.richtext-editor:focus { box-shadow: inset 0 0 0 2px var(--navy); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f3f4f6; }
.login-box { max-width: 360px; width: 100%; margin: 0 20px; padding: 32px; border-radius: 14px; background: white; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.login-box h1 { color: var(--navy); font-size: 1.3rem; text-align: center; margin-bottom: 20px; }
.error-msg { color: #dc2626; font-size: 13px; margin-bottom: 14px; text-align: center; }
.notice-success { background: #ecfdf5; color: #047857; padding: 10px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }

.turnstile-group { display: flex; justify-content: center; margin-bottom: 16px; }
.login-box .btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.harvest-grid { display: flex; gap: 24px; flex-wrap: wrap; }
.harvest-summary { background: white; border-radius: 12px; padding: 28px; max-width: 420px; flex: 1 1 360px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.harvest-summary .stat-value { font-size: 2rem; }
.harvest-source-title { margin: 0 0 12px; font-size: 1.1rem; }

.progress-bar-wrap { background: #e5e7eb; border-radius: 8px; height: 10px; overflow: hidden; margin: 18px 0 10px; }
.progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--navy) 25%, #93a5c4 50%, var(--navy) 75%);
  background-size: 200% 100%;
  animation: hv-loading 1.2s linear infinite;
}
@keyframes hv-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
