*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f3ef; /* Warm light portal background */
  --surface: rgba(255, 255, 255, 0.7); /* Translucent white glass */
  --surface-solid: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --text: #1e293b; /* Dark slate text */
  --muted: #64748b; /* Medium slate text */
  
  --accent-job: #0284c7; /* Sky blue for job */
  --accent-job-bg: rgba(2, 132, 199, 0.08);
  
  --accent-gig: #059669; /* Mint green for gig */
  --accent-gig-bg: rgba(5, 150, 105, 0.08);
  
  --accent-primary: #4f46e5; /* Royal indigo */
  --accent-primary-hover: #4338ca;
  --glass-bg: rgba(255, 255, 255, 0.6);
}

body {
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, #f5f3ef 100%) no-repeat fixed;
  background-size: cover;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 40px;
}

/* HEADER */
.header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}
.btn-back {
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.btn-back:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: translateX(-2px);
}
.header-title {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-post-ad {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-post-ad:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}
.btn-post-ad:active {
  transform: scale(0.97);
}

/* HERO BANNER */
.hero-banner {
  background: transparent;
  color: var(--text);
  padding: 24px 16px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.hero-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 12px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .hero-banner {
    padding: 16px 12px 8px;
    margin-bottom: 12px;
  }
  .hero-title {
    font-size: 20px;
  }
  .hero-desc {
    font-size: 11px;
    line-height: 1.4;
  }
}

/* CONTAINER */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* TYPE SWITCH TABS */
.type-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 12px;
  margin-bottom: 16px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.tab-btn {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.active[data-type="all"] {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}
.tab-btn.active[data-type="gig"] {
  background: var(--accent-gig);
  color: white;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}
.tab-btn.active[data-type="job"] {
  background: var(--accent-job);
  color: white;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

/* SEARCH & FILTERS */
.search-filters-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}
.search-control {
  grid-column: span 2;
  position: relative;
}
.filter-control {
  grid-column: span 1;
}
@media (min-width: 768px) {
  .search-filters-wrap {
    grid-template-columns: 2fr 1fr 1fr;
    padding: 12px 16px;
    gap: 12px;
  }
  .search-control {
    grid-column: span 1;
  }
  .filter-control {
    grid-column: span 1;
  }
}
.search-control input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
}
.search-control input:focus {
  border-color: var(--accent-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.search-control::before {
  content: "🔍";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  pointer-events: none;
}
.filter-control select {
  width: 100%;
  padding: 8px 28px 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1em;
  transition: all 0.2s ease;
}
.filter-control select:focus {
  border-color: var(--accent-primary);
  background: #ffffff;
}

/* CATEGORY FILTERS CHIPS */
.category-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.category-chips::-webkit-scrollbar {
  display: none;
}
.chip-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  transition: all 0.2s ease;
}
.chip-btn:hover {
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text);
  background: #ffffff;
}
.chip-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* JOBS GRID & CARDS */
.jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .jobs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .jobs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.job-card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}
.job-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  background: #ffffff;
}
.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.job-type-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.job-type-badge.gig {
  background: var(--accent-gig-bg);
  color: var(--accent-gig);
}
.job-type-badge.job {
  background: var(--accent-job-bg);
  color: var(--accent-job);
}
.job-cat-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.job-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.job-compensation {
  font-size: 15px;
  font-weight: 800;
  color: #b45309; /* Dark Amber for readability */
  margin-bottom: 10px;
}
.job-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 12px;
  margin-top: auto;
}
.job-poster {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-loc {
  color: var(--accent-job);
  font-weight: 600;
}

/* FLOATING FOOTER MOBILE */
.floating-footer {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 480px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 900;
}
.floating-footer .btn-post-ad {
  flex: 1;
  justify-content: center;
  padding: 12px;
}

@media (max-width: 768px) {
  .floating-footer {
    display: flex;
  }
  .header .btn-post-ad {
    display: none;
  }
  body {
    padding-bottom: 90px;
  }
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.3s ease;
}
.modal-backdrop.show {
  display: flex;
}
.modal-content {
  background: var(--surface-solid);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  padding: 8px 24px 32px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  animation: slideUp 0.35s cubic-bezier(.32,.72,0,1) both;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-bar {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.08);
  margin: 8px auto 16px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--muted);
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--text);
}
.modal-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text);
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  transition: all 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1.1em;
  cursor: pointer;
}
textarea.form-control {
  resize: vertical;
  min-height: 90px;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row > * {
  flex: 1;
}
.btn-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
  margin-top: 12px;
  transition: all 0.2s ease;
}
.btn-submit:hover {
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}
.btn-cancel {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  text-align: center;
  display: block;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-cancel:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
  }
  .modal-content {
    border-radius: 20px;
    margin: 0 auto;
    max-height: 85vh;
  }
}

/* DETAIL MODAL */
.detail-modal-content {
  max-width: 600px;
}
.detail-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
  margin-top: 8px;
}
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.info-block {
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 12px;
}
.info-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.info-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.detail-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}
.detail-actions {
  display: flex;
  gap: 12px;
}
.btn-wa {
  flex: 1;
  background: #10b981;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
  transition: all 0.2s ease;
}
.btn-wa:hover {
  background: #059669;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}
.btn-share {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  transition: all 0.2s;
}
.btn-share:hover {
  background: rgba(0, 0, 0, 0.08);
}

@media (max-width: 520px) {
  .detail-info-grid {
    grid-template-columns: 1fr;
  }
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  border: 1px solid var(--border);
  margin-top: 20px;
  grid-column: 1 / -1;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-desc {
  font-size: 13px;
  color: var(--muted);
}

/* LOAD MORE */
.btn-load-more {
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-load-more:hover:not(:disabled) {
  background: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}
.btn-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #ffffff;
  color: var(--text);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}
@media (max-width: 768px) {
  .toast {
    bottom: 85px;
  }
}
