/* ================= INFLUENCER JOBS ================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial;
  background: #0d0d0d;
  color: #fff;
}

:root {
  --ci-yellow: #ffc502;
  --ci-dark: #1a1a1a;
  --card-bg: #1f1f1f;
  --card-light: #ffffff;
  --text-muted: #9ca3af;
}

/* ================= LAYOUT ================= */
.influencer-jobs-page {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ================= SIDEBAR (ซ้าย 25%, ย่อ/ขยายได้) ================= */
.dashboard-sidebar {
  width: 25%;
  min-width: 200px;
  max-width: 280px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  background: var(--ci-dark, #1a1a1a);
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
}

.dashboard-sidebar.sidebar-collapsed {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}

.sidebar-top {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-top > .sidebar-toggle {
  align-self: flex-end;
  margin: 12px 12px 8px 0;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding: 12px 12px 24px;
  border-top: 1px solid #333;
  background: var(--ci-dark, #1a1a1a);
  position: sticky;
  bottom: 0;
}

.sidebar-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.sidebar-auth-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.dashboard-sidebar.sidebar-collapsed .sidebar-auth-btn {
  padding: 12px;
  font-size: 0;
  line-height: 0;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-auth-btn::after {
  content: "ออก";
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.dashboard-sidebar.sidebar-collapsed .sidebar-auth-btn.is-login::after {
  content: "เข้า";
}

.sidebar-toggle {
  padding: 8px 10px;
  min-width: 44px;
  min-height: 44px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.sidebar-toggle:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.sidebar-toggle-icon {
  display: block;
  font-size: 12px;
  transition: transform 0.25s ease;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* ================= DASHBOARD TABS (เมนูแนวตั้งใน sidebar) ================= */
.dashboard-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 12px 24px;
}

.dashboard-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  text-align: left;
  width: 100%;
}

.dashboard-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.dashboard-tab.active {
  color: var(--ci-yellow);
  background: rgba(255, 197, 2, 0.15);
}

.dashboard-tab-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-tab-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-tab-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-sidebar.sidebar-collapsed .dashboard-tab-label {
  display: none;
}

.dashboard-sidebar.sidebar-collapsed .dashboard-tab {
  justify-content: center;
  padding: 14px;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-top > .sidebar-toggle {
  align-self: center;
  margin: 12px auto 8px auto;
}

/* แท็บ งานของฉัน + โปรไฟล์ แสดงเฉพาะเมื่อ Login แล้ว */
/* แท็บ งานของฉัน + โปรไฟล์ แสดงเสมอ (เมื่อยังไม่ล็อกอินกดแล้วจะโผล่ popup) */
.dashboard-tab-creator-only {
  display: flex !important;
}

/* ================= MAIN CONTENT (ขวา 75%) ================= */
/* spacer รักษาความกว้างพื้นที่เมื่อ sidebar เป็น fixed บนมือถือ (กัน job-card กระโดด) */
.sidebar-spacer {
  width: 0;
  min-width: 0;
  flex-shrink: 0;
  transition: width 0.25s ease;
}

.dashboard-main {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: #0d0d0d;
  overflow-x: hidden;
  transition: none;
}

/* มือถือ: แรกเป็นแถบแคบ; กด toggle ขยายโผล่บังเนื้อหา ให้อ่านปุ่มและกดได้ */
@media (max-width: 768px) {
  .dashboard-sidebar {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    transition: box-shadow 0.25s ease;
  }
  .dashboard-sidebar .dashboard-tab-label {
    display: none;
  }
  .dashboard-sidebar .dashboard-tab {
    justify-content: center;
    padding: 14px;
  }
  /* ขยายแล้ว = overlay บังงานนิดหน่อย ให้เห็น label และกดได้ */
  .dashboard-sidebar:not(.sidebar-collapsed) {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    min-width: 280px;
    max-width: 85vw;
    z-index: 100;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .dashboard-sidebar:not(.sidebar-collapsed) .dashboard-tab-label {
    display: inline;
  }
  .dashboard-sidebar:not(.sidebar-collapsed) .dashboard-tab {
    justify-content: flex-start;
    padding: 14px 16px;
  }
  .dashboard-sidebar:not(.sidebar-collapsed) .sidebar-auth-btn {
    font-size: 14px;
  }
  .dashboard-sidebar:not(.sidebar-collapsed) .sidebar-auth-btn::after {
    content: none;
  }
  /* รักษาความกว้าง main ตอน sidebar ขยาย (fixed) = ไม่ให้ job-card กระโดด */
  .dashboard-sidebar:not(.sidebar-collapsed) ~ .sidebar-spacer {
    width: 72px;
    min-width: 72px;
  }
}

/* backdrop เมื่อ sidebar ขยายบนมือถือ (คลิกนอกแล้วปิด) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
  .sidebar-backdrop.is-open {
    display: block;
  }
}

/* Popup กรุณาเข้าสู่ระบบ (กด งานของฉัน/โปรไฟล์ โดยยังไม่ล็อกอิน) */
.login-required-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.login-required-box {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 24px;
  background: var(--card-bg, #1f1f1f);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 1px solid #333;
}

.login-required-message {
  margin: 0 0 20px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #e5e7eb;
}

.login-required-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  background: var(--ci-yellow);
  color: #0d0d0d;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  transition: filter 0.2s;
}

.login-required-btn:hover {
  filter: brightness(1.1);
}

.login-required-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.login-required-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* Popup สมัครงานสำเร็จ */
.apply-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.apply-success-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 24px;
  background: var(--card-bg, #1f1f1f);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 1px solid #333;
}

.apply-success-message {
  margin: 0 0 16px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #e5e7eb;
}

.apply-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.apply-success-link {
  display: inline-block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: var(--ci-yellow);
  color: #0d0d0d;
  border-radius: 10px;
  text-decoration: none;
  margin-right: 8px;
  transition: filter 0.2s;
}

.apply-success-link:hover {
  filter: brightness(1.1);
}

.apply-success-close {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.apply-success-close:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Section divider สมัครแล้ว ใน jobs-list */
.jobs-section-divider {
  margin: 20px 0 12px 0;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 1px solid #333;
}

.dashboard-panel {
  min-height: 200px;
}

.dashboard-panel:not(.dashboard-panel-my) {
  padding: 24px 20px 48px;
}

@media (max-width: 768px) {
  .dashboard-panel:not(.dashboard-panel-my) {
    padding: 16px 12px 32px;
  }
}
.my-jobs-auth-msg,
.profile-auth-msg {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--card-bg);
  border-radius: 12px;
}
.my-jobs-auth-msg a,
.profile-auth-msg a {
  color: var(--ci-yellow);
  text-decoration: none;
}

.profile-open-card {
  max-width: 480px;
  padding: 28px 24px;
  background: var(--card-bg);
  border-radius: 16px;
}
.profile-open-desc {
  margin: 0 0 20px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}
.profile-open-btn {
  display: inline-block;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  background: var(--ci-yellow);
  color: #0d0d0d;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.2s;
}
.profile-open-btn:hover {
  filter: brightness(1.1);
}

.profile-iframe {
  display: block;
  width: 100%;
  min-height: calc(100vh - 180px);
  height: 72vh;
  border: 0;
  border-radius: 12px;
  background: #0d0d0d;
}

/* โปรไฟล์ tab: modal box + พื้นหลังเบลอ (สเกลถูกบน Desktop) */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.profile-modal-box {
  width: 100%;
  max-width: 420px;
  height: 85vh;
  max-height: 820px;
  border-radius: 16px;
  overflow: hidden;
  background: #0d0d0d;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.profile-modal-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 16px;
  background: #0d0d0d;
}

#panelProfile .profile-content {
  min-height: 400px;
}

.register-link-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 20px;
  background: var(--ci-yellow);
  color: #0d0d0d;
  font-weight: 700;
  border-radius: 8px;
  transition: filter 0.2s;
}
.register-link-btn:hover {
  filter: brightness(1.1);
}
.open-tab-register-banner {
  padding: 12px 16px;
  margin-bottom: 16px;
  text-align: center;
  background: rgba(255, 197, 2, 0.12);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
}
.open-tab-register-banner a {
  color: var(--ci-yellow);
  font-weight: 600;
  text-decoration: none;
}
.open-tab-register-banner a:hover {
  text-decoration: underline;
}

/* ================= งานของฉัน (padding เหมือน tab งานใหม่) ================= */
.dashboard-panel-my {
  padding: 24px 20px 48px;
}

@media (max-width: 768px) {
  .dashboard-panel-my {
    padding: 16px 12px 32px;
  }
}

.my-jobs-screen {
  /* ไม่มี header แล้ว; padding มาจาก .dashboard-panel-my */
}

/* แถบ 3 แท็บ: ชิดซ้ายในคอม กลางในมือถือ (เหมือน platform filter งานใหม่) */
.my-jobs-tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  max-width: 560px;
  margin: 0 0 20px 0;
  padding: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
  .my-jobs-tab-row {
    margin-left: auto;
    margin-right: auto;
  }
}

.my-jobs-tab-row .my-jobs-tab-btn {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin: 0;
  width: 100%;
}

.my-jobs-tab-row .my-jobs-tab-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.my-jobs-tab-row .my-jobs-tab-btn.active {
  background: var(--ci-yellow);
  color: #0d0d0d;
  box-shadow: 0 2px 8px rgba(255, 197, 2, 0.25);
}

.my-jobs-tab-row .platform-filter-count {
  opacity: 0.85;
  font-weight: 600;
}

.my-jobs-list-wrap {
  padding-bottom: 24px;
  margin: 0;
}

/* 1 แถวต่อแคมเปญ (งานของฉัน) — ขนาด/ระยะเหมือน .jobs-list ใน tab งานใหม่ */
.my-jobs-list-wrap .jobs-list.my-jobs-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.my-jobs-list-wrap .jobs-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

.my-jobs-section {
  margin-bottom: 28px;
}
.my-jobs-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
}
.my-job-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card-bg);
  border-radius: 10px;
  margin-bottom: 8px;
}
.my-job-item .name { font-weight: 600; color: #fff; }
.my-job-item .meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.my-job-item .status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.my-job-item .status.active { background: rgba(34,197,94,0.2); color: #22c55e; }
.my-job-item .status.review { background: rgba(234,179,8,0.2); color: #eab308; }
.my-job-item .status.completed { background: rgba(96,165,250,0.2); color: #60a5fa; }
.my-job-item .status.pending { background: rgba(156,163,175,0.2); color: #9ca3af; }
.profile-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
}
.profile-form button[type="submit"] {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  background: var(--ci-yellow);
  color: #0d0d0d;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
}

/* ================= HEADER ================= */
.jobs-header {
  margin-bottom: 24px;
}

.jobs-header h1 {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 4px 0;
}

.jobs-header .subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.jobs-result-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ================= PLATFORM FILTER (งานใหม่) ================= */
.platform-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0px 0 20px 0;
  align-items: center;
}

.platform-filter-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.platform-filter-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

.platform-filter-btn.active {
  background: var(--ci-yellow);
  border-color: var(--ci-yellow);
  color: #111;
}

.platform-filter-btn .platform-filter-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
}

/* มือถือ: แสดงแค่ไอคอนกับตัวเลข (n) */
@media (max-width: 768px) {
  .platform-filter-btn .platform-filter-label {
    display: none;
  }
  .platform-filter-btn .platform-filter-icon {
    margin-right: 4px;
  }
  .platform-filter-btn:not(:has(.platform-filter-icon)) .platform-filter-label {
    display: inline;
  }
}

.platform-filter-count {
  opacity: 0.9;
  font-weight: 500;
}

/* ================= CARD LIST ================= */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

.job-card {
  display: grid;
  grid-template-columns: 3fr 1fr;
  min-height: 140px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-light);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  align-items: stretch;
}

@media (max-width: 640px) {
  .job-card {
    grid-template-columns: 1fr 2fr;
  }
}

/* ================= CARD LEFT (Image) ================= */
/* ความสูงแปรตาม job-card-right (grid row เท่ากับฝั่งขวา) */
.job-card-left {
  position: relative;
  min-height: 120px;
  background: var(--card-dark, #111);
}

.job-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-card-img-wrap {
  position: absolute;
  inset: 0;
  background: #252525;
}

.job-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent 70%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.job-card-brand-logo {
  height: 30px;
  display: flex;
  align-items: center;
}

.job-card-brand-logo img {
  height: 30px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
}

.job-card-budget-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--ci-yellow);
  color: #111;
  font-size: 12px;
  font-weight: 800;
  border-radius: 6px;
}

.job-card-acquisition {
  display: none;
  font-size: 11px;
  color: #e5e7eb;
}

/* ================= CARD RIGHT (Info) ================= */
.job-card-right {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

@media (min-width: 641px) {
  .job-card-right {
    justify-content: flex-start;
    padding: 25px;
  }
}

.job-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #111;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card-brand {
  font-size: 11px;
  color: #6b7280;
  margin: 0;
}

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

.job-card-social-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
}

.job-card-meta span {
  white-space: nowrap;
}

.job-card-brief {
  font-size: 11px;
  color: #6b7280;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}

.btn-view-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: var(--ci-yellow);
  color: #111;
  font-size: 12px;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: .15s;
  align-self: flex-start;
  text-decoration: none;
  flex-shrink: 0;
}

.btn-view-more:hover {
  filter: brightness(1.1);
}
.job-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 30px;
}

@media (max-width: 768px) {
  .job-card-actions {
    padding-top: 10px;
  }
}

.btn-apply-job {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.btn-apply-job:hover:not(:disabled) {
  filter: brightness(1.1);
}
.btn-apply-job:disabled {
  opacity: 0.7;
  cursor: default;
}

.btn-apply-job.btn-applied {
  background: #6b7280;
  color: #fff;
  cursor: pointer;
}
.btn-apply-job.btn-applied:hover {
  background: #4b5563;
}

/* ================= DETAIL PAGE ================= */
.detail-view-wrap {
  margin: 0 auto;
  max-width: 100%;
}

.detail-page {
  color: #fff;
  min-width: 0;
}

.detail-nav-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 16px 10px 16px;
  margin-bottom: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.detail-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.detail-nav-buttons a.detail-nav-btn {
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.detail-nav-buttons a.detail-nav-btn:hover {
  background: rgba(0, 0, 0, 0.09);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}
.detail-nav-btn--disabled {
  background: transparent;
  opacity: 0.4;
  cursor: default;
}
.detail-nav-btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
}
.detail-nav-btn-icon--flip {
  transform: scaleX(-1);
}
.detail-nav-btn--prev .detail-nav-btn-icon { margin-right: 0; }
.detail-nav-btn--next .detail-nav-btn-icon { margin-left: 0; }

.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 18px;
  background: #ffffff;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: .15s;
}
.detail-back-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

.detail-back-btn:hover {
  filter: brightness(1.1);
}

.detail-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.detail-breadcrumb-link {
  color: var(--ci-yellow, #ffc502);
  text-decoration: none;
  font-weight: 600;
}
.detail-breadcrumb-link:hover {
  text-decoration: underline;
}

.detail-title-main {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 12px 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-creator {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 15px;
}

.detail-creator-avatar {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.detail-creator-avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}
.detail-creator-avatar-img {
  border-radius: 50%;
}

.detail-creator-name {
  font-size: 14px;
  font-weight: 700;
}

.detail-badge-certified {
  font-size: 11px;
  padding: 4px 10px;
  background: #16a34a;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-badge-certified.detail-badge-not-certified {
  background: #6b7280;
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .detail-main { display: contents; }
  .detail-sidebar { display: contents; }
  .detail-hero-banner { order: 0; min-width: 0; width: 100%; }
  .detail-sidebar-card { order: 1; min-width: 0; width: 100%; box-sizing: border-box; margin-top: -40px; }
  .detail-content-card { order: 2; min-width: 0; width: 100%; box-sizing: border-box; }
  .detail-sidebar .detail-ps-section { order: 3; min-width: 0; width: 100%; box-sizing: border-box; }
  .detail-brief-wrap {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .detail-brief-wrap .detail-brief-html {
    min-width: 0;
    max-width: 100%;
  }
  .detail-ps-grid {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .detail-ps-card {
    min-width: 0;
    max-width: 100%;
  }
}

.detail-main {
  min-width: 0;
}

.detail-hero-banner {
  position: relative;
  width: 100%;
  min-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  background: #252525;
  margin-bottom: 16px;
}

.detail-hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .2s;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.7) 35%, rgba(0,0,0,.4) 60%, transparent 100%);
}

.detail-hero-content {
  position: relative;
  padding: 28px;
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.detail-hero-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 18px;
  font-weight: 900;
  color: var(--ci-yellow);
}

.detail-hero-logo img {
  border-radius: 8px;
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.detail-hero-headline {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 8px 0;
  color: #fff;
  line-height: 1.3;
}

.detail-hero-sub {
  display: none;
}

.detail-hero-budget {
  display: inline-flex;
  flex-direction: column;
  padding: 12px 24px;
  background: linear-gradient(
    to right,
    var(--ci-yellow) 0%,
    rgba(255, 197, 2, 0.75) 40%,
    rgba(255, 197, 2, 0.0) 100%
  );
  color: #111;
  border-radius: 14px;
  margin-bottom: 8px;
}

.detail-hero-budget-label {
  font-size: 12px;
  font-weight: 700;
}

.detail-hero-budget-value {
  font-size: 20px;
  font-weight: 900;
}

.detail-hero-acquisition {
  font-size: 13px;
  color: #e5e7eb;
  margin: 0 0 8px 0;
  display: none;
}

.detail-social-row {
  display: flex;
  gap: 10px;
  margin: 12px 0 16px 0;
}

.detail-social-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* ช่องทางที่เปิดรับ — section เดียวมีกรอบ พื้นหลังขาว ตัวหนังสือดำ */
.detail-channels-section {
  margin: 20px 0;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.detail-channels-section h4 {
  margin: 0 0 14px 0;
  font-size: 13px;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.detail-channel-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}
.detail-channel-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.detail-channel-box:hover {
  border-color: var(--ci-yellow, #ffc502);
  background: rgba(255, 197, 2, 0.06);
}
.detail-channel-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}
.detail-channel-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.detail-channel-label {
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.detail-channel-empty {
  color: #6b7280;
  font-size: 14px;
}

/* Quick specs block — 3 คอลัมน์ ระยะเวลาอยู่แถวเต็มความกว้าง, มือถือเป็นแถวเดียวยาว */
.detail-quick-specs {
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.detail-quick-specs .detail-spec-item:last-child {
  grid-column: 1 / -1;
}
@media (max-width: 768px) {
  .detail-quick-specs { grid-template-columns: repeat(2, 1fr); }
  .detail-quick-specs .detail-spec-item:last-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .detail-quick-specs { grid-template-columns: 1fr; }
  .detail-quick-specs .detail-spec-item:last-child { grid-column: 1; }
}
.detail-spec-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px;
  background: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  border-left: 3px solid var(--ci-yellow, #ffc502);
  min-width: 0;
}
.detail-spec-item--channel,
.detail-spec-item--with-icon {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.detail-spec-item--channel .detail-spec-text,
.detail-spec-item--with-icon .detail-spec-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.detail-spec-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  box-sizing: border-box;
  background: rgba(255, 197, 2, 0.1);
  border: 1px solid rgba(255, 197, 2, 0.25);
  border-radius: 8px;
}
.detail-spec-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-content-card .detail-spec-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-content-card .detail-spec-value {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-spec-row {
  margin: 6px 0 !important;
  font-size: 14px !important;
  color: #000000 !important;
}
.detail-spec-row:first-child { margin-top: 0 !important; }
.detail-spec-row:last-child { margin-bottom: 0 !important; }

/* BRIEF wrap */
.detail-brief-wrap {
  margin: 20px 0;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.detail-brief-wrap h4 {
  margin: 0 0 12px 0;
}
.detail-brief-wrap .detail-brief-html {
  margin-top: 0;
}

/* Product & Service — ใต้ detail-sidebar-card, 3 แถว, CI น่าเชื่อถือ */
.detail-sidebar .detail-ps-section {
  margin-top: 20px;
}
.detail-ps-section-title {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.detail-ps-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-ps-card {
  background: var(--card-bg, #1f1f1f);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  border-left: 3px solid #fff;
}
.detail-ps-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 0;
}
.detail-ps-card-icon {
  font-size: 18px;
  line-height: 1;
  margin: 0;
  padding: 0;
  opacity: 0.9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-ps-card-icon-img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}
.detail-ps-card-title {
  margin: 0;
  padding: 0 0 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.detail-ps-card-body {
  padding: 0 14px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #e5e7eb;
  word-break: break-word;
}
.detail-ps-pills {
  padding-top: 15px;
  padding-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.detail-ps-pill {
  display: inline-block;
  padding: 5px 10px;
  background: rgba(255,255,255,0.06);
  color: #e5e7eb;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}
.detail-ps-contact-item {
  display: block;
  padding: 6px 0;
  color: #e5e7eb;
  font-weight: 500;
}
.detail-ps-contact-item + .detail-ps-contact-item {
  border-top: 1px solid rgba(255,255,255,0.08);
}
.detail-ps-empty {
  color: var(--text-muted, #9ca3af);
  font-size: 13px;
}
.detail-hashtags h4 {
  margin: 0 0 8px 0;
}
.detail-hashtags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-content-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  color: #111;
  overflow: hidden;
}

.detail-content-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-content-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: #111;
}

.detail-copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: .15s;
  flex-shrink: 0;
}

.detail-copy-link-btn:hover {
  background: #e5e7eb;
  color: #111;
}

.detail-copy-link-icon {
  width: 20px;
  height: 20px;
}

.detail-desc-section {
  margin: 20px 0;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.detail-desc-section h4 {
  margin-top: 0;
}
.detail-desc-section .detail-content-desc {
  margin-bottom: 0;
}
.detail-content-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 20px;
}

.detail-content-card h4 {
  font-size: 14px;
  font-weight: 800;
  margin: 16px 0 8px 0;
  color: #111;
}
.detail-content-card h4:first-of-type { margin-top: 0; }
.detail-content-card p {
  font-size: 14px;
  margin: 8px 0;
  color: #374151;
}

.detail-summary-table {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.detail-summary-row {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  font-size: 14px;
}

.detail-summary-label {
  min-width: 140px;
  color: #6b7280;
}

.detail-brief-html {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.7;
  padding-bottom: 15px;
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-family: inherit;
}

.detail-brief-html h2 { font-size: 16px; margin: 12px 0 8px 0; }
.detail-brief-html img { max-width: 100%; height: auto; display: block; }

.detail-section-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #e5e7eb;
}

.detail-section-block p {
  margin: 6px 0;
}

.detail-product-service strong {
  color: #111827;
}

.detail-sidebar {
  position: static;
}
@media (min-width: 901px) {
  .detail-sidebar {
    position: sticky;
    top: 24px;
  }
}

.detail-sidebar-card {
  background: #fff;
  border: 2px solid #111;
  border-radius: 16px;
  padding: 24px;
  color: #111;
}

.detail-sidebar-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 12px 0;
}

.detail-sidebar-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 20px;
}

.detail-sidebar-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

.detail-sidebar-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: .15s;
}
.detail-sidebar-card .detail-sidebar-btn:not(.btn-applied):not(.detail-sidebar-btn-contact) {
  background: #16a34a;
  color: #fff;
}
.detail-sidebar-card .detail-sidebar-btn:not(.btn-applied):not(.detail-sidebar-btn-contact):hover:not(:disabled) {
  background: #15803d;
}

.detail-sidebar-btn:hover:not(:disabled) {
  background: #333;
}

.detail-sidebar-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.detail-sidebar-btn.btn-applied {
  background: #6b7280;
  color: #fff;
}
.detail-sidebar-btn.btn-applied:hover:not(:disabled) {
  background: #4b5563;
}

.detail-sidebar-footer {
  font-size: 12px;
  color: #9ca3af;
  margin: 16px 0 0 0;
}

.detail-sidebar-contact-reveal {
  font-size: 14px;
  color: #374151;
  margin-top: 12px;
  padding: 0;
  border-radius: 8px;
  word-break: break-word;
}
.detail-sidebar-contact-reveal--empty {
  padding: 12px;
  background: #f3f4f6;
}
.detail-sidebar-contact-reveal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 0 10px;
  background: #f3f4f6;
  border-radius: 8px;
  margin-bottom: 6px;
}
.detail-sidebar-contact-reveal-row:last-child {
  margin-bottom: 0;
}
.detail-sidebar-contact-reveal-label {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 12px;
  color: #6b7280;
}
.detail-sidebar-contact-reveal-value {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--ci-yellow, #ffc502);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.detail-sidebar-contact-reveal-value--copied {
  color: #16a34a;
}
.detail-sidebar-contact-copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #e5e7eb;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s;
}
.detail-sidebar-contact-copy-btn:hover {
  background: #d1d5db;
}
.detail-sidebar-contact-copy-icon {
  display: block;
}
.detail-sidebar-contact-copy-done {
  font-size: 11px;
  white-space: nowrap;
}

.detail-section-title {
  font-size: 13px;
  font-weight: 800;
  color: #374151;
  margin: 16px 0 8px 0;
}

.detail-brief {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
}

.do-dont-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 15px;
}

.do-dont-col {
  padding: 14px;
  border-radius: 12px;
}

.do-dont-col.do-col {
  background: #ecfdf5;
}

.do-dont-col.dont-col {
  background: #fef2f2;
}

.do-dont-col h4 {
  font-size: 12px;
  margin: 0 0 8px 0;
}

.do-col h4 { color: #065f46; }
.dont-col h4 { color: #991b1b; }

.do-dont-col ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.do-col ul { color: #047857; }
.dont-col ul { color: #b91c1c; }

.detail-list {
  margin: 0 0 16px 0;
  padding-left: 20px;
  line-height: 1.7;
}

.detail-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-contact a {
  color: #2563eb;
  text-decoration: none;
}

.detail-contact a:hover {
  text-decoration: underline;
}

.detail-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hashtag {
  display: inline-block;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
}

.detail-examples {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-example-link {
  padding: 8px 16px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.detail-example-link:hover {
  background: #dbeafe;
}

.detail-conditions {
  margin: 0 0 24px 0;
  padding-left: 20px;
  line-height: 1.8;
}

.detail-html {
  line-height: 1.8;
}

.detail-html h2 { font-size: 16px; margin: 12px 0 8px 0; }
.detail-html div, .detail-html p { margin: 8px 0; }
.detail-html ul { padding-left: 20px; margin: 8px 0; }

/* ================= SKELETON LOADING ================= */
.job-card-skeleton {
  display: grid;
  grid-template-columns: 3fr 1fr;
  height: 267px;
  min-height: 267px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-light);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
@media (max-width: 640px) {
  .job-card-skeleton {
    grid-template-columns: 1fr 2fr;
  }
}

.skeleton-left {
  position: relative;
  min-height: 140px;
  aspect-ratio: 3 / 1;
  background: #252525;
}
@media (min-width: 641px) {
  .skeleton-left {
    min-height: 267px;
    aspect-ratio: auto;
    height: 267px;
  }
}
@media (max-width: 640px) {
  .skeleton-left {
    min-height: 267px;
    aspect-ratio: auto;
    height: 267px;
  }
}

.skeleton-image {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #2a2a2a 0%,
    #383838 45%,
    #2e2e2e 55%,
    #2a2a2a 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-right {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card-light);
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    #e0e0e0 0%,
    #c8c8c8 45%,
    #e0e0e0 55%,
    #e0e0e0 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.skeleton-line.short { width: 50%; }
.skeleton-line.medium { width: 75%; }
.skeleton-line.full { width: 100%; }
.skeleton-line.meta { height: 10px; width: 60%; }

.skeleton-social {
  display: flex;
  gap: 6px;
  margin: 2px 0;
}
.skeleton-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    #e0e0e0 0%,
    #c8c8c8 45%,
    #e0e0e0 55%,
    #e0e0e0 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.skeleton-btn {
  height: 32px;
  width: 88px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #e0e0e0 0%,
    #c8c8c8 45%,
    #e0e0e0 55%,
    #e0e0e0 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

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

/* Platform filter skeleton (ระหว่างโหลดงานใหม่) */
.platform-filter-skeleton-wrap {
  gap: 10px;
}
.platform-filter-skeleton {
  display: inline-block;
  width: 72px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.14) 45%,
    rgba(255,255,255,0.08) 55%,
    rgba(255,255,255,0.08) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
@media (max-width: 768px) {
  .platform-filter-skeleton { width: 44px; }
}

/* Detail page skeleton (ระหว่างโหลดหน้า post) */
.detail-skeleton {
  max-width: 960px;
  margin: 0 auto;
}
.detail-skeleton-back {
  height: 24px;
  width: 140px;
  margin-bottom: 16px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 0%,
    rgba(255,255,255,0.12) 45%,
    rgba(255,255,255,0.06) 55%,
    rgba(255,255,255,0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.detail-skeleton-breadcrumb {
  height: 14px;
  width: 60%;
  margin-bottom: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 0%,
    rgba(255,255,255,0.12) 45%,
    rgba(255,255,255,0.06) 55%,
    rgba(255,255,255,0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.detail-skeleton-title {
  height: 28px;
  width: 80%;
  max-width: 480px;
  margin-bottom: 20px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.14) 45%,
    rgba(255,255,255,0.08) 55%,
    rgba(255,255,255,0.08) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.detail-skeleton-hero {
  height: 200px;
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.detail-skeleton-hero-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 0%,
    rgba(255,255,255,0.12) 45%,
    rgba(255,255,255,0.06) 55%,
    rgba(255,255,255,0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.detail-skeleton-content {
  margin-bottom: 24px;
}
.detail-skeleton-content .detail-skeleton-line {
  height: 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 0%,
    rgba(255,255,255,0.12) 45%,
    rgba(255,255,255,0.06) 55%,
    rgba(255,255,255,0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.detail-skeleton-content .detail-skeleton-line.full { width: 100%; }
.detail-skeleton-content .detail-skeleton-line.short { width: 70%; }
.detail-skeleton-content .detail-skeleton-line.medium { width: 85%; }
.detail-skeleton-sidebar {
  height: 180px;
  max-width: 320px;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 0%,
    rgba(255,255,255,0.12) 45%,
    rgba(255,255,255,0.06) 55%,
    rgba(255,255,255,0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

/* ================= LOADING / EMPTY ================= */
.jobs-loading, .jobs-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

#detailContent .jobs-loading {
  padding: 24px;
  color: #6b7280;
}

.jobs-empty {
  background: var(--card-bg);
  border-radius: 16px;
}
