/* ============================================================
   Careers (/careers)
   Loaded only on careers pages, after style.css, and built from its
   tokens (--deep, --blue, --green, --tint, --line, --radius ...) so the
   section reads as part of the site rather than the old portal.
   ============================================================ */

/* ------------------------------------------------------------------
   Flash messages
------------------------------------------------------------------ */
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 24px; font-size: 14.5px;
  background: var(--tint); color: var(--deep); border-left: 3px solid var(--green-dark);
}
.flash.error { background: #fdecec; color: #8a1c1c; border-left-color: #d32f2f; }
.flash .material-symbols-outlined { font-size: 20px; }

/* ------------------------------------------------------------------
   Job board
------------------------------------------------------------------ */
.job-filters {
  display: grid; grid-template-columns: 1fr 220px auto; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.job-filters input, .job-filters select, .field select {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 14.5px;
  background: rgba(238, 244, 249, .55); border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); outline: none;
}
.job-filters input:focus, .job-filters select:focus, .field select:focus { border-color: var(--blue); }

.job-tabs { display: flex; gap: 10px; margin: 36px 0 22px; flex-wrap: wrap; }
.job-tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  background: var(--tint); color: var(--deep); border: 1px solid var(--tint2);
}
.job-tabs a.active { background: var(--deep); color: #fff; border-color: var(--deep); }
.job-tabs .material-symbols-outlined { font-size: 18px; }

.job-count { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }

.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.job-card { display: flex; flex-direction: column; gap: 12px; transition: box-shadow .25s, transform .25s, border-color .25s; }
a.job-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--green); }
.job-card h3 { font-size: 18.5px; }
.job-card p { font-size: 14.5px; color: var(--muted); flex: 1; }

.badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 4px 12px;
  font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
  background: var(--tint); color: var(--deep);
}
.badge.green { background: var(--green); color: var(--deeper); }
.badge.soon { background: #fdecec; color: #b42318; }
.badge .material-symbols-outlined { font-size: 14px; }
.badge.status-pending { background: #fff4e0; color: #8a5300; }
.badge.status-reviewed { background: #e3f0fa; color: var(--deep); }
.badge.status-shortlisted, .badge.status-hired { background: #ecf7d9; color: #3d6100; }
.badge.status-rejected { background: #f1f3f5; color: var(--muted); }

.job-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-meta .material-symbols-outlined { font-size: 17px; color: var(--blue); }

.job-card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); padding-top: 14px; font-size: 13.5px; color: var(--muted);
}

.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state .material-symbols-outlined { font-size: 46px; color: var(--blue); }
.empty-state h3 { margin: 12px 0 6px; font-size: 20px; }
.empty-state .pill-btn { margin-top: 18px; }

/* Pagination (careers.partials.pagination) */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); color: var(--deep); background: #fff;
}
.pager a:hover { border-color: var(--blue); }
.pager .current { background: var(--deep); border-color: var(--deep); color: #fff; }
.pager .disabled { color: #b8c4cc; }

/* ------------------------------------------------------------------
   Posting page
------------------------------------------------------------------ */
.page-hero .badges { margin-top: 18px; }
.page-hero .job-meta { color: #D7E7F2; margin-top: 16px; font-size: 14.5px; }
.page-hero .job-meta .material-symbols-outlined { color: var(--green); }

.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.job-desc { white-space: pre-line; font-size: 16px; line-height: 1.75; color: var(--ink); }
.apply-card { position: sticky; top: 110px; }
.apply-card h3 { font-size: 20px; margin-bottom: 8px; }
.apply-card p { font-size: 14.5px; color: var(--muted); margin-bottom: 18px; }
.apply-card .pill-btn { width: 100%; justify-content: center; }
.apply-card .deadline {
  display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted);
}
.apply-card .deadline.urgent { color: #b42318; }
.apply-card .hint { font-size: 13.5px; text-align: center; margin: 12px 0 0; }
.apply-card .hint a { color: var(--blue); font-weight: 600; }
.pill-btn[disabled] { background: var(--tint2); color: var(--muted); cursor: not-allowed; transform: none; box-shadow: none; }

/* ------------------------------------------------------------------
   Forms with visible labels (apply form, profile). The site's contact
   form relies on placeholders; these forms are long enough that a label
   above each field reads better.
------------------------------------------------------------------ */
.form-card { max-width: 900px; }
.form-card + .form-card { margin-top: 28px; }
.form-block { padding: 26px 0; border-top: 1px solid var(--line); }
.form-block:first-of-type { border-top: 0; padding-top: 4px; }
.form-block > h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 18px; }
.form-block > h3 .material-symbols-outlined { color: var(--blue); }
.field > label, .field-label {
  display: block; margin-bottom: 7px;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--deep);
}
.field > label .opt { color: var(--muted); font-weight: 500; }
.field .hint { color: var(--muted); font-size: 12.5px; margin: 5px 2px 0; }
.field.error select { border: 2px solid #ff5252; }
.field .err.show { display: block; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.field.narrow { max-width: 200px; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.check-chip {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(238, 244, 249, .55); font-size: 14px; transition: border-color .2s, background .2s, opacity .2s;
}
.check-chip:has(input:checked) { border-color: var(--blue); background: #e3f0fa; color: var(--deep); font-weight: 600; }
.check-chip:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.check-chip input { accent-color: var(--deep); width: 16px; height: 16px; }

.inline-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 16px; cursor: pointer; }
.inline-check input { accent-color: var(--deep); width: 16px; height: 16px; }

.file-drop {
  display: block; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 14px; padding: 30px 20px;
  background: rgba(238, 244, 249, .55); transition: border-color .2s, background .2s;
}
.file-drop:hover, .file-drop.has-file { border-color: var(--blue); background: #e3f0fa; }
.file-drop .material-symbols-outlined { font-size: 36px; color: var(--blue); }
.file-drop b { display: block; font-family: var(--font-display); color: var(--deep); margin-top: 6px; }
.file-drop span { font-size: 13px; color: var(--muted); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.field.error .file-drop { border-color: #ff5252; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.text-link { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--blue); }
.text-link:hover { color: var(--deep); }
.text-link.danger { color: #b42318; }

/* Tom Select, restyled to sit with the site's fields. */
.ts-wrapper.multi .ts-control {
  padding: 10px 12px; min-height: 52px; font-size: 14.5px;
  background: rgba(238, 244, 249, .55); border: 1px solid var(--line); border-radius: 12px; box-shadow: none;
}
.ts-wrapper.multi.focus .ts-control { border-color: var(--blue); }
.ts-wrapper.multi .ts-control > div {
  background: var(--deep); color: #fff; border: 0; border-radius: 999px; padding: 3px 4px 3px 12px;
}
.ts-wrapper.plugin-remove_button .item .remove { border-left: 0; color: #fff; border-radius: 0 999px 999px 0; }
.ts-dropdown { border-radius: 12px; border-color: var(--line); box-shadow: var(--shadow); font-size: 14.5px; }
.ts-dropdown .active { background: var(--tint); color: var(--deep); }
.field.error .ts-control { border: 2px solid #ff5252; }

/* ------------------------------------------------------------------
   Account
------------------------------------------------------------------ */
.account-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 28px; }
.stat-tile b { display: block; font-family: var(--font-display); font-size: 34px; color: var(--deep); line-height: 1.1; }
.stat-tile span { font-size: 14px; color: var(--muted); }
.stat-tile a { display: flex; width: fit-content; align-items: center; gap: 4px; margin-top: 12px; }

.meter { height: 8px; border-radius: 99px; background: var(--tint2); overflow: hidden; margin-top: 12px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 99px; }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 21px; }

.app-list { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.app-list th {
  text-align: left; padding: 10px 12px; font-family: var(--font-display); font-size: 12px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line);
}
.app-list td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.app-list tr:last-child td { border-bottom: 0; }
.app-list td b { font-family: var(--font-display); color: var(--deep); display: block; }
.app-list td small { color: var(--muted); font-size: 12.5px; }
.app-list .actions { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }

.mini-jobs { display: grid; gap: 12px; }
.mini-job { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.mini-job:hover { border-color: var(--green); }
.mini-job b { font-family: var(--font-display); color: var(--deep); display: block; font-size: 15px; }
.mini-job small { color: var(--muted); font-size: 12.5px; }

/* ------------------------------------------------------------------
   Profile / CV builder
------------------------------------------------------------------ */
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--tint); display: grid; place-items: center; color: var(--blue);
  border: 3px solid #fff; box-shadow: var(--shadow);
}
.avatar .material-symbols-outlined { font-size: 40px; }

.entry { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.entry-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.entry h4 { font-size: 16.5px; }
.entry .sub { color: var(--blue); font-weight: 600; font-size: 14.5px; }
.entry .when { color: var(--muted); font-size: 13.5px; }
.entry p { font-size: 14.5px; color: var(--ink); margin-top: 8px; white-space: pre-line; }
.entry ul { margin: 8px 0 0 20px; font-size: 14.5px; }
.entry details, .add-entry { margin-top: 12px; }
.entry details > summary, .add-entry > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--blue);
}
.entry details > summary::-webkit-details-marker, .add-entry > summary::-webkit-details-marker { display: none; }
.entry details[open] > summary, .add-entry[open] > summary { margin-bottom: 16px; }
.add-entry { border: 1px dashed var(--line); border-radius: 14px; padding: 16px 20px; }
.entry-actions { display: flex; gap: 16px; align-items: center; flex-shrink: 0; }
.entry-actions form { display: inline; }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 1000px) {
  .job-layout { grid-template-columns: 1fr; }
  .apply-card { position: static; }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .job-filters { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr; }
  .job-grid { grid-template-columns: 1fr; }
  .entry-head { flex-direction: column; }
  .app-list thead { display: none; }
  .app-list tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .app-list td { display: block; border: 0; padding: 6px 4px; }
  .app-list .actions { justify-content: flex-start; }
}
