/* ==========================================================================
   Job application page (apply.php). Neutral greys with a green accent.
   ========================================================================== */
.apply { --ap-green: #1e8e4e; --ap-green-d: #17753f; --ap-green-t: #e7f5ec; --ap-red: #d32f2f; --ap-line: #e3e3e3; padding-block: clamp(36px, 5vw, 72px); background: #f6f6f6; }
.apply__layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Side column */
.apply-side { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 20px); }
.apply-side__card { padding: 24px; border-radius: 20px; background: #fff; border: 1px solid var(--ap-line); }
.apply-side__eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #777; margin-bottom: 6px; }
.apply-side__card h2 { font-size: 1.35rem; line-height: 1.25; font-weight: 700; color: #1f1f1f; margin-bottom: 14px; }
.apply-side__card h3 { font-size: 1rem; font-weight: 700; color: #1f1f1f; margin-bottom: 12px; }
.apply-side__meta li, .apply-side__list li { display: flex; align-items: flex-start; gap: 10px; font-size: .9375rem; color: #444; padding: 5px 0; }
.apply-side__meta i, .apply-side__list i { color: #777; font-size: 1.05rem; margin-top: 1px; }
.apply-side__list i { color: var(--ap-green); }
.apply-side__note { margin-top: 12px; font-size: .8125rem; line-height: 1.6; color: #777; }
.apply-side__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .875rem; font-weight: 600; color: #444; }
.apply-side__back:hover { color: #000; }
.apply-side__card--help p { font-size: .9375rem; line-height: 1.7; color: #555; }
.apply-side__card--help a { color: #1f1f1f; font-weight: 600; text-decoration: underline; }

/* Stepper */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; counter-reset: s; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: .8125rem; font-weight: 600; color: #8a8a8a; }
.stepper li::before { content: ""; position: absolute; top: 18px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 3px; border-radius: 3px; background: #dcdcdc; }
.stepper li:first-child::before { display: none; }
.stepper__n { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid #d4d4d4; color: #777; font-weight: 700; font-size: .9375rem; transition: background .25s, border-color .25s, color .25s; }
.stepper li.is-active { color: #1f1f1f; }
.stepper li.is-active .stepper__n { border-color: #1f1f1f; color: #1f1f1f; }
.stepper li.is-done { color: var(--ap-green-d); }
.stepper li.is-done::before, .stepper li.is-active::before { background: var(--ap-green); }
.stepper li.is-done .stepper__n { background: var(--ap-green); border-color: var(--ap-green); color: #fff; font-size: 0; }
.stepper li.is-done .stepper__n::after { content: "\2713"; font-size: 1rem; }

/* Form card */
.apply-form { padding: clamp(22px, 3.2vw, 40px); border-radius: 24px; background: #fff; border: 1px solid var(--ap-line); box-shadow: 0 10px 30px rgba(0, 0, 0, .05); }
.apply-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.apply-step[hidden] { display: none; }
.apply-step legend { padding: 0; margin-bottom: 22px; font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-weight: 700; letter-spacing: -.02em; color: #1f1f1f; }
.apply-step legend span { display: block; margin-bottom: 4px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a8a8a; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label, .filebox__label { display: block; margin-bottom: 7px; font-size: .875rem; font-weight: 600; color: #2b2b2b; }
.filebox__label em { font-weight: 400; color: #8a8a8a; font-style: normal; }
.req { color: var(--ap-red); }
.field input:not([type=checkbox]):not([type=file]), .field select, .field textarea { width: 100%; padding: 13px 15px; border: 1.5px solid #d6d6d6; border-radius: 12px; background: #fff; font-size: 1rem; line-height: 1.4; color: #1f1f1f; outline: 0; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
.field select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ap-green); box-shadow: 0 0 0 4px rgba(30, 142, 78, .14); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--ap-red); }
.hint { display: block; margin-top: 6px; font-size: .8125rem; color: #777; }
.field__error { min-height: 0; margin: 6px 0 0; font-size: .8125rem; font-weight: 500; color: var(--ap-red); }
.field__error:empty { display: none; }

/* Upload boxes */
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed #cdcdcd; border-radius: 16px; background: #fafafa; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.drop i { font-size: 1.9rem; color: #777; }
.drop span { font-size: .9375rem; color: #333; }
.drop small { font-size: .8125rem; color: #888; }
.drop:hover, .drop.is-over, .sr-only:focus + .filelist, .filebox input:focus-visible ~ .drop { border-color: var(--ap-green); background: var(--ap-green-t); }
.filebox.has-error .drop { border-color: var(--ap-red); background: #fdf3f2; }
.filelist { display: grid; gap: 8px; margin-top: 10px; }
.filelist:empty { display: none; }
.filelist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f3f3f3; font-size: .875rem; }
.filelist li > i { color: var(--ap-green); font-size: 1.15rem; }
.filelist__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #222; }
.filelist small { color: #777; white-space: nowrap; }
.filelist button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #e3e3e3; color: #444; cursor: pointer; }
.filelist button:hover { background: var(--ap-red); color: #fff; }

/* Review */
.review { display: grid; gap: 16px; margin: 26px 0 22px; }
.review section { border: 1px solid var(--ap-line); border-radius: 16px; overflow: hidden; }
.review header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #f3f3f3; }
.review h3 { font-size: .9375rem; font-weight: 700; color: #1f1f1f; margin: 0; }
.review__edit { border: 0; background: none; font-size: .8125rem; font-weight: 700; color: #444; text-decoration: underline; cursor: pointer; }
.review dl { margin: 0; padding: 6px 16px 10px; }
.review dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: .9rem; }
.review dl > div:last-child { border-bottom: 0; }
.review dt { color: #777; }
.review dd { margin: 0; color: #1f1f1f; font-weight: 500; overflow-wrap: anywhere; }
.field--check { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: .9rem; line-height: 1.6; color: #444; cursor: pointer; }
.check input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ap-green); }

/* Actions + progress */
.apply-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #ececec; }
.apply-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 28px; border: 1.5px solid transparent; border-radius: 999px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.apply-btn[hidden] { display: none; }
.apply-btn--primary { background: #1f1f1f; color: #fff; }
.apply-btn--primary:hover { background: #000; }
.apply-btn--submit { background: var(--ap-green); color: #fff; }
.apply-btn--submit:hover { background: var(--ap-green-d); }
.apply-btn--ghost { background: #fff; color: #222; border-color: #cfcfcf; margin-right: auto; }
.apply-done__actions .apply-btn--ghost { margin-right: 0; }
.apply-btn--ghost:hover { background: #f3f3f3; }
.apply-btn:disabled { opacity: .6; cursor: progress; }
.apply-progress { margin-top: 22px; }
.apply-progress[hidden] { display: none; }
.apply-progress__track { height: 8px; border-radius: 8px; background: #e6e6e6; overflow: hidden; }
.apply-progress__track > span { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--ap-green); transition: width .2s; }
.apply-progress em { display: block; margin-top: 8px; font-size: .8125rem; font-style: normal; color: #666; }
.apply-banner { margin-bottom: 20px; padding: 14px 18px; border-radius: 12px; font-size: .9375rem; font-weight: 500; }
.apply-banner[hidden] { display: none; }
.apply-banner--error { background: #fdecea; color: #a8281f; border: 1px solid #f5c6c1; }

/* Success */
.apply-done { padding: clamp(28px, 4vw, 52px); border-radius: 24px; background: #fff; border: 1px solid var(--ap-line); box-shadow: 0 10px 30px rgba(0, 0, 0, .05); text-align: center; outline: 0; }
.apply-done[hidden] { display: none; }
.apply-done__icon { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--ap-green); color: #fff; font-size: 2.6rem; margin-bottom: 20px; animation: apPop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes apPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.apply-done h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -.02em; color: #1f1f1f; margin-bottom: 10px; }
.apply-done__lead { font-size: 1.0625rem; color: #444; }
.apply-done__ref { display: inline-block; margin: 16px 0 24px; padding: 8px 18px; border-radius: 999px; background: #f1f1f1; font-size: .9rem; color: #555; }
.apply-done__ref strong { color: #1f1f1f; letter-spacing: .04em; }
.apply-done__list { display: grid; gap: 12px; max-width: 620px; margin: 0 auto 28px; text-align: left; }
.apply-done__list li { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; border-radius: 14px; background: #f7f7f7; font-size: .9375rem; line-height: 1.6; color: #444; }
.apply-done__list i { font-size: 1.35rem; color: var(--ap-green); margin-top: 1px; }
.apply-done__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Closed / not found */
.apply-notice { max-width: 560px; margin: 0 auto; padding: clamp(28px, 4vw, 48px); border-radius: 24px; background: #fff; border: 1px solid var(--ap-line); text-align: center; }
.apply-notice > i { font-size: 2.6rem; color: #888; }
.apply-notice--closed > i { color: var(--ap-red); }
.apply-notice h2 { font-size: 1.6rem; font-weight: 700; margin: 12px 0 8px; color: #1f1f1f; }
.apply-notice p { color: #666; margin-bottom: 22px; }

@media (max-width: 960px) {
  .apply__layout { grid-template-columns: 1fr; }
  .apply-side { position: static; order: 2; }
}
@media (max-width: 640px) {
  .fields { grid-template-columns: 1fr; }
  .stepper__t { display: none; }
  .stepper li.is-active .stepper__t { display: block; position: absolute; top: 46px; white-space: nowrap; }
  .stepper { margin-bottom: 40px; }
  .review dl > div { grid-template-columns: 1fr; gap: 2px; }
  .apply-actions { flex-wrap: wrap; }
  .apply-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .apply-done__icon { animation: none; } .stepper__n, .apply-progress__track > span { transition: none; } }
