/* Extracted from apply.html */
:root {
  --yellow: #fee023;
  --white: #ffffff;
  --green: #4CAF50;
  --dark-blue: #01244a;
  --blue-accent: #178adc;
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Fira Sans', sans-serif;
  /* background-color: var(--dark-blue); Old bg */
}

/* Centered auth-style wrapper (no sparkles, no glow blobs) */
.auth-page-wrapper {
  position: relative;
  /* needed for absolute back button */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: none;
}

.auth-page-wrapper::before,
.auth-page-wrapper::after {
  display: none;
}

.auth-container {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  max-width: 700px;
  width: 90%;
}

/* Logo + brand */
.auth-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 24px;
}

.auth-logo img {
  display: block;
  max-width: 200px;
  /* smaller logo */
  width: 100%;
  height: auto;
  margin: 0 auto;
  /* yellow glow using your palette color */
  filter: drop-shadow(0 0 18px rgba(254, 224, 35, 0.85));
}

/* Page intro */
.auth-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 15px;
  color: var(--dark-blue);
  margin-bottom: 26px;
}

/* Main panel (similar feel to login contact-panel, but palette-only) */
.contact-panel {
  border: 1px solid rgba(255, 255, 255, 0.22); /* white border */
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4); /* enhanced depth */
  padding: 32px 26px;
  color: var(--white);
  text-align: left;
  background: var(--dark-blue);

  position: relative;
}

.contact-panel::before,
.contact-panel::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.25;
  z-index: 0;
}

.contact-panel::before {
  background: var(--yellow-accent);
  top: -150px;
  left: -150px;
}

.contact-panel::after {
  background: var(--green-accent);
  bottom: -150px;
  right: -150px;
}

.contact-panel h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--yellow);
}

.job-applied-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--white);
}

.job-applied-title span {
  color: var(--yellow);
}

.company-meta p {
  margin: 2px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.company-meta strong {
  color: var(--yellow);
}

/* Header row: ONLY profile photo now, aligned right */
.application-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 10px;
}

.application-header-info {
  flex: 1;
  text-align: left;

  order: 1;
}

/* Profile photo box (right side of header) */
.profile-photo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  gap: 10px;
  padding-right: 2rem;
  flex-shrink: 0;

  order: 2;
}

/* Circular avatar – matches profile.html style */
.profile-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

/* Upload label (clickable) */
.upload-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--yellow);
  text-decoration: underline;
}

.upload-label:hover {
  color: var(--green);
}

/* Back button base styles */
.btn-back-application {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(254, 224, 35, 0.12);
  /* yellow tint */
  border: 1px solid var(--yellow);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background-color 0.12s ease-out;
}

.btn-back-application i {
  font-size: 13px;
}

.btn-back-application:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
  color: var(--dark-blue);
}

/* GLOBAL Back button position - far left corner */
.btn-back-application--global {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 5;
  background-color: var(--yellow);
  color: var(--dark-blue);
}

/* Form styling */
.form-step {
  display: none;
  animation: stepFade 0.65s ease;
}

.form-step.active {
  display: flex;
  flex-direction: column;
}

@keyframes stepFade {
  from {
    opacity: 0.5;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-panel__form {
  margin-top: 10px;
}

.form-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group {
  margin-bottom: 14px;
}

.cover-letter-group {
  display: flex;
  flex-direction: column;
  height: stretch;
}

.form-group label {
  color: var(--white);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  display: block;
}

.form-control,
.form-control-textarea,
.form-control-select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--dark-blue);
  font-weight: 500;
  /* font-size: 14px; Manual size makes it off-center */
  padding: 10px 12px;
  box-sizing: border-box;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out, background-color 0.15s ease-out;
}

.form-control::placeholder,
.form-control-textarea::placeholder {
  color: #01244a;
  /* dark-blue */
  opacity: 0.6;
}

.form-control-textarea {
  min-height: 90px;
  resize: vertical;
  flex-grow: 1;
}

.form-control-select {
  height: 44px;
  padding: 0 12px;
  line-height: 44px;
  margin-bottom: 0;
}

.form-control-select span {
  color: var(--dark-blue) !important;
}

.form-control-file {
  width: 100%;
  font-size: 13px;
  color: var(--white);
}

.form-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

/* Focus states with yellow accent */
.form-control:focus,
.form-control-textarea:focus,
.form-control-select:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 2px rgba(23, 138, 220, 0.35);
  background-color: var(--white);
}

/* Invalid states */
.invalid,
.invalid .form-control-select {
  border: 2px solid red !important;
  outline: none;
}

.error-message {
  color: red;
  font-size: 0.875rem;
  margin-top: 4px;
}

/* Buttons row */
.step-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 1rem;
}

.step-buttons button {
  background-color: var(--blue-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease-out, transform 0.12s ease-out, box-shadow 0.12s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  width: stretch;
  height: stretch;
}

.step-buttons i {
  margin-left: 1rem;
  font-size: 13px;
}

.step-buttons button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.step-buttons button:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
  outline: none;
}

.step-buttons .prev-btn:hover{
  background-color: #1670b1;
}

.step-buttons .next-btn {
  background-color: var(--green);
}

.step-buttons .next-btn:hover{
  background-color: #3d8e41;
}

.btn-back-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  background-color: var(--yellow);
  color: var(--dark-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background-color 0.12s ease-out;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.btn-back-secondary i {
  margin-right: 6px;
  font-size: 13px;
}

.btn-back-secondary:hover {
  background-color: #fff3a3;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

/* Small text below actions */
.form-footer-note {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.application-status {
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.application-status--success {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.4);
  color: #9ef3a1;
}

.application-status--error {
  background: rgba(255, 99, 71, 0.18);
  border-color: rgba(255, 99, 71, 0.45);
  color: #ffc8c0;
}

.application-status--pending {
  background: rgba(254, 224, 35, 0.14);
  border-color: rgba(254, 224, 35, 0.5);
  color: var(--yellow);
}

.status-popup {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: rgba(1, 36, 74, 0.95);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
  pointer-events: none;
}

.status-popup--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.status-popup--success {
  background: rgba(76, 175, 80, 0.95);
  border: 1px solid rgba(158, 243, 161, 0.8);
}

.status-popup--error {
  background: rgba(255, 99, 71, 0.95);
  border: 1px solid rgba(255, 200, 192, 0.85);
}

.status-popup--pending {
  background: rgba(254, 224, 35, 0.92);
  border: 1px solid rgba(254, 224, 35, 0.6);
  color: var(--dark-blue);
}

.status-popup__close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.status-popup__close:hover,
.status-popup__close:focus {
  opacity: 1;
}

.status-popup__close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

/* Form progress bar */
.form-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

/* Progress line container */
.progress-line {
  position: absolute;
  top: 18px;
  left: calc(12.5%);
  width: calc(75%);
  height: 3px;
  background: grey;
  z-index: 1;
}

/* Animated fill */
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blue-accent);
  transition: width 0.35s ease;
}

/* Steps */
.progress-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-circle {
  width: 36px;
  height: 36px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: grey;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s ease;
}

.progress-step span {
  font-size: 14px;
  color: #666;
  transition: all 0.3s ease;
}

.progress-step.active .step-circle {
  background: var(--blue-accent);
  color: white;
}

.progress-step.active span {
  color: var(--blue-accent);
}

@media (max-width: 600px) {
  .status-popup {
    left: 16px;
    right: 16px;
    width: auto;
  }
}

@media (max-width: 768px) {
  
  .auth-page-wrapper {
    padding: 2rem 0;
  }
  
  .auth-container {
    max-width: 95%;
  }

  .contact-panel {
    padding: 26px 20px;
    margin-top: 0;
  }

  .auth-header h2 {
    font-size: 22px;
  }

  .application-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .application-header-info {
    order: 2;
  }

  .profile-photo-box {
    order: 1;
    padding-right: 0;
  }

  .profile-photo {
    width: 72px;
    height: 72px;
  }
}