/* ============================================================
   Elinom Jobs Portal — jobs.css
   ============================================================ */

/* ── Iframe embedding ───────────────────────────────────────── */
.is-iframed .navbar,
.is-iframed .sidebar,
.is-iframed .mobile-toggle,
.is-iframed .footer { display: none !important; }
.is-iframed .main-content { margin-left: 0 !important; padding: 0 15px 15px !important; }
.is-iframed .page-container { margin-top: 0 !important; padding-top: 0 !important; }

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --primary:        #2563eb;
  --primary-light:  #3b82f6;
  --primary-dark:   #1d4ed8;
  --secondary:      #6366f1;
  --accent:         #38bdf8;
  --success:        #059669;
  --warning:        #d97706;
  --danger:         #dc2626;
  --info:           #0891b2;

  --nav-h:          102px; /* 34px util-bar + 68px main nav */

  --bg:             #f0f4ff;
  --bg2:            #e8eef8;
  --card:           #ffffff;
  --text:           #0f172a;
  --text-light:     #475569;
  --text-lighter:   #94a3b8;
  --border:         #dde3ee;

  --radius:         14px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  --shadow:    0 1px 4px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 6px 20px rgba(15,23,42,.10);
  --shadow-lg: 0 16px 48px rgba(37,99,235,.14);
  --shadow-xl: 0 28px 64px rgba(37,99,235,.20);

  --gradient-hero:    linear-gradient(135deg, #040c1a 0%, #0a1a3f 25%, #0f2260 45%, #1a3a8c 65%, #1d4ed8 85%, #2355c4 100%);
  --gradient-sidebar: linear-gradient(180deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
  --gradient-card:    linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
  --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --gradient-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --gradient-danger:  linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

/* ── Reset / base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Security bar (legacy / hidden) ────────────────────────── */
.security-bar { display: none; }

/* ── Layout skeleton ────────────────────────────────────────── */
.page-container {
  display: flex;
  min-height: calc(100vh - var(--nav-h));
  position: relative;
}

/* ── Sidebar (off-canvas, collapsed by default) ───────────── */
.sidebar {
  width: 268px;
  min-width: 268px;
  background: var(--gradient-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  border-right: 1px solid rgba(255,255,255,.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
  box-shadow: 4px 0 24px rgba(0,0,0,.18);
}
.sidebar.open { transform: translateX(0); }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* Dim overlay behind open sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 299;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

.sidebar-logo {
  padding: 28px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.15);
}
.sidebar-logo h2 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.sidebar-logo p  { font-size: 11.5px; opacity: .58; margin-top: 4px; font-weight: 500; }

.sidebar-section { padding: 8px 0 4px; }
.sidebar-section-title {
  padding: 8px 22px 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  opacity: .45;
  color: #93c5fd;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  cursor: pointer;
  border-radius: 0;
  transition: all .2s;
  font-size: 13.5px;
  font-weight: 500;
  opacity: .82;
  border: none;
  background: none;
  color: rgba(255,255,255,.9);
  width: 100%;
  text-align: left;
}
.sidebar-item:hover {
  background: rgba(255,255,255,.10);
  opacity: 1;
  padding-left: 26px;
  color: #fff;
}
.sidebar-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,.35) 0%, rgba(99,102,241,.18) 100%);
  opacity: 1;
  border-left: 3px solid #60a5fa;
  color: #fff;
  font-weight: 600;
}
.sidebar-item .icon { font-size: 15px; width: 20px; text-align: center; opacity: .9; }
.sidebar-badge {
  margin-left: auto;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.12);
}

/* ── Main content ───────────────────────────────────────────── */
.main-content { flex: 1; overflow-x: hidden; }

/* ── Hero banner ────────────────────────────────────────────── */
.jobs-hero {
  background: var(--gradient-hero);
  color: #fff;
  padding: 72px 48px 60px;
  margin-top: 6px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Animated mesh overlay */
.jobs-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 110%, rgba(99,102,241,.22), transparent),
    radial-gradient(ellipse 60% 50% at 80% -10%, rgba(37,99,235,.18), transparent),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='40' cy='40' r='5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.jobs-hero::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 56px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
  pointer-events: none;
}
.jobs-hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: 14px;
  position: relative;
  letter-spacing: -.5px;
  line-height: 1.15;
}
.jobs-hero h1 span {
  background: linear-gradient(90deg, #93c5fd, #a5b4fc, #f0abfc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.jobs-hero p {
  font-size: 1.05rem;
  opacity: .82;
  max-width: 560px;
  margin: 0 auto 36px;
  position: relative;
  font-weight: 400;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
  position: relative;
}
.hero-stat {
  text-align: center;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 16px 28px;
  min-width: 110px;
  transition: transform .2s, background .2s;
}
.hero-stat:hover { transform: translateY(-3px); background: rgba(255,255,255,.16); }
.hero-stat strong { font-size: 2.1rem; font-weight: 900; display: block; line-height: 1; }
.hero-stat span   { font-size: 11px; opacity: .72; text-transform: uppercase; letter-spacing: .9px; margin-top: 4px; display: block; font-weight: 600; }

/* ── Search bar ─────────────────────────────────────────────── */
.search-bar-wrap {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(15,23,42,.18), 0 4px 16px rgba(37,99,235,.12);
  padding: 28px 30px 24px;
  max-width: 980px;
  margin: -48px auto 0;
  position: relative;
  z-index: 10;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  border: 3px solid #2563eb;
}
.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
}
.search-row:first-child {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(37,99,235,.08);
  margin-bottom: 2px;
}
.search-bar-wrap input, .search-bar-wrap select {
  border: 2px solid rgba(37,99,235,.35);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14.5px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color .25s, box-shadow .25s, background .25s;
  font-family: inherit;
  box-shadow: 0 0 0 3px rgba(37,99,235,.06);
}
.search-bar-wrap input:focus, .search-bar-wrap select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}
.search-bar-wrap .search-input {
  flex: 1 1 280px;
  padding-left: 44px;
  font-size: 15px;
  font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='5.5'/%3E%3Cline x1='12.5' y1='12.5' x2='16.5' y2='16.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 18px;
}
.search-bar-wrap .search-input::placeholder {
  color: var(--text-lighter);
  font-weight: 400;
}
.search-bar-wrap select {
  flex: 0 1 160px;
  min-width: 140px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) center;
  padding-right: 34px;
}
.btn-search {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #6366f1 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 36px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(37,99,235,.4);
  letter-spacing: .3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-search:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37,99,235,.5); }
.btn-search:active { transform: translateY(0); }

/* ── Content wrapper ────────────────────────────────────────── */
.content-wrap { padding: 36px 36px 28px; max-width: 1240px; margin: 0 auto; }

/* ── Section header ─────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 70%;
  background: var(--gradient-card);
  border-radius: 4px;
}
.section-subtitle { font-size: 13px; color: var(--text-light); margin-top: 3px; font-weight: 400; }

/* ── Stats row ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  border: 1.5px solid var(--border);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #93c5fd;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,.25);
}
.stat-icon.blue   { background: linear-gradient(135deg,#2563eb,#3b82f6); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.stat-icon.green  { background: linear-gradient(135deg,#059669,#10b981); box-shadow: 0 4px 12px rgba(5,150,105,.3); }
.stat-icon.orange { background: linear-gradient(135deg,#d97706,#f59e0b); box-shadow: 0 4px 12px rgba(217,119,6,.3); }
.stat-icon.purple { background: linear-gradient(135deg,#6366f1,#8b5cf6); box-shadow: 0 4px 12px rgba(99,102,241,.3); }
.stat-icon.red    { background: linear-gradient(135deg,#dc2626,#ef4444); box-shadow: 0 4px 12px rgba(220,38,38,.3); }
.stat-icon.teal   { background: linear-gradient(135deg,#0891b2,#06b6d4); box-shadow: 0 4px 12px rgba(8,145,178,.3); }
.stat-value { font-size: 1.65rem; font-weight: 900; line-height: 1; color: var(--text); }
.stat-label { font-size: 11.5px; color: var(--text-light); margin-top: 4px; font-weight: 600; letter-spacing: .1px; }

/* ── Filter chips ───────────────────────────────────────────── */
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.chip {
  padding: 7px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  background: var(--card);
  color: var(--text-light);
  transition: all .2s;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .1px;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(37,99,235,.05); }
.chip.active {
  background: var(--gradient-card);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(37,99,235,.3);
}
.chip .count { opacity: .75; font-size: 11px; margin-left: 5px; }

/* ── Job cards grid ─────────────────────────────────────────── */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}
.job-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  overflow: hidden;
}
.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #93c5fd;
}
.job-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.job-card.priority-urgent::before { background: var(--gradient-danger); }
.job-card.priority-high::before   { background: var(--gradient-warning); }
.job-card.priority-medium::before { background: var(--gradient-card); }
.job-card.priority-low::before    { background: var(--gradient-success); }

.job-card-header { display: flex; align-items: flex-start; gap: 14px; }
.company-logo {
  width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, #e0eaff, #f0f4ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800; color: var(--primary);
  border: 1.5px solid rgba(37,99,235,.12);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(37,99,235,.12);
}
.company-logo img { width: 100%; height: 100%; object-fit: cover; }
.job-title { font-size: 15.5px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 2px; }
.job-company { font-size: 13px; color: var(--text-light); font-weight: 500; }

.job-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.tag-type     { background: #eff6ff; color: #1d4ed8; }
.tag-mode     { background: #f0fdf4; color: #059669; }
.tag-level    { background: #f5f3ff; color: #4f46e5; }
.tag-urgent   { background: #fef2f2; color: #dc2626; }
.tag-category { background: #f0f9ff; color: #0369a1; }

.job-location { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light); font-weight: 500; }
.job-salary   { font-size: 14.5px; font-weight: 800; color: #059669; }

.job-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-lighter);
}
.apply-btn {
  background: var(--gradient-card);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 3px 10px rgba(37,99,235,.28);
  letter-spacing: .15px;
}
.apply-btn:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 5px 16px rgba(37,99,235,.38); }
.view-btn {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid #93c5fd;
  border-radius: var(--radius);
  padding: 8px 17px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.view-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Category cards ─────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px 16px 18px;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: all .28s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #93c5fd;
}
.category-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12), var(--shadow-md);
  background: linear-gradient(135deg, #eff6ff, #f0f4ff);
}
.category-card .cat-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.12));
}
.category-card .cat-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.category-card .cat-count { font-size: 12px; color: var(--text-light); margin-top: 4px; font-weight: 500; }
.cat-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Pipeline kanban ────────────────────────────────────────── */
.pipeline-wrap {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.pipeline-col {
  min-width: 220px;
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 14px;
  flex: 0 0 220px;
}
.pipeline-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.pipeline-col-title { font-size: 13px; font-weight: 700; color: var(--text); }
.pipeline-count {
  background: var(--card);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
}
.pipeline-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow .2s;
}
.pipeline-card:hover { box-shadow: var(--shadow-md); }
.pipeline-card .pc-name  { font-size: 13px; font-weight: 600; color: var(--text); }
.pipeline-card .pc-role  { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.pipeline-card .pc-stars { color: #f59e0b; font-size: 11px; margin-top: 4px; }

/* ── Table view ─────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1.5px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: linear-gradient(135deg, #f0f4ff, #e8eef8);
  padding: 11px 16px;
  text-align: left;
  font-weight: 800;
  color: var(--text-light);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .7px;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #f5f8ff; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .2px;
}
.badge-open      { background: #dcfce7; color: #15803d; }
.badge-closed    { background: #f1f5f9; color: #475569; }
.badge-draft     { background: #fef3c7; color: #b45309; }
.badge-filled    { background: #dbeafe; color: #1d4ed8; }
.badge-on_hold   { background: #ede9fe; color: #5b21b6; }
.badge-urgent    { background: #fee2e2; color: #b91c1c; }
.badge-applied   { background: #e0f2fe; color: #0369a1; }
.badge-screening { background: #fef3c7; color: #b45309; }
.badge-interview_1,.badge-interview_2 { background: #dbeafe; color: #1d4ed8; }
.badge-offer     { background: #ede9fe; color: #5b21b6; }
.badge-hired     { background: #dcfce7; color: #15803d; }
.badge-rejected  { background: #fee2e2; color: #b91c1c; }
.badge-withdrawn { background: #f1f5f9; color: #475569; }

/* ── Star rating ────────────────────────────────────────────── */
.stars { color: #f59e0b; }
.stars span { color: var(--border); }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.3), 0 0 0 1px rgba(99,102,241,.08);
  animation: slideUp .28s cubic-bezier(.34,1.56,.64,1);
}
.modal-wide { max-width: 920px; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 26px 30px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, #f8faff, #fff);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-title { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.modal-close {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
  color: var(--text-light);
}
.modal-close:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.modal-body { padding: 26px 30px; }
.modal-footer {
  padding: 18px 30px 26px;
  display: flex; gap: 10px; justify-content: flex-end;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  background: #fafbff;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ── Form controls ──────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full  { grid-column: 1 / -1; }
.form-group label { font-size: 11.5px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .6px; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
  background: #fff;
}
.form-group textarea { min-height: 95px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  display: inline-flex; align-items: center; gap: 7px;
  letter-spacing: .1px;
}
.btn-primary {
  background: var(--gradient-card);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.btn-primary:hover {
  opacity: .92;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,.42);
}
.btn-success   { background: linear-gradient(135deg,#059669,#10b981); color: #fff; box-shadow: 0 4px 12px rgba(5,150,105,.3); }
.btn-success:hover { opacity: .9; transform: translateY(-1px); }
.btn-danger    { background: linear-gradient(135deg,#dc2626,#ef4444); color: #fff; box-shadow: 0 4px 12px rgba(220,38,38,.3); }
.btn-danger:hover  { opacity: .9; transform: translateY(-1px); }
.btn-outline   { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-ghost     { background: var(--bg2); color: var(--text-light); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: #e2e8f0; color: var(--text); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 10px; font-size: 14px; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 72px 24px;
  color: var(--text-light);
}
.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 18px;
  opacity: .35;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.12));
}
.empty-state h3 { font-size: 1.2rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.empty-state p   { font-size: 14px; line-height: 1.6; max-width: 360px; margin: 0 auto; }

/* ── Loading skeleton ───────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Toast notifications ────────────────────────────────────── */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toastIn .3s ease;
  max-width: 320px;
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-info    { background: var(--primary); }
@keyframes toastIn { from { opacity:0; transform:translateX(32px); } to { opacity:1; transform:translateX(0); } }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 24px; }
.page-btn {
  min-width: 34px; height: 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  color: var(--text-light);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Tab bar ────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
  display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Job detail panel ───────────────────────────────────────── */
.detail-hero {
  background: var(--gradient-hero);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 28px;
  color: #fff;
  display: flex; align-items: flex-start; gap: 16px;
}
.detail-logo {
  width: 60px; height: 60px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800;
  flex-shrink: 0;
}
.detail-title { font-size: 1.3rem; font-weight: 800; }
.detail-company { opacity: .8; font-size: 14px; margin-top: 3px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.detail-tag {
  background: rgba(255,255,255,.18);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}
.detail-body { padding: 24px 28px; }
.detail-section { margin-bottom: 20px; }
.detail-section h4 { font-size: 13px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.detail-section p, .detail-section ul { font-size: 14px; color: var(--text); line-height: 1.7; }
.detail-section ul { padding-left: 18px; }
.detail-section ul li { margin-bottom: 4px; }
.salary-highlight { font-size: 1.3rem; font-weight: 800; color: var(--success); }

/* ── Skill chips ────────────────────────────────────────────── */
.skill-chip {
  display: inline-block;
  padding: 4px 12px;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin: 3px;
}

/* ── Sidebar toggle button (always visible) ──────────────── */
.sidebar-toggle {
  position: fixed;
  top: calc(var(--nav-h) + 14px);
  left: 16px;
  z-index: 400;
  background: var(--gradient-card);
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 40px; height: 40px;
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(37,99,235,.35);
  transition: all .2s;
}
.sidebar-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(37,99,235,.45); }

/* ── Scroll-to-top ──────────────────────────────────────────── */
#scrollTopBtn {
  display: none;
  position: fixed; bottom: 28px; right: 28px;
  z-index: 900;
  background: var(--gradient-card);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 46px; height: 46px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(37,99,235,.35);
  align-items: center; justify-content: center;
  transition: all .22s;
}
#scrollTopBtn:hover { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(37,99,235,.48); }
#scrollTopBtn.visible { display: flex; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .search-bar-wrap { margin: -28px 16px 0; padding: 20px 18px 18px; }
  .search-row:first-child { padding-bottom: 10px; }
  .content-wrap { padding: 24px 16px 20px; }
  .jobs-hero { padding: 42px 20px 38px; }
  .jobs-hero h1 { font-size: clamp(1.6rem, 5vw, 2rem); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .jobs-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .modal { margin: 0 8px; }
  .modal-body, .modal-header, .modal-footer { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .content-wrap { padding: 16px 12px; }
  .search-bar-wrap { padding: 16px 12px; }
}

/* ── Legacy mobile-toggle (keep hidden, sidebar-toggle handles it now) ─ */
.mobile-toggle { display: none !important; }
