/* ------------------------------------------------------------------
   register.css — public alumni registration page.
   Dark theme matching the Al-Helal Mega Reunion hero
   (body #111121, blue→cyan gradient, cyan→green accent).
   ------------------------------------------------------------------ */
:root {
  --bg: #111121;
  --panel: #181830;
  --panel-2: #1f1f3a;
  --line: rgba(149, 149, 149, 0.16);
  --text: #e8eaf0;
  --muted: #9aa0b4;
  --accent1: #4ba2d3;
  --accent2: #7335fe;
  --blue: #485df5;
  --cyan: #0ccffb;
  --green1: #7befff;
  --green2: #07c926;
  --danger: #ff6b8b;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }

.reg-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}
.reg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 460px at 50% -8%, rgba(115, 53, 254, .22), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(12, 207, 251, .12), transparent 55%);
}
.text-gradient { -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.bg-gradient { background-image: linear-gradient(to right, #485df5, #0ccffb); }
.text-gradient.hl { background-image: linear-gradient(to right, var(--green1), var(--green2)); }

.reg-shell { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 30px 18px 70px; }

/* ---------- header ---------- */
.reg-header { text-align: center; position: relative; margin-bottom: 26px; }
.reg-back {
  position: absolute; left: 0; top: 4px; color: var(--muted); text-decoration: none;
  font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.reg-back:hover { color: var(--text); }
.reg-logo { width: 64px; height: auto; display: block; margin: 6px auto 12px; }
.reg-title { margin: 0; font-size: 28px; font-weight: 800; }
.reg-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) {
  .reg-back { position: static; display: inline-flex; margin-bottom: 14px; }
  .reg-title { font-size: 23px; }
}

/* ---------- card / sections ---------- */
.reg-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 24px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.reg-section { border: none; margin: 0; padding: 22px 0; border-top: 1px solid var(--line); }
.reg-section:first-of-type { border-top: none; }
.reg-section legend {
  display: flex; align-items: center; gap: 10px; padding: 0;
  font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 16px;
}
.reg-section .step {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(to right, var(--accent1), var(--accent2));
  color: #fff; font-size: 13px; font-weight: 700;
}

/* ---------- fields ---------- */
.field { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field .req { color: var(--danger); }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; margin-top: 6px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-size: 14.5px; font-weight: 400; outline: none;
  font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 78px; }
.field select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa0b4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent1); box-shadow: 0 0 0 3px rgba(75, 162, 211, .15);
}
.field input::placeholder, .field textarea::placeholder { color: #5d6480; }
.field option { background: var(--panel-2); color: var(--text); }

/* phone field with a fixed +88 prefix */
.phone-group { display: flex; align-items: stretch; margin-top: 6px; }
.phone-prefix {
  display: inline-flex; align-items: center; padding: 0 13px;
  background: var(--panel-2); border: 1px solid var(--line); border-right: none;
  border-radius: 10px 0 0 10px; color: var(--text); font-weight: 700; font-size: 14.5px;
}
.phone-group input {
  flex: 1 1 auto; width: auto; margin-top: 0 !important;
  border-radius: 0 10px 10px 0 !important; letter-spacing: .3px;
}

/* inline field validation message + input states */
.field-msg { display: block; margin-top: 7px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.field-msg i { margin-right: 5px; }
.field-msg.err { color: #ffadc0; }
.field-msg.ok { color: #7df59a; }
.field-msg.hint { color: var(--muted); font-weight: 500; }
.field input.input-err { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(255, 107, 139, .15) !important; }
.field input.input-ok { border-color: var(--green2) !important; box-shadow: 0 0 0 3px rgba(7, 201, 38, .13) !important; }
.phone-group input.input-err, .phone-group input.input-ok { position: relative; z-index: 1; }

.reg-grid { display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: start; }
.fields-col { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) {
  .reg-grid { grid-template-columns: 1fr; justify-items: center; }
  .fields-col { width: 100%; }
  .row2 { grid-template-columns: 1fr; }
  .reg-card { padding: 6px 16px 22px; }
}

/* ---------- photo / avatar ---------- */
.photo-col { display: grid; justify-items: center; gap: 10px; }
.avatar-frame {
  width: 150px; height: 150px; border-radius: 50%;
  background: var(--bg); border: 2px dashed var(--line);
  display: grid; place-items: center; overflow: hidden; cursor: pointer;
  transition: border-color .2s, transform .2s; position: relative;
}
.avatar-frame:hover { border-color: var(--accent1); transform: scale(1.02); }
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.avatar-empty { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.avatar-empty i { font-size: 26px; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hint { margin: 0; color: var(--muted); font-size: 11.5px; text-align: center; }

.mini-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px; padding: 8px 15px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(to right, var(--accent1), var(--accent2));
  transition: transform .2s, border-color .2s, background .2s; text-decoration: none;
}
.mini-btn:hover { transform: scale(1.04); }
.mini-btn.ghost { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.mini-btn.ghost:hover { border-color: var(--accent1); }

/* ---------- attachment upload ---------- */
.attach-field { margin-top: 14px; }
.attach-drop {
  margin-top: 6px; display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--bg); border: 1px dashed var(--line); border-radius: 10px;
  padding: 12px 14px; color: var(--muted); font-size: 14px; transition: border-color .2s;
}
.attach-drop:hover { border-color: var(--accent1); }
.attach-drop i { color: var(--green1); }
.attach-drop.has-file { color: var(--text); border-style: solid; }

/* ---------- lifetime membership ---------- */
.lifetime-row {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-top: 22px; transition: border-color .2s, background .2s;
}
.lifetime-row:hover { border-color: var(--accent1); }
.lifetime-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--green2); cursor: pointer; flex: 0 0 18px; }
.lifetime-row strong { color: var(--text); font-size: 14.5px; display: block; }
.lifetime-fee { color: var(--green1); font-size: 13px; font-weight: 700; }

/* ---------- fee box ---------- */
.fee-box {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; margin-top: 18px;
}
.fee-label { font-size: 11.5px; color: var(--muted); }
.fee-amount { font-size: 20px; font-weight: 800; color: var(--green1); }

/* ---------- submit ---------- */
.form-error {
  background: rgba(255, 107, 139, .1); border: 1px solid rgba(255, 107, 139, .35);
  color: #ffadc0; border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-top: 18px;
}
.pay-btn {
  width: 100%; margin-top: 22px; border: none; cursor: pointer;
  border-radius: 12px; padding: 15px 20px; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(to right, var(--blue), var(--cyan));
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .2s, opacity .2s, filter .2s;
}
.pay-btn:hover:not(:disabled) { transform: scale(1.01); filter: brightness(1.05); }
.pay-btn:disabled { opacity: .5; cursor: not-allowed; }
.pay-btn.busy { opacity: .8; cursor: progress; }
.secure-note { text-align: center; color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.secure-note i { color: var(--green2); }

/* ---------- cropper modal ---------- */
.cropper-overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(6, 6, 16, .8); backdrop-filter: blur(4px); padding: 18px;
}
.cropper-modal, .success-modal {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.cropper-modal h3, .success-modal h3 { margin: 0 0 4px; font-size: 18px; }
.cropper-stage {
  position: relative; width: 300px; height: 300px; max-width: 100%; aspect-ratio: 1;
  margin: 16px auto 0; border-radius: 12px; overflow: hidden; background: #000;
  touch-action: none; cursor: grab; user-select: none;
}
.cropper-stage:active { cursor: grabbing; }
.cropper-stage canvas { display: block; width: 100%; height: 100%; }
.cropper-mask {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: 0 0 0 2000px rgba(8, 8, 18, .55);
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55);
}
.cropper-zoom { display: flex; align-items: center; gap: 10px; margin: 16px 4px 4px; color: var(--muted); }
.cropper-zoom input[type=range] { flex: 1; accent-color: var(--accent1); }
.cropper-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.cropper-actions.center { justify-content: center; }

/* ---------- NPSB modal ---------- */
.npsb-modal {
  width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  max-height: 92vh; overflow-y: auto;
}
.npsb-modal h3 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.npsb-modal h3 i { color: var(--green1); }
.bank-details {
  text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; margin: 14px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; color: var(--green1); white-space: pre-wrap; word-break: break-word;
}
.npsb-upload {
  position: relative; border: 2px dashed var(--line); border-radius: 12px; min-height: 120px;
  display: grid; place-items: center; cursor: pointer; overflow: hidden; transition: border-color .2s;
}
.npsb-upload:hover { border-color: var(--accent1); }
.npsb-upload img { width: 100%; max-height: 220px; object-fit: contain; display: block; }
.npsb-upload-empty { display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 13px; padding: 18px; }
.npsb-upload-empty i { font-size: 26px; }

/* ---------- result (success / failure) modal ---------- */
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; font-size: 28px; color: #06210f;
  background: linear-gradient(to right, var(--green1), var(--green2));
}
.success-icon.fail { color: #2a0712; background: linear-gradient(to right, #ff8a8a, var(--danger)); }
.success-msg { margin: 8px 0 2px; }
