:root{
  --brand:#0055b8;
  --brand-2:#0693e3;
  --brand-dark:#022a59;
  --bg:#f6f4f3;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;

  --loc-bg:#fff7ed;
  --loc-border:#fdba74;

  --emp-bg:#fff1f2;
  --emp-border:#fda4af;

  --personal-bg:#eff6ff;
  --personal-border:#93c5fd;

  --edu-bg:#f0fdf4;
  --edu-border:#86efac;

  --work-bg:#faf5ff;
  --work-border:#c4b5fd;

  --ref-bg:#fdf4ff;
  --ref-border:#f0abfc;

  --attach-bg:#ecfeff;
  --attach-border:#67e8f9;

  --ack-bg:#fefce8;
  --ack-border:#fde047;

  --shadow:0 14px 34px rgba(75,20,16,.08);
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  font-family:Arial,Helvetica,sans-serif;
  background:
    radial-gradient(circle at top, #fffaf8 0%, #f7f3f1 45%, #f2ece9 100%);
  color:var(--text);
}

a{
  text-decoration:none;
  color:inherit;
}

body{
  min-height:100vh;
}

.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:28px 18px 40px;
}

.apply-wrap{
  padding-top:24px;
}

.apply-card,
.auth-card{
  width:100%;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.8);
  border-radius:28px;
  padding:24px;
  box-shadow:0 20px 60px rgba(75,20,16,.12);
  backdrop-filter:blur(8px);
}

.apply-card{
  max-width:1180px;
}

.auth-card{
  max-width:760px;
  text-align:center;
}

.apply-logo-wrap,
.success-logo-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  margin-bottom:22px;
  text-align:center;
}

.apply-logo{
  width:min(3000px, 72vw);
  max-height:240px;
  object-fit:contain;
  display:block;
  margin:0 auto 10px;
}

.apply-brand-title{
  margin:0;
  font-size:30px;
  font-weight:800;
  color:var(--brand-dark);
  letter-spacing:.2px;
}

.apply-brand-subtitle{
  margin:6px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

.apply-section{
  margin-top:22px;
  border-radius:24px;
  padding:22px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow:var(--shadow);
}

.apply-section > h2{
  margin:0 0 16px;
  font-size:24px;
  color:var(--brand-dark);
  display:flex;
  align-items:center;
  gap:10px;
}

.apply-section > h2::before{
  content:"";
  width:10px;
  height:28px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--brand),var(--brand-2));
  display:inline-block;
}

#section1{
  background:linear-gradient(180deg,#fffdf9 0%, var(--loc-bg) 100%);
  border-color:var(--loc-border);
}

#section2{
  background:linear-gradient(180deg,#ffffff 0%, #fffaf9 100%);
}

#section3{
  background:linear-gradient(180deg,#fbfeff 0%, var(--attach-bg) 100%);
  border-color:var(--attach-border);
}

#section4{
  background:linear-gradient(180deg,#fffef8 0%, var(--ack-bg) 100%);
  border-color:var(--ack-border);
}

.panel{
  background:#fff;
  border:1px solid var(--border);
  border-radius:20px;
  padding:18px;
  margin-bottom:16px;
  box-shadow:0 8px 24px rgba(0,0,0,.04);
}

#section2 .panel:nth-of-type(1){
  background:linear-gradient(180deg,#fff8f8 0%, var(--emp-bg) 100%);
  border-color:var(--emp-border);
}

#section2 .panel:nth-of-type(2){
  background:linear-gradient(180deg,#f8fbff 0%, var(--personal-bg) 100%);
  border-color:var(--personal-border);
}

#section2 .panel:nth-of-type(3){
  background:linear-gradient(180deg,#f7fff9 0%, var(--edu-bg) 100%);
  border-color:var(--edu-border);
}

#section2 .panel:nth-of-type(4){
  background:linear-gradient(180deg,#fcf9ff 0%, var(--work-bg) 100%);
  border-color:var(--work-border);
}

#section2 .panel:nth-of-type(5){
  background:linear-gradient(180deg,#fff9fe 0%, var(--ref-bg) 100%);
  border-color:var(--ref-border);
}

.panel h3{
  margin:0 0 14px;
  font-size:19px;
  color:var(--brand-dark);
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.field{
  margin-bottom:2px;
}

.field--full{
  grid-column:1 / -1;
}

.field label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin-bottom:7px;
  color:#374151;
}

.field input,
.field select,
.field textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid #d7d9df;
  border-radius:14px;
  font-size:14px;
  outline:none;
  background:rgba(255,255,255,.96);
  color:var(--text);
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.field textarea{
  min-height:110px;
  resize:vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 4px rgba(136,34,27,.10);
  transform:translateY(-1px);
}

.option-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.option-card{
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid #f0caa8;
  border-radius:18px;
  padding:20px 18px;
  background:rgba(255,255,255,.85);
  cursor:pointer;
  min-height:82px;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  font-weight:700;
}

.option-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  border-color:#f59e0b;
}

.option-card input{
  width:18px;
  height:18px;
  accent-color:var(--brand);
  flex:0 0 auto;
}

.section-head-inline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.repeat-card{
  border:1px dashed rgba(75,20,16,.18);
  border-radius:18px;
  padding:14px;
  margin-bottom:12px;
  background:rgba(255,255,255,.72);
}

.checkbox-item{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
  border:1px solid #f4dd72;
  border-radius:16px;
  background:rgba(255,255,255,.7);
}

.checkbox-item input{
  margin-top:3px;
  width:18px;
  height:18px;
  accent-color:var(--brand);
}

.ack-list{
  margin-top:16px;
  display:grid;
  gap:10px;
  color:#374151;
  line-height:1.6;
  background:rgba(255,255,255,.55);
  border:1px dashed rgba(146,64,14,.20);
  padding:16px;
  border-radius:16px;
}

.form-actions{
  margin-top:18px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:0 18px;
  border-radius:14px;
  border:none;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn-primary{
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#fff;
  box-shadow:0 10px 24px rgba(136,34,27,.22);
}

.btn-primary:hover{
  background:linear-gradient(135deg,var(--brand-dark),var(--brand));
}

.btn-secondary{
  background:#fff;
  color:var(--text);
  border:1px solid var(--border);
}

.btn-secondary:hover{
  box-shadow:0 8px 20px rgba(0,0,0,.06);
}

button[disabled],
.btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.muted{
  color:var(--muted);
}

.flash{
  margin:0 0 16px;
  padding:12px 14px;
  border-radius:14px;
  font-size:14px;
}

.flash--error{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}

.flash--success{
  background:#f0fdf4;
  color:#166534;
  border:1px solid #bbf7d0;
}

.flash--info{
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
}

.field-error{
  color:#b91c1c;
  font-size:12px;
  margin-top:6px;
  font-weight:700;
}

.input-error{
  border-color:#b91c1c !important;
  box-shadow:0 0 0 4px rgba(185,28,28,.08);
}

.is-hidden{
  display:none !important;
}

.success-card-title{
  margin:0 0 12px;
  font-size:30px;
  color:var(--brand-dark);
}

.success-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:10px auto 18px;
  padding:10px 16px;
  border-radius:999px;
  background:#f0fdf4;
  border:1px solid #bbf7d0;
  color:#166534;
  font-weight:800;
}

.success-meta{
  margin-top:12px;
  padding:14px 16px;
  border-radius:16px;
  background:#fffaf7;
  border:1px solid #f1ddd6;
  color:#374151;
}

.footer-public{
  text-align:center;
  padding:16px 12px 4px;
  color:#6b7280;
  font-size:12px;
}

@media (max-width: 980px){
  .form-grid,
  .option-grid{
    grid-template-columns:1fr;
  }

  .apply-card,
  .auth-card{
    padding:18px;
    border-radius:22px;
  }

  .apply-section{
    padding:16px;
    border-radius:20px;
  }

  .apply-section > h2{
    font-size:20px;
  }

  .section-head-inline{
    flex-direction:column;
    align-items:stretch;
  }

  .form-actions{
    justify-content:stretch;
  }

  .form-actions .btn{
    width:100%;
  }

  .apply-brand-title,
  .success-card-title{
    font-size:24px;
  }

  .apply-logo{
    width:min(220px, 70vw);
    max-height:110px;
  }
}