@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap");

:root {
  --staffy-blue: #073da3;
  --staffy-blue-dark: #062c77;
  --staffy-pink: #f47dbd;
  --ink: #0e1628;
  --text: #243046;
  --muted: #6f7890;
  --line: #e5e9f2;
  --line-strong: #d6ddeb;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --success: #167a5a;
  --danger: #b4233c;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(14, 22, 40, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

p {
  margin-bottom: 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 86px;
  padding: 0 44px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: grid;
  gap: 2px;
}

.brand-wordmark {
  color: var(--staffy-blue);
  display: block;
  font-size: 30px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
}

.brand-tagline {
  color: var(--staffy-blue);
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.topnav {
  align-items: center;
  display: flex;
  gap: 28px;
}

.topnav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.topnav a:hover {
  color: var(--staffy-blue);
}

.topnav .nav-button {
  border: 1px solid var(--staffy-blue);
  border-radius: var(--radius);
  color: var(--staffy-blue);
  min-height: 38px;
  padding: 7px 12px;
}

.topnav .nav-button:hover {
  background: var(--staffy-blue);
  color: #ffffff;
}

.page-shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 50px 24px 72px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) 220px;
  margin-bottom: 48px;
  padding: 42px 0 18px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  color: var(--staffy-pink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 86px);
  max-width: 860px;
  margin-bottom: 24px;
}

.hero p,
.lead,
.section-heading > p,
.apply-panel > p,
.message p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-metric {
  border-left: 4px solid var(--staffy-blue);
  padding-left: 22px;
}

.hero-metric span {
  color: var(--staffy-blue);
  display: block;
  font-size: 66px;
  font-weight: 900;
  line-height: 0.9;
}

.hero-metric strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
  margin-top: 12px;
}

.section {
  display: grid;
  gap: 22px;
}

.page-hero {
  align-items: end;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 360px;
  margin-bottom: 42px;
  padding: 42px 0 8px;
}

.page-hero.compact h1 {
  font-size: clamp(42px, 6vw, 72px);
  margin-bottom: 0;
}

.page-hero.compact {
  display: block;
}

.page-hero p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.section-heading {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  padding-bottom: 22px;
}

.section-heading.minimal {
  align-items: center;
  border-bottom: 0;
  padding-bottom: 0;
}

.section-heading.minimal h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-kicker-title {
  color: var(--staffy-blue);
  font-size: clamp(18px, 2.2vw, 22px) !important;
  font-weight: 800;
  margin: 0;
}

.section-kicker-title.accent {
  color: var(--staffy-pink);
}

.admin-hero + .section {
  gap: 16px;
}

.admin-hero + .section .section-kicker-title {
  font-size: 22px !important;
}

.home-preview {
  margin-top: 26px;
}

.home-preview .job-list {
  margin-top: 8px;
}

.home-preview .job-card {
  padding: 18px 20px;
}

.home-preview .job-card h2 {
  font-size: 22px;
}

.home-preview .job-card p:not(.eyebrow) {
  font-size: 14px;
}

.section-heading h1,
.section-heading h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 0;
}

.section-heading > p {
  max-width: 360px;
  text-align: right;
}

.job-list {
  display: grid;
  gap: 12px;
}

.section-actions {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.job-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 22px 24px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.job-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.job-card h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.job-card p {
  color: var(--muted);
}

.job-card .eyebrow {
  margin-bottom: 6px;
}

.button {
  align-items: center;
  background: var(--staffy-blue);
  border: 1px solid var(--staffy-blue);
  border-radius: var(--radius);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  white-space: nowrap;
}

.button:hover {
  background: var(--staffy-blue-dark);
  border-color: var(--staffy-blue-dark);
}

.button-secondary {
  background: #ffffff;
  color: var(--staffy-blue);
}

.button-secondary:hover {
  background: var(--staffy-blue);
  color: #ffffff;
}

.position-layout {
  align-items: start;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.position-content {
  min-width: 0;
}

.back-link {
  color: var(--staffy-blue);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 34px;
}

.back-link::before {
  content: "<";
  margin-right: 8px;
}

.position-content h1 {
  font-size: clamp(40px, 6vw, 72px);
  margin-bottom: 20px;
}

.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.metadata span,
.status-pill {
  background: #f3f6fc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--staffy-blue);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.position-content h2 {
  border-top: 1px solid var(--line);
  font-size: 22px;
  margin: 34px 0 14px;
  padding-top: 26px;
}

.position-content p,
.position-content li {
  color: var(--text);
}

.position-content ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.apply-panel,
.message,
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.apply-panel {
  padding: 24px;
  position: sticky;
  top: 112px;
}

.apply-panel h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--staffy-blue);
  outline: 3px solid rgba(7, 61, 163, 0.12);
}

input[type="file"] {
  background: #ffffff;
  padding: 9px 10px;
}

.phone-field {
  display: grid;
  gap: 8px;
  grid-template-columns: 118px minmax(0, 1fr);
  position: relative;
}

.phone-field input {
  min-width: 0;
}

.country-code-picker {
  position: relative;
}

.country-code-trigger {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.country-code-trigger::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  content: "";
  margin-left: auto;
}

.country-code-trigger[aria-expanded="true"] {
  border-color: var(--staffy-blue);
  outline: 3px solid rgba(7, 61, 163, 0.12);
}

.country-code-menu {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(14, 22, 40, 0.16);
  left: 0;
  margin-top: 8px;
  overflow: hidden;
  position: absolute;
  top: 100%;
  width: min(340px, calc(100vw - 48px));
  z-index: 40;
}

.country-code-search {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 42px;
}

.country-code-search:focus {
  outline: 0;
}

.country-code-options {
  max-height: 246px;
  overflow-y: auto;
  padding: 6px;
}

.country-code-options button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 10px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.country-code-options button:hover,
.country-code-options button.is-active {
  background: #f3f6fc;
  color: var(--staffy-blue);
}

.country-code-options span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-code-options strong,
.country-code-trigger strong {
  font-weight: 800;
}

.message {
  margin: 70px auto;
  max-width: 680px;
  padding: 38px;
}

.message h1 {
  font-size: clamp(36px, 5vw, 58px);
  margin-bottom: 16px;
}

.muted {
  color: var(--muted);
}

.admin-hero {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 22px 0 0;
}

.admin-hero h1 {
  font-size: clamp(38px, 5vw, 58px) !important;
}

.admin-form-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.admin-form {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-actions,
.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.message-actions {
  justify-content: flex-start;
  margin-top: 24px;
}

.form-alert {
  background: rgba(180, 35, 60, 0.08);
  border: 1px solid rgba(180, 35, 60, 0.18);
  border-radius: var(--radius);
  color: var(--danger);
  font-weight: 700;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.button-compact {
  font-size: 12px;
  min-height: 34px;
  padding: 7px 12px;
}

.row-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  white-space: nowrap;
}

.row-actions form,
.inline-admin-form {
  margin: 0;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--staffy-blue);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0 7px 4px;
}

.icon-button:hover,
.icon-button[aria-expanded="true"] {
  background: #f3f6fc;
  color: var(--staffy-blue);
}

.actions-menu {
  position: relative;
}

.actions-menu-list {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(14, 22, 40, 0.14);
  display: grid;
  gap: 2px;
  min-width: 170px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 35;
}

.actions-menu-list[hidden] {
  display: none;
}

.actions-menu-list a {
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  padding: 8px 10px;
}

.actions-menu-list form {
  margin: 0;
}

.actions-menu-list button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.actions-menu-list a:hover,
.actions-menu-list button:hover {
  background: #f3f6fc;
  color: var(--staffy-blue);
}

.actions-menu-list .menu-danger {
  color: var(--danger);
}

.actions-menu-list .menu-danger:hover {
  background: #fff1f4;
  color: var(--danger);
}

.modal-backdrop {
  align-items: center;
  background: rgba(14, 22, 40, 0.32);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 60;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(14, 22, 40, 0.18);
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 28px;
  position: relative;
  width: min(100%, 520px);
}

.modal-card h2 {
  font-size: 34px;
  margin-bottom: 0;
}

.modal-copy {
  color: var(--muted);
}

.modal-close {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
}

.inline-admin-form {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(92px, 1fr) 96px minmax(120px, 1.2fr) auto;
  min-width: 0;
}

.application-status-form {
  margin: 0;
}

.application-status-form select {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 8px;
}

.application-notes {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.application-notes textarea {
  font-size: 12px;
  min-height: 42px;
  padding: 6px 8px;
  resize: none;
}

.applications-list {
  display: grid;
  gap: 12px;
}

.application-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0;
  overflow: hidden;
}

.application-summary {
  align-items: center;
  background: #f8faff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: 90px 130px 130px 170px minmax(180px, 1fr) 48px;
  padding: 14px 18px;
}

.application-summary div,
.application-extra {
  min-width: 0;
}

.application-summary span,
.application-extra span,
.application-followup label > span:first-child {
  color: var(--ink);
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.application-summary strong {
  color: var(--text);
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.application-cv {
  color: var(--staffy-blue);
  font-size: 14px;
  font-weight: 800;
  justify-self: end;
}

.application-extra {
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
}

.application-extra p {
  color: var(--text);
  font-size: 13px;
}

.application-followup {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 150px) minmax(110px, 130px) minmax(260px, 1fr) auto;
  margin: 0;
  padding: 14px 18px 16px;
}

.application-followup select,
.application-followup textarea {
  font-size: 12px;
  min-height: 38px;
  padding: 7px 9px;
}

.application-followup textarea {
  resize: vertical;
}

.inline-admin-form input,
.inline-admin-form select,
.inline-admin-form textarea {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 8px;
}

.static-field {
  align-items: center;
  background: #f8faff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  display: flex;
  font-size: 12px;
  min-height: 34px;
  min-width: 0;
  overflow: hidden;
  padding: 6px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-admin-form textarea {
  min-height: 34px;
  resize: none;
}

.table-wrap {
  overflow: visible;
}

.applications-table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.admin-applications-table {
  min-width: 1280px;
}

.admin-vacancies-table th:nth-child(1),
.admin-vacancies-table td:nth-child(1) {
  width: 13%;
}

.admin-vacancies-table th:nth-child(2),
.admin-vacancies-table td:nth-child(2) {
  width: 30%;
}

.admin-vacancies-table th:nth-child(3),
.admin-vacancies-table td:nth-child(3) {
  width: 18%;
}

.admin-vacancies-table th:nth-child(4),
.admin-vacancies-table td:nth-child(4) {
  width: 14%;
}

.admin-vacancies-table th:nth-child(5),
.admin-vacancies-table td:nth-child(5) {
  width: 25%;
}

.admin-vacancies-table td:nth-child(5) {
  overflow: visible;
}

.admin-applications-table th:nth-child(1),
.admin-applications-table td:nth-child(1) {
  width: 8%;
}

.admin-applications-table th:nth-child(2),
.admin-applications-table td:nth-child(2) {
  width: 11%;
}

.admin-applications-table th:nth-child(3),
.admin-applications-table td:nth-child(3) {
  width: 10%;
}

.admin-applications-table th:nth-child(4),
.admin-applications-table td:nth-child(4) {
  width: 12%;
}

.admin-applications-table th:nth-child(5),
.admin-applications-table td:nth-child(5) {
  width: 14%;
}

.admin-applications-table th:nth-child(6),
.admin-applications-table td:nth-child(6) {
  width: 5%;
}

.admin-applications-table th:nth-child(7),
.admin-applications-table td:nth-child(7) {
  width: 10%;
}

.admin-applications-table th:nth-child(8),
.admin-applications-table td:nth-child(8) {
  width: 10%;
}

.admin-applications-table th:nth-child(9),
.admin-applications-table td:nth-child(9) {
  width: 9%;
}

.admin-applications-table th:nth-child(10),
.admin-applications-table td:nth-child(10) {
  width: 19%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8faff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

td {
  color: var(--text);
  font-size: 14px;
}

td {
  overflow: hidden;
  text-overflow: ellipsis;
}

td a {
  color: var(--staffy-blue);
  font-weight: 800;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }

  .topnav {
    gap: 18px;
  }

  .page-shell {
    padding: 32px 18px 56px;
  }

  .hero,
  .position-layout,
  .page-hero {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .form-grid.two,
  .form-grid.three,
  .phone-field {
    grid-template-columns: 1fr;
  }

  .application-summary,
  .application-followup {
    grid-template-columns: 1fr;
  }

  .application-cv {
    justify-self: start;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading > p {
    text-align: left;
  }

  .job-card {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .apply-panel {
    position: static;
  }
}
