/* ============================================================
   Custom additions — job cards + admin page
   Uses the same CSS variables (--primary, --accent, --card,
   --border, --muted-foreground, etc.) already defined by the
   site's compiled Tailwind stylesheet, so colors automatically
   match the site's palette and light/dark theme.
   ============================================================ */

/* ---------- Job cards ---------- */
.job-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .job-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.job-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}
.job-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0.35;
  transition: opacity 0.25s ease;
}
.job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.35);
  border-color: var(--accent);
}
.job-card:hover::before {
  opacity: 1;
}
.job-card--closed {
  opacity: 0.72;
}
.job-card--closed::before {
  background: var(--muted-foreground);
}

.job-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.job-card__number {
  font-family: var(--font-display, inherit);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.job-card__title {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}
.job-card__location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.job-card__location svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.job-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.job-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.job-status--open {
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  border-color: color-mix(in oklch, var(--accent) 30%, transparent);
}
.job-status--closing-soon {
  color: #b45309;
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.3);
}
.job-status--closed {
  color: var(--muted-foreground);
  background: color-mix(in oklch, var(--muted-foreground) 12%, transparent);
  border-color: var(--border);
}

.job-card__description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.job-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  padding-top: 0.9rem;
  margin-top: auto;
  border-top: 1px dashed var(--border);
}
.job-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.job-card__meta-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--accent);
}
.job-card__meta-item--deadline-urgent {
  color: #b45309;
  font-weight: 600;
}
.job-card__meta-item--deadline-urgent svg {
  color: #b45309;
}

.job-card__apply {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}
.job-card__apply:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.job-card__apply--disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}
.job-card__apply svg {
  width: 15px;
  height: 15px;
}

/* ---------- Admin page ---------- */
.admin-body {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
}
.admin-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}
.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}
.admin-subtitle {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  max-width: 60ch;
}
.admin-notice {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0.75rem;
  background: var(--card);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}
.admin-notice strong {
  color: var(--primary);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.admin-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.admin-btn--primary {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}
.admin-btn--primary:hover {
  opacity: 0.9;
  color: var(--accent-foreground);
}
.admin-btn--danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.3);
}
.admin-btn--danger:hover {
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
}

.admin-job-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.admin-job-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  padding: 1.5rem;
}
.admin-job-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-job-card__head-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}
.admin-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.admin-field-grid--full {
  grid-template-columns: 1fr;
}
@media (max-width: 640px) {
  .admin-field-grid {
    grid-template-columns: 1fr;
  }
}
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.admin-field label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.admin-field input,
.admin-field textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--background);
  color: var(--foreground);
  font-size: 0.88rem;
  font-family: inherit;
}
.admin-field input:focus,
.admin-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.admin-field textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.admin-output {
  margin-top: 2rem;
}
.admin-output textarea {
  width: 100%;
  min-height: 320px;
  padding: 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
}
