/* ================================================================
   style.css — Job Search (Sidebar Layout)
   ================================================================ */

:root {
  --bg:          #f7f8fc;
  --surface:     #ffffff;
  --surface2:    #f0f2f8;
  --border:      #e4e7f0;
  --border2:     #d0d5e8;
  --text:        #111827;
  --text2:       #374151;
  --muted:       #6b7280;
  --accent:      #2563eb;
  --accent-lt:   #eff6ff;
  --accent-bd:   #bfdbfe;
  --green:       #059669;
  --green-lt:    #ecfdf5;
  --amber:       #d97706;
  --amber-lt:    #fffbeb;
  --purple:      #7c3aed;
  --red:         #dc2626;
  --sidebar-w:   280px;
  --topbar-h:    58px;
  --r-sm:        6px;
  --r-md:        10px;
  --r-lg:        14px;
  --sh-sm:       0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --sh-md:       0 4px 16px rgba(0,0,0,.08);
  --t:           .16s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: 'Instrument Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

/* Eliminate 300ms tap delay on all interactive elements */
a, button, [role="button"], [role="link"], [tabindex], label, select,
.job-card, .cat-item, .ci, .pref-chip, .pg-btn, .btn-apply,
.country-trigger, .cat-group-header, .all-cats-btn {
  touch-action: manipulation;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  transition: transform var(--t);
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem .75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo { text-decoration: none; }
.logo-text {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -.025em;
}
.logo-text span { color: var(--accent); }

.sidebar-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
}

/* ── Filter sections ─────────────────────────────────────────── */
.filter-section {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.filter-section-cats { flex: 1; overflow-y: visible; padding-bottom: .5rem; }

.filter-section-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .75rem;
}

/* ── Country dropdown ────────────────────────────────────────── */
.country-select-wrap { position: relative; }

.country-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 38px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 .75rem;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--t);
}
.country-trigger:hover { border-color: var(--accent); }
.ct-flag { width: 18px; flex-shrink: 0; display: flex; align-items: center; }
.ct-name { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-arrow { margin-left: auto; flex-shrink: 0; color: var(--muted); transition: transform var(--t); }
.country-trigger[aria-expanded="true"] .ct-arrow { transform: rotate(180deg); }

.country-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  z-index: 500;
  display: none;
  flex-direction: column;
  max-height: 320px;
  overflow: hidden;
}
.country-dropdown.open { display: flex; }

.cd-search-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
}
#countrySearch {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: .85rem;
  color: var(--text);
  background: transparent;
}
#countrySearch::placeholder { color: var(--muted); }

#countryList {
  list-style: none;
  overflow-y: auto;
  flex: 1;
}
#countryList::-webkit-scrollbar { width: 4px; }
#countryList::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.ci {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .75rem;
  cursor: pointer;
  font-size: .85rem;
  transition: background var(--t);
}
.ci:hover { background: var(--accent-lt); }
.ci.active { background: var(--accent-lt); color: var(--accent); font-weight: 600; }
.ci-flag, .ci-icon { flex-shrink: 0; }
.ci-name { flex: 1; }
.ci-count {
  margin-left: auto;
  font-size: .72rem;
  color: var(--muted);
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 100px;
}

/* ── "All Categories" button ─────────────────────────────────── */
.all-cats-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem .6rem;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  margin-bottom: .5rem;
  transition: all var(--t);
}
.all-cats-btn:hover, .all-cats-btn.active { background: var(--accent-lt); color: var(--accent); }
.all-cats-btn .cat-count {
  font-size: .72rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 1px 6px;
  border-radius: 100px;
}

/* ── Category accordion ──────────────────────────────────────── */
.cat-group { margin-bottom: .15rem; }

.cat-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .6rem;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t), background var(--t);
}
.cat-group-header:hover { color: var(--text2); background: var(--surface2); }

.cgh-name { flex: 1; text-align: left; }
.cgh-count {
  font-size: .7rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.cgh-arrow { flex-shrink: 0; color: var(--muted); transition: transform var(--t); }
.cat-group.open .cgh-arrow { transform: rotate(180deg); }

.cat-list {
  list-style: none;
  display: none;
  padding: .15rem 0 .4rem;
}
.cat-group.open .cat-list { display: block; }

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35rem .6rem .35rem 1.25rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: .845rem;
  color: var(--text2);
  transition: background var(--t), color var(--t);
}
.cat-item:hover { background: var(--accent-lt); color: var(--accent); }
.cat-item.active { background: var(--accent-lt); color: var(--accent); font-weight: 600; }
.cat-item.zero { color: var(--muted); opacity: .55; cursor: default; }
.cat-item.zero:hover { background: none; color: var(--muted); }

.cat-name { flex: 1; }
.cat-count {
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 100px;
  margin-left: .35rem;
}
.cat-item.active .cat-count { background: var(--accent); color: #fff; }

/* ── Sidebar footer ──────────────────────────────────────────── */
.sidebar-footer {
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}
.sidebar-admin-link {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t);
}
.sidebar-admin-link:hover { color: var(--accent); }

/* ================================================================
   MAIN WRAP
   ================================================================ */
.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}
.main-wrap::-webkit-scrollbar { width: 6px; }
.main-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ================================================================
   TOP BAR
   ================================================================ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
  flex-shrink: 0;
}

/* Search */
.search-wrap {
  flex: 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-ico {
  position: absolute;
  left: .875rem;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  height: 40px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 0 2.5rem 0 2.75rem;
  font-family: inherit;
  font-size: .875rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.search-wrap input::placeholder { color: var(--muted); }
.search-wrap input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.btn-clear {
  position: absolute;
  right: .75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 3px;
  display: flex;
  align-items: center;
  transition: color var(--t);
}
.btn-clear:hover { color: var(--text); }
.btn-clear svg { width: 11px; height: 11px; }

/* Top bar right */
.tb-right {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-left: auto;
  flex-shrink: 0;
}
.job-tally {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
.job-tally span {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: -.02em;
}
.job-tally small {
  font-size: .62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
}

.btn-refresh {
  display: flex;
  align-items: center;
  gap: .4rem;
  height: 36px;
  padding: 0 .875rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text2);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.btn-refresh:hover { border-color: var(--accent); color: var(--accent); }
.btn-refresh.spinning svg { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   FILTER CRUMB
   ================================================================ */
.filter-crumb {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.5rem;
  background: var(--accent-lt);
  border-bottom: 1px solid var(--accent-bd);
  font-size: .85rem;
  color: var(--accent);
  font-weight: 500;
  flex-shrink: 0;
}
.crumb-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ================================================================
   STATUS BAR
   ================================================================ */
.status-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
  color: var(--muted);
  flex-shrink: 0;
}
.status-spacer { flex: 1; }
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.pulse-dot.pulse { animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ================================================================
   JOB GRID
   ================================================================ */
#jobsContainer {
  flex: 1;
  padding: 1.5rem;
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.125rem;
}

/* ── Job card ────────────────────────────────────────────────── */
.job-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.125rem;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.job-card:hover {
  border-color: var(--accent-bd);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

.c-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: .25rem;
}
.c-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.c-badge-wrap { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }

.badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge-new    { background: var(--green-lt);  color: var(--green); }
.badge-remote { background: var(--accent-lt); color: var(--accent); }

.c-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-top: .1rem;
}
.c-company {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text2);
}
.c-location {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  color: var(--muted);
}
.card-flag { border-radius: 2px; }

.c-cat {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--purple);
  background: #f5f3ff;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: .02em;
  align-self: flex-start;
}

.c-desc {
  font-size: .82rem;
  color: var(--text2);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.c-foot {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-top: .625rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.c-ago, .c-source {
  font-size: .75rem;
  color: var(--muted);
}
.c-source {
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 100px;
}

.btn-apply {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 .875rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t);
}
.btn-apply:hover { background: #1d4ed8; }

/* ================================================================
   EMPTY STATE / LOADING
   ================================================================ */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--muted);
  gap: 1rem;
}
.loading-ring {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--muted);
  gap: .75rem;
  text-align: center;
}
.empty-state svg { color: var(--border2); }
.empty-state h3 { font-size: 1.1rem; color: var(--text2); }
.empty-state p  { font-size: .9rem; }
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 1.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.pg-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 .5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--t);
}
.pg-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-ellipsis { padding: 0 .25rem; color: var(--muted); font-size: .85rem; }

/* ================================================================
   SIDEBAR OVERLAY (mobile)
   ================================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================================
   RESPONSIVE — mobile first
   ================================================================ */
@media (max-width: 900px) {
  .job-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
  body { display: block; }

  /* Sidebar becomes off-canvas overlay */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100%;
    transform: translateX(-100%);
    box-shadow: var(--sh-md);
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; }
  .sidebar-close { display: flex; }

  .main-wrap {
    height: auto;
    min-height: 100vh;
    overflow-y: visible;
  }

  .hamburger { display: flex; }

  .top-bar { padding: 0 1rem; gap: .75rem; }
  .job-tally { display: none; }

  #jobsContainer { padding: 1rem; }
  .job-grid { grid-template-columns: 1fr; }

  .filter-crumb { padding: .5rem 1rem; }
  .status-bar   { padding: .5rem 1rem; }
}

@media (max-width: 480px) {
  .btn-refresh span { display: none; }
  .top-bar { gap: .5rem; }
}



/* ================================================================
   NOTIFICATION BELL BUTTON
   ================================================================ */
.btn-notif {
  position: relative; width: 36px; height: 36px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-md); color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t); flex-shrink: 0;
}
.btn-notif svg { width: 17px; height: 17px; }
.btn-notif:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }
.btn-notif.active { border-color: var(--green); color: var(--green); background: var(--green-lt); }
.notif-active-dot {
  position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px; background: var(--green);
  border-radius: 50%; border: 2px solid var(--surface); display: none;
}
.btn-notif.active .notif-active-dot { display: block; }
.notif-count-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 100px;
  font-size: .6rem; font-weight: 800; line-height: 17px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface); pointer-events: none;
}
.ci.ci-dim { opacity: .5; }
.ci.ci-dim:hover { opacity: 1; }

/* ================================================================
   NOTIFICATION BANNER
   ================================================================ */
.notif-banner {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 400; background: var(--text); color: #fff;
  border-radius: var(--r-xl); padding: .875rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--sh-lg); max-width: min(620px, calc(100vw - 2rem));
  animation: slide-up .35s ease;
}
@keyframes slide-up {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.notif-banner-ico { flex-shrink: 0; opacity: .8; }
.notif-banner-ico svg { width: 20px; height: 20px; }
.notif-banner-text { flex: 1; min-width: 0; }
.notif-banner-text strong { display: block; font-size: .875rem; font-weight: 700; margin-bottom: .1rem; }
.notif-banner-text span { font-size: .775rem; opacity: .75; line-height: 1.4; }
.notif-banner-btns { display: flex; gap: .5rem; flex-shrink: 0; }
.btn-notif-setup {
  height: 34px; padding: 0 1rem; background: var(--accent);
  border: none; border-radius: var(--r-md); color: #fff;
  font-family: 'Instrument Sans', sans-serif; font-size: .78rem;
  font-weight: 700; cursor: pointer; transition: background var(--t); white-space: nowrap;
}
.btn-notif-setup:hover { background: #1d4ed8; }
.btn-notif-dismiss {
  height: 34px; padding: 0 .75rem; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-md);
  color: rgba(255,255,255,.8); font-family: 'Instrument Sans', sans-serif;
  font-size: .78rem; font-weight: 500; cursor: pointer;
  transition: background var(--t); white-space: nowrap;
}
.btn-notif-dismiss:hover { background: rgba(255,255,255,.22); }

/* ================================================================
   MODAL OVERLAY + DIALOG
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--surface); border-radius: var(--r-xl);
  width: 100%; max-width: 540px; max-height: calc(100vh - 3rem);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--sh-lg), 0 0 0 1px rgba(0,0,0,.06);
  animation: modal-in .25s ease;
}
@keyframes modal-in {
  from { transform: scale(.96) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-ttl-wrap { display: flex; align-items: center; gap: .625rem; }
.modal-ttl-wrap svg { width: 20px; height: 20px; color: var(--accent); }
.modal-ttl-wrap h2 {
  font-family: 'Cabinet Grotesk', sans-serif; font-size: 1.05rem;
  font-weight: 700; color: var(--text);
}
.modal-close {
  width: 32px; height: 32px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all var(--t);
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-close svg { width: 11px; height: 11px; }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-desc { font-size: .875rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.6; }
.pref-section { margin-bottom: 1.5rem; }
.pref-section-title {
  font-family: 'Cabinet Grotesk', sans-serif; font-size: .875rem;
  font-weight: 700; color: var(--text); margin-bottom: .3rem;
}
.pref-hint { font-size: .74rem; color: var(--muted); margin-bottom: .75rem; line-height: 1.5; }
.pref-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.pref-chip {
  height: 32px; padding: 0 .875rem; border-radius: 100px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text2); font-family: 'Instrument Sans', sans-serif;
  font-size: .8rem; font-weight: 500; cursor: pointer;
  transition: all var(--t); user-select: none;
}
.pref-chip:hover { background: var(--surface2); border-color: var(--border2); }
.pref-chip.pref-chip-active {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
.pref-note {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .875rem 1rem; background: var(--accent-lt);
  border: 1px solid var(--accent-bd); border-radius: var(--r-md);
  font-size: .775rem; color: #1e40af; line-height: 1.55; margin-top: .25rem;
}
.pref-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: .1rem; }
.modal-footer {
  display: flex; align-items: center; padding: 1rem 1.5rem;
  border-top: 1px solid var(--border); flex-shrink: 0; gap: .75rem;
}
.modal-footer-right { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.btn-modal-cancel {
  height: 38px; padding: 0 1rem; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  color: var(--text2); font-family: 'Instrument Sans', sans-serif;
  font-size: .82rem; font-weight: 600; cursor: pointer; transition: all var(--t);
}
.btn-modal-cancel:hover { background: var(--surface2); border-color: var(--border2); }
.btn-notif-enable {
  height: 38px; padding: 0 1.25rem; background: var(--accent);
  border: 1.5px solid var(--accent); border-radius: var(--r-md); color: #fff;
  font-family: 'Instrument Sans', sans-serif; font-size: .82rem; font-weight: 700;
  cursor: pointer; transition: background var(--t);
  display: inline-flex; align-items: center; gap: .4rem;
}
.btn-notif-enable:hover { background: #1d4ed8; }
.btn-notif-enable svg { width: 14px; height: 14px; }
.btn-notif-disable-modal {
  height: 38px; padding: 0 1rem; background: var(--red-lt);
  border: 1.5px solid #fca5a5; border-radius: var(--r-md); color: var(--red);
  font-family: 'Instrument Sans', sans-serif; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all var(--t);
}
.btn-notif-disable-modal:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ================================================================
   NOTIFICATION INBOX MODAL
   ================================================================ */
.modal-inbox { max-width: 560px; }
.inbox-modal-body { padding: 0; overflow-y: auto; flex: 1; }
.inbox-header-actions { display: flex; align-items: center; gap: .5rem; }
.btn-inbox-clear {
  height: 28px; padding: 0 .75rem; background: none;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  color: var(--muted); font-family: 'Instrument Sans', sans-serif;
  font-size: .73rem; font-weight: 600; cursor: pointer;
  transition: all var(--t); display: inline-flex; align-items: center; white-space: nowrap;
}
.btn-inbox-clear:hover { border-color: var(--red); color: var(--red); background: var(--red-lt); }
.inbox-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 3.5rem 2rem; gap: .875rem;
  text-align: center; color: var(--muted);
}
.inbox-empty svg { width: 48px; height: 48px; }
.inbox-empty p { font-size: .95rem; font-weight: 600; color: var(--text2); }
.inbox-empty span { font-size: .8rem; line-height: 1.6; max-width: 320px; }
.inbox-list { display: flex; flex-direction: column; }
.inbox-item {
  display: flex; align-items: flex-start; gap: .875rem;
  padding: .875rem 1.5rem; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: background var(--t); position: relative;
}
.inbox-item:last-child { border-bottom: none; }
.inbox-item:hover { background: var(--surface2); }
.inbox-item-unread { background: #fafbff; }
.inbox-item-unread::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.inbox-logo {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800;
  font-size: 1.05rem; flex-shrink: 0; border: 1px solid rgba(0,0,0,.07);
}
.inbox-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.inbox-title {
  font-family: 'Cabinet Grotesk', sans-serif; font-size: .925rem;
  font-weight: 700; color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.inbox-item-unread .inbox-title { color: var(--accent); }
.inbox-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.inbox-meta .c-badge { height: 19px; padding: 0 6px; font-size: .6rem; }
.inbox-company { font-size: .75rem; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-desc { font-size: .73rem; color: var(--muted); line-height: 1.5; }
.inbox-right { display: flex; flex-direction: column; align-items: flex-end; gap: .375rem; flex-shrink: 0; padding-top: 2px; }
.inbox-time { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.inbox-arrow { width: 14px; height: 14px; color: var(--muted); opacity: 0; transition: opacity var(--t), transform var(--t); }
.inbox-item:hover .inbox-arrow { opacity: 1; transform: translateX(2px); }

@media (max-width: 600px) {
  .notif-banner { flex-direction: column; align-items: flex-start; gap: .75rem; bottom: .75rem; padding: 1rem; }
  .notif-banner-btns { width: 100%; }
  .btn-notif-setup, .btn-notif-dismiss { flex: 1; text-align: center; justify-content: center; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer-right { width: 100%; justify-content: flex-end; }
  .inbox-item { padding: .75rem 1rem; gap: .625rem; }
  .inbox-logo { width: 34px; height: 34px; font-size: .9rem; }
  .inbox-title { font-size: .85rem; }
}

/* ── Fallback banner (no local listings) ──────────────────────── */
.fallback-banner {
  display: flex; align-items: center; gap: .625rem;
  margin: .75rem 1.5rem 0; padding: .75rem 1rem;
  background: var(--accent-lt); border: 1px solid var(--accent-bd);
  border-radius: var(--r-md); font-size: .8rem; color: #1e40af; line-height: 1.5;
}
.fallback-banner svg { flex-shrink: 0; }
.fallback-banner span { flex: 1; }
.fallback-banner button {
  flex-shrink: 0; height: 28px; padding: 0 .75rem;
  background: var(--accent); border: none; border-radius: var(--r-sm);
  color: #fff; font-family: 'Instrument Sans', sans-serif;
  font-size: .75rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.fallback-banner button:hover { background: #1d4ed8; }
@media (max-width: 600px) {
  .fallback-banner { margin: .5rem 1rem 0; flex-wrap: wrap; }
  .fallback-banner button { width: 100%; text-align: center; }
}

/* ── Google search CTA (bottom of job results) ───────────────────── */
.google-cta-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: .625rem; padding: 2rem 1rem 1.5rem; margin-top: 1rem;
  border-top: 1px solid var(--border);
}
.google-cta {
  display: inline-flex; align-items: center; gap: .75rem;
  padding: .9rem 1.75rem; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 100px;
  color: var(--text); text-decoration: none;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: .95rem; font-weight: 700;
  box-shadow: var(--sh-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t);
  max-width: 100%;
}
.google-cta:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--accent-lt);
  box-shadow: var(--sh-md);
}
.google-cta span {
  flex: 1; min-width: 0; max-width: 36ch;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.google-cta-arrow { color: var(--accent); flex-shrink: 0; }
.google-cta-hint {
  font-size: .75rem; color: var(--muted); text-align: center;
  margin: 0; max-width: 30rem;
}
@media (max-width: 600px) {
  .google-cta-wrap { padding: 1.5rem 1rem 1rem; }
  .google-cta { padding: .8rem 1.25rem; font-size: .85rem; width: 100%; justify-content: center; }
  .google-cta span { max-width: none; }
}
