/* ==========================================================================
   LOGISTIC WAVES - UNIFIED CMS CONTENT EDITOR (3-Column Easy Control)
   Shared across Live Detail Pages & Admin Dashboard
   ========================================================================== */

.cms-live-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #2563eb;
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  line-height: 1;
}
.cms-live-edit-btn:hover {
  background: #2563eb;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.cms-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.cms-modal-backdrop.active {
  display: flex;
}

.cms-modal-dialog {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 1060px;
  box-shadow: 0 25px 65px -15px rgba(15, 23, 42, 0.38), 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  animation: cmsModalZoom 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@keyframes cmsModalZoom {
  from { opacity: 0; transform: scale(0.97) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.cms-modal-header {
  padding: 14px 22px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  flex-shrink: 0;
}

.cms-modal-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.cms-header-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}
.cms-header-preview-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.cms-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
  font-size: 14px;
}
.cms-modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.cms-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
  background: #ffffff;
}

.cms-layout-3col {
  display: grid;
  grid-template-columns: 230px 1fr 255px;
  gap: 20px;
  align-items: start;
}

.cms-layout-2col {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 22px;
  align-items: start;
}

.cms-col-left,
.cms-col-center,
.cms-col-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.cms-col-center {
  min-height: 410px;
}

.cms-cover-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  aspect-ratio: 4 / 3;
}
.cms-cover-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cms-cover-overlay-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  transition: 0.15s;
}
.cms-cover-overlay-btn:hover {
  background: rgba(15, 23, 42, 0.94);
}

.cms-logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.cms-logo-box img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.cms-job-company-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 16px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.cms-job-company-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #ffffff;
  background: #2563eb;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}
.cms-job-company-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}
.cms-job-company-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.cms-job-company-loc {
  font-size: 12px;
  color: #64748b;
}

.cms-btn-sm-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.cms-btn-sm-outline:hover {
  background: #f1f5f9;
}

.cms-url-inline-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cms-gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.cms-gallery-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
}
.cms-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cms-gallery-add {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: 0.15s;
}
.cms-gallery-add:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.cms-side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cms-side-nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: 0.15s;
}
.cms-side-nav-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.cms-side-nav-btn:focus {
  outline: none;
}
.cms-side-nav-btn.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}

.cms-tab-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.cms-tab-pane.active {
  display: flex;
}

.cms-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cms-form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cms-input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cms-input-icon-wrap i {
  position: absolute;
  left: 10px;
  color: #64748b;
  font-size: 12.5px;
  pointer-events: none;
}
.cms-input-icon-wrap .cms-form-control {
  padding-left: 30px;
}

.cms-form-control {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cms-form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
textarea.cms-form-control {
  resize: vertical;
  min-height: 68px;
  line-height: 1.5;
}

.cms-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cms-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cms-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.cms-chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}
.cms-chip-remove {
  border: none;
  background: transparent;
  color: #3b82f6;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}
.cms-chip-remove:hover {
  color: #dc2626;
}
.cms-chip-add-btn {
  border: 1px dashed #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.cms-chip-add-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.cms-side-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.cms-side-box-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cms-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}
.cms-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.cms-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cms-switch-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 9999px;
  transition: 0.2s;
  cursor: pointer;
}
.cms-switch-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.2s;
}
.cms-switch input:checked + .cms-switch-slider {
  background: #2563eb;
}
.cms-switch input:checked + .cms-switch-slider::before {
  transform: translateX(16px);
}

.cms-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cms-color-swatch {
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
}

.cms-social-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cms-social-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  flex-shrink: 0;
}

.cms-modal-footer {
  padding: 13px 22px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
.cms-footer-left,
.cms-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cms-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.2;
}
.cms-btn-cancel {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
.cms-btn-cancel:hover {
  background: #f1f5f9;
}
.cms-btn-archive {
  background: #ffffff;
  border-color: #fecaca;
  color: #dc2626;
}
.cms-btn-archive:hover {
  background: #fef2f2;
}
.cms-btn-draft {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}
.cms-btn-draft:hover {
  background: #f1f5f9;
}
.cms-btn-save {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.24);
}
.cms-btn-save:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

@media (max-width: 960px) {
  .cms-layout-3col,
  .cms-layout-2col {
    grid-template-columns: 1fr;
  }
  .cms-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .cms-grid-2,
  .cms-grid-4 {
    grid-template-columns: 1fr;
  }
  .cms-modal-dialog {
    max-height: 96vh;
    border-radius: 14px;
  }
  .cms-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .cms-footer-left,
  .cms-footer-right {
    justify-content: space-between;
  }
}

/* ==========================================================================
   JOB MEDIA & GALLERY STYLES
   ========================================================================== */
.cms-media-cover-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.cms-cover-preview-wrap {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #cbd5e1;
  position: relative;
  margin-bottom: 12px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.cms-cover-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cms-preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cms-preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.cms-preset-pill i {
  color: #2563eb;
  font-size: 11px;
}

.cms-preset-pill:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.job-gallery-grid-editor {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  min-height: 110px;
}

.cms-gallery-card {
  position: relative;
  height: 95px;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid #cbd5e1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cms-gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.cms-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cms-gallery-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  background: rgba(239, 68, 68, 0.92);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
  z-index: 5;
}

.cms-gallery-remove:hover {
  background: #dc2626;
  transform: scale(1.15);
}

.cms-gallery-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.cms-gallery-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
  padding: 24px;
  text-align: center;
}

.cms-gallery-empty i {
  font-size: 28px;
  color: #cbd5e1;
}

/* Flagship Job Detail Cover Banner */
.flagship-job-cover-banner {
  height: 180px;
  width: calc(100% + 60px);
  margin: -26px -30px 22px -30px;
  background-size: cover;
  background-position: center;
  position: relative;
  border-top-left-radius: 17px;
  border-top-right-radius: 17px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: inset 0 -35px 45px -10px rgba(0, 0, 0, 0.35);
}
