/* =====================================================
   NextGEN TVETMARA v19 - Student Visual Refresh
   Scope: student-facing visual polish only.
   Does not change auth/admin/counselor/database logic.
   ===================================================== */
:root {
  --nextgen-blue: #2563eb;
  --nextgen-blue-dark: #1e40af;
  --nextgen-blue-soft: #eff6ff;
  --nextgen-green: #16a34a;
  --nextgen-purple: #7c3aed;
  --nextgen-gold: #fbbf24;
  --nextgen-ink: #172033;
  --nextgen-muted: #64748b;
  --nextgen-card: rgba(255,255,255,.92);
  --nextgen-border: rgba(37, 99, 235, .12);
  --nextgen-shadow: 0 24px 60px rgba(30,64,175,.12);
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 8% 10%, rgba(59,130,246,.10), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(124,58,237,.10), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 55%, #eef4ff 100%) !important;
  color: var(--nextgen-ink);
}

/* ---------------- Header polish ---------------- */
#navigation {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 55%, #214ed5 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 40px rgba(30,64,175,.18);
}
#navigation .container {
  min-height: 112px;
}
#hamburgerBtn {
  border: 1px solid rgba(255,255,255,.22) !important;
  background: rgba(255,255,255,.11) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
#navigation h1 {
  letter-spacing: -0.04em;
  text-shadow: 0 2px 16px rgba(0,0,0,.16);
}
#headerRegName { letter-spacing: -.02em; }
#roleButtons,
#adminNavButtonWrap,
#counselorNavButtonWrap,
#quickAccessButtons,
.nextgen-top-actions,
.v19-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#logoutBtn {
  border-radius: 18px !important;
  padding: .85rem 1.45rem !important;
  box-shadow: 0 14px 28px rgba(239,68,68,.26);
}

/* ---------------- Common screen rhythm ---------------- */
.screen > h2,
#dashboard h2,
#learning h2,
#fields h2,
#pathway h2,
#passport h1 {
  letter-spacing: -0.04em;
}
#dashboard,
#learning,
#fields,
#pathway,
#passport,
#cvbuilder {
  animation: v19ScreenIn .42s ease both;
}
@keyframes v19ScreenIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Journey Hub ---------------- */
.v19-journey-hub {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(300px, 1.6fr) minmax(220px, .9fr);
  gap: 18px;
  align-items: stretch;
  margin: 0 auto 28px;
  max-width: 1720px;
}
.v19-hub-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37,99,235,.14);
  border-radius: 28px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--nextgen-shadow);
  padding: 24px;
}
.v19-hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 5%, rgba(59,130,246,.08), transparent 32%), radial-gradient(circle at 100% 90%, rgba(124,58,237,.08), transparent 38%);
}
.v19-hub-card > * { position: relative; z-index: 1; }
.v19-hub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #1d4ed8;
  background: #dbeafe;
}
.v19-hub-title {
  margin-top: 14px;
  font-size: clamp(1.7rem, 2.3vw, 2.75rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -.055em;
  color: var(--nextgen-ink);
}
.v19-hub-subtitle {
  margin-top: 10px;
  color: var(--nextgen-muted);
  line-height: 1.55;
  font-weight: 500;
}
.v19-next-btn {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 16px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 16px 30px rgba(37,99,235,.24);
  transition: transform .2s ease, box-shadow .2s ease;
}
.v19-next-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 36px rgba(37,99,235,.30); }
.v19-progress-ring {
  --p: 0;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: conic-gradient(#2563eb calc(var(--p) * 1%), #e5edff 0);
  box-shadow: inset 0 0 0 12px rgba(255,255,255,.88), 0 16px 38px rgba(37,99,235,.18);
}
.v19-progress-ring-inner {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbeafe;
}
.v19-progress-number {
  font-size: 2rem;
  font-weight: 950;
  letter-spacing: -.05em;
  color: #2563eb;
}
.v19-progress-label { font-size: .78rem; color: #64748b; font-weight: 800; }
.v19-checkpoints {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-top: 14px;
}
.v19-checkpoint {
  text-align: center;
  padding: 10px 8px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-weight: 800;
  font-size: .78rem;
}
.v19-checkpoint.done {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}
.v19-mini-visa {
  min-height: 100%;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #7c3aed 100%);
  color: #fff;
  border-color: rgba(255,255,255,.18);
}
.v19-mini-visa::before { background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.18), transparent 35%); }
.v19-mini-visa .v19-hub-eyebrow { background: rgba(255,255,255,.18); color: #fff; }
.v19-mini-visa .v19-hub-title, .v19-mini-visa .v19-hub-subtitle { color: #fff; }
.v19-mini-visa-code {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  letter-spacing: .08em;
}

/* ---------------- Dashboard card refresh ---------------- */
#dashboardStats {
  border-radius: 32px !important;
  border: 1px solid rgba(37,99,235,.11) !important;
  background: rgba(255,255,255,.88) !important;
  box-shadow: var(--nextgen-shadow) !important;
}
#dashboardStats .grid {
  gap: 24px !important;
}
#dashboardProfilePicture {
  width: 104px !important;
  height: 104px !important;
  box-shadow: 0 16px 34px rgba(37,99,235,.16);
}
#studentName {
  font-size: clamp(1.7rem, 2.2vw, 2.65rem) !important;
  letter-spacing: -.05em;
}
#studentSchool { font-size: clamp(1.05rem, 1.3vw, 1.4rem) !important; }
#totalMarks, #badgesEarned { letter-spacing: -.055em; }
#totalMarks, #badgesEarned {
  padding: 12px 18px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-width: 132px;
}
#achievementBadges > div {
  border-radius: 16px !important;
  transition: transform .2s ease, box-shadow .2s ease;
}
#achievementBadges > div:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(245,158,11,.16); }

/* ---------------- Student action cards ---------------- */
.v19-student-actions {
  margin-top: 22px;
}
.v19-quest-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px !important;
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(37,99,235,.11) !important;
  box-shadow: 0 20px 46px rgba(30,64,175,.10) !important;
  min-height: 230px !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.v19-quest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(30,64,175,.16) !important;
  border-color: rgba(37,99,235,.22) !important;
}
.v19-quest-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 120px;
  background: radial-gradient(circle, rgba(37,99,235,.10), transparent 62%);
  pointer-events: none;
}
.v19-quest-card h3 { letter-spacing: -.03em; color: var(--nextgen-ink); }
.v19-quest-card .text-4xl { font-size: 3.4rem !important; filter: drop-shadow(0 10px 16px rgba(37,99,235,.12)); }
.v19-quest-card button,
#dashboard .grid.md\:grid-cols-3 button {
  border-radius: 16px !important;
  padding: .75rem 1.2rem !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 24px rgba(37,99,235,.14);
}

/* ---------------- Learning / Mission map ---------------- */
.v19-mission-map {
  position: relative;
  margin: -6px 0 26px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(37,99,235,.12);
  box-shadow: var(--nextgen-shadow);
  display: grid;
  grid-template-columns: repeat(7, minmax(80px,1fr));
  gap: 10px;
}
.v19-mission-map::before {
  content: "";
  position: absolute;
  left: 42px;
  right: 42px;
  top: 51%;
  height: 4px;
  background: linear-gradient(90deg, #bfdbfe, #ddd6fe);
  border-radius: 999px;
  z-index: 0;
}
.v19-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  font-weight: 900;
  font-size: .78rem;
  color: #475569;
}
.v19-node-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 1.7rem;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
.v19-node.done .v19-node-icon { background: #dcfce7; border-color: #86efac; }
.v19-node.active .v19-node-icon { background: #dbeafe; border-color: #93c5fd; animation: v19Pulse 1.7s ease-in-out infinite; }
@keyframes v19Pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
#learning > .bg-white.rounded-lg.shadow-lg {
  border-radius: 28px !important;
  border: 1px solid rgba(37,99,235,.10);
  box-shadow: 0 20px 48px rgba(30,64,175,.10) !important;
}
#learning .mission-card {
  border-radius: 24px !important;
  background: linear-gradient(180deg, #fff, #f8fbff) !important;
  border: 1px solid rgba(37,99,235,.12) !important;
  box-shadow: 0 14px 30px rgba(30,64,175,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
#learning .mission-card:hover { transform: translateY(-4px); box-shadow: 0 24px 44px rgba(30,64,175,.14); }
#learning .mission-complete,
#learning .mission-completed {
  background: linear-gradient(180deg, #f0fdf4, #fff) !important;
  border-color: #bbf7d0 !important;
}
#learning .mission-locked {
  opacity: .68;
  filter: grayscale(.15);
}
#learning .mission-card button {
  border-radius: 16px !important;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(37,99,235,.14);
}
#progressBar { box-shadow: 0 0 0 4px rgba(37,99,235,.08); }

/* ---------------- Career quiz modern look ---------------- */
#careerQuizModal > div,
#missionModal > div {
  border-radius: 32px !important;
  box-shadow: 0 30px 90px rgba(15,23,42,.30) !important;
  border: 1px solid rgba(255,255,255,.28);
}
#careerQuizTitle,
#missionTitle { letter-spacing: -.04em; }
#careerQuizContent button,
#missionContent button,
.option-card,
.quiz-option {
  border-radius: 24px !important;
  border: 2px solid #dbeafe !important;
  background: #fff !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
#careerQuizContent button:hover,
#missionContent button:hover,
.option-card:hover,
.quiz-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(37,99,235,.14) !important;
  border-color: #60a5fa !important;
}
#careerNextBtn, #nextBtn {
  border-radius: 999px !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  font-weight: 900 !important;
}

/* ---------------- Passport visual refresh ---------------- */
#passport .bg-white.rounded-lg.shadow-lg {
  border-radius: 32px !important;
  border: 1px solid rgba(37,99,235,.12);
  box-shadow: 0 28px 70px rgba(30,64,175,.14) !important;
  overflow: hidden;
}
#passport .bg-white.rounded-lg.shadow-lg::before {
  content: "Digital Talent Visa";
  display: block;
  margin: -2rem -2rem 2rem;
  padding: 18px 28px;
  color: #fff;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #1d4ed8, #2563eb 52%, #7c3aed);
}
#passport h1 { letter-spacing: -.05em; }
#passport .grid.md\:grid-cols-2 > div {
  padding: 20px;
  border-radius: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
#passport button { border-radius: 16px !important; font-weight: 900 !important; }

/* ---------------- Mobile polish ---------------- */
@media (max-width: 1100px) {
  .v19-journey-hub { grid-template-columns: 1fr; }
  .v19-checkpoints { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
  #navigation .container { min-height: unset; gap: 14px; align-items: flex-start; }
  #navigation h1 { font-size: 1.6rem !important; }
  .v19-mission-map { grid-template-columns: repeat(4, minmax(72px,1fr)); overflow-x: auto; }
  .v19-mission-map::before { display: none; }
  #dashboardStats .grid { text-align: center; }
  #dashboardProfilePicture { margin: 0 auto; }
  #studentName, #studentSchool { white-space: normal !important; }
}
@media (max-width: 560px) {
  .v19-hub-card { padding: 18px; border-radius: 24px; }
  .v19-hub-title { font-size: 1.65rem; }
  .v19-progress-ring { width: 132px; height: 132px; }
  .v19-progress-ring-inner { width: 100px; height: 100px; }
  .v19-checkpoints { grid-template-columns: 1fr; }
  .v19-node-icon { width: 48px; height: 48px; }
  #dashboardStats { padding: 1.15rem !important; }
  #totalMarks, #badgesEarned { min-width: 100%; }
}

@media print {
  .v19-journey-hub,
  .v19-mission-map { display: none !important; }
}
