/* ===========================================================================
   Nzura Careers — branded, flat, typography-led job board.
   Dual theme: LIGHT default (nzura.co.tz palette — brand blue #195AFE on white)
   + DARK via html.dark (#010919 page / #091222 cards). Toggle persists in the
   shared `nzura-theme` localStorage key (light|dark|system, default system).
   Footer is always the nzura dark navy in both themes (mirrors nzura.co.tz).
   Flat — no decorative gradients. Open Sans. Mobile-first.
   =========================================================================== */

:root {
  /* LIGHT (default) — mirrors nzura.co.tz */
  --bg:            #ffffff;
  --panel:         #f6f8fc;
  --panel-2:       #eef2f9;
  --hairline:      #e6eaf2;
  --hairline-2:    #d4dbe8;
  --text:          #0d1b2e;
  --text-2:        #475569;
  --muted:         #74839a;
  --accent:        #195AFE;
  --accent-deep:   #1048d4;
  --accent-soft:   rgba(25, 90, 254, .10);
  --accent-text:   #ffffff;
  --accent-rgb:    25, 90, 254;
  --success:       #15935f;
  --danger:        #dc2626;
  --warn:          #b45309;
  --chrome-bg:     rgba(255, 255, 255, .85);
  --text-rich:     #334155;
  --chip-btn-bg:   rgba(13, 27, 46, .08);
  --skel-shimmer:  rgba(13, 27, 46, .05);
  --radius:        14px;
  --radius-sm:     10px;
  --shadow-1:      0 1px 2px rgba(13,27,46,.06);
  --shadow-2:      0 12px 30px rgba(13,27,46,.10);
  --ease:          cubic-bezier(.4, 0, .2, 1);
  --maxw:          1180px;
  --font:          'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

html.dark {
  --bg:            #010919;
  --panel:         #091222;
  --panel-2:       #0c1526;
  --hairline:      rgba(255, 255, 255, .07);
  --hairline-2:    rgba(255, 255, 255, .12);
  --text:          #E8EDF5;
  --text-2:        #8A97AC;
  --muted:         #5B6678;
  --accent:        #5b9aff;
  --accent-deep:   #3f7be0;
  --accent-soft:   rgba(91, 154, 255, .14);
  --accent-text:   #ffffff;
  --accent-rgb:    91, 154, 255;
  --success:       #34d399;
  --danger:        #f87171;
  --warn:          #fbbf24;
  --chrome-bg:     rgba(1, 9, 25, .82);
  --text-rich:     #cdd6e4;
  --chip-btn-bg:   rgba(255, 255, 255, .08);
  --skel-shimmer:  rgba(255, 255, 255, .05);
  --shadow-1:      0 1px 2px rgba(0,0,0,.4);
  --shadow-2:      0 10px 30px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
svg { flex: none; }

/* focus visibility (accessibility) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── Top nav ──────────────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--chrome-bg);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.topnav .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; }
.brand .word { font-size: 17px; }
.brand .sub { color: var(--text-2); font-weight: 600; font-size: 13px; border-left: 1px solid var(--hairline-2); padding-left: 10px; margin-left: 2px; }
.topnav .spacer { flex: 1; }
.topnav .nav-actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  display: inline-flex; background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 999px; overflow: hidden;
}
.lang-toggle button {
  background: transparent; border: 0; color: var(--text-2); padding: 6px 12px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease);
}
.lang-toggle button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); }
.nav-link {
  color: var(--text-2); font-weight: 600; font-size: 13.5px; padding: 8px 12px; border-radius: 8px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--panel); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding: 46px 0 26px; border-bottom: 1px solid var(--hairline); }
.hero h1 {
  margin: 0 0 8px; font-size: clamp(28px, 5vw, 44px); line-height: 1.08;
  letter-spacing: -.025em; font-weight: 800;
}
.hero .subhead { margin: 0 0 22px; color: var(--text-2); font-size: clamp(15px, 2.4vw, 18px); max-width: 640px; }
.hero-search {
  display: flex; align-items: center; gap: 10px; background: var(--panel);
  border: 1px solid var(--hairline-2); border-radius: 999px; padding: 6px 6px 6px 16px;
  max-width: 620px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-search svg { color: var(--muted); }
.hero-search input {
  flex: 1; background: transparent; border: 0; color: var(--text); font-size: 15.5px;
  padding: 10px 2px; outline: none;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search .btn-search {
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 999px;
  padding: 11px 22px; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: background .15s var(--ease), transform .12s var(--ease);
}
.hero-search .btn-search:hover { background: var(--accent-deep); }
.hero-search .btn-search:active { transform: scale(.97); }

.stats-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--text-2); font-size: 13.5px; }
.stats-row .stat { display: inline-flex; align-items: center; gap: 7px; }
.stats-row .stat b { color: var(--text); font-weight: 700; }
.stats-row .stat .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.stats-row .remote { color: var(--success); }

/* ── Sticky filter/search bar (appears on scroll) ─────────────────────── */
.stickybar {
  position: sticky; top: 60px; z-index: 40;
  background: var(--chrome-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  padding: 10px 0; display: none;
}
.stickybar.show { display: block; }
.stickybar .wrap { display: flex; align-items: center; gap: 10px; }
.stickybar .mini-search {
  flex: 1; display: flex; align-items: center; gap: 8px; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 10px; padding: 8px 12px; max-width: 460px;
}
.stickybar .mini-search input { flex: 1; background: transparent; border: 0; color: var(--text); outline: none; font-size: 14px; }
.stickybar .mini-search input::placeholder { color: var(--muted); }
.stickybar .filter-trigger { display: none; }

/* ── Board layout ─────────────────────────────────────────────────────── */
.board { padding: 26px 0 60px; }
.board-grid { display: grid; grid-template-columns: 256px 1fr; gap: 32px; align-items: start; }

/* Filters sidebar */
.filters { position: sticky; top: 132px; }
.filters .filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.filters .filters-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; font-weight: 700; }
.filters .clear-all { background: none; border: 0; color: var(--accent); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0; }
.filters .clear-all[hidden] { display: none; }
.facet { border-top: 1px solid var(--hairline); padding: 14px 0; }
.facet:first-of-type { border-top: 0; }
.facet h3 {
  margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none;
}
.facet h3 .chev { transition: transform .18s var(--ease); color: var(--muted); }
.facet.collapsed h3 .chev { transform: rotate(-90deg); }
.facet.collapsed .facet-body { display: none; }
.facet-body { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; }
.facet-body::-webkit-scrollbar { width: 6px; }
.facet-body::-webkit-scrollbar-thumb { background: var(--hairline-2); border-radius: 6px; }
.fopt {
  display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--text-2); transition: background .12s var(--ease), color .12s var(--ease);
}
.fopt:hover { background: var(--panel); color: var(--text); }
.fopt input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; flex: none; }
.fopt .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fopt .count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fopt input:checked ~ .label { color: var(--text); font-weight: 600; }

/* Results column */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.results-count { color: var(--text-2); font-size: 14px; }
.results-count b { color: var(--text); }
.sort-wrap { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.sort-wrap select {
  background: var(--panel); border: 1px solid var(--hairline); color: var(--text); border-radius: 8px;
  padding: 7px 28px 7px 10px; font-size: 13px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A97AC' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}

/* applied chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), .35); color: var(--text); border-radius: 999px;
  padding: 5px 6px 5px 12px; font-size: 12.5px; font-weight: 600;
}
.chip .chip-cat { color: var(--text-2); font-weight: 600; }
.chip button {
  background: var(--chip-btn-bg); border: 0; color: var(--text-2); width: 18px; height: 18px;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center; line-height: 0;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.chip button:hover { background: var(--danger); color: #fff; }
.chip.clear { background: transparent; border-color: var(--hairline); cursor: pointer; padding: 6px 12px; color: var(--accent); }

/* department group */
.dept-group { margin-bottom: 30px; }
.dept-head {
  display: flex; align-items: baseline; gap: 10px; padding: 0 0 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--hairline);
}
.dept-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.dept-head .n { color: var(--muted); font-size: 13px; font-weight: 600; }

/* job card */
.job-list { display: flex; flex-direction: column; }
.job-card {
  display: flex; align-items: center; gap: 16px; padding: 18px 18px; border-radius: var(--radius);
  border: 1px solid transparent; position: relative; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
  animation: cardIn .4s var(--ease) both;
}
.job-card + .job-card { margin-top: 2px; }
.job-card:hover { background: var(--panel); border-color: var(--hairline); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.job-card .co-logo {
  width: 46px; height: 46px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--hairline);
  display: grid; place-items: center; font-weight: 800; font-size: 17px; color: var(--accent); flex: none; overflow: hidden;
}
.job-card .co-logo img { width: 100%; height: 100%; object-fit: cover; }
.job-main { flex: 1; min-width: 0; }
.job-card .co-name { color: var(--text-2); font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.job-card .title {
  font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -.01em; margin: 0 0 7px;
  display: inline-block;
}
.job-card:hover .title { color: var(--accent); }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--hairline); color: var(--text-2);
  border-radius: 7px; padding: 3px 9px;
}
.pill svg { color: var(--muted); }
.pill.work {
  background: var(--accent-soft); border-color: rgba(var(--accent-rgb), .3); color: var(--accent);
}
.pill.salary { color: var(--success); border-color: rgba(52, 211, 153, .25); background: rgba(52, 211, 153, .08); }
.job-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.job-right .posted { color: var(--muted); font-size: 12px; white-space: nowrap; }
.view-role { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 700; font-size: 13px; white-space: nowrap; }
.view-role svg { transition: transform .15s var(--ease); }
.job-card:hover .view-role svg { transform: translateX(3px); }

@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* skeleton */
.skel { background: var(--panel); border-radius: var(--radius); overflow: hidden; position: relative; }
.skel-card { height: 84px; margin-bottom: 8px; }
.skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skel-shimmer), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* empty + error */
.state {
  text-align: center; padding: 64px 20px; border: 1px dashed var(--hairline-2);
  border-radius: var(--radius); background: var(--panel);
}
.state .icon { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--muted); }
.state h3 { margin: 0 0 6px; font-size: 18px; }
.state p { margin: 0 0 18px; color: var(--text-2); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; background: var(--panel-2);
  border: 1px solid var(--hairline-2); color: var(--text); border-radius: 10px; padding: 10px 18px;
  font-weight: 700; font-size: 14px; cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease);
}
.btn-ghost:hover { background: var(--panel); border-color: var(--accent); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--hairline); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--text-2); font-weight: 600; }
.footer a:hover { color: var(--text); }
.footer .powered { display: inline-flex; align-items: center; gap: 7px; }

/* ── Mobile filter sheet ──────────────────────────────────────────────── */
.filter-fab { display: none; }
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; background: var(--panel);
  border-top-left-radius: 20px; border-top-right-radius: 20px; border-top: 1px solid var(--hairline-2);
  max-height: 82vh; transform: translateY(100%); transition: transform .25s var(--ease);
  display: flex; flex-direction: column; padding: 14px 18px env(safe-area-inset-bottom);
}
.sheet.open { transform: translateY(0); }
.sheet .grab { width: 40px; height: 4px; background: var(--hairline-2); border-radius: 4px; margin: 2px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-head button { background: none; border: 0; color: var(--text-2); cursor: pointer; padding: 4px; }
.sheet-body { overflow-y: auto; flex: 1; }
.sheet-foot { padding-top: 12px; display: flex; gap: 10px; }
.sheet-foot button { flex: 1; }
.btn-primary {
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 10px; padding: 12px 18px;
  font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s var(--ease);
}
.btn-primary:hover { background: var(--accent-deep); }

/* ============================ JOB DETAIL ================================= */
.detail { padding: 28px 0 120px; }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 600; font-size: 13.5px; margin-bottom: 18px; }
.back-link:hover { color: var(--text); }
.detail-head { margin-bottom: 22px; }
.detail-head .co-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.detail-head .co-logo { width: 52px; height: 52px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--hairline); display: grid; place-items: center; font-weight: 800; font-size: 20px; color: var(--accent); overflow: hidden; }
.detail-head .co-logo img { width: 100%; height: 100%; object-fit: cover; }
.detail-head .co-name { font-size: 14px; color: var(--text-2); font-weight: 700; }
.detail-head h1 { margin: 0 0 14px; font-size: clamp(24px, 4vw, 34px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.detail-body { font-size: 15px; line-height: 1.7; color: var(--text); }
.detail-body section { margin-bottom: 30px; }
.detail-body h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -.01em; }
.detail-body .rich p { margin: 0 0 12px; color: var(--text-rich); }
.detail-body .rich ul, .detail-body .rich ol { padding-left: 22px; margin: 0 0 12px; color: var(--text-rich); }
.detail-body .rich li { margin-bottom: 6px; }
.detail-body .rich h1, .detail-body .rich h2, .detail-body .rich h3 { color: var(--text); margin: 18px 0 10px; }
.detail-body .rich a { color: var(--accent); text-decoration: underline; }
.bullet-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.bullet-list li { display: flex; gap: 11px; color: var(--text-rich); }
.bullet-list li .bdot { color: var(--accent); flex: none; margin-top: 2px; }
.salary-block {
  display: flex; align-items: center; gap: 12px; background: rgba(52,211,153,.07);
  border: 1px solid rgba(52,211,153,.22); border-radius: 12px; padding: 16px 18px;
}
.salary-block .amt { font-size: 20px; font-weight: 800; color: var(--success); letter-spacing: -.01em; }
.salary-block .lbl { color: var(--text-2); font-size: 13px; }
.about-co { background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 18px; }
.about-co h2 { margin-top: 0; }
.about-co p { color: var(--text-2); margin: 0; }

.share-row { display: flex; align-items: center; gap: 8px; margin: 24px 0 0; }
.share-row .lbl { color: var(--muted); font-size: 13px; margin-right: 2px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--hairline);
  color: var(--text-2); border-radius: 9px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.share-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--hairline-2); }
.share-btn.copied { color: var(--success); border-color: rgba(52,211,153,.3); }

/* apply aside */
.apply-aside { position: sticky; top: 84px; }
.apply-card { background: var(--panel); border: 1px solid var(--hairline); border-radius: 16px; padding: 22px; }
.apply-card .deadline { color: var(--text-2); font-size: 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.apply-card .deadline.urgent { color: var(--warn); }
.apply-cta {
  width: 100%; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 12px;
  padding: 14px; font-size: 15px; font-weight: 800; cursor: pointer; transition: background .15s var(--ease), transform .12s var(--ease);
}
.apply-cta:hover { background: var(--accent-deep); }
.apply-cta:active { transform: scale(.98); }
.apply-card .meta-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.apply-card .meta-list .row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.apply-card .meta-list .row svg { color: var(--muted); }
.apply-card .meta-list .row b { color: var(--text); font-weight: 600; }

/* mobile sticky apply bar */
.mobile-apply-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none;
  background: var(--chrome-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline-2); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.mobile-apply-bar .apply-cta { padding: 13px; }

/* ── Application form ─────────────────────────────────────────────────── */
.apply-section { margin-top: 36px; scroll-margin-top: 80px; }
.apply-panel { background: var(--panel); border: 1px solid var(--hairline); border-radius: 16px; padding: 26px; }
.apply-panel > h2 { margin: 0 0 4px; font-size: 20px; }
.apply-panel > .desc { color: var(--text-2); margin: 0 0 20px; font-size: 14px; }
.progress { display: flex; gap: 6px; margin-bottom: 22px; }
.progress .seg { flex: 1; height: 4px; border-radius: 4px; background: var(--hairline); transition: background .25s var(--ease); }
.progress .seg.done { background: var(--accent); }
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.field .req { color: var(--danger); margin-left: 2px; }
.field .help { color: var(--muted); font-size: 12.5px; margin: -2px 0 8px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=url],
.field input[type=number], .field input[type=date], .field textarea, .field select {
  width: 100%; background: var(--bg); border: 1px solid var(--hairline-2); color: var(--text);
  border-radius: 10px; padding: 12px 13px; font-size: 14.5px; font-family: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); outline: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input.invalid, .field textarea.invalid, .field select.invalid, .dropzone.invalid { border-color: var(--danger); }
.field .err-msg { color: var(--danger); font-size: 12.5px; margin-top: 6px; display: none; }
.field.has-error .err-msg { display: block; }

.field-section-divider { border: 0; border-top: 1px solid var(--hairline); margin: 26px 0 22px; }
.field-section { margin: 26px 0 16px; }
.field-section h3 { margin: 0 0 4px; font-size: 16px; }
.field-section p { margin: 0; color: var(--text-2); font-size: 13px; }

/* select multiselect */
.multiselect { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-opt {
  display: inline-flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--hairline-2);
  color: var(--text-2); border-radius: 9px; padding: 8px 13px; font-size: 13.5px; cursor: pointer; user-select: none;
  transition: all .12s var(--ease);
}
.ms-opt input { accent-color: var(--accent); }
.ms-opt:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

/* rating */
.rating { display: flex; gap: 6px; }
.rating .star {
  background: none; border: 0; cursor: pointer; color: var(--hairline-2); padding: 2px;
  transition: color .12s var(--ease), transform .12s var(--ease);
}
.rating .star:hover { transform: scale(1.15); }
.rating .star.on { color: var(--warn); }

/* yes/no */
.yesno { display: flex; gap: 10px; }
.yesno .yn-opt {
  flex: 1; text-align: center; background: var(--bg); border: 1px solid var(--hairline-2); color: var(--text-2);
  border-radius: 10px; padding: 11px; font-weight: 700; font-size: 14px; cursor: pointer; transition: all .12s var(--ease);
}
.yesno .yn-opt.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

/* consent */
.consent-field { display: flex; gap: 11px; align-items: flex-start; background: var(--bg); border: 1px solid var(--hairline); border-radius: 10px; padding: 13px 14px; }
.consent-field input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 1px; flex: none; }
.consent-field label { font-size: 13.5px; color: var(--text-2); font-weight: 600; line-height: 1.5; }

/* file dropzone */
.dropzone {
  border: 1.5px dashed var(--hairline-2); border-radius: 12px; padding: 22px; text-align: center;
  cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease);
  background: var(--bg);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon { width: 32px; height: 32px; color: var(--muted); margin: 0 auto 8px; }
.dropzone .dz-text { font-size: 13.5px; color: var(--text-2); }
.dropzone .dz-text b { color: var(--accent); }
.dropzone .dz-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.file-chips { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.file-chip {
  display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 9px 11px; font-size: 13px;
}
.file-chip .fc-icon { color: var(--accent); flex: none; }
.file-chip .fc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file-chip .fc-size { color: var(--muted); font-size: 12px; flex: none; }
.file-chip .fc-x { background: none; border: 0; color: var(--text-2); cursor: pointer; padding: 2px; flex: none; }
.file-chip .fc-x:hover { color: var(--danger); }

.apply-actions { margin-top: 24px; display: flex; gap: 12px; }
.apply-actions button { font-weight: 700; }
.btn-submit {
  flex: 1; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 12px;
  padding: 14px; font-size: 15px; cursor: pointer; transition: background .15s var(--ease); position: relative;
}
.btn-submit:hover { background: var(--accent-deep); }
.btn-submit:disabled { opacity: .65; cursor: not-allowed; }
.btn-submit .spin { display: none; }
.btn-submit.loading .label { visibility: hidden; }
.btn-submit.loading .spin { display: inline-block; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; }
.btn-back-step { background: var(--panel-2); border: 1px solid var(--hairline-2); color: var(--text); border-radius: 12px; padding: 14px 22px; cursor: pointer; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* success */
.apply-success { text-align: center; padding: 30px 10px; animation: cardIn .4s var(--ease) both; }
.apply-success .check {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.3); display: grid; place-items: center; color: var(--success);
  animation: pop .4s var(--ease) both;
}
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.apply-success h2 { margin: 0 0 8px; font-size: 22px; }
.apply-success p { color: var(--text-2); margin: 0 auto 22px; max-width: 380px; }

.form-error-banner {
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: var(--danger);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 13.5px; display: none;
}
.form-error-banner.show { display: block; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .board-grid { grid-template-columns: 1fr; }
  .filters { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .apply-aside { display: none; }
  .mobile-apply-bar { display: block; }
  .detail { padding-bottom: 90px; }
  .filter-fab {
    display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--hairline-2);
    color: var(--text); border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer;
  }
  .filter-fab .badge { background: var(--accent); color: #fff; border-radius: 999px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; display: grid; place-items: center; }
  .results-head { align-items: center; }
}
@media (min-width: 901px) { .sheet, .sheet-backdrop { display: none !important; } }
@media (max-width: 620px) {
  .job-card { align-items: flex-start; flex-wrap: wrap; }
  .job-right { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; margin-top: 4px; }
  .brand .sub { display: none; }
  .hero-search .btn-search span { display: none; }
  .hero-search .btn-search { padding: 11px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ══════════════════════════════════════════════════════════════
   Upgraded branded chrome — header nav, hero, rich footer (flat, token-based)
   ══════════════════════════════════════════════════════════════ */
.topnav { transition: box-shadow .2s var(--ease), background .2s; }
.topnav.scrolled { box-shadow: 0 1px 0 var(--hairline), var(--shadow-2); }
.topnav .wrap { gap: 4px; }
.brand { gap: 9px; }
.brand .brand-logo { width: 32px; height: 32px; border-radius: 8px; display: block; object-fit: contain; }
.brand .brand-name { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.brand .brand-sub { font-size: 12px; font-weight: 600; color: var(--text-2); border-left: 1px solid var(--hairline-2); padding-left: 9px; letter-spacing: .03em; text-transform: none; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 20px; }
.nav-links .nav-link { color: var(--text-2); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 9px; transition: color .15s, background .15s; }
.nav-links .nav-link:hover { color: var(--text); background: var(--panel-2); }
.nav-links .nav-link.active { color: var(--text); }
.topnav .nav-actions { gap: 12px; }
.nav-cta { display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 10px; box-shadow: 0 6px 16px rgba(var(--accent-rgb), .28); transition: transform .12s var(--ease), box-shadow .15s, background .15s; }
.nav-cta:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(var(--accent-rgb), .42); }
.nav-cta svg { display: block; }
@media (max-width: 820px) { .nav-links { display: none; } }
@media (max-width: 560px) { .nav-cta span { display: none; } .nav-cta { padding: 9px; } }

.hero { padding: 54px 0 30px; }
.hero-glow { display: none; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 7px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; padding: 6px 13px; border-radius: 999px; margin-bottom: 18px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-chip { background: var(--panel); border: 1px solid var(--hairline); color: var(--text-2); font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.hero-chip:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }

.footer { border-top: 1px solid var(--hairline); padding: 0; margin-top: 64px; background: var(--panel); color: var(--text-2); }
.footer .footer-top { display: grid; grid-template-columns: 1.4fr 2fr; gap: 44px; padding: 50px 20px 38px; align-items: start; }
.footer-brand { max-width: 380px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-tag { color: var(--text-2); font-size: 14px; line-height: 1.65; margin: 0 0 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--bg); border: 1px solid var(--hairline); color: var(--text-2); transition: color .15s, border-color .15s, transform .12s; }
.footer-social a:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 0 0 14px; }
.footer-col a { display: block; color: var(--text-2); font-size: 14px; font-weight: 500; padding: 6px 0; transition: color .15s; }
.footer-col a:hover { color: var(--text); }
.footer .footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-top: 1px solid var(--hairline); flex-wrap: wrap; gap: 10px; }
.footer-copy { color: var(--muted); font-size: 13px; }
.footer .powered { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; font-weight: 600; }
@media (max-width: 820px) { .footer .footer-top { grid-template-columns: 1fr; gap: 34px; } .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.hero-chips-label { color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; align-self: center; margin-right: 2px; }

/* ══════════════════════════════════════════════════════════════
   v3 — light/dark, theme toggle, featured carousel, card stats,
   featured-image covers, detail hero image + stats, related roles.
   ══════════════════════════════════════════════════════════════ */

/* Footer is always the nzura dark navy in BOTH themes (mirrors nzura.co.tz).
   Scoped CSS-var overrides recolour every token-driven descendant. */
.footer {
  background: #061122; margin-top: 64px;
  --text: #ffffff; --text-2: rgba(255,255,255,.72); --muted: rgba(255,255,255,.46);
  --hairline: rgba(255,255,255,.10); --hairline-2: rgba(255,255,255,.16);
  --bg: rgba(255,255,255,.05); --panel: rgba(255,255,255,.05); --panel-2: rgba(255,255,255,.07);
  --accent: #5b9aff; --accent-rgb: 91,154,255;
  color: var(--text-2);
}
.footer .brand-name { color: #fff; }

/* Theme toggle button */
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  background: var(--panel); border: 1px solid var(--hairline); border-radius: 999px;
  color: var(--text-2); cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-moon { display: block; }

/* ── Featured roles strip ─────────────────────────────────────── */
.featured { margin: 0 0 34px; }
.featured-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.featured-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.featured-head h2 .spk { color: var(--accent); }
.featured-head p { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; }
.feat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feat-card {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius); overflow: hidden; cursor: pointer; text-align: left;
  transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
  animation: cardIn .4s var(--ease) both;
}
.feat-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.feat-cover { position: relative; aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.feat-cover img { width: 100%; height: 100%; object-fit: cover; }
.feat-cover.placeholder { display: grid; place-items: center; }
.feat-cover.placeholder .co-logo {
  width: 64px; height: 64px; border-radius: 16px; background: var(--bg); border: 1px solid var(--hairline);
  display: grid; place-items: center; font-weight: 800; font-size: 24px; color: var(--accent); overflow: hidden;
}
.feat-cover.placeholder .co-logo img { width: 100%; height: 100%; object-fit: cover; }
.feat-badge {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em;
  padding: 4px 9px; border-radius: 999px; text-transform: uppercase;
}
.feat-badge.soon { background: #e8830c; }
.feat-body { padding: 15px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.feat-co { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.feat-co .mini-logo { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; flex: none; }
.feat-title { font-size: 16.5px; font-weight: 700; color: var(--text); letter-spacing: -.01em; margin: 0 0 10px; line-height: 1.3; }
.feat-card:hover .feat-title { color: var(--accent); }
.feat-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.feat-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--hairline); }
@media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .feat-grid { grid-template-columns: 1fr; } }

/* ── Engagement stat row (cards + featured + detail) ──────────── */
.job-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.jstat { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.jstat svg { color: var(--muted); }
.jstat b { color: var(--text-2); font-weight: 700; }
.jstat.hot b, .jstat.hot svg { color: var(--accent); }

/* List card: small cover thumbnail replacing the logo tile when an image exists */
.job-card .co-logo.has-cover { border: 0; }
.job-card .co-logo.has-cover img { object-fit: cover; }

/* ── Job detail: featured hero image + stat band ──────────────── */
.detail-cover {
  width: 100%; aspect-ratio: 21 / 9; max-height: 320px; object-fit: cover;
  border-radius: 16px; border: 1px solid var(--hairline); margin-bottom: 22px; background: var(--panel-2);
}
.detail-stats {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px;
}
.dstat {
  display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 12px 16px; min-width: 92px;
}
.dstat .v { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.dstat .l { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dstat.accent .v { color: var(--accent); }

/* ── Related / similar roles ──────────────────────────────────── */
.related { margin-top: 48px; }
.related h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 16px; }
.rel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rel-card {
  display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 14px 16px; cursor: pointer;
  transition: border-color .15s var(--ease), transform .12s var(--ease);
}
.rel-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.rel-card .co-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--hairline); display: grid; place-items: center; font-weight: 800; color: var(--accent); flex: none; overflow: hidden; }
.rel-card .co-logo img { width: 100%; height: 100%; object-fit: cover; }
.rel-card .r-title { font-weight: 700; color: var(--text); font-size: 14.5px; margin-bottom: 2px; }
.rel-card .r-co { color: var(--text-2); font-size: 12.5px; }
@media (max-width: 620px) { .rel-grid { grid-template-columns: 1fr; } }

/* Footer contact block (mirrors nzura.co.tz) */
.footer-contacts { display: flex; flex-direction: column; gap: 7px; margin: 0 0 18px; }
.footer-contacts a, .footer-contacts span { color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.footer-contacts a:hover { color: #fff; }

/* search-field glyphs follow the active theme (was hardcoded dark muted) */
.stickybar .mini-search svg { color: var(--muted); }
