/* ─── NPPE Vault — Redesigned Global Styles ─────────────────────────────────
   Bold, warm design with organic shapes and editorial typography.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0f;
  --bg2:       #121218;
  --bg3:       #1a1a24;
  --surface:   #16161f;
  --border:    #2a2a3a;
  --border2:   #3a3a4e;
  --text:      #f0ebe3;
  --text2:     #c4bfb6;
  --text3:     #8a857d;
  --muted:     #5e5a54;
  --accent:    #e8734a;
  --accent-h:  #d4613a;
  --accent-glow: rgba(232, 115, 74, 0.15);
  --accent2:   #4a9eff;
  --success:   #3ecf8e;
  --danger:    #ef5350;
  --warning:   #ffb547;
  --gold:      #f5c542;
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xl: 24px;
  --shadow:    0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.6);
  --glow:      0 0 60px rgba(232, 115, 74, 0.08);
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Fira Code', monospace;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-h); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  width: 100%;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
::selection { background: var(--accent); color: #fff; }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1 { font-size: 2.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; color: var(--text); }
h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text2); }
.display { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -.04em; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 640px; margin: 0 auto; padding: 0 24px; }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding: 16px 0;
  transition: background .3s;
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
}
.nav__logo {
  font-size: 1.2rem; font-weight: 800; color: var(--text);
  text-decoration: none; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 2px;
}
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  color: var(--text3); font-size: .875rem; padding: 8px 14px;
  border-radius: var(--radius-sm); transition: all .2s;
  text-decoration: none; font-weight: 500;
}
.nav__link:hover { color: var(--text); background: rgba(255,255,255,0.04); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; border: none;
  transition: all .2s cubic-bezier(.4,0,.2,1); text-decoration: none; cursor: pointer;
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn--primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 12px rgba(232, 115, 74, 0.3);
}
.btn--primary:hover {
  background: var(--accent-h); text-decoration: none; color: #fff;
  box-shadow: 0 4px 20px rgba(232, 115, 74, 0.4);
  transform: translateY(-1px);
}
.btn--secondary {
  background: rgba(255,255,255,0.06); color: var(--text);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  background: rgba(255,255,255,0.1); text-decoration: none;
  border-color: var(--border2);
}
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { opacity: .88; }
.btn--success { background: var(--success); color: #fff; }
.btn--ghost { background: transparent; color: var(--text2); }
.btn--ghost:hover { background: rgba(255,255,255,0.04); color: var(--text); text-decoration: none; }
.btn--sm  { padding: 8px 16px; font-size: .82rem; }
.btn--lg  { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius); }
.btn--full { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }
.btn:active:not(:disabled) { transform: scale(.98); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.card--hover:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.card--glass {
  background: rgba(22, 22, 31, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 99px;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}
.badge--blue { background: rgba(74, 158, 255, 0.12); color: var(--accent2); border: 1px solid rgba(74, 158, 255, 0.2); }
.badge--green { background: rgba(62, 207, 142, 0.12); color: var(--success); border: 1px solid rgba(62, 207, 142, 0.2); }
.badge--red { background: rgba(239, 83, 80, 0.12); color: var(--danger); border: 1px solid rgba(239, 83, 80, 0.2); }
.badge--orange { background: rgba(232, 115, 74, 0.12); color: var(--accent); border: 1px solid rgba(232, 115, 74, 0.2); }
.badge--muted { background: var(--bg3); color: var(--text3); }

/* ── Stars ───────────────────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; }
.stars span { color: var(--gold); font-size: 1.1rem; }
.stars span.empty { color: var(--bg3); }

/* ── Form elements ───────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: .85rem; font-weight: 500; color: var(--text2); }
.form-hint  { font-size: .8rem; color: var(--muted); }
.form-error { font-size: .85rem; color: var(--danger); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .9rem; border: 1px solid transparent;
}
.alert--info    { background: rgba(74, 158, 255, 0.08); border-color: rgba(74, 158, 255, 0.15); color: #93c5fd; }
.alert--success { background: rgba(62, 207, 142, 0.08); border-color: rgba(62, 207, 142, 0.15); color: #86efac; }
.alert--danger  { background: rgba(239, 83, 80, 0.08); border-color: rgba(239, 83, 80, 0.15); color: #fca5a5; }
.alert--warning { background: rgba(255, 181, 71, 0.08); border-color: rgba(255, 181, 71, 0.15); color: #fcd34d; }

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress { height: 6px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.progress__bar { height: 100%; border-radius: 99px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.progress__bar--success { background: var(--success); }
.progress__bar--warning { background: var(--warning); }
.progress__bar--danger  { background: var(--danger); }
.progress__bar--accent  { background: var(--accent); }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ── Section spacing ─────────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section--sm { padding: 48px 0; }

/* ── Score ring ──────────────────────────────────────────────────────────── */
.score-ring {
  width: 120px; height: 120px; border-radius: 50%;
  border: 6px solid var(--bg3); display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}
.score-ring__pct { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.score-ring__label { font-size: .7rem; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }

/* ── Table ───────────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 10px 14px;
  font-size: .75rem; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Exam grid (on dashboard) ────────────────────────────────────────────── */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.exam-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; position: relative;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.exam-card:not(.exam-card--locked):hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}
.exam-card--locked { opacity: .45; }
.exam-card__num {
  font-size: .7rem; color: var(--text3); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.exam-card__title { font-weight: 600; margin-bottom: 12px; font-size: 1.05rem; }
.exam-card__lock {
  position: absolute; top: 16px; right: 16px;
  font-size: .75rem; color: var(--muted); font-weight: 600;
  background: var(--bg3); padding: 3px 10px; border-radius: 99px;
}

/* ── Category bar ────────────────────────────────────────────────────────── */
.cat-bar { display: flex; flex-direction: column; gap: 10px; }
.cat-bar__item { display: flex; flex-direction: column; gap: 4px; }
.cat-bar__header { display: flex; justify-content: space-between; font-size: .85rem; }
.cat-bar__name { color: var(--text2); }
.cat-bar__pct  { font-weight: 600; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted  { color: var(--text3); }
.text-small  { font-size: .85rem; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.p-0    { padding: 0; }

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(232, 115, 74, 0.1); }
  50% { box-shadow: 0 0 40px rgba(232, 115, 74, 0.2); }
}
.animate-fade-up { animation: fadeUp .6s cubic-bezier(.4,0,.2,1) both; }
.animate-fade-up-delay { animation: fadeUp .6s cubic-bezier(.4,0,.2,1) .15s both; }
.animate-fade-up-delay2 { animation: fadeUp .6s cubic-bezier(.4,0,.2,1) .3s both; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .display { font-size: clamp(2rem, 8vw, 3rem); }
  .section { padding: 48px 0; }
  .nav__links .btn--lg { padding: 10px 18px; font-size: .85rem; }
  .exam-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .container, .container--narrow { padding: 0 16px; }
  .nav__inner { padding: 0 16px; }
}
