:root {
  --bg-dark: #050608;
  --card-bg: rgba(16, 18, 26, 0.86);
  --border-color: rgba(255, 255, 255, 0.08);
  --primary: #d946ef;
  --cyan: #38bdf8;
  --success: #2ecc71;
  --warning: #f1c40f;
  --danger: #ef4444;
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --font-mono: "JetBrains Mono", monospace;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Montserrat", sans-serif;
  margin: 0;
  overflow-x: hidden;
}

.jobs-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      circle at 15% 10%,
      rgba(217, 70, 239, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(56, 189, 248, 0.08) 0%,
      transparent 50%
    );
}

.jobs-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1240px;
  margin: 0 auto;
  padding: 125px 20px 90px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.jobs-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.jh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(217, 70, 239, 0.12);
  border: 1px solid rgba(217, 70, 239, 0.35);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}
.jobs-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  margin: 0 0 12px;
  line-height: 1.1;
}
.jobs-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.6;
}

.vacancies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 22px;
}

.vac-card {
  --vc: #d946ef;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: 0.28s;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.vac-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vc), transparent 85%);
}
.vac-card:hover {
  transform: translateY(-6px);
  border-color: var(--vc);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}

.vc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.vc-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--vc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}
.vc-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.vc-status {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}
.vc-status.open {
  background: rgba(46, 204, 113, 0.14);
  color: var(--success);
  border: 1px solid rgba(46, 204, 113, 0.4);
}
.vc-status.closed {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.vc-title {
  font-size: 1.3rem;
  font-weight: 900;
  margin: 0 0 6px;
  color: #fff;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vc-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vc-reqs-preview {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 12px 14px;
}
.vc-reqs-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.vc-reqs-preview ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
}
.vc-reqs-preview li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vc-reqs-preview li i {
  color: var(--vc);
  font-size: 0.72rem;
  flex-shrink: 0;
}

.vc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.btn-apply-vac {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--vc), #7c3aed);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.25s;
  text-decoration: none;
  box-sizing: border-box;
}
.btn-apply-vac:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-2px);
}
.btn-apply-vac:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: #6b7280;
  cursor: not-allowed;
}

.my-apps-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 26px;
  padding: 28px;
}
.my-apps-section h2 {
  margin: 0 0 18px;
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}
.my-app-card {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mac-status {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}
.mac-PENDING {
  background: rgba(241, 196, 15, 0.15);
  color: var(--warning);
}
.mac-INTERVIEW {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
}
.mac-ACCEPTED {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
}
.mac-REJECTED {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.apply-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}
.apply-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.apply-modal {
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9);
}
.am-head {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.am-head h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.am-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #9ca3af;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.am-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.am-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.4);
}

.preview-desc-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px;
  color: #e5e7eb;
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.preview-reqs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preview-reqs-list li {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px 15px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #fff;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.preview-reqs-list li i {
  margin-top: 3px;
  flex-shrink: 0;
}

.q-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.qf-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  overflow-wrap: anywhere;
}
.qf-req {
  color: var(--danger);
  margin-left: 4px;
}
.qf-counter {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.qf-input,
.qf-textarea,
.qf-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 13px 16px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.94rem;
  outline: none;
  box-sizing: border-box;
  transition: 0.2s;
}
.qf-input:focus,
.qf-textarea:focus {
  border-color: var(--primary);
}

@media (max-width: 640px) {
  .vacancies-grid {
    grid-template-columns: 1fr;
  }
  .am-body {
    padding: 20px;
  }
}
