:root {
  --page-bg: #eef4fa;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: #ffffff;
  --surface-soft: #f5f8fc;
  --ink: #17263c;
  --muted: #66758a;
  --line: rgba(86, 111, 154, 0.18);
  --blue: #2e7de9;
  --blue-deep: #123a86;
  --danger: #c14646;
  --shadow: 0 28px 58px rgba(18, 44, 86, 0.14);
  --heading-font: "Space Grotesk", "Segoe UI", sans-serif;
  --body-font: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 10% 10%, rgba(211, 240, 93, 0.18), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(46, 125, 233, 0.12), transparent 28%),
    linear-gradient(180deg, #eef4fa 0%, #f8fbff 48%, #ffffff 100%);
}

.apply-shell {
  width: min(1220px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.apply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.apply-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.apply-brand img {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(18, 44, 86, 0.12);
}

.apply-brand strong,
.apply-intro h1,
.role-preview-copy h2,
.form-head h2,
.driver-license-head h3 {
  font-family: var(--heading-font);
}

.eyebrow {
  display: block;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.apply-brand strong {
  font-size: 1.16rem;
}

.back-link {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--blue-deep);
  text-decoration: none;
  font-weight: 800;
}

.apply-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.94fr) minmax(0, 1.12fr);
  gap: 22px;
  align-items: start;
}

.apply-intro,
.apply-card {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.apply-intro {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 20px;
  padding: 24px;
}

.intro-copy {
  display: grid;
  gap: 10px;
}

.apply-intro h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.apply-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.conversion-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.conversion-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: #41516a;
  font-size: 0.8rem;
  font-weight: 800;
}

.role-preview {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.role-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background: #dbe7f6;
}

.role-preview-copy {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-strong);
}

.role-summary-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.role-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(46, 125, 233, 0.12);
  color: var(--blue-deep);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.role-summary-chip.muted {
  background: rgba(15, 30, 55, 0.08);
  color: #55657b;
}

.role-preview-copy h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.role-points {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.role-points li,
.role-notes span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: #40516a;
  font-size: 0.82rem;
  font-weight: 800;
}

.apply-card {
  padding: 28px;
}

.form-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.form-head h2 {
  margin: 8px 0 0;
  font-size: 2rem;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.form-head p,
.driver-license-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.apply-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.proof-item {
  display: grid;
  gap: 6px;
  min-height: 100%;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}

.proof-item strong {
  font-family: var(--heading-font);
  font-size: 0.96rem;
}

.proof-item span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field-grid + .field-grid,
.field-grid + .driver-license,
.duplicate-check + .field-grid,
.field-grid + .duplicate-check {
  margin-top: 16px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input::placeholder {
  color: #95a2b7;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(46, 125, 233, 0.42);
  box-shadow: 0 0 0 4px rgba(46, 125, 233, 0.12);
  transform: translateY(-1px);
}

.driver-license {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(46, 125, 233, 0.05), rgba(46, 125, 233, 0.02));
}

.driver-license-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.driver-license-head h3 {
  margin: 8px 0 0;
  font-size: 1.28rem;
}

.submit-btn {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(18, 58, 134, 0.22);
  transition: transform 180ms ease, filter 180ms ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.submit-btn:disabled {
  opacity: 0.78;
  cursor: wait;
  transform: none;
}

.form-footer {
  margin-top: 22px;
}

#statusMsg {
  margin-top: 12px;
}

.success-box,
.error-box,
.duplicate-check {
  padding: 16px 18px;
  border-radius: 18px;
  line-height: 1.65;
}

.success-box {
  border: 1px solid rgba(83, 200, 129, 0.24);
  background: rgba(83, 200, 129, 0.12);
  color: #1b6a40;
}

.success-box h2 {
  margin: 0 0 8px;
}

.error-box {
  border: 1px solid rgba(193, 70, 70, 0.24);
  background: rgba(193, 70, 70, 0.1);
  color: #7f2b2b;
}

.duplicate-check {
  border: 1px solid rgba(255, 190, 62, 0.28);
  background: rgba(255, 190, 62, 0.12);
  color: #8a5900;
}

.field-error {
  margin-top: -4px;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 980px) {
  .apply-layout {
    grid-template-columns: 1fr;
  }

  .apply-intro {
    position: static;
  }

  .role-preview img {
    aspect-ratio: 16 / 10;
  }

  .apply-proof {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .apply-shell {
    width: min(100vw - 22px, 100%);
    padding-top: 12px;
  }

  .apply-header,
  .form-head,
  .driver-license-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .field-grid.two {
    grid-template-columns: 1fr;
  }

  .conversion-strip {
    gap: 6px;
  }

  .conversion-strip span {
    width: 100%;
    justify-content: center;
  }

  .apply-card,
  .apply-intro {
    padding: 20px;
    border-radius: 28px;
  }

  .apply-intro h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }
}
