/* ─── VARIABLES ──────────────────────────────────────────────────────────── */
:root {
  /* Primary palette — derived from CTE DocSync */
  --navy:    #2563eb;
  --blue:    #60a5fa;
  --lblue:   rgba(96,165,250,0.15);
  --teal:    #14b8a6;
  --green:   #22c55e;
  --amber:   #f59e0b;
  --red:     #ef4444;
  --orange:  #f97316;
  /* Backgrounds */
  --bg:      #0d1626;
  --sidebar: #0f1c2e;
  --panel:   #162033;
  --panel-b: #1a2640;
  /* Glass/card tokens */
  --card:    rgba(22,32,51,0.80);
  --border:  rgba(255,255,255,0.08);
  --text:    rgba(255,255,255,0.90);
  --muted:   rgba(160,190,220,0.60);
  --nav-h:   60px;
  --side-w:  240px;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.60);
  /* Glass helpers */
  --glass:   rgba(22,32,51,0.80);
  --glass-b: rgba(255,255,255,0.09);
  --glass-bt: rgba(255,255,255,0.16);
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #060d1f;
  color: var(--text);
  font-size: 14px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
ul { list-style: none; }

/* ─── LOGIN  (Liquid Glass — iOS 26) ────────────────────────────────────── */
#login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: 0;
}
@keyframes lgGridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

/* Canvas: particles + shooting stars */
#lg-canvas {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 3;
  width: 100% !important; height: 100% !important;
}

/* Cursor glow follower */
.lg-cursor-glow {
  position: fixed;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.09) 0%, rgba(37,99,235,.04) 38%, transparent 70%);
  pointer-events: none; z-index: 1;
  will-change: transform; top: 0; left: 0;
}

/* ── Aurora blobs ────────────────────────────────────────────────────────── */
.lg-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
/* Deep-space mesh always visible behind all screens */
.lg-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 18% 38%, rgba(37,99,235,.20) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 76% 22%, rgba(109,40,217,.17) 0%, transparent 55%),
    radial-gradient(ellipse 55% 55% at 50% 82%, rgba(14,116,144,.14) 0%, transparent 55%);
  pointer-events: none; z-index: 0;
}
/* Drifting dot grid always visible behind all screens */
.lg-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.040) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 2;
  animation: lgGridDrift 70s linear infinite;
}
.lg-blob { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.lg-blob.b1 {
  width: 60vw; height: 60vw; max-width: 740px; max-height: 740px;
  background: radial-gradient(circle, rgba(37,99,235,.65) 0%, transparent 68%);
  top: -18%; left: -10%;
  animation: lgBlob1 22s ease-in-out infinite alternate;
}
.lg-blob.b2 {
  width: 48vw; height: 48vw; max-width: 600px; max-height: 600px;
  background: radial-gradient(circle, rgba(109,40,217,.50) 0%, transparent 68%);
  top: -14%; right: -8%;
  animation: lgBlob2 18s ease-in-out infinite alternate;
}
.lg-blob.b3 {
  width: 46vw; height: 46vw; max-width: 580px; max-height: 580px;
  background: radial-gradient(circle, rgba(14,116,144,.55) 0%, transparent 68%);
  bottom: -14%; left: 18%;
  animation: lgBlob3 26s ease-in-out infinite alternate;
}
.lg-blob.b4 {
  width: 34vw; height: 34vw; max-width: 440px; max-height: 440px;
  background: radial-gradient(circle, rgba(37,99,235,.38) 0%, transparent 68%);
  top: 42%; right: -6%;
  animation: lgBlob4 16s ease-in-out infinite alternate;
}
.lg-blob.b5 {
  width: 30vw; height: 30vw; max-width: 390px; max-height: 390px;
  background: radial-gradient(circle, rgba(192,38,211,.32) 0%, transparent 68%);
  bottom: -6%; right: 5%;
  animation: lgBlob5 20s ease-in-out infinite alternate;
}
.lg-blob.b6 {
  width: 36vw; height: 36vw; max-width: 460px; max-height: 460px;
  background: radial-gradient(circle, rgba(5,150,105,.35) 0%, transparent 68%);
  top: 28%; left: -7%;
  animation: lgBlob6 24s ease-in-out infinite alternate;
}
.lg-blob.b7 {
  width: 26vw; height: 26vw; max-width: 340px; max-height: 340px;
  background: radial-gradient(circle, rgba(67,56,202,.42) 0%, transparent 68%);
  top: -9%; left: 36%;
  animation: lgBlob7 19s ease-in-out infinite alternate;
}
.lg-blob.b8 {
  width: 32vw; height: 32vw; max-width: 420px; max-height: 420px;
  background: radial-gradient(circle, rgba(244,63,94,.20) 0%, transparent 68%);
  bottom: -5%; left: 1%;
  animation: lgBlob8 21s ease-in-out infinite alternate;
}
@keyframes lgBlob1 {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(50px,-35px) scale(1.07); }
  66%  { transform: translate(-25px,55px) scale(.93); }
  100% { transform: translate(35px,25px) scale(1.04); }
}
@keyframes lgBlob2 {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(-60px,45px) scale(1.09); }
  100% { transform: translate(25px,-35px) scale(.92); }
}
@keyframes lgBlob3 {
  0%   { transform: translate(0,0) scale(1); }
  40%  { transform: translate(35px,-45px) scale(1.06); }
  100% { transform: translate(-45px,22px) scale(.94); }
}
@keyframes lgBlob4 {
  0%   { transform: translate(0,0); }
  100% { transform: translate(-35px,-55px) scale(1.12); }
}
@keyframes lgBlob5 {
  0%   { transform: translate(0,0); }
  100% { transform: translate(45px,-35px) scale(.88); }
}
@keyframes lgBlob6 {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(30px,-40px) scale(1.06); }
  100% { transform: translate(-20px,30px) scale(.95); }
}
@keyframes lgBlob7 {
  0%   { transform: translate(0,0); }
  100% { transform: translate(-25px,42px) scale(1.08); }
}
@keyframes lgBlob8 {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(20px,-30px) scale(1.05); }
  100% { transform: translate(-15px,25px) scale(.93); }
}

/* ── Floating glass orbs ─────────────────────────────────────────────────── */
.lg-orb {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border: 1px solid rgba(255,255,255,.11);
  border-top-color: rgba(255,255,255,.28);
  box-shadow: inset 0 0 22px rgba(255,255,255,.06), 0 8px 32px rgba(0,0,0,.22);
  pointer-events: none; z-index: 4;
}
.lg-orb.o1 { animation: lgOrbFloat1 18s ease-in-out infinite alternate; }
.lg-orb.o2 { animation: lgOrbFloat2 24s ease-in-out infinite alternate; animation-delay: -6s; }
.lg-orb.o3 { animation: lgOrbFloat3 15s ease-in-out infinite alternate; animation-delay: -9s; }
.lg-orb.o4 { animation: lgOrbFloat4 21s ease-in-out infinite alternate; animation-delay: -3s; }
@keyframes lgOrbFloat1 {
  0%   { transform: translate(0,0) rotate(0deg); }
  33%  { transform: translate(18px,-24px) rotate(9deg); }
  66%  { transform: translate(-12px,16px) rotate(-6deg); }
  100% { transform: translate(22px,12px) rotate(5deg); }
}
@keyframes lgOrbFloat2 {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(-22px,-18px) scale(1.06); }
  100% { transform: translate(14px,-28px) scale(.96); }
}
@keyframes lgOrbFloat3 {
  0%   { transform: translate(0,0); }
  100% { transform: translate(20px,-32px) rotate(18deg); }
}
@keyframes lgOrbFloat4 {
  0%   { transform: translate(0,0) scale(1); }
  40%  { transform: translate(-18px,22px) scale(1.04); }
  100% { transform: translate(12px,-20px) scale(.94); }
}

/* ── Glass card — animated conic border (iOS 26 signature) ──────────────── */
@property --ba {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0turn;
}
.login-card {
  position: relative; z-index: 10;
  width: 100%; max-width: 444px;
  padding: 44px 48px;
  --ba: 0turn;
  background:
    rgba(10,18,42,.84) padding-box,
    conic-gradient(from var(--ba),
      rgba(96,165,250,.78),
      rgba(167,139,250,.72),
      rgba(94,234,212,.65),
      rgba(244,114,182,.58),
      rgba(96,165,250,.78)
    ) border-box;
  border: 1.5px solid transparent;
  backdrop-filter: blur(56px) saturate(200%) brightness(1.06);
  -webkit-backdrop-filter: blur(56px) saturate(200%) brightness(1.06);
  border-radius: 30px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.07) inset,
    0 4px 0 rgba(255,255,255,.09) inset,
    0 36px 80px rgba(0,0,0,.60),
    0 0 0 1px rgba(0,0,0,.15),
    0 0 120px rgba(37,99,235,.22);
  animation: lgCardIn .9s cubic-bezier(.22,1,.36,1) both, lgBorderSpin 9s linear infinite;
  overflow: hidden;
  --sx: 50%; --sy: 30%;
  transition: box-shadow .3s ease;
}
@keyframes lgBorderSpin { to { --ba: 1turn; } }
@keyframes lgCardIn {
  from { opacity: 0; transform: translateY(40px) scale(.95); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   filter: blur(0); }
}

/* Mouse-following specular highlight */
.login-card::before {
  content: '';
  position: absolute; inset: 0; border-radius: 30px;
  background: radial-gradient(circle 280px at var(--sx) var(--sy),
    rgba(255,255,255,.11) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
  transition: background .05s linear;
}

/* Top-edge spectral reflection */
.login-card::after {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.76) 50%, transparent);
  pointer-events: none; z-index: 0;
}

/* ── Header / logo ───────────────────────────────────────────────────────── */
.login-header {
  text-align: center; margin-bottom: 30px;
  position: relative; z-index: 1;
  animation: lgFadeUp .7s .12s cubic-bezier(.22,1,.36,1) both;
}
.login-logo { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.logo-ring-face {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; letter-spacing: 2px;
  box-shadow: 0 0 28px rgba(37,99,235,.52), inset 0 1px 0 rgba(255,255,255,.26);
  z-index: 2;
}
.logo-ring-orbit {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: rgba(96,165,250,.96);
  border-right-color: rgba(96,165,250,.20);
  animation: lgSpin 2.8s linear infinite; z-index: 3;
}
.logo-ring-orbit2 {
  position: absolute; inset: -11px; border-radius: 50%;
  border: 1.5px solid transparent;
  border-bottom-color: rgba(167,139,250,.70);
  border-left-color: rgba(167,139,250,.14);
  animation: lgSpin 4.6s linear infinite reverse; z-index: 3;
}
.logo-ring-glow {
  position: absolute; inset: -14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.55) 0%, transparent 70%);
  animation: lgGlowPulse 3s ease-in-out infinite; z-index: 1;
}
@keyframes lgSpin { to { transform: rotate(360deg); } }
@keyframes lgGlowPulse {
  0%,100% { opacity: .5; transform: scale(1); }
  50%     { opacity: .9; transform: scale(1.22); }
}

/* Title text */
.login-title { position: relative; z-index: 1; }
.login-institution { font-weight: 700; font-size: 14px; color: rgba(255,255,255,.92); letter-spacing: .2px; }
.login-system {
  font-size: 12.5px; font-weight: 600;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #5eead4, #f472b6, #60a5fa);
  background-size: 250% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: lgShimmer 4.5s linear infinite;
}
@keyframes lgShimmer {
  0%   { background-position: 0%   50%; }
  100% { background-position: 250% 50%; }
}
.login-sub { font-size: 11px; color: rgba(255,255,255,.38); margin-top: 3px; }

/* ── Auth tabs ───────────────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px; padding: 4px; margin-bottom: 22px; gap: 3px;
  position: relative; z-index: 1;
  animation: lgFadeUp .7s .24s cubic-bezier(.22,1,.36,1) both;
}
.auth-tab {
  flex: 1; padding: 9px 12px; background: none; border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.40);
  border-radius: 11px; transition: color .2s, background .2s, box-shadow .2s;
}
.auth-tab:hover:not(.active) { color: rgba(255,255,255,.72); background: rgba(255,255,255,.055); }
.auth-tab.active {
  color: rgba(255,255,255,.96); background: rgba(255,255,255,.12);
  box-shadow: 0 1px 8px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.18);
}

/* ── Form elements ───────────────────────────────────────────────────────── */
.login-card form { position: relative; z-index: 1; animation: lgFadeUp .7s .34s cubic-bezier(.22,1,.36,1) both; }
.login-card .form-group label { color: rgba(255,255,255,.68); font-size: 12.5px; font-weight: 600; letter-spacing: .3px; }
.login-card .form-group input,
.login-card .form-group select {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-top-color: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  border-radius: 13px;
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none;
}
.login-card .form-group input::placeholder { color: rgba(255,255,255,.26); }
.login-card .form-group input:focus,
.login-card .form-group select:focus {
  border-color: rgba(96,165,250,.65);
  background: rgba(96,165,250,.09);
  box-shadow: 0 0 0 3px rgba(96,165,250,.18), 0 0 28px rgba(96,165,250,.12);
  color: rgba(255,255,255,.98);
}
.login-card .form-group select option { background: #0e1b38; color: rgba(255,255,255,.9); }
/* Keep dark glass styling on browser autofill */
.login-card .form-group input:-webkit-autofill,
.login-card .form-group input:-webkit-autofill:hover,
.login-card .form-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(18,36,70,.88) inset !important;
  -webkit-text-fill-color: rgba(255,255,255,.92) !important;
  caret-color: rgba(255,255,255,.92);
  transition: background-color 5000s ease-in-out 0s;
  border-color: rgba(255,255,255,.12) !important;
}

/* ── Submit button ───────────────────────────────────────────────────────── */
.login-card .btn.btn-primary,
.login-card .btn-primary {
  background: linear-gradient(135deg, rgba(37,99,235,.92), rgba(14,116,144,.88));
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,255,255,.36);
  border-radius: 14px; padding: 13px 16px;
  font-weight: 700; font-size: 14px; letter-spacing: .3px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .22s ease, filter .18s ease;
  box-shadow: 0 4px 24px rgba(37,99,235,.42), inset 0 1px 0 rgba(255,255,255,.24);
  margin-top: 6px;
}
.login-card .btn.btn-primary::before,
.login-card .btn-primary::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transition: left .55s ease; pointer-events: none;
}
.login-card .btn.btn-primary:hover,
.login-card .btn-primary:hover {
  transform: translateY(-2px); filter: brightness(1.10);
  box-shadow: 0 8px 36px rgba(37,99,235,.56), inset 0 1px 0 rgba(255,255,255,.30);
}
.login-card .btn.btn-primary:hover::before,
.login-card .btn-primary:hover::before { left: 100%; }
.login-card .btn.btn-primary:active,
.login-card .btn-primary:active {
  transform: translateY(0) scale(.984);
  box-shadow: 0 2px 10px rgba(37,99,235,.30);
  transition: transform .07s, box-shadow .08s;
}

/* ── Password strength meter / match hint ───────────────────────────────── */
.pw-meter { height: 4px; border-radius: 4px; margin-top: 7px; background: rgba(255,255,255,.08); overflow: hidden; }
.pw-meter-bar { height: 100%; width: 0; border-radius: 4px; transition: width .25s ease, background .25s ease; }
.pw-meter-label { font-size: 11px; font-weight: 600; margin-top: 4px; letter-spacing: .3px; }
.pw-match-hint  { font-size: 11px; font-weight: 600; margin-top: 5px; letter-spacing: .3px; }

/* ── Registration field loading skeleton ────────────────────────────────── */
.reg-skeleton {
  height: 58px; border-radius: 13px; margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.10) 50%, rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
  animation: regShimmer 1.2s linear infinite;
}
@keyframes regShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Alerts inside card ──────────────────────────────────────────────────── */
.login-card .alert-danger {
  background: rgba(192,0,0,.13); border: 1px solid rgba(255,90,90,.22);
  color: rgba(255,165,165,.92); border-radius: 11px;
  font-size: 12.5px; backdrop-filter: blur(8px);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.login-footer {
  text-align: center; margin-top: 26px;
  font-size: 11px; color: rgba(255,255,255,.22); line-height: 1.8;
  position: relative; z-index: 1;
  animation: lgFadeUp .7s .54s cubic-bezier(.22,1,.36,1) both;
}

@keyframes lgFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Split-screen layout ─────────────────────────────────────────────────── */
.login-layout {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  gap: 56px;
  width: 100%; max-width: 1120px;
  padding: 44px 36px;
  box-sizing: border-box;
  min-height: 100vh;
}

/* ── Left: Orbital scene ─────────────────────────────────────────────────── */
.login-features {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 36px; padding: 20px;
}

/* Orbit container */
.lf-orbit-scene {
  position: relative; width: 300px; height: 300px;
  animation: lgFadeUp .8s .08s cubic-bezier(.22,1,.36,1) both;
}

/* Background radial glow */
.lf-orbit-glow {
  position: absolute; inset: -50px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.40) 0%, rgba(109,40,217,.20) 40%, transparent 68%);
  animation: lfGlowPulse 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lfGlowPulse {
  0%,100% { opacity: .70; transform: scale(1); }
  50%     { opacity: 1.0; transform: scale(1.10); }
}

/* Expanding pulse rings that emanate from center */
.lf-pulse-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(96,165,250,.35);
  width: 90px; height: 90px;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
  animation: lfPulseExpand 3.8s ease-out infinite;
}
.lf-pulse-ring.pr1 { animation-delay: 0s; }
.lf-pulse-ring.pr2 { animation-delay: 1.27s; }
.lf-pulse-ring.pr3 { animation-delay: 2.53s; }
@keyframes lfPulseExpand {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: .80; }
  100% { transform: translate(-50%,-50%) scale(3.5); opacity: 0; }
}

/* Three spinning orbit rings */
.lf-ring {
  position: absolute; border-radius: 50%;
  top: 50%; left: 50%;
}
.lf-ring.ring1 {
  width: 180px; height: 180px; margin: -90px 0 0 -90px;
  border: 1.5px solid transparent;
  border-top-color: rgba(96,165,250,.70);
  border-right-color: rgba(96,165,250,.18);
  animation: lfRingSpin 4s linear infinite;
}
.lf-ring.ring2 {
  width: 244px; height: 244px; margin: -122px 0 0 -122px;
  border: 1.5px solid transparent;
  border-bottom-color: rgba(167,139,250,.60);
  border-left-color: rgba(167,139,250,.15);
  animation: lfRingSpin 7s linear infinite reverse;
}
.lf-ring.ring3 {
  width: 300px; height: 300px; margin: -150px 0 0 -150px;
  border: 1px solid transparent;
  border-top-color: rgba(94,234,212,.40);
  border-left-color: rgba(94,234,212,.10);
  animation: lfRingSpin 13s linear infinite;
}
@keyframes lfRingSpin { to { transform: rotate(360deg); } }

/* Center orb — reuses the card logo system */
.lf-orbit-core {
  position: absolute;
  width: 90px; height: 90px;
  top: 50%; left: 50%; margin: -45px 0 0 -45px;
  z-index: 5;
}

/* Three glowing orbiting dots */
.lf-dot {
  position: absolute; border-radius: 50%;
  top: 50%; left: 50%; z-index: 6;
}
.lf-dot.dot1 {
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  background: #60a5fa;
  box-shadow: 0 0 14px #60a5fa, 0 0 28px rgba(96,165,250,.55);
  animation: lfOrbit1 4s linear infinite;
}
.lf-dot.dot2 {
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: #a78bfa;
  box-shadow: 0 0 12px #a78bfa, 0 0 24px rgba(167,139,250,.55);
  animation: lfOrbit2 7s linear infinite reverse;
}
.lf-dot.dot3 {
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: #5eead4;
  box-shadow: 0 0 10px #5eead4, 0 0 20px rgba(94,234,212,.55);
  animation: lfOrbit3 13s linear infinite;
}
@keyframes lfOrbit1 {
  from { transform: rotate(0deg)   translateX(90px); }
  to   { transform: rotate(360deg) translateX(90px); }
}
@keyframes lfOrbit2 {
  from { transform: rotate(60deg)  translateX(122px); }
  to   { transform: rotate(420deg) translateX(122px); }
}
@keyframes lfOrbit3 {
  from { transform: rotate(210deg) translateX(150px); }
  to   { transform: rotate(570deg) translateX(150px); }
}

/* Caption below the orbit scene */
.lf-caption {
  text-align: center;
  animation: lgFadeUp .7s .5s cubic-bezier(.22,1,.36,1) both;
}
.lf-caption-title {
  font-size: 16px; font-weight: 700; letter-spacing: .3px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #5eead4, #60a5fa);
  background-size: 250% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: lgShimmer 4.5s linear infinite;
}
.lf-caption-sub {
  font-size: 11px; color: rgba(255,255,255,.30); margin-top: 6px;
  text-transform: uppercase; letter-spacing: 1.6px; font-weight: 500;
}

/* ── Responsive breakpoints ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .login-layout {
    flex-direction: column-reverse; gap: 24px;
    padding: 28px 20px; min-height: auto; justify-content: center;
  }
  .lf-orbit-scene { width: 200px; height: 200px; }
  .lf-ring.ring1 { width: 120px; height: 120px; margin: -60px 0 0 -60px; }
  .lf-ring.ring2 { width: 162px; height: 162px; margin: -81px 0 0 -81px; }
  .lf-ring.ring3 { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
}
@media (max-width: 600px) {
  .login-features { display: none; }
  .login-layout { padding: 20px; }
}

/* ─── TOPNAV ─────────────────────────────────────────────────────────────── */
#topnav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(13,22,38,0.92);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: #fff; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 12px; }
.nav-brand { display: flex; flex-direction: column; line-height: 1.2; }
.nav-brand-rec { font-size: 15px; font-weight: 800; letter-spacing: 2px; color: #fff; }
.nav-brand-sys { font-size: 11px; color: rgba(96,165,250,0.80); letter-spacing: 1px; }
.icon-btn {
  background: none; border: none; color: rgba(255,255,255,0.85); cursor: pointer; font-size: 18px;
  width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.10); color: #fff; }
.user-info { text-align: right; }
#nav-user-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.92); }
.role-badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10px;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px;
}
.role-badge.admin      { background: rgba(245,158,11,0.18);  color: #f59e0b; border: 1px solid rgba(245,158,11,0.30); }
.role-badge.rep        { background: rgba(96,165,250,0.15);  color: #60a5fa; border: 1px solid rgba(96,165,250,0.28); }
.role-badge.researcher { background: rgba(34,197,94,0.15);   color: #22c55e; border: 1px solid rgba(34,197,94,0.28); }
.role-badge.secretariat { background: rgba(192,132,252,0.15); color: #c084fc; border: 1px solid rgba(192,132,252,0.28); }
.btn-outline-sm {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.80);
  padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 12px;
  transition: all .15s; font-weight: 600;
}
.btn-outline-sm:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.28); }

/* ─── NOTIFICATIONS ──────────────────────────────────────────────────────── */
.notif-wrap { position: relative; }
.badge {
  position: absolute; top: 2px; right: 2px; background: #ef4444; color: #fff;
  border-radius: 10px; min-width: 16px; height: 16px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 340px;
  background: rgba(15,26,44,0.96);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  border-top-color: rgba(255,255,255,0.20);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 200;
}
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); font-weight: 600;
  color: rgba(255,255,255,0.90);
}
.link-btn { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 12px; }
.notif-item {
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); cursor: pointer; transition: background .1s;
}
.notif-item:hover { background: rgba(255,255,255,0.06); }
.notif-item.unread { background: rgba(37,99,235,0.10); }
.notif-item-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; color: rgba(255,255,255,0.90); }
.notif-item-msg { font-size: 12px; color: var(--muted); line-height: 1.4; }
.notif-item-time { font-size: 11px; color: rgba(255,255,255,0.28); margin-top: 4px; }
.notif-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
#app { position: relative; z-index: 1; }
#layout { display: flex; margin-top: var(--nav-h); min-height: calc(100vh - var(--nav-h)); }
#sidebar {
  width: var(--side-w);
  background: rgba(9,18,38,0.82);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-right: 1px solid rgba(255,255,255,0.07);
  position: fixed; top: var(--nav-h); bottom: 0; left: 0; overflow-y: auto; z-index: 50;
  transition: transform .25s;
}
#sidenav { padding: 12px 0; }
.side-section { padding: 8px 20px 4px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(255,255,255,0.28); }
.side-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 1px 10px;
  color: rgba(200,220,245,0.60); cursor: pointer; border-radius: 8px; transition: all .15s;
  border-left: none; font-size: 13.5px;
}
.side-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.90); }
.side-item.active {
  background: #2563eb; color: #fff; font-weight: 600;
  box-shadow: 0 2px 12px rgba(37,99,235,0.40);
}
.side-icon { font-size: 16px; width: 20px; text-align: center; }
#content { margin-left: var(--side-w); flex: 1; padding: 28px; max-width: 1400px; background: transparent; }

/* ─── CARDS & PANELS ─────────────────────────────────────────────────────── */
.card {
  background: #162033;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.07);
  border-top-color: rgba(255,255,255,0.12);
  border-radius: var(--radius);
  box-shadow: 0 2px 16px rgba(0,0,0,0.30), 0 0 0 1px rgba(255,255,255,0.03) inset;
  margin-bottom: 20px; overflow: hidden;
}
.card-header {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex;
  align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.02);
}
.card-title { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.92); }
.card-body { padding: 20px; }

.page-header { margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 800; color: rgba(255,255,255,0.95); }
.page-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ─── STAT CARDS ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card {
  background: #1a2640;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 3px solid #2563eb;
  border-radius: var(--radius); padding: 20px 20px 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.28);
}
.stat-card.navy   { border-top-color: #2563eb; }
.stat-card.navy   .stat-val { color: #60a5fa; }
.stat-card.green  { border-top-color: #22c55e; }
.stat-card.green  .stat-val { color: #22c55e; }
.stat-card.amber  { border-top-color: #f59e0b; }
.stat-card.amber  .stat-val { color: #f59e0b; }
.stat-card.red    { border-top-color: #ef4444; }
.stat-card.red    .stat-val { color: #ef4444; }
.stat-card.teal   { border-top-color: #14b8a6; }
.stat-card.teal   .stat-val { color: #14b8a6; }
.stat-card.orange { border-top-color: #f97316; }
.stat-card.orange .stat-val { color: #f97316; }
.stat-card.blue   { border-top-color: #60a5fa; }
.stat-card.blue   .stat-val { color: #60a5fa; }
.stat-val { font-size: 34px; font-weight: 800; color: rgba(255,255,255,0.95); line-height: 1; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.stat-sub { font-size: 11px; color: rgba(255,255,255,0.28); margin-top: 5px; }
.stat-trend { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }
.stat-trend.up   { background: rgba(34,197,94,0.15);  color: #22c55e; }
.stat-trend.down { background: rgba(239,68,68,0.15);  color: #ef4444; }

/* ─── TABLES ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th {
  background: rgba(255,255,255,0.04); color: rgba(160,190,220,0.65); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; padding: 12px 14px; text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; color: rgba(255,255,255,0.85); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(37,99,235,0.05); }
.ref-no {
  font-family: 'Courier New', monospace; font-size: 12px; font-weight: 700;
  color: #60a5fa; background: rgba(96,165,250,0.12); padding: 3px 7px;
  border-radius: 4px; white-space: nowrap; border: 1px solid rgba(96,165,250,0.20);
}

/* ─── STATUS BADGES ──────────────────────────────────────────────────────── */
.status { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.status-pending       { background: rgba(245,158,11,0.15);  color: #f59e0b; border: 1px solid rgba(245,158,11,0.28); }
.status-under_review  { background: rgba(96,165,250,0.15);  color: #60a5fa; border: 1px solid rgba(96,165,250,0.28); }
.status-resubmitted   { background: rgba(192,132,252,0.15); color: #c084fc; border: 1px solid rgba(192,132,252,0.28); }
.status-approved      { background: rgba(34,197,94,0.15);   color: #22c55e; border: 1px solid rgba(34,197,94,0.28); }
.status-rejected      { background: rgba(239,68,68,0.15);   color: #ef4444; border: 1px solid rgba(239,68,68,0.28); }
.status-deferred      { background: rgba(245,158,11,0.10);  color: #fde68a; border: 1px solid rgba(245,158,11,0.20); }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px;
  border-radius: 9px; border: none; cursor: pointer; font-weight: 600; font-size: 13px;
  transition: all .15s; position: relative; overflow: hidden;
}
.btn-primary {
  background: #2563eb;
  color: #fff; border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 3px 14px rgba(37,99,235,0.40);
}
.btn-primary:hover {
  background: #1d4fd8; transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.55);
}
.btn-blue {
  background: rgba(96,165,250,0.15); color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.25);
}
.btn-blue:hover { background: rgba(96,165,250,0.25); }
.btn-green {
  background: rgba(34,197,94,0.15); color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
}
.btn-green:hover { background: rgba(34,197,94,0.25); }
.btn-red {
  background: rgba(239,68,68,0.15); color: #ef4444;
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-red:hover { background: rgba(239,68,68,0.25); }
.btn-amber {
  background: rgba(245,158,11,0.15); color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.25);
}
.btn-amber:hover { background: rgba(245,158,11,0.25); }
.btn-outline {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.75);
}
.btn-outline:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.24); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }
.btn-block { width: 100%; justify-content: center; padding: 12px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ─── PENDING ACTIONS ─────────────────────────────────────────────────────── */
.pending-section { }
.pending-item {
  padding: 10px 12px;
  background: rgba(96,165,250,0.07);
  border-radius: 8px; border-left: 3px solid rgba(96,165,250,0.50);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.pending-title { font-weight: 600; color: rgba(255,255,255,0.90); }
.pending-ref { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pending-item .btn { margin-top: 0; }

.badge {
  display: inline-block; background: rgba(96,165,250,0.20); color: #60a5fa;
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
  border: 1px solid rgba(96,165,250,0.25);
}

/* ─── FORMS ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; color: rgba(255,255,255,0.65); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.90); outline: none; transition: border .15s, background .15s, box-shadow .15s;
}
.form-group input::placeholder { color: rgba(255,255,255,0.26); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(96,165,250,0.55);
  background: rgba(96,165,250,0.08);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.12);
  color: rgba(255,255,255,0.95);
}
.form-group select option { background: #0c1c3e; color: rgba(255,255,255,0.90); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* Autofill override for app forms */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(12,28,62,.90) inset !important;
  -webkit-text-fill-color: rgba(255,255,255,.90) !important;
  caret-color: rgba(255,255,255,.90);
  transition: background-color 5000s ease-in-out 0s;
}

/* ─── FILE UPLOAD ZONE ───────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed rgba(255,255,255,0.15); border-radius: var(--radius); padding: 28px;
  text-align: center; cursor: pointer; transition: all .2s;
  background: rgba(255,255,255,0.04);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: rgba(96,165,250,0.55); background: rgba(96,165,250,0.08);
}
.upload-zone-icon { font-size: 36px; margin-bottom: 8px; }
.upload-zone-text { font-size: 14px; color: var(--muted); }
.upload-zone-text strong { color: var(--blue); }
.file-list { margin-top: 12px; }
.file-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px; margin-top: 6px;
}
.file-item-name { flex: 1; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.88); }
.file-item-size { font-size: 12px; color: var(--muted); }
.file-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 16px; padding: 0 4px; }

/* ─── ALERTS ─────────────────────────────────────────────────────────────── */
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; backdrop-filter: blur(8px); }
.alert-danger  { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.22); }
.alert-success { background: rgba(34,197,94,0.12);  color: #86efac; border: 1px solid rgba(34,197,94,0.22); }
.alert-info    { background: rgba(96,165,250,0.12); color: #93c5fd; border: 1px solid rgba(96,165,250,0.22); }
.alert-warning { background: rgba(245,158,11,0.12);  color: #fde68a; border: 1px solid rgba(245,158,11,0.22); }

/* ─── DETAIL VIEW ────────────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-section {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-b); border-top-color: var(--glass-bt);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.detail-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.40); margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; }
.dl dt { font-weight: 600; color: rgba(255,255,255,0.55); font-size: 13px; }
.dl dd { color: rgba(255,255,255,0.88); font-size: 13px; }

/* ─── REVIEW HISTORY ─────────────────────────────────────────────────────── */
.review-card { border-radius: 8px; padding: 16px; margin-bottom: 12px; backdrop-filter: blur(8px); }
.review-card.approved { background: rgba(34,197,94,0.10);  border-left: 4px solid #22c55e; }
.review-card.rejected { background: rgba(239,68,68,0.10); border-left: 4px solid #ef4444; }
.review-card.deferred { background: rgba(245,158,11,0.10);  border-left: 4px solid #f59e0b; }
.review-decision { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.review-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.review-comments {
  margin-top: 10px; font-size: 13px; line-height: 1.6; padding: 10px 12px;
  background: rgba(255,255,255,0.06); border-radius: 6px; color: rgba(255,255,255,0.82);
}

/* ─── FILE CHIPS ─────────────────────────────────────────────────────────── */
.file-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  background: rgba(96,165,250,0.12); border-radius: 20px; font-size: 12px; color: #60a5fa;
  text-decoration: none; margin: 3px; font-weight: 500;
  border: 1px solid rgba(96,165,250,0.22); cursor: pointer; transition: background .15s;
}
.file-chip:hover { background: rgba(96,165,250,0.22); text-decoration: none; }

/* ─── REP MULTI-SELECT ───────────────────────────────────────────────────── */
.rep-checkbox-list {
  display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.10); border-radius: 9px; padding: 10px 12px;
  background: rgba(255,255,255,0.04);
}
.rep-checkbox-label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; transition: background .12s; }
.rep-checkbox-label:hover { background: rgba(255,255,255,0.07); }
.rep-checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: #60a5fa; flex-shrink: 0; cursor: pointer; }
.rep-checkbox-info { display: flex; flex-direction: column; }
.rep-checkbox-name { font-weight: 600; font-size: 13px; color: rgba(255,255,255,0.90); }
.rep-checkbox-dept { font-size: 11px; color: var(--muted); }
.rep-tag {
  display: inline-block; background: rgba(96,165,250,0.12); color: #60a5fa;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 20px; margin: 2px 2px 2px 0;
  border: 1px solid rgba(96,165,250,0.20);
}

/* ─── MODAL ──────────────────────────────────────────────────────────────── */
#modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.60);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
#modal-box {
  background: rgba(10,18,36,0.92);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  border-top-color: rgba(255,255,255,0.22);
  border-radius: 16px; width: 100%; max-width: 680px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
#modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
#modal-title { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.92); }
#modal-header .icon-btn { color: var(--muted); }
#modal-body { padding: 22px; overflow-y: auto; }

/* ─── TOAST ──────────────────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 13px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; min-width: 260px;
  animation: slideIn .25s ease; display: flex; gap: 10px; align-items: flex-start;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow);
}
.toast.success { background: rgba(34,197,94,0.18);  color: #86efac; border-color: rgba(34,197,94,0.25); }
.toast.error   { background: rgba(239,68,68,0.18); color: #fca5a5; border-color: rgba(239,68,68,0.25); }
.toast.info    { background: rgba(96,165,250,0.18); color: #93c5fd; border-color: rgba(96,165,250,0.25); }
@keyframes slideIn { from { transform: translateX(50px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ─── SEARCH / FILTER ────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar input, .filter-bar select {
  padding: 8px 12px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9px; background: rgba(255,255,255,0.06); outline: none;
  color: rgba(255,255,255,0.90);
}
.filter-bar input::placeholder { color: rgba(255,255,255,0.30); }
.filter-bar input:focus, .filter-bar select:focus {
  border-color: rgba(96,165,250,0.50); background: rgba(96,165,250,0.08);
}
.filter-bar select option { background: #0c1c3e; }
.filter-bar input { flex: 1; min-width: 200px; }

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: .6; }
.empty-state-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: rgba(255,255,255,0.65); }
.empty-state-sub { font-size: 13px; }

/* ─── SECTION DIVIDER ────────────────────────────────────────────────────── */
.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.35); margin: 20px 0 12px; }
.divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 20px 0; }

/* ─── ARCHIVE CARDS ──────────────────────────────────────────────────────── */
.archive-card {
  background: var(--glass); border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 16px; overflow: hidden; border-left: 4px solid rgba(96,165,250,0.60);
  border: 1px solid var(--glass-b); border-left-width: 4px; border-left-color: rgba(96,165,250,0.60);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.archive-card.is-archived { border-left-color: rgba(255,255,255,0.20); opacity: .75; }
.archive-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; flex-wrap: wrap; }
.archive-year { font-size: 17px; font-weight: 800; color: rgba(255,255,255,0.92); margin-bottom: 4px; }
.archive-meta { font-size: 12px; color: var(--muted); }
.is-archived .archive-year { color: rgba(255,255,255,0.40); }

/* ─── SETTINGS EDITOR ────────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.settings-section {
  background: rgba(255,255,255,0.05); border-radius: var(--radius);
  padding: 18px 20px; border: 1px solid rgba(255,255,255,0.10);
  border-top-color: rgba(255,255,255,0.16);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.settings-section-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.90); margin-bottom: 12px; }
.settings-list {
  display: flex; flex-direction: column; gap: 6px; min-height: 40px;
  margin-bottom: 12px; max-height: 260px; overflow-y: auto;
}
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; color: rgba(255,255,255,0.88);
}
.settings-item-text { flex: 1; }
.settings-del-btn { flex-shrink: 0; background: none; border: none; cursor: pointer; }
.settings-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 10px 0; }
.settings-add-row { display: flex; gap: 8px; }
.settings-input {
  flex: 1; padding: 8px 10px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; font-size: 13px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.90); outline: none;
}
.settings-input:focus { border-color: rgba(96,165,250,0.50); background: rgba(96,165,250,0.08); }

/* ─── UNIFIED REGISTRATION FIELD ROWS ───────────────────────────────────── */
.rf-sortable-list { user-select: none; }
.rf-item {
  border: 1px solid rgba(255,255,255,0.09); border-radius: 10px; margin-bottom: 8px;
  overflow: hidden; background: rgba(255,255,255,0.05); transition: box-shadow .15s, opacity .15s;
}
.rf-item-custom { border-color: rgba(34,197,94,0.20); }
.rf-item.rf-dragging { opacity: .45; box-shadow: 0 4px 18px rgba(0,0,0,.40); }
.rf-item.rf-drag-over { box-shadow: 0 0 0 2.5px #60a5fa; border-color: #60a5fa; }
.rf-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap;
  background: transparent;
}
.rf-drag-handle { font-size: 18px; color: rgba(255,255,255,0.25); cursor: grab; flex-shrink: 0; line-height: 1; padding: 0 2px; }
.rf-drag-handle:active { cursor: grabbing; }
.rf-move-btns { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.rf-move-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px; font-size: 9px; color: rgba(255,255,255,0.45); cursor: pointer;
  padding: 1px 4px; line-height: 1.4;
}
.rf-move-btn:hover { background: rgba(96,165,250,0.15); border-color: #60a5fa; color: #60a5fa; }
.rf-item-custom .rf-row { background: rgba(34,197,94,0.04); }
.rf-lbl-input {
  flex: 1; min-width: 120px; height: 34px; font-size: 13px; padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 7px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.90);
}
.rf-lbl-input:focus { border-color: rgba(96,165,250,0.50); outline: none; }
.rf-sel {
  height: 34px; font-size: 12px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px; padding: 0 8px;
  background: rgba(255,255,255,0.06); cursor: pointer; color: rgba(255,255,255,0.88);
}
.rf-sel:focus { border-color: rgba(96,165,250,0.50); outline: none; }
.rf-sel option { background: #0c1c3e; }
.rf-type-fixed { font-size: 12px; color: var(--muted); padding: 0 4px; white-space: nowrap; }
.rf-toggle-lbl { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.rf-show-txt, .rf-req-txt { font-size: 11px; color: var(--muted); }
.rf-req-lbl { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.rf-label-cell { flex: 1; min-width: 130px; }
.rf-type-cell { flex-shrink: 0; }
.rf-badge-builtin { font-size: 10px; background: rgba(96,165,250,0.15); color: #60a5fa; padding: 2px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0; }
.rf-badge-custom  { font-size: 10px; background: rgba(34,197,94,0.15); color: #22c55e; padding: 2px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0; }
.rf-opts-panel { padding: 0 14px 12px; border-top: 1px dashed rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); }
.rf-item-custom .rf-opts-panel,
.rf-item-custom .rf-ph-panel,
.rf-item-custom .rf-cf-opts-panel { background: rgba(34,197,94,0.04); border-top-color: rgba(34,197,94,0.15); }
.rf-ph-panel { padding: 0 14px 10px; background: rgba(255,255,255,0.03); border-top: 1px dashed rgba(255,255,255,0.08); }
.rf-cf-opts-panel { padding: 0 14px 12px; background: rgba(34,197,94,0.04); border-top: 1px dashed rgba(34,197,94,0.15); }
.rf-opts-hdr { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 10px 0 6px; }
.rf-opts-list { max-height: 180px; overflow-y: auto; margin-bottom: 8px; }
.rf-opts-add { display: flex; gap: 8px; }

/* ─── ACTIVITY TIMELINE ──────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(96,165,250,0.15); display: flex; align-items: center;
  justify-content: center; font-size: 14px; flex-shrink: 0; margin-top: 2px;
  border: 1px solid rgba(96,165,250,0.20);
}
.timeline-body { flex: 1; }
.timeline-action { font-weight: 700; font-size: 13px; color: rgba(255,255,255,0.90); }
.timeline-actor { font-size: 12px; color: var(--blue); }
.timeline-details { font-size: 12px; color: rgba(255,255,255,0.70); margin-top: 3px; line-height: 1.5; }
.timeline-time { font-size: 11px; color: rgba(255,255,255,0.28); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Desktop baseline ────────────────────────────────────────────────────── */
#sidebar-toggle { display: none; }

/* ── Tablet (769px – 1100px) ─────────────────────────────────────────────── */
@media (max-width: 1100px) and (min-width: 769px) {
  :root { --side-w: 200px; }
  #content { padding: 20px 18px; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .perf-star-score { font-size: 20px; }
}

/* ── Mobile (≤ 768px) ────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  #sidebar-toggle { display: flex; }

  #sidebar {
    transform: translateX(-100%);
    z-index: 200;
    width: 260px;
    box-shadow: 4px 0 28px rgba(0,0,0,.40);
  }
  #sidebar.open { transform: translateX(0); }

  body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 190;
  }

  #content { margin-left: 0 !important; padding: 14px 12px; }

  #topnav { padding: 0 10px; gap: 8px; }
  .nav-brand-sys { display: none; }
  .user-info { display: none; }
  .btn-outline-sm { padding: 5px 10px; font-size: 11px; }

  .notif-dropdown { width: calc(100vw - 20px); right: -54px; max-height: 70vh; overflow-y: auto; }

  .login-card { padding: 24px 18px; border-radius: 12px; }
  .login-header { flex-direction: column; text-align: center; gap: 8px; }

  .detail-grid       { grid-template-columns: 1fr; }
  .form-row          { grid-template-columns: 1fr; }
  .settings-grid     { grid-template-columns: 1fr; }
  .stats-grid        { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .perf-rating-summary { flex-direction: column; gap: 10px; }

  .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-header .btn-group { width: 100%; }
  .card-body { padding: 14px; }

  .page-title { font-size: 18px; }
  .page-header { margin-bottom: 16px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0 0 var(--radius) var(--radius); }
  table { min-width: 520px; font-size: 13px; }
  .perf-table { min-width: 580px; }
  th { padding: 10px 10px; font-size: 11px; }
  td { padding: 10px 10px; font-size: 12px; }

  .btn-group { flex-wrap: wrap; gap: 6px; }
  .btn { font-size: 12px; padding: 8px 13px; }
  .btn-sm { font-size: 11px; padding: 5px 10px; }
  .btn-block { width: 100%; justify-content: center; }

  #modal-bg { padding: 0; align-items: flex-end; background: rgba(0,0,0,.65); }
  #modal-box {
    max-width: 100%; width: 100%; max-height: 88vh;
    border-radius: 18px 18px 0 0; margin: 0;
  }
  #modal-header { padding: 16px 18px; }
  #modal-body { padding: 14px 18px 24px; }

  .stage-progress { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px; gap: 4px; }
  .stage-step-label { font-size: 11px; }
  .stage-step-status { font-size: 10px; }
  .stage-step-num { width: 28px; height: 28px; font-size: 12px; }

  .filter-bar { flex-direction: column; gap: 8px; }
  .filter-bar input, .filter-bar select { width: 100%; min-width: 0; }

  #toast-container { left: 10px; right: 10px; bottom: 10px; }
  .toast { min-width: 0; width: 100%; }

  .rep-rating-block { padding: 12px; }
  .star { font-size: 26px; }

  .dl { grid-template-columns: 110px 1fr; gap: 6px 10px; }

  .stat-val { font-size: 26px; }
  .stat-card { padding: 12px 14px; }

  .archive-card-header { flex-direction: column; gap: 10px; }

  .settings-add-row { flex-direction: column; }
  .settings-input { width: 100%; }

  .breadcrumb { font-size: 12px; }

  .perf-comments-list { max-height: 200px; }
  .perf-comment-header { flex-direction: column; gap: 2px; }

  .stage-section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ── Small mobile (≤ 420px) ──────────────────────────────────────────────── */
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .login-card { padding: 20px 14px; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { margin-top: 4px; color: var(--muted); font-size: 11px; }
  .dl dd { font-size: 13px; }
  #modal-body { padding: 12px 14px 20px; }
  .stage-progress { flex-wrap: nowrap; }
  .stat-val { font-size: 22px; }
  .stat-label { font-size: 10px; }
  .page-title { font-size: 16px; }
  .card-title { font-size: 13px; }
  th { font-size: 10px; padding: 8px 8px; }
  td { font-size: 11px; padding: 8px 8px; }
}

/* ─── APP FOOTER ─────────────────────────────────────────────────────────── */
.app-footer {
  margin-top: 40px; padding: 16px 0;
  text-align: center; font-size: 11px; color: rgba(255,255,255,0.22);
  border-top: 1px solid rgba(255,255,255,0.06); letter-spacing: .3px;
}

/* ─── LOADING ────────────────────────────────────────────────────────────── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.15); border-top-color: rgba(96,165,250,.80); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: rgba(255,255,255,.10); border-top-color: #60a5fa; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { display: flex; align-items: center; justify-content: center; padding: 60px; }

/* ─── TABS ───────────────────────────────────────────────────────────────── */
.tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 20px; gap: 2px;
}
.tab {
  padding: 10px 18px; cursor: pointer; font-weight: 600; font-size: 13px;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s;
}
.tab:hover { color: rgba(255,255,255,0.75); }
.tab.active { color: #60a5fa; border-bottom-color: #60a5fa; }

/* ─── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb .sep { color: rgba(255,255,255,0.18); }
.breadcrumb a { color: var(--blue); cursor: pointer; }
.breadcrumb .current { color: rgba(255,255,255,0.85); font-weight: 600; }

/* ─── STAGE PROGRESS ─────────────────────────────────────────────────────── */
.stage-progress {
  display: flex; align-items: center; gap: 0; margin-bottom: 20px; padding: 16px 20px;
  background: var(--glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-b); border-top-color: var(--glass-bt);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.stage-step { display: flex; align-items: center; gap: 10px; }
.stage-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.60);
  font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}
.stage-step.done .stage-step-num { background: rgba(34,197,94,0.20); color: #22c55e; border-color: rgba(34,197,94,0.35); }
.stage-step.active .stage-step-num { background: rgba(96,165,250,0.20); color: #60a5fa; border-color: rgba(96,165,250,0.40); }
.stage-step.locked .stage-step-num { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.20); border-color: rgba(255,255,255,0.08); }
.stage-step-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85); }
.stage-step-status { font-size: 11px; font-weight: 400; color: var(--muted); }
.stage-connector { flex: 1; height: 2px; background: rgba(255,255,255,0.10); margin: 0 12px; }
.stage-connector.done { background: rgba(34,197,94,0.40); }

/* ─── STAGE SECTIONS ─────────────────────────────────────────────────────── */
.stage-section {
  background: var(--glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-b); border-top-color: var(--glass-bt);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden;
}
.stage-section-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.07); flex-wrap: wrap;
  background: rgba(255,255,255,0.03);
}
.stage-section-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.90); }
.stage-section-body { padding: 20px; }
.stage-locked { text-align: center; padding: 32px 20px; color: var(--muted); }
.stage-locked-icon { font-size: 36px; margin-bottom: 10px; opacity: .5; }
.stage-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.stage-badge.stage1 { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }
.stage-badge.stage2 { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }

/* ─── STAR RATING WIDGET ─────────────────────────────────────────────────── */
.star-rating { display: flex; gap: 4px; margin: 8px 0 6px; }
.star {
  font-size: 28px; color: rgba(255,255,255,0.15); cursor: pointer;
  transition: color .15s, transform .1s;
  line-height: 1; user-select: none;
}
.star.active { color: #f59e0b; }
.star.hover  { color: #f59e0b; transform: scale(1.1); }
.star:hover  { transform: scale(1.1); }

.star-display { font-size: 16px; color: #f59e0b; }

/* ─── REP RATING BLOCK ───────────────────────────────────────────────────── */
.rep-rating-block {
  border: 1px solid rgba(255,255,255,0.10); border-radius: 10px; padding: 14px 16px;
  margin-bottom: 12px; background: rgba(255,255,255,0.05);
}
.rep-rating-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.rep-rating-name  { font-weight: 700; font-size: 14px; color: rgba(255,255,255,0.90); }
.rep-rating-stage {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  background: rgba(96,165,250,0.12); color: #60a5fa; padding: 2px 7px; border-radius: 20px;
  border: 1px solid rgba(96,165,250,0.20);
}
.rated-badge { font-size: 11px; color: #22c55e; font-weight: 700; margin-left: auto; }
.rep-rating-comment {
  width: 100%; margin: 6px 0 8px; padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 7px; font-size: 13px;
  resize: vertical; min-height: 52px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.90);
}
.rep-rating-comment:focus { border-color: rgba(96,165,250,0.50); outline: none; }

/* ─── PERFORMANCE TABLE ──────────────────────────────────────────────────── */
.perf-table th, .perf-table td { padding: 12px 14px; }
.perf-table td:nth-child(2),
.perf-table td:nth-child(3),
.perf-table td:nth-child(4) { text-align: center; }

/* ─── RATING BAR ─────────────────────────────────────────────────────────── */
.rating-bar {
  height: 100%; background: linear-gradient(90deg, #f59e0b, #f59e0b);
  border-radius: 6px; transition: width .3s;
}

/* ─── REP PERF CARD (modal) ──────────────────────────────────────────────── */
.rep-perf-card { padding: 4px 0; }

/* ─── PERF DETAIL MODAL SECTIONS ─────────────────────────────────────────── */
.perf-detail-section { margin-bottom: 18px; }
.perf-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* Rating summary block */
.perf-rating-summary { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.perf-rating-big { text-align: center; min-width: 80px; }
.perf-rating-number { font-size: 40px; font-weight: 800; color: rgba(255,255,255,0.95); line-height: 1; }
.perf-rating-stars { font-size: 22px; color: #f59e0b; margin: 4px 0; }
.perf-rating-count { font-size: 11px; color: var(--muted); }
.perf-rating-bars { flex: 1; min-width: 150px; }

/* Student comments list */
.perf-comments-list { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; }
.perf-comment-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px; padding: 12px 14px; border-left: 3px solid #f59e0b;
}
.perf-comment-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px;
}
.perf-comment-stars { font-size: 14px; color: #f59e0b; flex-shrink: 0; }
.perf-comment-meta { font-size: 11px; font-weight: 600; color: var(--blue); flex: 1; min-width: 100px; }
.perf-comment-date { font-size: 10px; color: rgba(255,255,255,0.28); white-space: nowrap; }
.perf-comment-text { font-size: 13px; color: rgba(255,255,255,0.80); line-height: 1.6; }

/* Performance table star metric */
.perf-star-metric { display: flex; align-items: center; gap: 10px; }
.perf-star-score { font-size: 24px; font-weight: 800; line-height: 1; color: rgba(255,255,255,0.92); }
.perf-star-row { font-size: 14px; color: #f59e0b; line-height: 1; }
.perf-star-count { font-size: 10px; color: var(--muted); margin-top: 2px; }
.perf-no-rating { font-size: 12px; color: rgba(255,255,255,0.25); font-style: italic; }

/* ─── REVIEW TYPE BADGES ─────────────────────────────────────────────────── */
.rt-badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px;
  font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.rt-unsorted  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.12); }
.rt-full      { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }
.rt-expedited { background: rgba(96,165,250,0.15);  color: #93c5fd; border: 1px solid rgba(96,165,250,0.25); }
.rt-exempt    { background: rgba(34,197,94,0.15);  color: #86efac; border: 1px solid rgba(34,197,94,0.25); }

/* ─── SORT MODAL OPTIONS ─────────────────────────────────────────────────── */
.sort-options { display: flex; flex-direction: column; gap: 10px; }
.sort-option  { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.sort-option input[type="radio"] { display: none; }
.sort-option-content {
  flex: 1; border: 1px solid rgba(255,255,255,0.10); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s, background .15s; background: rgba(255,255,255,0.04);
}
.sort-option:hover .sort-option-content { border-color: rgba(96,165,250,0.40); background: rgba(96,165,250,0.07); }
.sort-option input:checked + .sort-option-content {
  border-color: #60a5fa; background: rgba(96,165,250,0.12);
}
.sort-option-title { font-weight: 700; font-size: 14px; color: rgba(255,255,255,0.90); margin-bottom: 4px; }
.sort-option-desc  { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ─── MANUSCRIPT SECTION ─────────────────────────────────────────────────── */
.manuscript-card { border-top: 3px solid rgba(124,58,237,0.60); }
.manuscript-list  { display: flex; flex-direction: column; gap: 10px; }
.manuscript-item  {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid rgba(255,255,255,0.09); border-radius: 9px;
  background: rgba(255,255,255,0.05); flex-wrap: wrap;
}
.manuscript-current { border-color: rgba(124,58,237,0.35); background: rgba(124,58,237,0.08); }
.manuscript-item-left  { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.manuscript-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.manuscript-icon  { font-size: 28px; flex-shrink: 0; }
.manuscript-name  { font-weight: 600; font-size: 14px; color: rgba(255,255,255,0.90); word-break: break-all; }
.manuscript-meta  { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ms-current-tag   {
  display: inline-block; background: rgba(124,58,237,0.25); color: #c084fc;
  border-radius: 10px; padding: 1px 7px; font-size: 10px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; vertical-align: middle;
  border: 1px solid rgba(124,58,237,0.35);
}
.manuscript-empty {
  text-align: center; padding: 32px 16px; color: var(--muted);
  border: 2px dashed rgba(255,255,255,0.10); border-radius: 8px;
}

/* Manuscript stage blocks */
.ms-stage-block {
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  overflow: hidden;
}
.ms-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(124,58,237,0.10);
  border-bottom: 1px solid rgba(124,58,237,0.15);
}
.ms-stage-label {
  font-weight: 600;
  font-size: 13px;
  color: #c084fc;
}
.ms-stage-block .manuscript-list { padding: 10px 12px; }
.ms-stage-block .manuscript-empty { border: none; background: rgba(255,255,255,0.03); border-radius: 0; }
.ms-stage-block + .ms-stage-block { margin-top: 12px; }

/* ── File chip preview+download layout ─────────────────────────────────── */
.file-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip-wrap {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px;
  padding: 4px 10px; font-size: 12px; max-width: 100%;
}
.file-chip-name { color: #60a5fa; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.file-chip-preview {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: #c084fc; font-weight: 600; padding: 0 4px;
  white-space: nowrap;
}
.file-chip-preview:hover { text-decoration: underline; }
.file-chip-dl {
  font-size: 13px; color: var(--muted); text-decoration: none; padding: 0 2px;
}
.file-chip-dl:hover { color: rgba(255,255,255,0.85); }

/* ── Document item card (submission detail) — shows the document TYPE clearly
      so reviewers don't have to guess what each file is ────────────────────── */
.doc-item-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 3px solid #60a5fa;
  border-radius: 8px;
  padding: 9px 13px;
}
.doc-item-main { min-width: 0; flex: 1; }
.doc-item-type {
  font-size: 13.5px; font-weight: 700; color: #cfe0ff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-item-type.untyped { color: var(--muted); font-weight: 600; font-style: italic; }
.doc-item-file {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-item-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.doc-item .file-chip-dl { font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ── Document preview modal — full-size override ────────────────────────── */
#modal-bg.modal-preview #modal-box {
  max-width: 92vw;
  width: 92vw;
  max-height: 95vh;
  height: 95vh;
}
#modal-bg.modal-preview #modal-body {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.doc-preview-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04); flex-shrink: 0;
}
.doc-preview-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; margin-right: 12px; }
.doc-preview-frame { flex: 1; width: 100%; border: none; min-height: 0; }
.doc-preview-image-wrap { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.30); padding: 16px; }
.doc-preview-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: var(--shadow); }
.doc-preview-unsupported { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 40px 24px; text-align: center; }

/* ── Certificates Page ───────────────────────────────────────────────────── */
.cert-grid { display: flex; flex-direction: column; gap: 16px; }

.cert-card {
  background: var(--glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 12px; border: 1px solid var(--glass-b);
  border-top: 3px solid rgba(184,134,11,0.60); box-shadow: var(--shadow); overflow: hidden;
}
.cert-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 20px 12px; background: rgba(184,134,11,0.06);
  border-bottom: 1px solid rgba(184,134,11,0.15);
}
.cert-card-refno  { font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: .5px; margin-bottom: 4px; }
.cert-card-title  { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.92); margin-bottom: 4px; }
.cert-card-date   { font-size: 12px; color: var(--muted); }
.cert-trophy      { font-size: 36px; flex-shrink: 0; margin-left: 12px; }

.cert-card-stages { padding: 14px 20px 16px; }
.cert-stage-row   { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cert-stage-info  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cert-stage-badge { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 12px; white-space: nowrap; flex-shrink: 0; }
.cert-s1 { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }
.cert-s2 { background: rgba(34,197,94,0.15);  color: #22c55e; border: 1px solid rgba(34,197,94,0.25); }
.cert-stage-name  { font-size: 13px; color: rgba(255,255,255,0.82); }

.cert-count-badge {
  font-size: 12px; font-weight: 700; padding: 3px 10px;
  background: rgba(96,165,250,0.15); color: #60a5fa; border-radius: 12px;
  border: 1px solid rgba(96,165,250,0.25);
}
.cert-count-s2 { background: rgba(34,197,94,0.15); color: #22c55e; border-color: rgba(34,197,94,0.25); }

/* ─── DOCUMENT CATEGORIZATION ────────────────────────────────────────────── */
.upload-section {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.04);
}
.upload-section:last-child { margin-bottom: 0; }

.upload-section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.upload-cat-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: .3px;
  white-space: nowrap;
  margin-top: 1px;
}
.upload-cat-badge.cat1 {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.25);
}
.upload-cat-badge.cat2 {
  background: rgba(245,158,11,0.12);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.22);
}
.upload-cat-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.90);
}
.upload-cat-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Attachment type selector inside file list items */
.attachment-type-sel {
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  font-size: 12px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  outline: none;
  min-width: 150px;
  max-width: 200px;
}
.attachment-type-sel:focus { border-color: rgba(96,165,250,0.50); }
.attachment-type-sel option { background: #0c1c3e; }

/* File category sections in submission detail */
.file-cat-section {
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius);
  overflow: hidden;
}
.file-cat-section:last-child { margin-bottom: 0; }

.file-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
}
.file-cat-header.cat1 {
  background: rgba(96,165,250,0.08);
  border-bottom: 1px solid rgba(96,165,250,0.15);
}
.file-cat-header.cat2 {
  background: rgba(245,158,11,0.07);
  border-bottom: 1px solid rgba(245,158,11,0.15);
}
.file-cat-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9px;
}
.file-cat-header.cat1 .file-cat-badge {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.25);
}
.file-cat-header.cat2 .file-cat-badge {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.25);
}
.file-cat-title {
  font-weight: 700;
  color: rgba(255,255,255,0.88);
}
.file-cat-body {
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
}

/* ─── Required / Optional attachment slots (Category 2) ──────────────────── */
.req-attach-slot {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 9px;
  margin-top: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
/* Clear "done" state once a required document has been attached — green
   border, tinted header, and a "✓ Uploaded" badge replacing "Required". */
.req-attach-slot.filled {
  border-color: rgba(34,197,94,0.55);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.25), 0 2px 10px rgba(34,197,94,0.10);
}
.req-attach-slot.filled .req-attach-header {
  background: rgba(34,197,94,0.12);
  border-bottom-color: rgba(34,197,94,0.22);
}
.req-attach-slot.filled .req-attach-label { color: #d4f5e0; }
.req-attach-slot.filled .req-zone-compact {
  background: rgba(34,197,94,0.05);
}
/* The "✓ Uploaded" badge: hidden until the slot is filled, then it replaces
   the amber "Required" badge. */
.req-check { display: none; }
.req-attach-slot.filled .req-check {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  background: rgba(34,197,94,0.18); color: #34d399;
  border: 1px solid rgba(34,197,94,0.40);
}
.req-attach-slot.filled .req-badge { display: none; }
.req-attach-slot.optional-slot {
  border-style: dashed;
  border-color: rgba(255,255,255,0.08);
}
.req-attach-slot.optional-slot.filled { border-style: solid; }
.req-attach-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.req-attach-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.req-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  background: rgba(245,158,11,0.12);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.22);
}
.opt-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.22);
}
.req-zone-compact {
  padding: 14px 16px !important;
  min-height: 52px !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px dashed rgba(255,255,255,0.08) !important;
  background: rgba(255,255,255,0.03);
}
.req-zone-compact:hover,
.req-zone-compact.dragover {
  background: rgba(96,165,250,0.07) !important;
  border-color: rgba(96,165,250,0.35) !important;
}
.req-attach-slot .file-list {
  padding: 4px 10px;
  background: rgba(255,255,255,0.03);
}

/* ─── Settings: required toggle for doc types ─────────────────────────────── */
.dt-req-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin-right: 4px;
}
.dt-req-label {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  transition: all 0.15s;
}
.dt-req-label.is-req {
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.25);
  font-weight: 700;
}

/* ── Admin-written requirements box shown to researchers ─────────────────── */
.doc-req-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 6px;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.55;
  border-left: 4px solid currentColor;
}
.doc-req-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.cat1-req-box {
  background: rgba(96,165,250,0.08);
  border-color: #60a5fa;
  color: #93c5fd;
}
.cat2-req-box {
  background: rgba(94,234,212,0.08);
  border-color: #5eead4;
  color: #5eead4;
}
