/* ---------- Apply page ---------- */
.apply-hero {
  background: radial-gradient(1200px 400px at 80% -10%, #eaf3ff 0%, transparent 60%), var(--bg);
  padding: 56px 0 40px;
  text-align: center;
}
.apply-hero-inner { max-width: 640px; margin: 0 auto; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-alt); border: 1px solid var(--line); color: var(--navy-800);
  font-size: .82rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.apply-hero h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--navy-900); }
.apply-ready-note {
  font-size: .92rem; color: var(--navy-800); background: #eef4ff; border: 1px solid #d7e6fb;
  border-radius: 10px; padding: 10px 16px; display: inline-block; margin-top: 12px;
}

.apply-section { padding-top: 24px; }
.apply-container { max-width: 720px; }

.apply-form { display: flex; flex-direction: column; gap: 44px; }

.form-section {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  background: var(--bg); display: flex; flex-direction: column; gap: 18px;
}
.form-section legend {
  padding: 0; margin-bottom: 6px; float: left; width: 100%;
}
.form-section legend h2 { font-size: 1.2rem; color: var(--navy-900); margin-bottom: 4px; }
.form-section legend .section-sub { margin: 0; }

.form-row-triple { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; }
.form-row-triple .form-row { display: flex; flex-direction: column; gap: 6px; }

textarea {
  font: inherit; padding: 12px 14px; border-radius: 9px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); width: 100%; resize: vertical; min-height: 68px;
}
textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47,123,214,.15);
}
.req { color: var(--danger); }
.label-optional { font-weight: 500; color: var(--slate-600); }
.field-hint { font-size: .8rem; color: var(--slate-400); margin: -2px 0 0; }

input:disabled, select:disabled {
  background: var(--bg-alt); color: var(--slate-400); cursor: not-allowed;
}

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 28px 20px; text-align: center;
  cursor: pointer; transition: border-color .15s ease, background .15s ease; background: var(--bg-alt);
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragover {
  border-color: var(--blue-500); background: #eef4ff; outline: none;
}
.dropzone-icon { width: 26px; height: 26px; color: var(--blue-500); margin: 0 auto 10px; }
.dropzone p { margin: 0 0 4px; font-weight: 600; color: var(--navy-800); font-size: .95rem; }
.dropzone .field-hint { font-weight: 400; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.file-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: .85rem; color: var(--navy-800);
}
.file-list button {
  background: none; border: none; color: var(--danger); cursor: pointer; font-size: .8rem; font-weight: 600;
}

/* Authorization */
.authorization-box {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px;
  max-height: 220px; overflow-y: auto;
}
.authorization-box p { font-size: .85rem; color: var(--slate-600); margin: 0 0 10px; }
.authorization-box p:last-child { margin-bottom: 0; }
.placeholder-flag { color: #a15c00 !important; font-weight: 600; font-size: .8rem !important; }

/* Signature */
.signature-wrap { position: relative; }
#signatureCanvas {
  width: 100%; height: 160px; border: 1.5px dashed var(--line); border-radius: 12px;
  background: #fff; touch-action: none; cursor: crosshair; display: block;
}
#signatureCanvas.has-signature { border-style: solid; border-color: var(--blue-500); }
.signature-placeholder {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: var(--slate-400); font-size: .9rem; pointer-events: none; margin: 0;
}
.signature-clear {
  position: absolute; top: 10px; right: 12px; background: none; border: none;
  color: var(--blue-500); font-weight: 600; font-size: .82rem; cursor: pointer;
}

.signing-meta { font-size: .8rem; color: var(--slate-400); margin: -4px 0 4px; }

@media (max-width: 720px) {
  .form-section { padding: 24px 20px; }
  .form-row-triple { grid-template-columns: 1fr; }
}
