/* UniConnect — registration pages (university / school / industry).
   Split-card layout: framed artwork on the left, guided form on the right.
   Loaded AFTER each page's own <style>, so it restyles the existing wizard markup without touching its JavaScript. */

body.reg-body { --ra:#1f3b73; --ra-h:#172d59; --ra-soft:#eef2f9; --ra-ring:rgba(31,59,115,.16); --shade:9,30,64;
  background:radial-gradient(1200px 600px at 15% -10%, rgba(255,255,255,.55), transparent 60%), #e9ecf1; color:#101828; }

/* ---------- shell + card ---------- */
.reg-shell { min-height:100vh; padding:32px 28px 20px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; }
.reg-card { width:100%; max-width:1320px; background:#fff; border-radius:44px; padding:22px; display:grid; grid-template-columns:minmax(0,5fr) minmax(0,6fr); gap:44px; box-shadow:0 40px 90px -50px rgba(17,31,53,.45), 0 1px 0 rgba(255,255,255,.7) inset; }
.reg-copy { font-size:12px; color:#6b7280; }

/* ---------- artwork panel ---------- */
.reg-art { position:sticky; top:32px; align-self:start; height:calc(100vh - 150px); min-height:560px; max-height:880px; border-radius:32px; overflow:hidden; isolation:isolate;
  background:linear-gradient(140deg, var(--ra-soft), #f4f6fa 55%, #e7ecf4); }
.reg-art > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; transform:scale(1.02); }
.reg-art::after { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(to top, rgba(var(--shade),.94) 0%, rgba(var(--shade),.72) 30%, rgba(var(--shade),.18) 56%, rgba(var(--shade),0) 70%), linear-gradient(to bottom, rgba(var(--shade),.32), rgba(var(--shade),0) 20%); }
.art-top { position:absolute; top:22px; left:22px; right:22px; display:flex; justify-content:space-between; align-items:center; }
.art-pill { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:999px; background:rgba(10,18,32,.5); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border:1px solid rgba(255,255,255,.22); color:#fff; font-size:12.5px; font-weight:600; letter-spacing:.02em; }
.art-pill i { color:#fff; font-size:12px; }
.art-caption { position:absolute; left:26px; right:26px; bottom:26px; color:#fff; }
.art-caption h2 { font-size:30px; line-height:1.14; font-weight:800; letter-spacing:-.025em; margin:0 0 10px; }
.art-caption > p { font-size:14.5px; line-height:1.55; color:rgba(255,255,255,.82); margin:0 0 16px; max-width:420px; }
.art-caption ul { list-style:none; margin:0 0 18px; padding:0; display:grid; gap:9px; }
.art-caption li { display:flex; align-items:center; gap:10px; font-size:13.5px; font-weight:500; color:rgba(255,255,255,.94); }
.art-caption li i { width:22px; height:22px; border-radius:50%; background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.3); display:inline-flex; align-items:center; justify-content:center; font-size:10px; flex-shrink:0; }
.art-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:0; padding:14px 6px; border-radius:20px; background:rgba(255,255,255,.12); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border:1px solid rgba(255,255,255,.2); }
.art-stats > div { text-align:center; padding:0 6px; }
.art-stats > div + div { border-left:1px solid rgba(255,255,255,.22); }
.art-stats b { display:block; font-size:19px; font-weight:800; letter-spacing:-.02em; }
.art-stats span { display:block; font-size:11px; color:rgba(255,255,255,.75); margin-top:1px; }

/* ---------- form panel ---------- */
.reg-panel { display:flex; flex-direction:column; min-width:0; padding:14px 22px 6px 0; }
.reg-panel-inner { width:100%; max-width:660px; margin:0 auto; }
.reg-top { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:26px; }
.reg-brand { display:inline-flex; align-items:center; gap:11px; text-decoration:none; color:#111F35; }
.reg-brand .mark { width:38px; height:38px; border-radius:12px; background:var(--ra); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:16px; box-shadow:0 8px 18px -8px var(--ra); }
.reg-brand b { display:block; font-size:17px; font-weight:800; letter-spacing:-.02em; line-height:1.1; }
.reg-brand small { display:block; font-size:11.5px; color:#6b7280; font-weight:500; }
.reg-back { display:inline-flex; align-items:center; gap:8px; padding:8px 16px; border-radius:999px; border:1px solid #e2e5ea; color:#4b5563; font-size:13px; font-weight:600; text-decoration:none; transition:all .15s; }
.reg-back:hover { background:#f6f7f9; border-color:#cfd4dc; color:#111F35; }
.reg-head h1 { font-family:'IBM Plex Sans',sans-serif !important; font-size:32px; line-height:1.15; font-weight:800; letter-spacing:-.03em; margin:0; color:#0f1a2e; }
.reg-head > p { margin:10px 0 0; font-size:15px; line-height:1.6; color:#6b7280; max-width:560px; }
.reg-badges { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.reg-badges span { display:inline-flex; align-items:center; gap:8px; padding:7px 13px; border-radius:999px; background:var(--ra-soft); color:var(--ra-h); font-size:12.5px; font-weight:600; }
.reg-badges span i { font-size:12px; }

/* progress + stepper (sticky so the user always sees where they are) */
.reg-sticky { position:sticky; top:0; z-index:20; background:linear-gradient(#fff 82%, rgba(255,255,255,0)); padding:22px 0 6px; margin-top:6px; }
.reg-progress .row { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:9px; }
.reg-progress #mobile-step-label { font-size:12px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:#6b7280; }
.reg-progress #mobile-step-percent { display:none; }
.reg-progress .bar { height:6px; background:#eceef2; border-radius:6px; overflow:hidden; }
.reg-progress .progress-fill { height:100%; border-radius:6px; background:linear-gradient(90deg, var(--ra), var(--ra-h)) !important; animation:none !important; }
.reg-steps { display:flex; align-items:center; list-style:none; margin:16px 0 4px !important; padding:0 !important; }
.reg-steps .timeline-item { display:flex; align-items:center; flex:1; position:relative; padding:0 !important; margin:0 !important; }
.reg-steps .timeline-item:last-child { flex:0 0 auto; }
.reg-steps .timeline-item > p { display:none !important; }
.reg-steps .step-dot { position:static !important; order:1; flex-shrink:0; width:34px !important; height:34px !important; font-size:12.5px; transition:all .2s; cursor:pointer; }
.reg-steps .timeline-line { position:static !important; order:2; display:block; flex:1; width:auto !important; height:3px !important; margin:0 10px; border-radius:3px; background:#e5e8ee !important; }
.reg-steps .timeline-line.filled { background:var(--ra) !important; }

/* ---------- form ---------- */
.reg-form { background:transparent !important; border:0 !important; box-shadow:none !important; border-radius:0 !important; padding:22px 0 0 !important; min-height:0 !important; scroll-margin-top:150px; }
.reg-form .step-panel > .flex.items-start.justify-between { margin-bottom:22px !important; }
.reg-form .step-panel > .flex.items-start.justify-between > div:nth-child(2) { display:none !important; }
.reg-form .step-panel h2 { font-family:'IBM Plex Sans',sans-serif !important; font-size:22px !important; font-weight:800 !important; letter-spacing:-.02em; color:#0f1a2e; }
.reg-form .step-panel h2 + p { font-size:14px !important; color:#6b7280 !important; }
.reg-form .step-panel > .flex span.uppercase { color:var(--ra) !important; letter-spacing:.09em; }
.reg-form label.block, .reg-form label.text-sm { color:#6b7280; font-size:13px; font-weight:600; }
.reg-form .field { border:1px solid #d8dce3 !important; background:#fff; border-radius:999px !important; padding:13px 20px !important; font-size:14.5px !important; color:#111F35; min-height:48px; transition:border-color .15s, box-shadow .15s; }
.reg-form textarea.field { border-radius:22px !important; min-height:0; }
.reg-form select.field { appearance:none; -webkit-appearance:none; padding-right:44px !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 18px center; }
.reg-form .field::placeholder { color:#9aa3b0; }
.reg-form .field:focus { outline:none; border-color:var(--ra) !important; box-shadow:0 0 0 4px var(--ra-ring) !important; }
.reg-form .field.error { border-color:#DC2626 !important; box-shadow:0 0 0 4px rgba(220,38,38,.08) !important; }
.reg-form .error-msg { margin-left:8px; }
.reg-form .step-panel > .grid { row-gap:20px; column-gap:16px; }
.reg-form input.elegant, .reg-form input[type=checkbox], .reg-form input[type=radio] { accent-color:var(--ra); }
.reg-form .choice-card { border-radius:18px; }
.reg-form .choice-card.selected { border-color:var(--ra) !important; background:var(--ra-soft) !important; box-shadow:0 0 0 3px var(--ra-ring) !important; }
.reg-form .choice-card.selected .choice-icon { color:var(--ra) !important; }
.reg-form .dropzone { border-radius:20px; }
.reg-form .dropzone.dragover { border-color:var(--ra) !important; background:var(--ra-soft) !important; }
.reg-form .text-primary { color:var(--ra) !important; }
.reg-form .bg-primary-light { background:var(--ra-soft) !important; }

/* action bar (replaces the old full-width sticky footer) */
.reg-actions { position:sticky; bottom:0; z-index:15; display:flex; align-items:center; gap:10px; padding:22px 0 10px; margin-top:10px; background:linear-gradient(to top, #fff 68%, rgba(255,255,255,0)); }
.reg-actions .ml-auto { margin-left:auto; display:flex; align-items:center; gap:10px; }
.reg-actions button { border-radius:999px !important; padding:14px 28px !important; font-size:14.5px !important; font-weight:700 !important; letter-spacing:.005em; }
.reg-actions #backBtn, .reg-actions #backBtnMobile, .reg-actions button[onclick="saveDraft()"] { background:#fff; border:1px solid #d8dce3 !important; color:#4b5563 !important; padding:13px 22px !important; }
.reg-actions #backBtnMobile { width:48px; height:48px; padding:0 !important; }
.reg-actions #backBtn:hover, .reg-actions #backBtnMobile:hover, .reg-actions button[onclick="saveDraft()"]:hover { background:#f6f7f9; border-color:#c7ccd6 !important; color:#111F35 !important; }
.reg-actions #continueBtn, .reg-actions #submitBtn { background:var(--ra) !important; color:#fff !important; box-shadow:0 12px 24px -12px var(--ra) !important; border:0 !important; }
.reg-actions #continueBtn:hover, .reg-actions #submitBtn:hover { background:var(--ra-h) !important; transform:translateY(-1px); }
.reg-actions #submitBtn:disabled { opacity:.6; cursor:not-allowed; transform:none; }
.reg-foot { margin:6px 0 4px; text-align:center; font-size:13.5px; color:#6b7280; }
.reg-foot a { color:var(--ra); font-weight:700; text-decoration:none; }
.reg-foot a:hover { text-decoration:underline; }
.reg-trust { display:flex; align-items:flex-start; gap:12px; margin-top:22px; padding:14px 16px; border-radius:18px; background:#f7f8fa; color:#6b7280; font-size:12.5px; line-height:1.55; }
.reg-trust i { color:var(--ra); margin-top:2px; }

/* success modal */
.reg-body #success-modal .bg-primary { background:var(--ra) !important; }
.reg-body #success-modal a.bg-primary, .reg-body #success-modal button { border-radius:999px !important; }
.reg-body #success-modal > div { border-radius:32px; }

/* ---------- tablet & mobile ---------- */
@media (max-width: 1100px) { .reg-card { gap:30px; } .art-caption h2 { font-size:25px; } }
@media (max-width: 960px) {
  .reg-shell { padding:14px 12px 16px; justify-content:flex-start; }
  .reg-card { grid-template-columns:minmax(0,1fr); gap:16px; padding:12px; border-radius:30px; }
  .reg-art { position:relative; top:auto; height:210px; min-height:0; max-height:none; border-radius:22px; }
  .reg-art::after { background:linear-gradient(to top, rgba(var(--shade),.9) 0%, rgba(var(--shade),.15) 72%); }
  .art-caption { left:18px; right:18px; bottom:16px; }
  .art-caption h2 { font-size:21px; margin:0; }
  .art-caption > p, .art-caption ul, .art-stats { display:none; }
  .art-top { top:14px; left:14px; right:14px; }
  .reg-panel { padding:4px 6px 0; }
  .reg-head h1 { font-size:26px; }
  .reg-top { margin-bottom:18px; }
  .reg-actions button { padding:13px 22px !important; }
}
@media (max-width: 520px) {
  .reg-back span { display:none; }
  .reg-actions { gap:8px; }
  .reg-actions .ml-auto { gap:8px; }
  .reg-actions #continueBtn, .reg-actions #submitBtn { padding:13px 20px !important; }
  .reg-steps .step-dot { width:30px !important; height:30px !important; }
  .reg-steps .timeline-line { margin:0 6px; }
}
@media (prefers-reduced-motion: reduce) { .reg-art > img { transform:none; } }

/* ---------- desktop: full-height artwork pinned to the left of the whole page ---------- */
@media (min-width: 961px) {
  body.reg-body { background:#fff; }
  .reg-shell { display:block; padding:0; min-height:100vh; }
  .reg-card { display:block; max-width:none; padding:0; gap:0; border-radius:0; box-shadow:none; background:transparent; }
  .reg-art { position:fixed; top:16px; left:16px; width:calc(46vw - 16px); height:calc(100vh - 32px); height:calc(100dvh - 32px); min-height:0; max-height:none; z-index:1; }
  .reg-panel { margin-left:46vw; min-height:100vh; padding:28px clamp(24px,4.5vw,72px) 8px clamp(20px,3.2vw,52px); }
  .reg-copy { margin-left:46vw; text-align:center; padding:2px 24px 22px; }
}
/* ---------- step-aware artwork (see assets/js/register-art.js) ---------- */
.art-stage { position:absolute; inset:0; z-index:-2; overflow:hidden; }
.art-layer { position:absolute; inset:0; opacity:0; transform:scale(1); transition:opacity .9s ease, transform 0s linear .9s; }
.art-layer.is-on { opacity:1; transform:scale(1.07); transition:opacity .9s ease, transform 18s ease-out; }
.art-layer img { position:absolute; max-width:none !important; display:block; user-select:none; }
.art-caption h2, .art-caption > p, .art-caption ul { transition:opacity .28s ease, transform .28s ease; }
.art-caption.is-swap h2, .art-caption.is-swap > p, .art-caption.is-swap ul { opacity:0; transform:translateY(10px); }
.art-dots { display:inline-flex; align-items:center; gap:6px; padding:10px 13px; border-radius:999px; background:rgba(10,18,32,.5); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border:1px solid rgba(255,255,255,.22); }
.art-dots i { display:block; width:7px; height:7px; border-radius:999px; background:rgba(255,255,255,.45); transition:width .35s ease, background .35s ease; }
.art-dots i.on { width:22px; background:#fff; }
@media (prefers-reduced-motion: reduce) { .art-layer, .art-layer.is-on { transition:opacity .01ms; transform:none; } .art-caption h2, .art-caption > p, .art-caption ul { transition:none; } }
/* one palette for every registration page: the university blue; completed steps use the success green */
.reg-steps .step-dot.bg-gold { background:#059669 !important; color:#fff !important; }

/* Phones and touch screens: 16px fields (iPhones zoom into smaller ones), comfortable targets, the dynamic viewport and
   the iPhone home bar. Desktop is untouched. */
html { -webkit-tap-highlight-color:transparent; }
.reg-shell { min-height:100dvh; }
@media (max-width: 767px) {
  .reg-form .field { font-size:16px !important; }
  .reg-steps .step-dot { width:36px !important; height:36px !important; }
  .reg-back { min-height:40px; }
  .reg-actions { padding-bottom:calc(10px + env(safe-area-inset-bottom)); }
  .reg-actions button { min-height:50px; }
  .reg-shell { padding-left:max(12px, env(safe-area-inset-left)); padding-right:max(12px, env(safe-area-inset-right)); }
}
@media (hover:none) { .reg-actions button:active { transform:scale(.97); } }
