/* =========================================================
   STAFF FORM LAYOUT

   These styles are scoped to the direct children of
   .staff-form-shell so they do not interfere with the
   form components rendered inside the Outlet.
   ========================================================= */

.staff-form-shell,
.staff-form-shell *,
.staff-form-shell *::before,
.staff-form-shell *::after {
  box-sizing: border-box;
}

.staff-form-shell {
  display: flex;
  flex-direction: column;

  width: 100%;
  min-width: 0;
  min-height: 100vh;

  background:
    linear-gradient(
      135deg,
      #f3f8f6 0%,
      #f7faf8 52%,
      #f8f6ec 100%
    );

  color: #2f4439;
}

/* =========================================================
   HEADER
   ========================================================= */

.staff-form-shell > .staff-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  width: 100%;
  min-height: 74px;
  padding: 14px 30px;

  border-bottom: 1px solid #dbe6e1;

  background: #ffffff;

  box-shadow:
    0 3px 15px
    rgba(28, 60, 47, 0.045);
}

.staff-form-shell
> .staff-form-header
> .staff-form-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 0;
}

.staff-form-shell
.staff-form-brand-mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;

  width: 42px;
  height: 42px;

  border-radius: 10px;

  background: #087358;
  color: #ffffff;

  font-size: 1rem;
  font-weight: 900;
}

.staff-form-shell
.staff-form-header__brand
> div:last-child {
  min-width: 0;
}

.staff-form-shell
.staff-form-header__brand strong,
.staff-form-shell
.staff-form-header__brand span {
  display: block;
}

.staff-form-shell
.staff-form-header__brand strong {
  color: #294236;

  font-size: 0.82rem;
  font-weight: 900;
}

.staff-form-shell
.staff-form-header__brand span {
  margin-top: 3px;

  color: #72827a;

  font-size: 0.63rem;
}

.staff-form-shell
.staff-form-exit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 40px;
  padding: 9px 16px;

  border: 1px solid #c5d5cd;
  border-radius: 8px;

  background: #ffffff;
  color: #3d5549;

  font-family: inherit;
  font-size: 0.67rem;
  font-weight: 850;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.staff-form-shell
.staff-form-exit-button:hover {
  border-color: #087358;

  background: #edf8f4;
  color: #087358;

  transform: translateY(-1px);
}

/* =========================================================
   PROGRESS SECTION
   ========================================================= */

.staff-form-shell
> .staff-form-progress-section {
  width: min(
    1240px,
    calc(100% - 40px)
  );

  margin: 24px auto 0;
  padding: 23px;

  border: 1px solid #dbe6e1;
  border-radius: 14px;

  background: #ffffff;

  box-shadow:
    0 7px 22px
    rgba(28, 60, 47, 0.05);
}

.staff-form-shell
.staff-form-progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.staff-form-shell
.staff-form-progress-heading
> div:first-child {
  min-width: 0;
}

.staff-form-shell
.staff-form-progress-eyebrow {
  display: block;

  margin-bottom: 6px;

  color: #087358;

  font-size: 0.62rem;
  font-weight: 900;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.staff-form-shell
.staff-form-progress-heading h1 {
  margin: 0;

  color: #263e33;

  font-size: clamp(
    1.25rem,
    2vw,
    1.6rem
  );
  line-height: 1.25;
}

.staff-form-shell
.staff-form-progress-heading p {
  max-width: 730px;

  margin: 8px 0 0;

  color: #718078;

  font-size: 0.71rem;
  line-height: 1.65;
}

.staff-form-shell
.staff-form-progress-count {
  display: grid;
  flex-shrink: 0;
  justify-items: center;
  gap: 5px;

  min-width: 108px;
  padding: 11px 15px;

  border: 1px solid #d4e2db;
  border-radius: 9px;

  background: #f4f9f7;
}

.staff-form-shell
.staff-form-progress-count span,
.staff-form-shell
.staff-form-progress-count strong {
  display: block;
}

.staff-form-shell
.staff-form-progress-count span {
  color: #72817a;

  font-size: 0.58rem;
  font-weight: 800;
}

.staff-form-shell
.staff-form-progress-count strong {
  color: #087358;

  font-size: 0.88rem;
}

/* =========================================================
   PROGRESS BAR
   ========================================================= */

.staff-form-shell
.staff-form-progress-track {
  width: 100%;
  height: 7px;

  margin-top: 20px;

  overflow: hidden;

  border-radius: 999px;

  background: #dfe9e4;
}

.staff-form-shell
.staff-form-progress-bar {
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #087358,
      #17a17d
    );

  transition:
    width 0.3s ease;
}

/* =========================================================
   FORM STEPS
   ========================================================= */

.staff-form-shell
.staff-form-steps {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );
  gap: 10px;

  margin-top: 18px;
}

.staff-form-shell
.staff-form-step {
  display: flex;
  align-items: center;
  gap: 9px;

  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 11px;

  border: 1px solid #dce6e1;
  border-radius: 9px;

  background: #f8faf9;
  color: #596d62;

  font-family: inherit;
  text-align: left;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.staff-form-shell
.staff-form-step:hover {
  border-color: #aacabe;

  transform: translateY(-1px);

  box-shadow:
    0 4px 12px
    rgba(35, 76, 59, 0.06);
}

.staff-form-shell
.staff-form-step__number {
  display: grid;
  flex-shrink: 0;
  place-items: center;

  width: 28px;
  height: 28px;

  border-radius: 50%;

  background: #e3ebe7;
  color: #53675d;

  font-size: 0.62rem;
  font-weight: 900;
}

.staff-form-shell
.staff-form-step__label {
  min-width: 0;

  font-size: 0.62rem;
  font-weight: 850;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-form-shell
.staff-form-step--active {
  border-color: #087358;

  background: #edf8f4;
  color: #087358;

  box-shadow:
    0 0 0 2px
    rgba(8, 115, 88, 0.07);
}

.staff-form-shell
.staff-form-step--active
.staff-form-step__number {
  background: #087358;
  color: #ffffff;
}

.staff-form-shell
.staff-form-step--completed {
  border-color: #b6d7ca;

  background: #f1f9f5;
  color: #24624e;
}

.staff-form-shell
.staff-form-step--completed
.staff-form-step__number {
  background: #cce8dc;
  color: #087358;
}

/* =========================================================
   NESTED FORM CONTENT

   This section must remain a normal block. It must not use
   a grid or fixed sidebar because each form page controls
   its own internal layout.
   ========================================================= */

.staff-form-shell
> .staff-form-content {
  display: block;

  width: min(
    1240px,
    calc(100% - 40px)
  );

  min-width: 0;
  min-height: 420px;

  margin: 20px auto 30px;
  padding: 0;
}

.staff-form-shell
> .staff-form-content
> * {
  width: 100%;
  min-width: 0;
  max-width: none;
}

/* =========================================================
   FOOTER
   ========================================================= */

.staff-form-shell
> .staff-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  width: 100%;
  margin-top: auto;
  padding: 16px 30px;

  border-top: 1px solid #dbe6e1;

  background: #ffffff;
  color: #718078;
}

.staff-form-shell
> .staff-form-footer span {
  font-size: 0.66rem;
  font-weight: 750;
}

.staff-form-shell
> .staff-form-footer small {
  max-width: 560px;

  font-size: 0.6rem;
  line-height: 1.5;
  text-align: right;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */

@media (max-width: 1000px) {
  .staff-form-shell
  .staff-form-steps {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }
}

@media (max-width: 700px) {
  .staff-form-shell
  > .staff-form-header {
    padding: 13px 18px;
  }

  .staff-form-shell
  .staff-form-header__brand span {
    display: none;
  }

  .staff-form-shell
  > .staff-form-progress-section,
  .staff-form-shell
  > .staff-form-content {
    width:
      calc(
        100% - 24px
      );
  }

  .staff-form-shell
  > .staff-form-progress-section {
    margin-top: 14px;
    padding: 16px;
  }

  .staff-form-shell
  .staff-form-progress-heading {
    flex-direction: column;
  }

  .staff-form-shell
  .staff-form-progress-count {
    justify-items: start;

    width: 100%;
  }

  .staff-form-shell
  > .staff-form-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;

    padding: 14px 18px;
  }

  .staff-form-shell
  > .staff-form-footer small {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .staff-form-shell
  .staff-form-steps {
    grid-template-columns: 1fr;
  }

  .staff-form-shell
  .staff-form-step__label {
    white-space: normal;
  }

  .staff-form-shell
  .staff-form-exit-button {
    padding-right: 11px;
    padding-left: 11px;
  }
}