/* =========================================================
   HOSPITAL REGISTRATION + STATUS — SachiCare
   Used by BOTH pages: Hospital/register.php and Hospital/status.php
   Link it AFTER landingPage.css.

   1) SachiCare site tokens (identical to landingPage.css, so keeping
      them here is harmless and makes this file work on its own).
   2) .reg-page maps the extra tokens these pages need onto those
      site tokens, so both pages follow the site's green theme and
      the dark-mode toggle (html[data-theme="dark"]).
   ========================================================= */

/* ============ 1. SACHICARE SITE TOKENS ============ */
:root{
  --bg:#F4FBF8;
  --bg-rgb:244,251,248;               /* same colour as --bg, used for hero overlay */
  --bg-alt:#FFFFFF;
  --bg-soft:#EAF6F0; 
  --text:#0B2B22;
  --text-soft:#4B6358;
  --primary:#0E7C5A;
  --primary-dark:#0B4F3D;
  --accent:#12A66E;
  --accent-2:#0FB88C;
  --accent-soft:#E4F5EC;
  --border: rgba(11,79,61,0.12);
  --card-bg:#FFFFFF;
  --shadow: 0 20px 45px -25px rgba(11,79,61,0.35);
  --radius:18px;
  --nav-bg: rgba(255,255,255,0.55);
  --nav-border: rgba(255,255,255,0.4);

  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="dark"]{
  --bg:#071612;
  --bg-rgb:7,22,18;
  --bg-alt:#0D211A;
  --bg-soft:#0F2A21;
  --text:#EAF7F1;
  --text-soft:#9FC3B4;
  --primary:#22D585;
  --primary-dark:#12A66E;
  --accent:#28E39A;
  --accent-2:#1FE39A;
  --accent-soft:#123528;
  --border: rgba(255,255,255,0.08);
  --card-bg:#0E241C;
  --shadow: 0 24px 50px -25px rgba(0,0,0,0.6);
  --nav-bg: rgba(9,26,20,0.55);
  --nav-border: rgba(255,255,255,0.08);
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth; overflow-x:hidden; -webkit-text-size-adjust:100%;}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
  transition:background .4s ease, color .4s ease;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
}
/* overflow-x:hidden on <body> stops position:sticky from working (the "What happens next" column).
   "clip" hides sideways overflow the same way without turning <body> into a scroll container. */
body{overflow-x:clip;}

/* ============ 2. TOKENS FOR THESE PAGES (mapped to the site tokens above) ============ */
.reg-page{
  --surface:var(--card-bg);
  --surface-2:var(--bg-soft);
  --surface-3:color-mix(in srgb, var(--primary) 14%, var(--bg-alt));
  --text-muted:var(--text-soft);
  --text-faint:color-mix(in srgb, var(--text-soft) 62%, var(--bg-alt));
  --primary-tint:var(--accent-soft);
  --on-primary:#FFFFFF;
  --teal:var(--accent-2);
  --teal-tint:var(--accent-soft);
  --green:var(--accent);
  --green-tint:var(--accent-soft);
  --amber:#D9970F;  --amber-tint:#FBF1DE;
  --red:#DD4B4B;    --red-tint:#FCEAEA;
  --pulse:var(--accent-2);
  --shadow-sm:0 1px 2px rgba(11,43,34,.08);
  --shadow-md:var(--shadow);
  --shadow-lg:0 30px 60px -28px rgba(11,79,61,.45);
  --radius-sm:10px;
  --font-display:var(--font-heading);

  display:block;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
}

/* dark mode: only what the site tokens do not already cover */
html[data-theme="dark"] .reg-page{
  --on-primary:#04140E;
  --amber:#EAB13A;  --amber-tint:#3A2E12;
  --red:#F07272;    --red-tint:#3B1B1E;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-lg:0 30px 60px -28px rgba(0,0,0,.7);
}

.reg-page *, .reg-page *::before, .reg-page *::after{box-sizing:border-box;}
:where(.reg-page) :is(h1, h2, p, ul, ol){margin:0; padding:0;}
:where(.reg-page) :is(ul, ol){list-style:none;}
:where(.reg-page) button{font-family:inherit; cursor:pointer;}
:where(.reg-page) a{color:inherit; text-decoration:none;}

.reg-i{width:18px; height:18px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}
.reg-container{width:min(1180px, 100% - 40px); margin-inline:auto;}
.reg-hp{position:absolute !important; left:-9999px; width:1px; height:1px; opacity:0;}

/* ============ HERO ============ */
.reg-hero{
  position:relative; overflow:hidden; text-align:center;
  padding:-1px;
  background:
    radial-gradient(900px 480px at 88% -10%, color-mix(in srgb, var(--teal) 18%, transparent), transparent),
    radial-gradient(800px 460px at -8% 110%, color-mix(in srgb, var(--primary) 16%, transparent), transparent),
    var(--bg);
}
.reg-hero::before{
  content:""; position:absolute; inset:0; opacity:.5; pointer-events:none;
  background-image:linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size:44px 44px;
  -webkit-mask-image:radial-gradient(ellipse at center, #000 15%, transparent 72%);
  mask-image:radial-gradient(ellipse at center, #000 15%, transparent 72%);
}
.reg-hero-inner{position:relative; max-width:760px; margin-inline:auto;}
.reg-eyebrow{
  display:inline-flex; align-items:center; gap:8px; padding:7px 14px; border-radius:999px;
  background:var(--primary-tint); color:var(--primary); font-size:13px; font-weight:600;
}
.reg-hero h1{
  font-family:var(--font-display); font-weight:700; letter-spacing:-.02em; line-height:1.08;
  font-size:clamp(2.1rem, 5.4vw, 3.6rem); margin:20px 0 16px;
}
.reg-sub{max-width:600px; margin-inline:auto; color:var(--text-muted); font-size:1.02rem; line-height:1.7;}

/* signature Vitalis pulse line: the one animated moment on load */
.reg-pulse{display:block; width:min(520px, 84%); height:22px; margin:30px auto 0; overflow:visible;}
.reg-pulse path{
  stroke:var(--pulse); stroke-width:2; fill:none; stroke-linecap:round; stroke-linejoin:round;
  stroke-dasharray:520; stroke-dashoffset:520; animation:regPulse 3s ease-in-out infinite;
}
@keyframes regPulse{0%{stroke-dashoffset:520;} 55%{stroke-dashoffset:0;} 100%{stroke-dashoffset:-520;}}

/* ============ LAYOUT ============ */
.reg-body{position:relative; margin-top:-46px; padding:0 0 96px;}
.reg-layout{display:grid; grid-template-columns:minmax(0, 340px) minmax(0, 1fr); gap:32px; align-items:start;}

/* Aside (plain, not boxed cards: the timeline is the content) */
.reg-aside{position:sticky; top:110px; display:flex; flex-direction:column; gap:30px; padding-top:34px;}
.reg-side h2{font-family:var(--font-display); font-size:1.3rem; font-weight:600; margin-bottom:18px;}
.reg-timeline li{position:relative; display:flex; gap:14px; padding-bottom:22px;}
.reg-timeline li:last-child{padding-bottom:0;}
.reg-timeline li::before{content:""; position:absolute; left:17px; top:38px; bottom:2px; width:2px; background:var(--border);}
.reg-timeline li:last-child::before{display:none;}
.reg-tl-dot{width:36px; height:36px; flex-shrink:0; display:grid; place-items:center; border-radius:50%; background:var(--primary-tint); color:var(--primary);}
.reg-timeline b{display:block; font-size:14px; margin-bottom:3px;}
.reg-timeline span{font-size:13px; color:var(--text-muted); line-height:1.55;}
.reg-help{padding:20px; border-radius:var(--radius); background:var(--teal-tint);}
.reg-help h2{font-size:1.05rem; margin-bottom:8px;}
.reg-help p{font-size:13px; color:var(--text-muted); line-height:1.6; margin-bottom:12px;}
.reg-help a{display:flex; align-items:center; gap:9px; font-size:13.5px; font-weight:600; color:var(--teal); padding:4px 0; word-break:break-word;}
.reg-help a:hover{text-decoration:underline;}

/* ============ CARD ============ */
.reg-card{
  position:relative; overflow:clip; scroll-margin-top:110px;
  background:var(--surface); border:1px solid var(--border); border-radius:26px;
  box-shadow:var(--shadow-lg); padding:36px;
}
.reg-card::before{
  content:""; position:absolute; top:-90px; right:-90px; width:260px; height:260px; border-radius:50%; pointer-events:none;
  background:radial-gradient(circle, var(--primary-tint) 0%, transparent 70%);
}
.reg-card > *{position:relative;}
.reg-card.is-done .reg-wizard{display:none;}

/* ============ STEPPER ============ */
.reg-stepper{position:relative; display:grid; grid-template-columns:repeat(3, 1fr); margin-bottom:34px;}
.reg-stepper::before, .reg-stepper::after{content:""; position:absolute; top:19px; left:16.666%; height:3px; border-radius:3px;}
.reg-stepper::before{right:16.666%; background:var(--surface-3);}
.reg-stepper::after{width:calc(66.666% * var(--p, 0)); background:linear-gradient(90deg, var(--primary), var(--teal)); transition:width .45s cubic-bezier(.22,.8,.3,1);}
.reg-step{display:flex; flex-direction:column; align-items:center; gap:4px; border:none; background:none; padding:0; color:var(--text-faint); text-align:center;}
.reg-step-num{
  position:relative; z-index:1; width:40px; height:40px; border-radius:50%; display:grid; place-items:center;
  background:var(--surface); border:2px solid var(--border); font-family:var(--font-mono); font-weight:600; font-size:14px;
  transition:background .25s, border-color .25s, color .25s, box-shadow .25s;
}
.reg-step .reg-tick{display:none;}
.reg-step-label{font-size:13.5px; font-weight:700; margin-top:6px;}
.reg-step-sub{font-size:12px;}
.reg-step.is-current{color:var(--text);}
.reg-step.is-current .reg-step-num{border-color:var(--primary); color:var(--primary); box-shadow:0 0 0 5px var(--primary-tint);}
.reg-step.is-done{color:var(--text-muted);}
.reg-step.is-done .reg-step-num{background:var(--primary); border-color:var(--primary); color:var(--on-primary);}
.reg-step.is-done .reg-num-text{display:none;}
.reg-step.is-done .reg-tick{display:block;}
.reg-step:focus-visible, .reg-btn:focus-visible, .reg-eye:focus-visible{outline:2px solid var(--primary); outline-offset:3px; border-radius:10px;}


.reg-hero-inner span {color: var(--accent);} 

/* ============ PANELS + FIELDS ============ */
.reg-step-panel{display:none;}
.reg-step-panel.is-active{display:block; animation:regIn .35s ease;}
@keyframes regIn{from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:none;}}
.reg-panel-head{margin-bottom:24px;}
.reg-panel-head h2{font-family:var(--font-display); font-size:1.65rem; font-weight:600; letter-spacing:-.01em; margin-bottom:4px;}
.reg-panel-head p{color:var(--text-muted); font-size:14px;}

.reg-row{display:grid; gap:0 16px;}
.reg-row.two{grid-template-columns:repeat(2, minmax(0, 1fr));}
.reg-field{margin-bottom:18px; min-width:0;}
.reg-field > label:not(.reg-drop):not(.reg-check-row){display:block; font-size:12.5px; font-weight:700; margin-bottom:7px;}
.reg-field label b{color:var(--red);}
.reg-field label em{font-style:normal; font-weight:500; color:var(--text-faint);}

.reg-input{position:relative;}
.reg-input > .reg-i{position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--text-faint); pointer-events:none; transition:color .15s;}
.reg-input:focus-within > .reg-i{color:var(--primary);}
.reg-input input, .reg-input select{
  width:100%; height:46px; padding:0 14px 0 42px; border-radius:12px; border:1px solid var(--border);
  background:var(--surface-2); color:var(--text); font:500 14px var(--font-body); transition:background .15s, border-color .15s;
}
.reg-input.no-icon input{padding-left:14px;}
.reg-input input::placeholder{color:var(--text-faint); font-weight:400;}
.reg-input input:focus, .reg-input select:focus{outline:2px solid var(--primary); outline-offset:1px; background:var(--surface);}
.reg-input select{
  appearance:none; -webkit-appearance:none; padding-right:40px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238FA5AD' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center;
}
.reg-input select option{color:#0E252E; background:#fff;}
.reg-input.has-eye input{padding-right:46px;}
.reg-eye{position:absolute; right:6px; top:50%; transform:translateY(-50%); width:34px; height:34px; display:grid; place-items:center; border:none; background:none; color:var(--text-faint); border-radius:9px;}
.reg-eye:hover{color:var(--primary); background:var(--surface-3);}

.reg-field.is-invalid input, .reg-field.is-invalid select{border-color:var(--red); background:var(--red-tint);}
.reg-field.is-invalid .reg-drop{border-color:var(--red);}
.reg-err{display:block; margin-top:6px; font-size:12px; font-weight:600; color:var(--red); line-height:1.4;}
.reg-err:empty{display:none;}

/* logo dropzone */
.reg-drop{position:relative; display:flex; align-items:center; gap:14px; padding:14px; border:2px dashed var(--border); border-radius:14px; background:var(--surface-2); cursor:pointer; transition:border-color .15s, background .15s;}
.reg-drop:hover, .reg-drop.is-over, .reg-drop:focus-within{border-color:var(--primary); background:var(--primary-tint);}
.reg-drop input{position:absolute; width:1px; height:1px; opacity:0; pointer-events:none;}
.reg-drop-ico{width:56px; height:56px; flex-shrink:0; display:grid; place-items:center; border-radius:14px; background:var(--surface); border:1px solid var(--border); color:var(--primary); overflow:hidden;}
.reg-drop-ico img{width:100%; height:100%; object-fit:cover; display:block;}
.reg-drop-txt{display:flex; flex-direction:column; gap:2px; min-width:0;}
.reg-drop-txt b{font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.reg-drop-txt span{font-size:12px; color:var(--text-muted);}
.reg-drop-clear{margin-left:auto; border:1px solid var(--border); background:var(--surface); color:var(--red); font-size:12px; font-weight:700; padding:6px 12px; border-radius:9px;}
.reg-drop-clear[hidden]{display:none;}

/* map location block */
.reg-geo{padding:18px 18px 4px; margin-bottom:6px; border-radius:14px; background:var(--surface-2); border:1px solid var(--border);}
.reg-geo-head{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px;}
.reg-geo-head b{display:block; font-size:14px;}
.reg-geo-head span{font-size:12.5px; color:var(--text-muted);}
.reg-geo .reg-input input{background:var(--surface);}
.reg-geo-note{font-size:12.5px; font-weight:600; margin:-6px 0 14px; color:var(--green);}
.reg-geo-note:empty{display:none;}
.reg-geo-note.is-bad{color:var(--red);}

/* password meter */
.reg-meter{display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; margin-top:9px;}
.reg-meter i{height:5px; border-radius:5px; background:var(--surface-3); transition:background .25s;}
.reg-meter[data-level="1"] i:nth-child(-n+1){background:var(--red);}
.reg-meter[data-level="2"] i:nth-child(-n+2){background:var(--amber);}
.reg-meter[data-level="3"] i:nth-child(-n+3){background:var(--teal);}
.reg-meter[data-level="4"] i:nth-child(-n+4){background:var(--green);}
.reg-meter-txt{font-size:12px; color:var(--text-muted); margin-top:6px;}

/* terms */
.reg-check-row{display:flex; gap:11px; align-items:flex-start; font-size:13px; line-height:1.55; color:var(--text-muted); cursor:pointer;}
.reg-check-row input{width:18px; height:18px; margin-top:2px; flex-shrink:0; accent-color:var(--primary);}
.reg-secure{display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text-muted);}
.reg-secure .reg-i{color:var(--green);}

/* ============ BUTTONS / NAV ============ */
.reg-nav{display:flex; align-items:center; gap:12px; margin-top:28px; padding-top:24px; border-top:1px solid var(--border);}
.reg-nav-spacer{flex:1;}
.reg-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:0 22px; height:46px;
  border-radius:12px; border:1px solid transparent; font:700 14px var(--font-body);
  transition:background .15s, transform .1s, box-shadow .15s;
}
.reg-btn:active{transform:scale(.97);}
.reg-btn[hidden]{display:none;}
.reg-btn:disabled{opacity:.7; cursor:not-allowed;}
.reg-btn-sm{height:38px; padding:0 14px; font-size:12.5px; border-radius:10px;}
.reg-btn-primary{background:var(--primary); color:var(--on-primary); box-shadow:0 8px 18px -8px color-mix(in srgb, var(--primary) 70%, transparent);}
.reg-btn-primary:hover:not(:disabled){background:var(--primary-dark);}
.reg-btn-ghost{background:var(--surface); border-color:var(--border); color:var(--text);}
.reg-btn-ghost:hover{background:var(--surface-2);}
.reg-spin{display:none; width:16px; height:16px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:regSpin .7s linear infinite;}
.is-loading .reg-spin{display:inline-block;}
@keyframes regSpin{to{transform:rotate(360deg);}}

/* ============ RESULT PANELS (success / error) ============ */
.reg-result{display:none; text-align:center; padding:24px 6px 8px;}
.reg-result.is-active{display:block; animation:regIn .45s ease;}
.reg-result-ico{width:84px; height:84px; margin:0 auto 22px; display:grid; place-items:center; border-radius:50%; color:#fff;}
.reg-result-ico .reg-i{width:38px; height:38px; stroke-width:2.6;}
.reg-result.ok .reg-result-ico{background:linear-gradient(135deg, var(--green), var(--teal)); box-shadow:0 0 0 10px var(--green-tint); animation:regPop .6s cubic-bezier(.34,1.56,.64,1) both;}
.reg-result.bad .reg-result-ico{background:var(--red); box-shadow:0 0 0 10px var(--red-tint);}
@keyframes regPop{from{transform:scale(0);} to{transform:scale(1);}}
.reg-result h2{font-family:var(--font-display); font-size:clamp(1.5rem, 3.4vw, 1.95rem); font-weight:600; letter-spacing:-.01em; margin-bottom:10px;}
.reg-result > p{max-width:460px; margin:0 auto 18px; color:var(--text-muted); line-height:1.65;}
.reg-result .reg-redirect{font-size:14px; margin-bottom:12px;}
.reg-result .reg-redirect b{color:var(--primary); font-family:var(--font-mono); font-size:16px;}
.reg-bar{width:100%; max-width:300px; height:6px; margin:0 auto 26px; border-radius:999px; background:var(--surface-3); overflow:hidden;}
.reg-bar span{display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg, var(--primary), var(--teal));}
.reg-result.ok.run .reg-bar span{animation:regFill var(--dur, 5s) linear forwards;}
@keyframes regFill{to{width:100%;}}
.reg-code{display:inline-flex; align-items:baseline; gap:8px; margin-bottom:14px; padding:6px 14px; border-radius:10px; background:var(--red-tint); color:var(--red); font:600 14px var(--font-mono);}
.reg-code b{font-size:24px; line-height:1;}
.reg-errlist{max-width:460px; margin:0 auto 24px !important; padding:14px 18px 14px 34px !important; list-style:disc !important; text-align:left; border-radius:12px; background:var(--red-tint); color:var(--red); font-size:13px; font-weight:600; line-height:1.7;}
.reg-errlist:empty{display:none;}
.reg-actions{display:flex; flex-wrap:wrap; justify-content:center; gap:12px;}

/* ============ RESPONSIVE ============ */
@media (max-width:991px){
  .reg-layout{grid-template-columns:minmax(0, 1fr); gap:30px;}
  .reg-aside{position:static; order:2; padding-top:0;}
  .reg-body{margin-top:-36px;}
}
@media (max-width:640px){
  .reg-hero{padding-bottom:84px;}
  .reg-card{padding:26px 18px; border-radius:20px;}
  .reg-row.two{grid-template-columns:1fr;}
  .reg-step-sub{display:none;}
  .reg-stepper{margin-bottom:28px;}
  .reg-nav .reg-btn{flex:1;}
  .reg-nav-spacer{display:none;}
  .reg-geo-head .reg-btn{width:100%;}
}
@media (prefers-reduced-motion:reduce){
  .reg-pulse path{animation:none; stroke-dashoffset:0;}
  .reg-step-panel.is-active, .reg-result.is-active, .reg-result-ico{animation:none;}
  .reg-stepper::after{transition:none;}
}

/* soften the seam between hero and page background */
.reg-hero::after{content:""; position:absolute; left:0; right:0; bottom:0; height:130px; pointer-events:none; background:linear-gradient(to bottom, transparent, var(--bg));}

/* file name inside the dropzone must not inherit the red asterisk colour */
.reg-field .reg-drop-txt b{color:var(--text);}

/* =========================================================
   ENROLLMENT NUMBER (success screen)
   ========================================================= */
.reg-enroll{max-width:480px; margin:18px auto 20px; padding:16px 18px 14px; border:2px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius:16px; background:var(--primary-tint);}
.reg-enroll[hidden]{display:none;}
.reg-enroll-label{display:block; margin-bottom:8px; font-size:12.5px; font-weight:600; color:var(--text-muted);}
.reg-enroll-row{display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap;}
.reg-enroll-no{font-family:var(--font-mono); font-size:clamp(1.15rem, 4.8vw, 1.75rem); font-weight:600; letter-spacing:.06em; color:var(--text); white-space:nowrap;}
.reg-enroll-no .pre, .reg-enroll-no .suf{color:var(--text-muted); font-weight:500;}
.reg-enroll-no .mid{color:var(--primary);}
.reg-copy{display:inline-flex; align-items:center; gap:7px; height:36px; padding:0 14px; border-radius:10px; border:1px solid var(--border); background:var(--surface); color:var(--text); font:700 12.5px var(--font-body); transition:background .15s, color .15s, border-color .15s;}
.reg-copy:hover{background:var(--surface-2);}
.reg-copy .reg-i{width:15px; height:15px;}
.reg-copy.is-copied{background:var(--green-tint); border-color:var(--green); color:var(--green);}
.reg-copy:focus-visible{outline:2px solid var(--primary); outline-offset:2px;}
.reg-enroll small{display:block; margin-top:10px; font-size:12px; color:var(--text-muted); line-height:1.5;}

/* =========================================================
   STATUS PAGE
   ========================================================= */
.reg-hero--sm{padding-bottom:78px;}
.reg-container.reg-status-wrap{width:min(1020px, 100% - 40px);}
.reg-card--status{padding:34px;}
.reg-lookup{display:flex; gap:12px; align-items:stretch;}
.reg-lookup .reg-input{flex:1; min-width:0;}
.reg-lookup .reg-btn{flex-shrink:0;}
#enrollment_number{font-family:var(--font-mono); font-weight:600; letter-spacing:.06em; text-transform:uppercase;}
#enrollment_number::placeholder{letter-spacing:.04em; text-transform:none; font-weight:400;}
.reg-hint{margin-top:9px; font-size:12.5px; line-height:1.55; color:var(--text-muted);}
.is-loading .reg-search-i{display:none;}
.reg-status-result{margin-top:8px; padding-top:6px; animation:regIn .4s ease;}
.reg-status-result[hidden]{display:none;}
.reg-status-foot{margin-top:22px; text-align:center; font-size:14px; color:var(--text-muted);}
.reg-status-foot a{color:var(--primary); font-weight:600; text-decoration:underline; text-underline-offset:3px;}

/* summary strip */
.reg-summary{display:grid; grid-template-columns:minmax(0,1.9fr) minmax(0,1.7fr) minmax(0,1.3fr) auto; gap:16px 26px; align-items:center; margin:22px 0 34px; padding:18px 22px; border-radius:16px; background:var(--surface-2); border:1px solid var(--border);}
.reg-sum-item{min-width:0; display:flex; flex-direction:column; gap:4px;}
.reg-sum-item > span{font-size:12px; font-weight:600; color:var(--text-muted);}
.reg-sum-item > b{font-size:14.5px; font-weight:700; line-height:1.35; overflow-wrap:anywhere;}
.reg-sum-item > code{font-family:var(--font-mono); font-size:14.5px; font-weight:600; letter-spacing:.04em; color:var(--primary); overflow-wrap:anywhere;}
.reg-sum-chip{align-items:flex-end;}
.reg-chip{display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:999px; font-size:12.5px !important; font-weight:700; white-space:nowrap; color:var(--primary); background:var(--primary-tint);}
.reg-chip::before{content:""; width:7px; height:7px; border-radius:50%; background:currentColor;}
.reg-chip.is-ok{color:var(--green); background:var(--green-tint);}
.reg-chip.is-wait{color:var(--primary); background:var(--primary-tint);}
.reg-chip.is-warn{color:var(--amber); background:var(--amber-tint);}
.reg-chip.is-bad{color:var(--red); background:var(--red-tint);}

/* 5-step tracker: horizontal on wide screens, vertical on small ones */
.reg-tracker{list-style:none; display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); margin:0;}
.reg-tracker .reg-step{position:relative; padding:0 6px; text-align:center; cursor:default;}
.reg-tstep-txt{display:flex; flex-direction:column; align-items:center; gap:4px; min-width:0;}
.reg-tracker .reg-step-label{margin-top:8px; font-size:13.5px; line-height:1.35;}
.reg-tracker .reg-step-sub{display:block; font-size:12px; line-height:1.45; color:var(--text-faint);}
.reg-tracker .reg-step.is-done, .reg-tracker .reg-step.is-current{color:var(--text);}
.reg-tracker .reg-step.is-current .reg-step-num{animation:regRing 2.4s ease-in-out infinite;}
@keyframes regRing{0%,100%{box-shadow:0 0 0 5px var(--primary-tint);} 50%{box-shadow:0 0 0 10px color-mix(in srgb, var(--primary-tint) 25%, transparent);}}
.reg-tracker .reg-step:not(:last-child)::before{content:""; position:absolute; top:19px; left:calc(50% + 24px); width:calc(100% - 48px); height:3px; border-radius:3px; background:var(--surface-3); transition:background .4s;}
.reg-tracker .reg-step.is-done:not(:last-child)::before{background:linear-gradient(90deg, var(--primary), var(--teal));}
.reg-step .reg-cross{display:none;}
.reg-step.is-error .reg-num-text, .reg-step.is-error .reg-tick{display:none;}
.reg-step.is-error .reg-cross{display:block;}
.reg-step.is-error .reg-step-num{background:var(--red); border-color:var(--red); color:#fff; box-shadow:0 0 0 5px var(--red-tint);}
.reg-tracker[data-tone="warn"] .reg-step.is-error .reg-step-num{background:var(--amber); border-color:var(--amber); box-shadow:0 0 0 5px var(--amber-tint);}
.reg-tracker .reg-step.is-error{color:var(--text);}
.reg-plan-link{display:inline-flex; align-items:center; gap:5px; color:var(--primary); text-decoration:underline; text-underline-offset:3px;}
.reg-plan-link:hover{color:var(--primary-dark);}
.reg-plan-link .reg-i{width:14px; height:14px;}

/* message under the tracker */
.reg-note{margin:30px 0 20px; padding:14px 16px; border-radius:12px; border-left:4px solid var(--primary); background:var(--primary-tint); font-size:14px; line-height:1.65;}
.reg-note.is-ok{border-color:var(--green); background:var(--green-tint);}
.reg-note.is-warn{border-color:var(--amber); background:var(--amber-tint);}
.reg-note.is-bad{border-color:var(--red); background:var(--red-tint);}
.reg-actions--left{justify-content:flex-start;}
.reg-updated{margin-top:16px; font-size:12px; color:var(--text-faint);}
.reg-updated:empty{display:none;}

/* error panel on the status page sits below the form */
.reg-card--status .reg-result{padding-top:34px;}

@media (max-width:900px){
  .reg-summary{grid-template-columns:repeat(2, minmax(0,1fr));}
  .reg-sum-chip{align-items:flex-start;}
}
@media (max-width:720px){
  .reg-tracker{grid-template-columns:1fr;}
  .reg-tracker .reg-step{flex-direction:row; align-items:flex-start; gap:16px; padding:0 0 28px; text-align:left;}
  .reg-tracker .reg-step:last-child{padding-bottom:0;}
  .reg-tstep-txt{align-items:flex-start; padding-top:2px;}
  .reg-tracker .reg-step-label{margin-top:0;}
  .reg-tracker .reg-step:not(:last-child)::before{top:44px; bottom:4px; left:19px; width:3px; height:auto;}
  .reg-tracker .reg-step.is-done:not(:last-child)::before{background:linear-gradient(var(--primary), var(--teal));}
}
@media (max-width:560px){
  .reg-lookup{flex-direction:column;}
  .reg-lookup .reg-btn{width:100%;}
  .reg-summary{grid-template-columns:1fr; padding:16px;}
  .reg-card--status{padding:24px 16px;}
  .reg-actions--left .reg-btn{width:100%;}
}

/* =========================================================
   EXTRA RESPONSIVE: tablets, small phones, landscape, big screens
   ========================================================= */
/* tablets: put the two side blocks next to each other under the form */
@media (min-width:641px) and (max-width:991px){
  .reg-aside{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:28px; align-items:start;}
  .reg-card{padding:32px;}
}
/* phones: 16px inputs stop iOS from zooming the page on focus */
@media (max-width:640px){
  .reg-input input, .reg-input select{font-size:16px;}
  .reg-actions .reg-btn{flex:1 1 100%;}
}
@media (max-width:380px){
  .reg-hero{padding-left:14px; padding-right:14px;}
  .reg-container{width:calc(100% - 24px);}
  .reg-card, .reg-card--status{padding:20px 14px;}
  .reg-step-label{font-size:12px;}
  .reg-panel-head h2{font-size:1.4rem;}
  .reg-enroll{padding:14px 12px 12px;}
  .reg-enroll-no{letter-spacing:.03em;}
  .reg-btn{padding:0 16px;}
}
/* phones held sideways */
@media (max-height:520px) and (orientation:landscape){
  .reg-hero{padding-top:80px; padding-bottom:70px;}
  .reg-aside{position:static;}
  .reg-card{scroll-margin-top:80px;}
}
/* large desktops */
@media (min-width:1440px){
  .reg-layout{grid-template-columns:minmax(0,380px) minmax(0,1fr); gap:44px;}
  .reg-card{padding:44px;}
  .reg-input input, .reg-input select{height:50px; font-size:15px;}
  .reg-btn{height:50px;}
  .reg-panel-head h2{font-size:1.85rem;}
  .reg-container.reg-status-wrap{width:min(1120px, 100% - 80px);}
}
@media (min-width:1700px){
  .reg-container{width:min(1420px, 100% - 120px);}
  .reg-container.reg-status-wrap{width:min(1180px, 100% - 120px);}
  .reg-hero h1{font-size:4rem;}
  .reg-sub{max-width:680px; font-size:1.12rem;}
}
/* 2K / 4K screens: scale the whole page up so it does not look tiny */
@media (min-width:2200px){
  .reg-page{zoom:1.2;}
}
@media (min-width:3000px){
  .reg-page{zoom:1.5;}
}
@media (prefers-reduced-motion:reduce){
  .reg-tracker .reg-step.is-current .reg-step-num, .reg-status-result{animation:none;}
}
