/* ============================================================
   CSS VARIABLES - Light Mode
   ============================================================ */
:root {
  --surface-white: #ffffff;
  --surface-modal: #ffffff;
  --surface-menu-bar: #f8f9fb;
  --surface-gray-1: #f4f5f7;
  --surface-gray-2: #eceef0;
  --surface-gray-3: #e2e4e8;
  --surface-selected: #ffffff;
  --surface-page-bg: #f5f5f5;
  --ink-gray-3: #b4b8bf;
  --ink-gray-4: #9ca0a6;
  --ink-gray-5: #74787e;
  --ink-gray-6: #60646a;
  --ink-gray-7: #4c5056;
  --ink-gray-8: #333538;
  --ink-gray-9: #1a1c1e;
  --ink-blue-4: #2490ef;
  --outline-gray-1: #e8eaed;
  --outline-gray-2: #dfe1e4;
  --outline-gray-3: #c8cacf;
  --sidebar-width: 220px;
}

/* ============================================================
   DARK MODE
   ============================================================ */
.dark {
  --surface-white: #1a1c1e;
  --surface-modal: #222426;
  --surface-menu-bar: #141517;
  --surface-gray-1: #222426;
  --surface-gray-2: #2a2c2e;
  --surface-gray-3: #333538;
  --surface-selected: #2a2c2e;
  --surface-page-bg: #141517;
  --ink-gray-3: #60646a;
  --ink-gray-4: #74787e;
  --ink-gray-5: #9ca0a6;
  --ink-gray-6: #b4b8bf;
  --ink-gray-7: #c8cacf;
  --ink-gray-8: #e2e4e8;
  --ink-gray-9: #f4f5f7;
  --ink-blue-4: #4dabf7;
  --outline-gray-1: #333538;
  --outline-gray-2: #3a3c3e;
  --outline-gray-3: #4c5056;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background-color: var(--surface-page-bg);
  color: var(--ink-gray-8);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  transition: background-color 0.2s, color 0.2s;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-gray-3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-gray-5); }

/* ============================================================
   APP ROOT LAYOUT
   ============================================================ */
.app-root {
  display: flex;
  height: 100vh;
  overflow: hidden;
  direction: rtl;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface-menu-bar);
  border-inline-end: 1px solid var(--outline-gray-1);
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
}

.app-sidebar.collapsed {
  width: 56px;
  min-width: 56px;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 8px 4px 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink-gray-7);
  transition: background 0.15s;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: var(--surface-gray-2); }

/* Sidebar Nav */
.sidebar-nav {
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-gray-7);
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
}
.sidebar-link:hover { background: var(--surface-gray-2); }
.sidebar-link.active {
  background: var(--surface-selected);
  color: var(--ink-gray-8);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.sidebar-link svg,
.sidebar-link .icon { flex-shrink: 0; }

.app-sidebar.collapsed .sidebar-link {
  justify-content: center;
  gap: 0;
  padding: 6px;
}
.app-sidebar.collapsed .sidebar-link-text { display: none; }
.app-sidebar.collapsed .sidebar-section-header { display: none; }
.app-sidebar.collapsed .sidebar-services { display: none; }

/* Sidebar Categories */
.sidebar-categories-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 24px;
}

.sidebar-section-header {
  padding: 6px 16px;
  font-size: 13px;
  color: var(--ink-gray-5);
  flex-shrink: 0;
}

.sidebar-categories-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-category-link {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-gray-7);
  transition: background 0.15s;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-category-link:hover { background: var(--surface-gray-2); }
.sidebar-category-link.active { background: var(--surface-selected); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.sidebar-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 20px;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar-category-name {
  margin-inline-start: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar shimmer rows */
.sidebar-shimmer-row {
  height: 28px;
  border-radius: 6px;
  margin-bottom: 2px;
}

/* Sidebar bottom services */
.sidebar-services {
  border-top: 1px solid var(--outline-gray-1);
  padding: 8px;
  flex-shrink: 0;
}

.sidebar-service-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-gray-7);
  transition: background 0.15s;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-align: start;
}
.sidebar-service-link:hover { background: var(--surface-gray-2); }
.sidebar-service-link.active { background: var(--surface-selected); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* ============================================================
   CONTENT COLUMN
   ============================================================ */
.content-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--surface-white);
  border-bottom: 1px solid var(--outline-gray-2);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.app-logo-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-gray-9);
}
.app-logo-tagline {
  font-size: 12px;
  font-weight: 500;
  color: #3b82f6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--outline-gray-2);
  background: var(--surface-gray-1);
  font-size: 14px;
  color: var(--ink-gray-4);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.search-trigger-btn:hover {
  border-color: var(--outline-gray-3);
  background: var(--surface-gray-2);
  color: var(--ink-gray-6);
}
.search-trigger-btn kbd {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid var(--outline-gray-2);
  background: var(--surface-white);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-gray-4);
  font-family: inherit;
}

.dark-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--ink-gray-5);
  transition: background 0.15s, color 0.15s;
}
.dark-mode-btn:hover { background: var(--surface-gray-2); color: var(--ink-gray-7); }

/* ============================================================
   MAIN SCROLL CONTAINER
   ============================================================ */
#scrollContainer {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ============================================================
   BODY CONTAINER (content width limit)
   ============================================================ */
.body-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 12px;
  padding-bottom: 160px;
}

/* ============================================================
   PAGE HEADER (title + layout toggle)
   ============================================================ */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 12px;
}

.page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-gray-8);
}

.layout-toggle {
  display: flex;
  align-items: center;
  background: var(--surface-gray-2);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.layout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border-radius: 6px;
  color: var(--ink-gray-5);
  transition: background 0.15s, color 0.15s;
}
.layout-btn:hover { color: var(--ink-gray-7); }
.layout-btn.active {
  background: var(--surface-white);
  color: var(--ink-gray-9);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* ============================================================
   STICKY HEADER (tabs + compact title)
   ============================================================ */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-page-bg);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs-outer {
  position: relative;
  margin: 0 -12px;
  padding: 0 12px;
}

.tabs-container {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--outline-gray-1);
  gap: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
}
.tabs-container::-webkit-scrollbar { display: none; }

.tab-btn {
  position: relative;
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-gray-5);
  white-space: nowrap;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}
.tab-btn:hover { color: var(--ink-gray-7); }
.tab-btn.active { color: var(--ink-gray-9); }

.tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--ink-gray-9);
  border-radius: 2px 2px 0 0;
  transition: left 0.3s ease, width 0.3s ease;
  pointer-events: none;
}

/* Scroll arrows for tabs */
.tab-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-white);
  color: var(--ink-gray-6);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: color 0.15s;
  border: none;
  cursor: pointer;
}
.tab-arrow:hover { color: var(--ink-gray-9); }
.tab-arrow-start { right: 12px; }
.tab-arrow-end { left: 12px; }

.tabs-fade-start {
  position: absolute;
  top: 0; bottom: 0; right: 12px;
  width: 48px;
  background: linear-gradient(to left, var(--surface-page-bg), transparent);
  pointer-events: none;
  z-index: 10;
}
.tabs-fade-end {
  position: absolute;
  top: 0; bottom: 0; left: 12px;
  width: 48px;
  background: linear-gradient(to right, var(--surface-page-bg), transparent);
  pointer-events: none;
  z-index: 10;
}

/* ============================================================
   JOB LIST
   ============================================================ */
.jobs-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-gray-6);
  padding: 12px 12px 8px;
}

.jobs-list {
  display: flex;
  flex-direction: column;
  margin: 0 -12px;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 8px 0;
}

/* ============================================================
   JOB ROW (list layout)
   ============================================================ */
.job-row {
  position: relative;
  display: block;
  transition: background 0.15s;
  border-radius: 10px;
}
.job-row:hover { background: var(--surface-gray-2); }
.job-row.pinned { background: #eff6ff; }
.dark .job-row.pinned { background: rgba(30, 58, 138, 0.2); }
.job-row.pinned:hover { background: #dbeafe; }
.dark .job-row.pinned:hover { background: rgba(30, 58, 138, 0.3); }

.job-row-inner {
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 12px;
  gap: 0;
  text-decoration: none;
  color: inherit;
}

.job-row-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-gray-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.job-row-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-row-content {
  flex: 1;
  min-width: 0;
  margin-inline-start: 16px;
  margin-inline-end: 16px;
}

.job-row-title {
  font-size: 15px;
  color: var(--ink-gray-8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.job-row-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-size: 13px;
  color: var(--ink-gray-5);
}

.job-row-actions {
  margin-inline-start: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.job-row-time {
  font-size: 13px;
  color: var(--ink-gray-5);
  white-space: nowrap;
}

.job-row-separator {
  margin: 0 12px;
  height: 1px;
  background: var(--outline-gray-1);
  transition: opacity 0.15s;
}
.job-row:hover + .job-row-separator,
.job-row:hover .job-row-separator { opacity: 0; }

/* ============================================================
   JOB CARD (card layout)
   ============================================================ */
.job-card {
  background: var(--surface-white);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s;
  display: block;
}
.job-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.job-card.pinned { ring: 1px solid #bfdbfe; }

.job-card-inner {
  display: block;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}

.job-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.job-card-logo {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-gray-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.job-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-card-info {
  flex: 1;
  min-width: 0;
}

.job-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-gray-8);
  line-height: 1.3;
}

.job-card-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-size: 13px;
  color: var(--ink-gray-5);
}

.job-card-bookmark {
  flex-shrink: 0;
  margin-top: 2px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--ink-gray-4);
  transition: background 0.15s, color 0.15s;
}
.job-card-bookmark:hover { background: var(--surface-gray-2); color: var(--ink-gray-7); }

.job-card-excerpt {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-gray-6);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card-bottom {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.job-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-card-time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-gray-4);
  white-space: nowrap;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}
.badge-available {
  background: #f0fdf4;
  color: #15803d;
}
.dark .badge-available {
  background: rgba(22, 101, 52, 0.2);
  color: #4ade80;
}
.badge-expired {
  background: #fef2f2;
  color: #b91c1c;
}
.dark .badge-expired {
  background: rgba(127, 29, 29, 0.2);
  color: #f87171;
}

.job-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--outline-gray-2);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-gray-6);
}

/* ============================================================
   BOOKMARK BUTTON
   ============================================================ */
.bookmark-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--ink-gray-4);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.bookmark-btn:hover { background: var(--surface-gray-3); color: var(--ink-gray-7); }
.bookmark-btn.saved { color: #2563eb; }
.bookmark-btn.saved svg { fill: currentColor; }

/* ============================================================
   LOAD MORE / INFINITE SCROLL
   ============================================================ */
.load-more-trigger {
  height: 40px;
}

.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 8px;
  color: var(--ink-gray-5);
  font-size: 14px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--outline-gray-2);
  border-top-color: var(--ink-gray-5);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   SHIMMER LOADING
   ============================================================ */
.shimmer {
  background: linear-gradient(90deg,
    var(--surface-gray-2) 25%,
    var(--surface-gray-3) 50%,
    var(--surface-gray-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   SEARCH PALETTE
   ============================================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.search-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.search-palette {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) scale(0.97);
  width: min(600px, calc(100vw - 32px));
  background: var(--surface-modal);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  z-index: 1001;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.search-palette.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--outline-gray-1);
}
.search-input-icon { color: var(--ink-gray-4); flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--ink-gray-9);
  outline: none;
  font-family: inherit;
  direction: rtl;
}
.search-input::placeholder { color: var(--ink-gray-4); }
.search-close-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--outline-gray-2);
  font-size: 12px;
  color: var(--ink-gray-5);
  flex-shrink: 0;
  transition: background 0.15s;
}
.search-close-btn:hover { background: var(--surface-gray-2); }

.search-results {
  max-height: 480px;
  overflow-y: auto;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--ink-gray-5);
  font-size: 14px;
  gap: 8px;
}

/* ============================================================
   SINGLE JOB PAGE
   ============================================================ */
.job-detail-back {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-page-bg);
  padding-top: 16px;
  padding-bottom: 8px;
}

.job-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 12px;
}
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  color: var(--ink-gray-5);
  transition: background 0.15s, color 0.15s;
}
.back-btn:hover { background: var(--surface-gray-2); color: var(--ink-gray-7); }
.breadcrumb-link { color: var(--ink-gray-5); }
.breadcrumb-link:hover { color: var(--ink-gray-7); }
.breadcrumb-current { font-weight: 500; color: var(--ink-gray-8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.job-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 8px;
}
.job-detail-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-gray-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.job-detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.job-detail-title {
  flex: 1;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-gray-8);
  line-height: 1.3;
}

.job-detail-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.badge-available-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  font-size: 14px;
  font-weight: 500;
  color: #15803d;
}
.dark .badge-available-lg {
  border-color: #166534;
  background: rgba(22, 101, 52, 0.2);
  color: #4ade80;
}

.badge-expired-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  font-size: 14px;
  font-weight: 500;
  color: #b91c1c;
}
.dark .badge-expired-lg {
  border-color: #7f1d1d;
  background: rgba(127, 29, 29, 0.2);
  color: #f87171;
}

.badge-expiry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fef3c7;
  font-size: 14px;
  font-weight: 500;
  color: #92400e;
}
.dark .badge-expiry {
  background: rgba(120, 53, 15, 0.2);
  color: #fcd34d;
}

.job-detail-info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-gray-6);
}
.job-detail-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.job-detail-content-card {
  margin-top: 16px;
  border-radius: 12px;
  background: var(--surface-white);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Prose styles for job content */
.job-content {
  font-size: 14px;
  color: var(--ink-gray-8);
  line-height: 1.7;
}
.job-content p { margin-bottom: 12px; }
.job-content h1, .job-content h2, .job-content h3 {
  font-weight: 600;
  color: var(--ink-gray-9);
  margin-bottom: 8px;
  margin-top: 16px;
}
.job-content h2 { font-size: 18px; }
.job-content h3 { font-size: 16px; }
.job-content ul, .job-content ol {
  margin-bottom: 12px;
  padding-inline-start: 20px;
}
.job-content li { margin-bottom: 4px; }
.job-content a {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #7c3aed;
  color: white;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.job-content a:hover { background: #6d28d9; }
.job-content img { border-radius: 8px; max-width: 100%; }

.apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 24px;
  border-radius: 12px;
  background: #16a34a;
  color: white;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.apply-btn:hover { background: #15803d; }
.apply-btn:active { transform: scale(0.98); }

.job-code {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  font-size: 13px;
  color: var(--ink-gray-5);
}
.job-code span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden { display: none !important; }
.text-muted { color: var(--ink-gray-5); }
.separator-dot { color: var(--ink-gray-3); }

/* ============================================================
   EMPTY / ERROR STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  gap: 16px;
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-gray-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-gray-4);
}
.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-gray-8);
}
.empty-state-desc {
  font-size: 14px;
  color: var(--ink-gray-5);
  max-width: 360px;
}

.btn-primary {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--ink-gray-9);
  color: white;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--outline-gray-2);
  color: var(--ink-gray-7);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s;
  background: none;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--surface-gray-1); }

/* ============================================================
   RESPONSIVE - Mobile
   ============================================================ */
@media (max-width: 768px) {
  .app-logo-tagline { display: none; }
  .search-trigger-btn kbd { display: none; }
  .search-trigger-btn span { display: none; }

  .app-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.25s ease, width 0.2s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  }
  .app-sidebar.mobile-open {
    transform: translateX(0);
  }
  .app-sidebar.collapsed {
    width: 220px;
    min-width: 220px;
  }

  .mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
    display: none;
  }
  .mobile-sidebar-overlay.visible { display: block; }

  .mobile-menu-btn {
    display: flex !important;
  }

  .content-column { width: 100%; }

  .body-container {
    padding: 0 8px;
    padding-bottom: 120px;
  }

  .jobs-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none !important; }
  .mobile-sidebar-overlay { display: none !important; }
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--ink-gray-5);
  transition: background 0.15s;
}
.mobile-menu-btn:hover { background: var(--surface-gray-2); }

/* ============================================================
   404 / Generic Page
   ============================================================ */
.page-content-card {
  background: var(--surface-white);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-top: 32px;
}

/* Saved page */
.saved-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-gray-1);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-gray-6);
  margin-bottom: 16px;
}
