/* ── NERD Student Portal CSS ───────────────────────────────── */
:root {
  --g: #0F6E56;  --gm: #1D9E75;  --gd: #085041;  --gl: #E1F5EE;  --gl2: #C8EEE1;
  --a: #BA7517;  --al: #FAEEDA;  --am: #EF9F27;
  --b: #185FA5;  --bl: #E6F1FB;
  --r: #A32D2D;  --rl: #FCEBEB;
  --gy: #64655E; --gyl: #F5F5F2; --gyb: #D3D1C7; --gyd: #888780;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 2px 8px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.04);
  --radius: 10px; --radius-lg: 14px; --radius-xl: 18px;
  --font: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --trans: all .18s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 14px; color: #1a1a18; line-height: 1.55; }
a { color: var(--g); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── AUTH PAGES (register / login / resend) ─────────────────── */
.ns-auth-body {
  min-height: 100vh;
  background: linear-gradient(145deg, #0B4F3A 0%, #0F6E56 50%, #1a8a6a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  box-sizing: border-box;
}
.ns-auth-shell { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.ns-auth-brand {
  display: flex; align-items: center; gap: 12px; color: #fff;
}
.ns-brand-icon {
  width: 44px; height: 44px; background: rgba(255,255,255,.18); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.ns-brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.ns-brand-sub  { font-size: 12px; opacity: .65; margin-top: 1px; }

.ns-card {
  background: var(--white); border-radius: var(--radius-xl); padding: 28px;
  box-shadow: var(--shadow-md);
}
.ns-card-title { font-size: 18px; font-weight: 700; color: #111; margin-bottom: 6px; }
.ns-card-sub   { font-size: 13px; color: var(--gy); margin-bottom: 20px; line-height: 1.5; }

.ns-auth-footer {
  color: rgba(255,255,255,.55); font-size: 12px; text-align: center;
}
.ns-auth-footer .ns-link { color: rgba(255,255,255,.8); }

/* Sent state */
.ns-sent-icon {
  width: 60px; height: 60px; background: var(--gl); border-radius: 50%; border: 3px solid var(--gm);
  display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--g);
  margin: 0 auto 16px;
}
.ns-sent-desc { font-size: 14px; color: var(--gy); text-align: center; line-height: 1.6; margin-bottom: 16px; }

/* ── TOPBAR ──────────────────────────────────────────────────── */
.ns-topbar {
  background: var(--gd); color: #fff; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.ns-topbar-left  { display: flex; align-items: center; gap: 10px; }
.ns-topbar-right { display: flex; align-items: center; gap: 10px; }
.ns-topbar-icon  { font-size: 20px; opacity: .85; }
.ns-topbar-inst  { font-size: 14px; font-weight: 700; }
.ns-topbar-sub   { font-size: 11px; opacity: .55; }
.ns-topbar-user  { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.ns-user-dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--gm);
  border: 2px solid rgba(255,255,255,.3); display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 700;
}
.ns-user-name  { font-size: 13px; }
.ns-topbar-logout {
  color: rgba(255,255,255,.6); font-size: 18px; padding: 4px 6px;
  border-radius: 6px; transition: var(--trans);
}
.ns-topbar-logout:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── ALERTS ──────────────────────────────────────────────────── */
.ns-alert {
  padding: 11px 14px; border-radius: var(--radius); font-size: 13px;
  display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px;
  line-height: 1.5; border-left: 3px solid;
}
.ns-alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.ns-alert-ok   { background: var(--gl);  color: var(--gd); border-color: var(--gm); }
.ns-alert-err  { background: var(--rl);  color: var(--r);  border-color: var(--r); }
.ns-alert-warn { background: var(--al);  color: var(--a);  border-color: var(--am); }
.ns-alert-info { background: var(--bl);  color: var(--b);  border-color: var(--b); }

/* ── FIELDS ──────────────────────────────────────────────────── */
.ns-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.ns-label { font-size: 12px; font-weight: 600; color: #444; }
.ns-req   { color: var(--r); }
.ns-hint  { font-size: 11px; color: var(--gyd); display: flex; align-items: center; gap: 4px; }

.ns-input-wrap { position: relative; }
.ns-input-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--gyd); font-size: 16px; pointer-events: none;
}
.ns-input {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--gyb); border-radius: var(--radius);
  font-size: 13px; color: #1a1a18; background: #fff; transition: var(--trans);
  font-family: var(--font); appearance: none;
}
.ns-input:focus { outline: none; border-color: var(--gm); box-shadow: 0 0 0 3px rgba(29,158,117,.12); }
.ns-input-icon-l { padding-left: 36px; }
.ns-input-err { border-color: var(--r) !important; }
.ns-input[readonly], .ns-input[disabled] { background: var(--gyl); color: var(--gy); cursor: not-allowed; }
.ns-mono { font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace; letter-spacing: .05em; }
select.ns-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.ns-field-grid { display: grid; gap: 14px; margin-bottom: 4px; }
.ns-field-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.ns-field-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Radio group */
.ns-radio-group { display: flex; gap: 8px; }
.ns-radio-opt {
  flex: 1; border: 1.5px solid var(--gyb); border-radius: var(--radius); padding: 9px 12px;
  display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px;
  transition: var(--trans);
}
.ns-radio-opt input[type=radio] { display: none; }
.ns-radio-opt::before {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--gyb); flex-shrink: 0; transition: var(--trans);
}
.ns-radio-opt.checked,
.ns-radio-opt:has(input:checked) {
  border-color: var(--gm); background: var(--gl);
}
.ns-radio-opt.checked::before,
.ns-radio-opt:has(input:checked)::before {
  border-color: var(--gm); background: var(--gm);
  box-shadow: inset 0 0 0 3px #fff;
}

/* Field feedback */
.ns-field-feedback { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.ns-fb-ok      { color: var(--gd); }
.ns-fb-err     { color: var(--r); }
.ns-fb-neutral { color: var(--gy); }
.ns-saved-indicator { font-size: 12px; color: var(--gd); display: flex; align-items: center; gap: 5px; margin-top: 4px; }

/* ── BUTTONS ──────────────────────────────────────────────────── */
.ns-btn-primary, .ns-btn-outline, .ns-btn-submit {
  padding: 10px 20px; border-radius: var(--radius); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--trans); display: inline-flex; align-items: center;
  gap: 7px; border: 1.5px solid; text-decoration: none; white-space: nowrap;
}
.ns-btn-primary {
  background: var(--g); color: #fff; border-color: var(--gd);
  box-shadow: 0 2px 6px rgba(15,110,86,.25);
}
.ns-btn-primary:hover:not(:disabled) { background: var(--gd); box-shadow: 0 3px 10px rgba(15,110,86,.3); text-decoration: none; color: #fff; }
.ns-btn-primary:disabled { background: #ccc; border-color: #bbb; box-shadow: none; cursor: not-allowed; }
.ns-btn-outline { background: #fff; color: #333; border-color: var(--gyb); }
.ns-btn-outline:hover { background: var(--gyl); color: var(--g); text-decoration: none; }
.ns-btn-submit {
  background: var(--gd); color: #fff; border-color: var(--gd); padding: 12px 28px;
  font-size: 14px; box-shadow: 0 3px 12px rgba(8,80,65,.3);
}
.ns-btn-submit:hover { background: #063c30; }
.ns-btn-full { width: 100%; justify-content: center; margin-top: 4px; }
.ns-link { color: var(--g); font-weight: 500; }

/* ── INFO BOX ────────────────────────────────────────────────── */
.ns-info-box {
  background: var(--bl); border-left: 3px solid var(--b); border-radius: var(--radius);
  padding: 11px 14px; font-size: 13px; color: var(--b); display: flex;
  gap: 9px; align-items: flex-start; line-height: 1.55; margin-bottom: 18px;
}
.ns-info-box i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── DIVIDER ──────────────────────────────────────────────────── */
.ns-divider { border: none; border-top: 1px solid #F0F0EC; margin: 20px 0; }
.ns-muted   { font-size: 13px; color: var(--gyd); }

/* ══════════════════════════════════════════════════════════════
   FORM PAGE
══════════════════════════════════════════════════════════════ */
.ns-form-body { background: var(--gyl); min-height: 100vh; }

.ns-form-shell {
  max-width: 680px; margin: 0 auto; padding: 20px 16px 60px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Progress header */
.ns-progress-header {
  background: var(--white); border-radius: var(--radius-lg); padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.ns-progress-title {
  font-size: 15px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ns-complete-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--gl); color: var(--gd); padding: 4px 12px;
  border-radius: 20px; font-size: 14px; font-weight: 700;
}
.ns-deadline {
  font-size: 12px; font-weight: 400; color: var(--a); background: var(--al);
  padding: 3px 10px; border-radius: 20px;
}

/* Step strip */
.ns-steps {
  display: flex; align-items: center; gap: 0; overflow-x: auto;
  padding: 2px 0 4px; margin-bottom: 14px;
}
.ns-step { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.ns-step-circle {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--gyb);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--gy); background: #fff;
  transition: var(--trans);
}
.ns-step.active .ns-step-circle { border-color: var(--gm); color: var(--g); background: var(--gl); }
.ns-step.done   .ns-step-circle { border-color: var(--gm); background: var(--gm); color: #fff; }
.ns-step-label  { font-size: 10px; font-weight: 500; color: var(--gyd); white-space: nowrap; }
.ns-step.active .ns-step-label  { color: var(--g); font-weight: 700; }
.ns-step.done   .ns-step-label  { color: var(--gd); }
.ns-step-line {
  flex: 1; height: 2px; background: var(--gyb); min-width: 20px; max-width: 60px;
  align-self: center; margin-bottom: 18px; transition: var(--trans);
}
.ns-step-line.done { background: var(--gm); }

.ns-overall-bar { height: 5px; background: var(--gyb); border-radius: 10px; overflow: hidden; }
.ns-overall-fill { height: 100%; border-radius: 10px; background: var(--gm); transition: width .5s; }
.ns-overall-label { font-size: 11px; color: var(--gyd); margin-top: 5px; text-align: right; }

/* Locked banner */
.ns-locked-banner {
  background: var(--white); border-radius: var(--radius-lg); padding: 12px 16px;
  border: 1.5px solid var(--gyb); display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 6px;
  box-shadow: var(--shadow-sm);
}
.ns-locked-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.ns-locked-row i { color: var(--gy); font-size: 15px; }
.ns-locked-label { color: var(--gy); }
.ns-locked-sep { color: var(--gyb); }
.ns-locked-note { font-size: 11px; color: var(--gyd); }

/* Step panels */
.ns-step-panel {
  display: none; background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
  border: 1.5px solid transparent; transition: border-color .2s;
}
.ns-step-panel.active { display: block; border-color: var(--gm); }
.ns-step-panel.visited:not(.active) {
  display: block; opacity: .5; pointer-events: none;
}

.ns-panel-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px 14px; border-bottom: 1px solid #F0F0EC;
}
.ns-panel-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--gl);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--g); flex-shrink: 0;
}
.ns-panel-icon.complete { background: var(--gm); color: #fff; }
.ns-panel-title { font-size: 15px; font-weight: 700; }
.ns-panel-sub   { font-size: 12px; color: var(--gy); margin-top: 1px; }
.ns-panel-body  { padding: 20px 22px; }
.ns-panel-footer {
  padding: 14px 22px; border-top: 1px solid #F0F0EC;
  display: flex; align-items: center; justify-content: space-between;
  background: #FAFAF8; gap: 10px;
}
.ns-panel-footer-submit { background: var(--gl); }

/* Academic record grid */
.ns-record-grid { display: grid; gap: 0; border: 1px solid #F0F0EC; border-radius: var(--radius); overflow: hidden; }
.ns-record-row {
  display: flex; padding: 9px 14px; border-bottom: 1px solid #F0F0EC;
  font-size: 13px;
}
.ns-record-row:last-child { border-bottom: none; }
.ns-record-row:nth-child(even) { background: #FAFAF8; }
.ns-record-label { width: 160px; flex-shrink: 0; color: var(--gy); font-size: 12px; }
.ns-record-value { color: #1a1a18; flex: 1; }

/* Review summary cards */
.ns-summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.ns-summary-card {
  border: 1.5px solid var(--gyb); border-radius: var(--radius); padding: 13px 14px;
}
.ns-summary-card-title {
  font-size: 11px; font-weight: 600; color: var(--gy); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 7px; display: flex; align-items: center; gap: 5px;
}
.ns-summary-val  { font-size: 14px; font-weight: 600; margin-bottom: 4px; word-break: break-word; }
.ns-summary-meta { font-size: 11px; color: var(--gy); }
.ns-summary-ok   { font-size: 11px; color: var(--gd); display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.ns-summary-warn { font-size: 11px; color: var(--a);  display: flex; align-items: center; gap: 4px; margin-top: 4px; }

.ns-submit-note {
  background: #FAFAF8; border: 1px solid var(--gyb); border-radius: var(--radius);
  padding: 12px 14px; font-size: 12px; color: var(--gy); display: flex;
  gap: 8px; align-items: flex-start; line-height: 1.6;
}

.ns-save-notice {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gd);
  background: var(--gl); border-radius: var(--radius); padding: 10px 14px;
}

/* ── TOAST ────────────────────────────────────────────────────── */
.ns-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1a1a18; color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 7px;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 999;
}
.ns-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ns-toast.ns-toast-ok  { background: var(--gd); }
.ns-toast.ns-toast-err { background: var(--r); }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD PAGE
══════════════════════════════════════════════════════════════ */
.ns-dash-body { background: var(--gyl); min-height: 100vh; }
.ns-dash-shell { max-width: 700px; margin: 0 auto; padding: 20px 16px 60px; display: flex; flex-direction: column; gap: 14px; }

.ns-dash-hero {
  background: var(--white); border-radius: var(--radius-xl); padding: 22px;
  box-shadow: var(--shadow-sm); border: 1.5px solid var(--gyb);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.ns-dash-hero.complete { border-color: var(--gm); background: var(--gl); }
.ns-dash-hero-left  { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.ns-dash-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ns-dash-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.ns-dash-meta { font-size: 12px; color: var(--gy); margin-bottom: 7px; }
.ns-dash-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ns-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.ns-badge-green { background: var(--gl); color: var(--gd); }
.ns-badge-amber { background: var(--al); color: var(--a); }
.ns-badge-blue  { background: var(--bl); color: var(--b); }
.ns-badge-gray  { background: var(--gyl); color: var(--gy); }

/* Circle progress */
.ns-circle-prog { position: relative; width: 70px; height: 70px; flex-shrink: 0; }
.ns-circle-prog svg { width: 100%; height: 100%; }
.ns-circle-prog .track { stroke: var(--gyb); }
.ns-circle-prog .fill  { stroke: var(--gm); stroke-linecap: round; transition: stroke-dasharray .6s; }
.ns-circle-prog.complete .fill { stroke: var(--g); }
.ns-circle-label {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 11px; font-weight: 700; color: var(--gd); white-space: nowrap;
}

.ns-action-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 16px 20px;
  box-shadow: var(--shadow-sm); display: flex; align-items: center;
  justify-content: space-between; gap: 14px;
  border: 1.5px solid var(--gyb);
}
.ns-action-card.complete { border-color: var(--gm); background: var(--gl); }
.ns-action-text { display: flex; flex-direction: column; gap: 3px; }
.ns-action-text strong { font-size: 14px; }
.ns-action-text span   { font-size: 12px; color: var(--gy); }

.ns-dash-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.ns-dash-step-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 14px;
  border: 1.5px solid var(--gyb); box-shadow: var(--shadow-sm);
  text-align: center;
}
.ns-dash-step-card.done { border-color: var(--gl2); }
.ns-dsc-icon { font-size: 20px; color: var(--gy); margin-bottom: 7px; }
.ns-dash-step-card.done .ns-dsc-icon { color: var(--gm); }
.ns-dsc-label  { font-size: 11px; font-weight: 600; color: var(--gy); margin-bottom: 6px; }
.ns-dsc-status { font-size: 16px; }

.ns-dash-section-title {
  font-size: 12px; font-weight: 700; color: var(--gy); text-transform: uppercase;
  letter-spacing: .6px; margin-top: 4px;
}
.ns-dl-cards { display: flex; flex-direction: column; gap: 8px; }
.ns-dl-card {
  background: var(--white); border: 1.5px solid var(--gyb); border-radius: var(--radius-lg);
  padding: 13px 16px; display: flex; align-items: center; gap: 13px;
  transition: var(--trans); box-shadow: var(--shadow-sm);
}
.ns-dl-card:hover { border-color: var(--gm); background: var(--gl); text-decoration: none; }
.ns-dl-card > i { font-size: 24px; color: var(--g); flex-shrink: 0; }
.ns-dl-card strong { font-size: 13px; font-weight: 600; color: #1a1a18; }
.ns-dl-desc { font-size: 11px; color: var(--gy); margin-top: 2px; }

/* Pipeline */
.ns-pipeline { display: flex; flex-direction: column; gap: 0; }
.ns-pipe-step {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--white); border: 1px solid #F0F0EC; font-size: 13px;
}
.ns-pipe-step:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.ns-pipe-step:last-child  { border-radius: 0 0 var(--radius) var(--radius); }
.ns-pipe-step:not(:last-child) { border-bottom: none; }
.ns-pipe-dot {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--gyb);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; color: var(--gy);
}
.ns-pipe-step.done .ns-pipe-dot { background: var(--gm); border-color: var(--gm); color: #fff; }
.ns-pipe-label { flex: 1; }
.ns-dot { margin: 0 4px; color: var(--gyb); }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ns-field-grid.cols-3 { grid-template-columns: 1fr; }
  .ns-field-grid.cols-2 { grid-template-columns: 1fr; }
  .ns-summary-grid      { grid-template-columns: 1fr; }
  .ns-dash-steps        { grid-template-columns: repeat(2, 1fr); }
  .ns-dash-hero         { flex-direction: column; align-items: flex-start; }
  .ns-record-label      { width: 120px; }
  .ns-panel-body        { padding: 16px; }
  .ns-panel-footer      { padding: 12px 16px; flex-wrap: wrap; }
  .ns-panel-head        { padding: 14px 16px 12px; }
}
@media print {
  .ns-topbar, .ns-btn-primary, .ns-btn-outline, .ns-btn-submit,
  .ns-toast, .ns-save-notice { display: none !important; }
}
