*{box-sizing:border-box}:root{--blue:#001a45;--blue2:#002b70;--gold:#d9a441;--bg:#f4f6fa;--line:#d9e0ea;--red:#b42318}
html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:#182235;font-family:"Almarai",Tahoma,Arial,sans-serif;line-height:1.8}
.app-shell{max-width:1240px;margin:auto;padding:28px 18px 55px}.screen-hero{position:relative;overflow:hidden;border-radius:26px;padding:34px 38px;background:linear-gradient(135deg,#001a45,#003783);color:#fff;box-shadow:0 18px 45px rgba(0,43,112,.15)}
.screen-hero:after{content:"";position:absolute;width:230px;height:230px;border:34px solid rgba(217,164,65,.16);border-radius:50%;left:-65px;top:-95px}.screen-badge{display:inline-block;padding:6px 13px;border:1px solid rgba(255,255,255,.28);border-radius:999px;background:rgba(255,255,255,.09);font-size:13px;font-weight:700}
.screen-hero h1{margin:13px 0 5px;font-size:clamp(24px,4vw,39px);line-height:1.45}.screen-hero p{margin:0;color:#e7edf8;font-weight:700}
.steps{display:flex;justify-content:center;gap:12px;margin:22px auto}.step{display:flex;align-items:center;gap:9px;padding:9px 16px;border-radius:999px;background:#fff;border:1px solid var(--line);color:#667085;font-weight:700}.step b{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#edf2f8}.step.active{color:var(--blue);border-color:#b7c7de;box-shadow:0 7px 20px rgba(0,43,112,.07)}.step.active b{background:var(--gold);color:#fff}
.screen-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}.screen-card{background:#fff;border:1px solid #e1e6ee;border-radius:22px;box-shadow:0 12px 34px rgba(0,43,112,.07);padding:26px}.card-head{border-bottom:1px solid #e8edf4;margin-bottom:22px;padding-bottom:16px}.card-head h2,.help-card h2{margin:0;color:var(--blue);font-size:22px}.card-head p{margin:5px 0 0;color:#667085}
.form-step{display:none}.form-step.active{display:block}.instructions{margin:0;padding-right:25px}.instructions li{margin-bottom:9px}.instructions ul{margin-top:8px}.alert{margin:18px 0;padding:15px 17px;border-radius:13px;border-right:4px solid #d92d20;background:#fff4f2;color:#8b1e16;font-weight:700}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.top-gap{margin-top:20px}.field{display:flex;flex-direction:column;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:14px;font-weight:800;color:#263b5e}.required:after{content:" *";color:#d92d20}.field input,.field select{width:100%;min-height:48px;border:1px solid #cbd5e1;border-radius:11px;background:#fff;padding:10px 12px;font:inherit;color:#172033;outline:none;transition:.2s}.field input:focus,.field select:focus{border-color:#527bb8;box-shadow:0 0 0 4px rgba(0,43,112,.08)}
.check{padding:13px 15px;background:#f7f9fc;border:1px solid #e1e7ef;border-radius:12px}.check label{display:flex;gap:9px;align-items:center}.check input{width:18px;min-height:18px}
.group-title{margin:27px 0 15px;padding:9px 14px;border-right:4px solid var(--gold);background:#f5f8fc;color:var(--blue);border-radius:8px;font-size:17px}.buttons{display:flex;justify-content:flex-start;gap:12px;margin-top:24px}.buttons.split{justify-content:space-between}.button{border:0;border-radius:11px;padding:12px 20px;font:inherit;font-weight:800;cursor:pointer}.button.primary{background:linear-gradient(135deg,var(--blue2),var(--blue));color:#fff}.button.secondary{background:#eef2f7;color:var(--blue)}
.help-card{position:sticky;top:20px}.help-card ol{padding-right:21px}.privacy-note{padding:13px;border-radius:12px;background:#f7f3e8;color:#72510f;font-weight:700;font-size:13px}
@media(max-width:900px){.app-shell{padding:14px 10px 35px}.screen-hero{padding:25px 20px;border-radius:18px}.screen-layout{grid-template-columns:1fr}.help-card{position:static;order:-1}.screen-card{padding:18px;border-radius:16px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.steps{overflow:auto;justify-content:flex-start}.step{white-space:nowrap}}

.data-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:24px;padding:14px;border:1px solid #e0e6ef;background:#f8fafc;border-radius:13px}
.button.save{background:#eaf2ff;color:#113a75;border:1px solid #c7d7ef}
.button.danger{background:#fff1f0;color:#a1261c;border:1px solid #f1c8c3}
.save-status{font-size:13px;font-weight:800;color:#39714b}
@media(max-width:700px){.data-actions .button{width:100%}.save-status{width:100%;text-align:center}}

.button.import{background:#eef8f0;color:#1f6a38;border:1px solid #c9e4d0}

/* BUILD V4 - professional personal/academic section */
.personal-top{display:flex;justify-content:flex-start;margin-bottom:14px}
.gender-field{width:min(260px,100%)}
.name-card{
  border:1px solid #d8e1ed;
  border-radius:15px;
  overflow:hidden;
  background:linear-gradient(180deg,#fbfdff,#f7fafe);
  margin-bottom:18px;
}
.name-card-title{
  padding:10px 15px;
  background:#eef3f9;
  border-bottom:1px solid #d8e1ed;
  color:#17335f;
  font-weight:800;
  font-size:14px;
}
.name-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  padding:15px;
}
.name-grid .field label{font-size:13px}
.academic-grid{margin-top:2px}
@media(max-width:900px){
  .name-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .name-grid{grid-template-columns:1fr}
  .gender-field{width:100%}
}

/* v1.4 — secure form recovery */
.recovery-entry{max-width:1180px;margin:16px auto 0;padding:15px 18px;border:1px solid rgba(0,43,112,.14);border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(0,43,112,.06);display:flex;align-items:center;justify-content:space-between;gap:16px}
.recovery-entry strong{display:block;color:#001a45;margin-bottom:4px}.recovery-entry span{font-size:13px;color:#64748b}
.recovery-open{white-space:nowrap;background:#fff;color:#002b70;border:1px solid #d9a441}
.recovery-box{max-width:1180px;margin:12px auto 0;padding:20px;border:1px solid rgba(217,164,65,.45);border-radius:18px;background:#fffdf8;box-shadow:0 10px 28px rgba(0,43,112,.07)}
.recovery-box-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.recovery-box-head h2{margin:0 0 5px;color:#001a45;font-size:20px}.recovery-box-head p{margin:0;color:#64748b;font-size:13px}
.recovery-close{border:0;background:transparent;font-size:30px;line-height:1;color:#64748b;cursor:pointer}.recovery-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}
.recovery-status{font-size:13px;font-weight:700;margin-top:10px;color:#002b70}.recovery-status.error{color:#a61b1b}
.recovery-modal[hidden],.recovery-box[hidden]{display:none!important}.recovery-modal{position:fixed;inset:0;z-index:9999;background:rgba(0,20,55,.68);display:grid;place-items:center;padding:18px}
.recovery-modal-card{width:min(520px,100%);background:#fff;border-radius:22px;padding:26px;box-shadow:0 28px 80px rgba(0,0,0,.28);text-align:center;border-top:5px solid #d9a441}
.success-mark{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 12px;border-radius:50%;background:#edf8f1;color:#176b3a;font-size:28px;font-weight:800}
.recovery-modal-card h2{color:#001a45;margin:0 0 8px}.recovery-modal-card>p{color:#64748b;font-size:14px;line-height:1.8}
.credential-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 15px;margin-top:10px;border:1px solid #dfe6ef;border-radius:12px;background:#f8fafc;text-align:right}
.credential-row b{font-family:Arial,sans-serif;color:#002b70;letter-spacing:.4px}.credential-row.secret{border-color:rgba(217,164,65,.55);background:#fffaf0}.credential-row.secret b{color:#8a5b00}
.security-warning{margin-top:14px;padding:11px 13px;border-radius:10px;background:#fff5f5;color:#8b1d1d;font-size:12px;line-height:1.7;text-align:right}
.modal-actions{display:flex;gap:10px;margin-top:18px}.modal-actions .button{flex:1}
@media(max-width:700px){.recovery-entry{align-items:stretch;flex-direction:column}.recovery-grid{grid-template-columns:1fr}.modal-actions{flex-direction:column}.credential-row{align-items:flex-start;flex-direction:column}}

/* v1.5 — Recovery UX Polish */
.button.recovery-pdf{background:#fff8e8;color:#75500b;border:1px solid rgba(217,164,65,.65)}
.recovery-modal-card{width:min(610px,100%)}
.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#continuePreviewBtn{grid-column:1/-1}
.recovery-code-input{text-transform:uppercase;letter-spacing:1.2px;font-family:Arial,sans-serif}
.recovery-request-input{text-transform:uppercase;font-family:Arial,sans-serif}
.recovered-banner{margin:18px 0 0;padding:13px 15px;border-radius:12px;background:#edf8f1;border:1px solid #c9e6d3;color:#185f36;font-weight:800}
@media(max-width:700px){.modal-actions{grid-template-columns:1fr}.modal-actions .button,#continuePreviewBtn{grid-column:auto}}


/* ==========================================================
   PG INSTRUCTIONS — FINAL CONTENT PRESENTATION
   Scoped to step 1 only; no form / preview / PDF changes.
   ========================================================== */
#step1 .instructions-sections{
  margin:0;
  padding:0;
  display:grid;
  gap:14px;
}
#step1 .instruction-section{
  border:1px solid #dce4ee;
  border-radius:15px;
  overflow:hidden;
  background:linear-gradient(180deg,#ffffff,#fbfcfe);
  box-shadow:0 5px 16px rgba(0,43,112,.035);
}
#step1 .instruction-title{
  min-height:46px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 14px;
  color:var(--blue);
  background:linear-gradient(90deg,#f3f7fc,#fbfcfe);
  border-bottom:1px solid #e3e9f1;
  font-size:15px;
}
#step1 .instruction-title span{
  flex:0 0 29px;
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--gold);
  color:#fff;
  font-size:13px;
  font-weight:800;
}
#step1 .instruction-title strong{font-weight:800}
#step1 .instruction-section ul{
  margin:0;
  padding:12px 43px 13px 18px;
  list-style:none;
}
#step1 .instruction-section li{
  position:relative;
  margin:0;
  padding:5px 0;
  line-height:1.9;
  font-size:14px;
}
#step1 .instruction-section li::before{
  content:"";
  position:absolute;
  right:-19px;
  top:15px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--gold);
  box-shadow:0 0 0 3px rgba(217,164,65,.13);
}
#step1 .instruction-note{
  margin:0 14px 14px;
  padding:11px 14px;
  border-radius:11px;
  border-right:4px solid var(--gold);
  background:#fbf7ed;
  color:#684b12;
  font-size:13.5px;
  font-weight:700;
  line-height:1.9;
}
#step1 .instructions-footer{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:7px 18px;
  padding:13px 15px;
  border:1px solid #d9e1eb;
  border-radius:13px;
  background:#f7f9fc;
  color:#53647e;
  font-size:12.5px;
  text-align:center;
}
#step1 .instructions-footer strong{
  color:var(--blue);
  font-size:13px;
}
#step1 .instructions-footer span{
  position:relative;
}
#step1 .instructions-footer span::before{
  content:"";
  display:inline-block;
  width:4px;
  height:4px;
  margin-left:8px;
  border-radius:50%;
  background:var(--gold);
  vertical-align:middle;
}
@media(max-width:700px){
  #step1 .instruction-title{
    align-items:flex-start;
    font-size:14px;
    line-height:1.7;
  }
  #step1 .instruction-section ul{
    padding:10px 37px 11px 13px;
  }
  #step1 .instruction-section li{
    font-size:13.5px;
  }
  #step1 .instructions-footer{
    flex-direction:column;
    gap:3px;
  }
  #step1 .instructions-footer span::before{display:none}
}
