:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #1a1c2e;
  --ink-soft: #5b5f78;
  --line: #e7e9f3;
  --primary: #4f46e5;
  --primary-dark: #3a32c4;
  --primary-soft: #eef0ff;
  --accent: #f59e0b;
  --accent-soft: #fff5e2;
  --green: #16a34a;
  --green-soft: #e7f6ec;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(33, 35, 80, 0.08);
  --shadow-lg: 0 20px 50px rgba(33, 35, 80, 0.16);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Heebo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { width: min(1120px, 92vw); margin: 0 auto; }
.container.narrow { width: min(720px, 92vw); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { font-size: 26px; }
.logo-text { font-size: 21px; font-weight: 800; }
.logo-text b { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  border: none; background: transparent; color: var(--ink-soft);
  font-size: 15px; font-weight: 600; padding: 9px 14px; border-radius: 12px;
  transition: all .15s;
}
.nav-btn:hover { color: var(--ink); background: var(--primary-soft); }
.nav-btn.is-active { color: var(--primary); background: var(--primary-soft); }
.nav-cta {
  background: var(--primary); color: #fff;
}
.nav-cta:hover { background: var(--primary-dark); color: #fff; }
.nav-cta.is-active { background: var(--primary-dark); color: #fff; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(79,70,229,0.14), transparent),
    radial-gradient(900px 360px at 10% 0%, rgba(245,158,11,0.12), transparent);
  padding: 56px 0 30px;
}
.hero h1 { font-size: clamp(28px, 5vw, 46px); font-weight: 900; margin: 0 0 10px; letter-spacing: -0.5px; }
.hero .hl {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(15px, 2vw, 19px); color: var(--ink-soft); margin: 0 0 26px; max-width: 560px; }
.search-bar {
  display: flex; gap: 10px; background: var(--surface);
  padding: 8px; border-radius: 16px; box-shadow: var(--shadow); max-width: 680px;
}
.search-bar input {
  flex: 1; border: none; outline: none; padding: 12px 14px; font-size: 16px; background: transparent;
}
.search-bar select {
  border: none; outline: none; background: var(--primary-soft); color: var(--primary);
  font-weight: 600; padding: 0 14px; border-radius: 12px; min-width: 130px;
}

/* ---------- category chips ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 26px 0 4px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.results-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 14px; }
.results-count { font-weight: 700; color: var(--ink-soft); }
.link-btn { border: none; background: none; color: var(--primary); font-weight: 600; font-size: 14px; }

/* ---------- jobs grid ---------- */
.jobs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px; padding-bottom: 50px;
}
.job-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s; cursor: pointer;
}
.job-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d9dcf0; }
.job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.job-cat {
  background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center;
}
.job-role { font-size: 19px; font-weight: 800; margin: 12px 0 2px; line-height: 1.3; }
.job-biz { color: var(--ink-soft); font-weight: 600; font-size: 14.5px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.tag {
  font-size: 13px; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 8px; font-weight: 600;
}
.tag.pay { background: var(--green-soft); color: var(--green); border-color: transparent; }
.job-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.job-city { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.job-city::before { content: "📍 "; }
.btn-ghost {
  border: 1px solid var(--primary); color: var(--primary); background: transparent;
  padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; transition: all .15s;
}
.btn-ghost:hover { background: var(--primary); color: #fff; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 60px 0; color: var(--ink-soft); }
.empty-emoji { font-size: 48px; display: block; margin-bottom: 10px; }

/* ---------- form ---------- */
#view-post { padding: 36px 0 60px; }
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
}
.form-card h2 { margin: 0 0 6px; font-size: 26px; font-weight: 900; }
.form-intro { color: var(--ink-soft); margin: 0 0 22px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; border: none; padding: 0; }
.field > span, .legend { font-weight: 700; font-size: 14.5px; }
.field i { color: var(--accent); font-style: normal; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px;
  background: #fbfbff; outline: none; transition: border .15s, box-shadow .15s; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  position: relative; cursor: pointer; user-select: none;
}
.check input { position: absolute; opacity: 0; }
.check span {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft); background: #fbfbff; transition: all .12s;
}
.check input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--ink-soft); font-weight: 700; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-primary {
  background: var(--primary); color: #fff; border: none; padding: 14px 20px; border-radius: 12px;
  font-size: 16px; font-weight: 800; transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(.99); }
.btn-block { width: 100%; margin-top: 8px; }
.form-errors {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 14px; font-weight: 600; font-size: 14px;
}
.form-errors ul { margin: 6px 0 0; padding-inline-start: 20px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,22,50,0.5); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg);
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto; padding: 30px; animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; left: 16px; border: none; background: var(--bg); color: var(--ink-soft);
  width: 34px; height: 34px; border-radius: 50%; font-size: 15px; font-weight: 700;
}
.modal-close:hover { background: var(--line); }
.m-cat { display: inline-flex; gap: 6px; align-items: center; background: var(--primary-soft); color: var(--primary);
  font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.m-role { font-size: 25px; font-weight: 900; margin: 14px 0 4px; }
.m-biz { color: var(--ink-soft); font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.m-desc { color: var(--ink); margin: 0 0 20px; white-space: pre-wrap; }
.m-rows { display: grid; gap: 10px; margin-bottom: 22px; }
.m-row { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; background: var(--bg); border-radius: 12px; }
.m-row .k { font-weight: 700; min-width: 96px; color: var(--ink-soft); }
.m-row .v { font-weight: 600; }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-call, .btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  padding: 14px; border-radius: 12px; font-weight: 800; font-size: 16px;
}
.btn-call { background: var(--primary); color: #fff; }
.btn-call:hover { background: var(--primary-dark); }
.btn-wa { background: var(--green-soft); color: var(--green); border: 1px solid #c7ecd2; }
.btn-wa:hover { background: #d6f0de; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 14px 24px; border-radius: 14px;
  font-weight: 700; box-shadow: var(--shadow-lg); z-index: 80; animation: pop .2s ease;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 26px 0 34px; margin-top: 20px; }
.safety {
  background: var(--accent-soft); border: 1px solid #f6e0b8; color: #92580a; border-radius: 14px;
  padding: 14px 18px; font-size: 14px; margin: 0 0 14px;
}
.copy { text-align: center; color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ---------- custom select (replaces native dropdowns) ---------- */
.cs { position: relative; }
.cs-native { display: none; }
.cs-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px;
  background: #fbfbff; color: var(--ink); font-weight: 600; cursor: pointer; text-align: start;
  transition: border .15s, box-shadow .15s;
}
.cs-trigger:hover { border-color: #cfd2ea; }
.cs.is-open .cs-trigger { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cs-trigger.is-placeholder { color: var(--ink-soft); font-weight: 500; }
.cs-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-caret { color: var(--ink-soft); transition: transform .18s; flex: 0 0 auto; font-size: 12px; }
.cs.is-open .cs-caret { transform: rotate(180deg); }
.cs-panel {
  position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; animation: pop .14s ease;
}
.cs-search {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  font-size: 14px; margin-bottom: 6px; outline: none; background: var(--bg); color: var(--ink);
}
.cs-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cs-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.cs-opt {
  padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink);
  cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.cs-opt:hover, .cs-opt.is-active { background: var(--primary-soft); color: var(--primary); }
.cs-opt.is-selected { background: var(--primary); color: #fff; }
.cs-empty { padding: 14px; text-align: center; color: var(--ink-soft); font-size: 14px; }

/* search-bar variant: pill look matching the old filter */
.search-bar .cs { min-width: 150px; }
.search-bar .cs-trigger { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.search-bar .cs-trigger.is-placeholder { color: var(--primary); font-weight: 600; }

/* ---------- mobile bottom tab bar ---------- */
.tabbar { display: none; }
.tab-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: none; background: transparent; color: var(--ink-soft);
  font-size: 12px; font-weight: 700; padding: 8px 0 4px; min-height: 54px; transition: color .12s;
}
.tab-btn .tab-ic { font-size: 21px; line-height: 1; }
.tab-btn.is-active { color: var(--primary); }

/* ---------- responsive: tablet ---------- */
@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

/* ---------- responsive: phone ---------- */
@media (max-width: 620px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  /* app-like layout: hide top nav, show bottom tabs */
  .nav { display: none; }
  .header-inner { height: 56px; justify-content: center; }
  .logo-text { font-size: 20px; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* hero + search */
  .hero { padding: 30px 0 18px; }
  .hero h1 { font-size: 30px; }
  .search-bar { flex-direction: column; padding: 10px; gap: 8px; }
  .search-bar input { font-size: 16px; padding: 13px 12px; }
  .search-bar select { padding: 13px 12px; font-size: 15px; width: 100%; }

  /* category chips: horizontal scroll strip */
  .cat-chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 22px 0 12px; scrollbar-width: none;
    margin: 0 calc(-4vw); padding-inline: 4vw;
  }
  .cat-chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }

  /* single-column cards, no overflow on small screens */
  .jobs-grid { grid-template-columns: 1fr; gap: 14px; padding-bottom: 30px; }
  .job-card { padding: 18px; }
  .job-role { font-size: 18px; }

  /* form inputs: 16px to stop iOS auto-zoom */
  .form-card { padding: 22px 18px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .check span { padding: 9px 15px; }

  /* modal as bottom sheet */
  .modal { align-items: flex-end; padding: 0; }
  .modal-card {
    width: 100%; max-width: none; max-height: 90vh;
    border-radius: 22px 22px 0 0;
    padding: 26px 18px calc(20px + env(safe-area-inset-bottom));
    animation: sheet .24s cubic-bezier(.2, .8, .2, 1);
  }
  .modal-card::before {
    content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 999px; background: var(--line);
  }
  .modal-close { top: 14px; left: 14px; }
  .m-actions { grid-template-columns: 1fr; }
  .btn-call, .btn-wa { padding: 16px; font-size: 17px; }

  /* keep toast above the tab bar */
  .toast { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .site-footer { margin-top: 10px; }
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 360px) {
  .hero h1 { font-size: 26px; }
  .logo-mark { font-size: 23px; }
}
