/* ═══════════════════════════════════════════════════════
   ESEF El Jadida — Design System
   Colors: #547792 (Blue) | #FAB95B (Gold) | #E8E2DB (Sand)
════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

:root {
  --blue:        #547792;
  --blue-dark:   #3d5a70;
  --blue-light:  #6e94ab;
  --blue-xlight: #dce9f0;
  --gold:        #FAB95B;
  --gold-dark:   #e09b38;
  --gold-light:  #fdd49a;
  --sand:        #E8E2DB;
  --sand-dark:   #d5cec6;
  --sand-light:  #f5f1ed;
  --white:       #ffffff;
  --text-dark:   #1f2b36;
  --text-mid:    #4a5c68;
  --text-light:  #7a909e;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   24px;
  --shadow-sm:   0 2px 10px rgba(84,119,146,.12);
  --shadow-md:   0 8px 30px rgba(84,119,146,.18);
  --shadow-lg:   0 20px 60px rgba(84,119,146,.22);
  --transition:  0.3s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--sand-light);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

main { 
  flex: 1; 
  display: flex;
  flex-direction: column;
}

a { transition: color var(--transition); }

/* ════════════════════════════════════════════════════════
   NAVBAR — Public
════════════════════════════════════════════════════════ */
.esef-navbar {
  background: var(--blue);
  border-bottom: 3px solid var(--gold);
  padding: 0 0;
  min-height: 70px;
}

.esef-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.esef-navbar .brand-logo {
  height: 52px;
  width: auto;
  background: white;
  border-radius: 8px;
  padding: 3px 6px;
  transition: transform var(--transition);
}
.esef-navbar .brand-logo:hover { transform: scale(1.05); }

.esef-navbar .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.esef-navbar .brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}
.esef-navbar .brand-sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,.7);
  letter-spacing: 0.03em;
}

.esef-navbar .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.esef-navbar .nav-link:hover,
.esef-navbar .nav-link.active-link {
  color: var(--gold) !important;
  background: rgba(255,255,255,.1);
}

.esef-navbar .nav-btn-primary {
  background: var(--gold);
  color: var(--text-dark) !important;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1.2rem !important;
}
.esef-navbar .nav-btn-primary:hover {
  background: var(--gold-dark);
  color: var(--text-dark) !important;
}

/* ════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════ */
.esef-footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,.55);
  font-size: 0.8rem;
  padding: 1.2rem 0;
  text-align: center;
  border-top: 2px solid var(--gold);
}
.esef-footer strong { color: var(--gold); }

/* ════════════════════════════════════════════════════════
   FLASH MESSAGES
════════════════════════════════════════════════════════ */
.flash-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}
.flash-toast {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.35s ease-out;
  border-left: 4px solid;
}
.flash-toast.success { background:#e8f5e9; color:#2e7d32; border-color:#66bb6a; }
.flash-toast.danger  { background:#fdecea; color:#c62828; border-color:#ef5350; }
.flash-toast.info    { background:#e3f2fd; color:#1565c0; border-color:#42a5f5; }
.flash-toast.warning { background:#fff8e1; color:#f57f17; border-color:var(--gold); }

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ════════════════════════════════════════════════════════
   WIZARD STEPS — Student Form
════════════════════════════════════════════════════════ */
.wizard-header {
  background: var(--blue);
  padding: 2rem 0 0;
  position: relative;
  overflow: hidden;
}
.wizard-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.wizard-logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.wizard-logo-img {
  height: 70px;
  width: auto;
  background: white;
  border-radius: 12px;
  padding: 6px 10px;
  animation: logoPulse 2s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(0,0,0,.15); }
  50% { transform: scale(1.04); box-shadow: 0 6px 28px rgba(250,185,91,.45); }
}

/* step-entering animation — triggered via JS */
.logo-step-transition {
  animation: logoStepAnim 0.6s cubic-bezier(.4,0,.2,1);
}
@keyframes logoStepAnim {
  0%   { transform: translateY(-20px) scale(0.85); opacity: 0; filter: brightness(0) invert(1); }
  60%  { transform: translateY(4px) scale(1.06); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.wizard-school-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

/* Step track */
.wizard-steps-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  position: relative;
  z-index: 1;
  padding: 0 2rem;
}

.w-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 100px;
}

.w-step-bubble {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.6);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
}
.w-step.done .w-step-bubble {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text-dark);
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(250,185,91,.3);
}
.w-step.active .w-step-bubble {
  background: var(--white);
  border-color: var(--white);
  color: var(--blue);
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(255,255,255,.25);
  animation: activePulse 2s ease-in-out infinite;
}
@keyframes activePulse {
  0%,100% { box-shadow: 0 0 0 5px rgba(255,255,255,.25); }
  50%      { box-shadow: 0 0 0 9px rgba(255,255,255,.08); }
}

.w-step-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
  margin-bottom: 0.8rem;
  white-space: nowrap;
}
.w-step.active .w-step-label  { color: var(--white); }
.w-step.done .w-step-label    { color: var(--gold-light); }

/* Connector line between steps */
.w-step::before {
  content: '';
  position: absolute;
  top: 19px;
  right: calc(50% + 19px);
  left: calc(-50% + 19px);
  height: 3px;
  background: rgba(255,255,255,.15);
  transition: background 0.4s;
}
.w-step:first-child::before { display: none; }
.w-step.done::before,
.w-step.active::before { background: var(--gold); }

/* Bottom curve */
.wizard-header-curve {
  height: 30px;
  background: var(--sand-light);
  border-radius: 30px 30px 0 0;
  margin-top: -1px;
}

/* Main card area for student form */
.wizard-body {
  max-width: 560px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ════════════════════════════════════════════════════════
   CARDS
════════════════════════════════════════════════════════ */
.card-esef {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-md);
  padding: 2rem;
  animation: cardFadeUp 0.45s cubic-bezier(.4,0,.2,1);
}
@keyframes cardFadeUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.card-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-section-title .title-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--blue-xlight);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.card-subtitle { color: var(--text-light); font-size: 0.87rem; margin-bottom: 1.5rem; }

/* ════════════════════════════════════════════════════════
   FORM INPUTS
════════════════════════════════════════════════════════ */
.esef-input {
  border: 2px solid var(--sand-dark);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--sand-light);
  color: var(--text-dark);
  width: 100%;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  outline: none;
}
.esef-input:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(84,119,146,.12);
}
.esef-input::placeholder { color: var(--text-light); font-weight: 400; }
.esef-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 6px;
  display: block;
}

/* ════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════ */
.btn-esef-primary {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  width: 100%;
  justify-content: center;
}
.btn-esef-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(84,119,146,.35);
  color: var(--white);
  text-decoration: none;
}
.btn-esef-primary:active { transform: translateY(0); }

.btn-esef-gold {
  background: var(--gold);
  color: var(--text-dark);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  text-decoration: none;
}
.btn-esef-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(250,185,91,.4);
  color: var(--text-dark);
  text-decoration: none;
}

.btn-esef-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 0.82rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  justify-content: center;
}
.btn-esef-outline:hover {
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 1.5rem;
}
.btn-row .btn-esef-outline { flex: 0 0 auto; }
.btn-row .fill             { flex: 1; }

/* ════════════════════════════════════════════════════════
   OPTION CARDS — Document type / Delivery
════════════════════════════════════════════════════════ */
.options-grid { display: flex; flex-direction: column; gap: 12px; }

.option-card-wrap { position: relative; }
.option-card-wrap input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 1.1rem 1.3rem;
  border: 2px solid var(--sand-dark);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--sand-light);
  position: relative;
  overflow: hidden;
}
.option-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  opacity: 0.04;
}
.option-card-wrap input:checked + .option-card::before { transform: scaleX(1); }
.option-card:hover {
  border-color: var(--blue-light);
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.option-card-wrap input:checked + .option-card {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(84,119,146,.12);
}

.option-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--blue-xlight);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.option-card-wrap input:checked + .option-card .option-icon {
  background: var(--blue);
  color: var(--white);
}

.option-text .option-title { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); }
.option-text .option-sub   { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }

.option-check {
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--sand-dark);
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  font-size: 0.75rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.option-card-wrap input:checked + .option-card .option-check {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ════════════════════════════════════════════════════════
   SEMESTER GRID
════════════════════════════════════════════════════════ */
.semester-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.sem-wrap { position: relative; }
.sem-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.sem-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 0.5rem;
  border: 2px solid var(--sand-dark);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-mid);
  background: var(--sand-light);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  user-select: none;
}
.sem-label small {
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-top: 4px;
}
.sem-label:hover {
  border-color: var(--blue);
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.sem-wrap input:checked + .sem-label {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(84,119,146,.35);
  transform: translateY(-3px);
}
.sem-wrap input:checked + .sem-label small { color: rgba(255,255,255,.75); }

/* Ripple on semester select */
.sem-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,.4);
  animation: semRipple 0.5s linear;
  pointer-events: none;
}
@keyframes semRipple {
  to { transform: scale(4); opacity: 0; }
}

/* ════════════════════════════════════════════════════════
   CONFIRMATION PAGE
════════════════════════════════════════════════════════ */
.confirmation-card {
  text-align: center;
  padding: 3rem 2rem;
}
.confirm-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}
.confirm-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: confirmPop 0.6s cubic-bezier(.4,0,.2,1) both;
}
@keyframes confirmPop {
  0%   { transform: scale(0) rotate(-90deg); opacity: 0; }
  70%  { transform: scale(1.12) rotate(8deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.confirm-circle i { font-size: 2.5rem; color: white; }
.confirm-rings {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 3px solid rgba(76,175,80,.35);
  animation: ringExpand 1.5s ease-out infinite;
}
@keyframes ringExpand {
  0%   { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.6);  opacity: 0; }
}
.confirm-title { font-size: 1.6rem; font-weight: 800; color: #2e7d32; margin-bottom: 0.8rem; font-family: 'Playfair Display', serif; }
.confirm-msg { color: var(--text-mid); font-size: 1rem; line-height: 1.6; }
.confirm-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sand);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
  margin: 1.2rem 0;
}

/* Gold separator */
.gold-divider {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border: none;
  margin: 1.8rem 0;
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════
   LOGIN PAGE
════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -40%; left: -20%;
  width: 80vw; height: 80vw;
  max-width: 700px; max-height: 700px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -30%; right: -15%;
  width: 60vw; height: 60vw;
  max-width: 500px; max-height: 500px;
  border-radius: 50%;
  background: rgba(250,185,91,.06);
}

.login-box {
  background: var(--white);
  border-radius: 28px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  animation: loginSlideUp 0.5s cubic-bezier(.4,0,.2,1) both;
}
@keyframes loginSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.login-logo-area {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo-img {
  height: 80px;
  width: auto;
  margin-bottom: 1rem;
  animation: loginLogoIn 0.7s cubic-bezier(.4,0,.2,1) 0.2s both;
}
@keyframes loginLogoIn {
  from { transform: scale(0.6) translateY(-20px); opacity: 0; }
  to   { transform: scale(1) translateY(0);       opacity: 1; }
}

.login-school-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
  font-family: 'Playfair Display', serif;
}
.login-subtitle { font-size: 0.87rem; color: var(--text-light); margin-bottom: 0; }

.login-gold-line {
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  width: 50px;
  margin: 1rem auto 1.5rem;
}

.input-esef-wrap {
  position: relative;
}
.input-esef-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
  transition: color var(--transition);
}
.input-esef-wrap input { padding-left: 2.8rem !important; }
.input-esef-wrap input:focus + .input-icon,
.input-esef-wrap:focus-within .input-icon { color: var(--blue); }

.login-forgot {
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition);
}
.login-forgot:hover { color: var(--blue); }

/* ════════════════════════════════════════════════════════
   ADMIN / SERVICE — SHELL LAYOUT
════════════════════════════════════════════════════════ */
.shell-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sand-light);
}
.shell-navbar {
  background: var(--blue-dark);
  border-bottom: 3px solid var(--gold);
  min-height: 60px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  flex-shrink: 0;
}
.shell-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.shell-navbar-brand img {
  height: 36px;
  width: auto;
  background: white;
  border-radius: 6px;
  padding: 2px 4px;
}
.shell-navbar-brand .sn-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.shell-navbar-brand .sn-sub {
  font-size: 0.68rem;
  color: var(--gold-light);
  font-weight: 500;
}
.shell-navbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.shell-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 50px;
  padding: 5px 14px 5px 8px;
}
.shell-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--text-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}
.shell-user-name { font-size: 0.83rem; font-weight: 600; color: var(--white); }
.shell-btn-logout {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}
.shell-btn-logout:hover { background: rgba(255,255,255,.2); color: var(--white); }

.shell-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ── Sidebar ── */
.shell-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--sand-dark);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  padding: 1.2rem 1.2rem 0.4rem;
}
.sidebar-nav {
  list-style: none;
  padding: 0.4rem;
  margin: 0;
}
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-mid);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
}
.sidebar-nav a:hover { background: var(--sand); color: var(--blue); }
.sidebar-nav a.active-sidebar {
  background: var(--blue-xlight);
  color: var(--blue);
}
.sidebar-nav a.active-sidebar::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}
.sidebar-nav a i { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--text-dark);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid var(--sand);
}
.sidebar-student-link {
  display: flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 1px solid var(--sand-dark);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  color: var(--text-mid);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}
.sidebar-student-link:hover { background: var(--blue-xlight); color: var(--blue); }

/* ── Main content ── */
.shell-main {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  min-width: 0;
}

/* ════════════════════════════════════════════════════════
   PAGE HEADER (admin pages)
════════════════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.8rem;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  font-family: 'Playfair Display', serif;
  display: flex; align-items: center; gap: 12px;
}
.page-title-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-xlight);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* ════════════════════════════════════════════════════════
   STAT CARDS
════════════════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }

.stat-card-esef {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.3rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  animation: cardFadeUp 0.4s ease-out both;
}
.stat-card-esef:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-card-esef:nth-child(1) { border-color: var(--blue);       animation-delay: .05s; }
.stat-card-esef:nth-child(2) { border-color: var(--gold);       animation-delay: .10s; }
.stat-card-esef:nth-child(3) { border-color: #4caf50;           animation-delay: .15s; }
.stat-card-esef:nth-child(4) { border-color: #ef5350;           animation-delay: .20s; }

.stat-icon-esef {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-i-blue   { background: var(--blue-xlight); color: var(--blue); }
.stat-i-gold   { background: #fff8e1;             color: #e09b38; }
.stat-i-green  { background: #e8f5e9;             color: #2e7d32; }
.stat-i-red    { background: #fdecea;             color: #c62828; }

.stat-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--text-dark); }
.stat-lbl { font-size: 0.75rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px; }

/* ════════════════════════════════════════════════════════
   TABLES
════════════════════════════════════════════════════════ */
.table-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: cardFadeUp 0.4s ease-out 0.2s both;
}
.table-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--sand);
}
.table-card-header h6 {
  font-size: 0.95rem; font-weight: 700; color: var(--text-dark); margin: 0;
  display: flex; align-items: center; gap: 8px;
}

.esef-table { width: 100%; border-collapse: collapse; }
.esef-table thead th {
  background: var(--sand-light);
  color: var(--text-light);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.9rem 1.2rem;
  border-bottom: 2px solid var(--sand-dark);
  white-space: nowrap;
}
.esef-table tbody td {
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--sand);
  vertical-align: middle;
}
.esef-table tbody tr { transition: background var(--transition); }
.esef-table tbody tr:hover { background: var(--sand-light); }
.esef-table tbody tr:last-child td { border-bottom: none; }

.td-light { color: var(--text-light); font-size: 0.78rem; display: block; }
.td-id { color: var(--text-light); font-size: 0.82rem; }

/* ════════════════════════════════════════════════════════
   STATUS BADGES
════════════════════════════════════════════════════════ */
.badge-esef {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge-attente     { background: #fff8e1; color: #e09b38; }
.badge-traitement  { background: var(--blue-xlight); color: var(--blue); }
.badge-termine     { background: #e8f5e9; color: #2e7d32; }
.badge-rejete      { background: #fdecea; color: #c62828; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ════════════════════════════════════════════════════════
   FILTER BAR
════════════════════════════════════════════════════════ */
.filter-bar {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.2rem;
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.filter-label {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-light);
}
.filter-select {
  border: 2px solid var(--sand-dark);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  background: var(--sand-light);
  outline: none;
  transition: border-color var(--transition);
  cursor: pointer;
}
.filter-select:focus { border-color: var(--blue); background: var(--white); }

/* ════════════════════════════════════════════════════════
   ACTION BUTTONS (inline table)
════════════════════════════════════════════════════════ */
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
  text-decoration: none;
}
.btn-icon-edit   { background: var(--blue-xlight); color: var(--blue); }
.btn-icon-edit:hover { background: var(--blue); color: var(--white); }
.btn-icon-del    { background: #fdecea; color: #c62828; }
.btn-icon-del:hover  { background: #c62828; color: var(--white); }

/* ════════════════════════════════════════════════════════
   FORM CARD (admin create/edit)
════════════════════════════════════════════════════════ */
.form-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  max-width: 600px;
  animation: cardFadeUp 0.4s ease-out both;
}

/* ════════════════════════════════════════════════════════
   QUICK LINK CARDS (admin dashboard shortcuts)
════════════════════════════════════════════════════════ */
.quick-cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.quick-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  border-bottom: 3px solid var(--sand-dark);
  transition: all var(--transition);
  animation: cardFadeUp 0.4s ease-out both;
}
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
  color: var(--text-dark);
}
.quick-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue-xlight);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 1rem;
  transition: all var(--transition);
}
.quick-card:hover .quick-card-icon { background: var(--blue); color: var(--white); }
.quick-card-label { font-size: 0.88rem; font-weight: 700; color: var(--text-dark); }
.quick-card-sub   { font-size: 0.75rem; color: var(--text-light); margin-top: 3px; }

/* ════════════════════════════════════════════════════════
   BACK BUTTON
════════════════════════════════════════════════════════ */
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sand);
  border: none;
  color: var(--text-mid);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-back:hover { background: var(--sand-dark); color: var(--text-dark); }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .shell-sidebar {
    width: 60px;
    overflow: hidden;
  }
  .shell-sidebar .sidebar-nav a span,
  .shell-sidebar .sidebar-section-label,
  .shell-sidebar .sidebar-bottom { display: none; }
  .shell-sidebar .sidebar-nav a { justify-content: center; padding: 0.75rem; }
  .shell-sidebar .sidebar-badge { display: none; }
}
@media (max-width: 576px) {
  .wizard-steps-track { gap: 0; padding: 0 0.5rem; }
  .w-step-label { display: none; }
  .card-esef { padding: 1.3rem; }
  .login-box  { padding: 2rem 1.5rem; }
  .shell-main { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .semester-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════════════
   PREMIUM MODAL SYSTEM
   Glassmorphism, Blurs, and Professional Animations
   Used for: Confirmations, Deletions, Modals
════════════════════════════════════════════════════════ */
.esef-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 43, 54, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.esef-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.esef-modal {
  background: rgba(255, 255, 255, 0.98);
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.esef-modal-overlay.active .esef-modal {
  transform: scale(1) translateY(0);
}

.modal-icon-container {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
}

/* Modal Icon Variants */
.icon-delete { background: #fee2e2; color: #ef4444; } /* Red */
.icon-warning { background: #fff7ed; color: #f59e0b; } /* Gold/Amber */
.icon-info    { background: #eff6ff; color: #3b82f6; } /* Blue */

.modal-header-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-family: 'Playfair Display', serif;
}

.modal-body-text {
  color: var(--text-mid);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-modal-cancel {
  background: var(--sand-light);
  color: var(--text-mid);
  border: 1px solid var(--sand-dark);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-cancel:hover {
  background: var(--sand-dark);
  color: var(--text-dark);
}

.btn-modal-confirm {
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-modal-confirm.delete { background: #ef4444; }
.btn-modal-confirm.delete:hover { background: #dc2626; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); }

.btn-modal-confirm.action { background: var(--blue); }
.btn-modal-confirm.action:hover { background: var(--blue-dark); box-shadow: 0 4px 15px rgba(84, 119, 146, 0.3); }

/* Animation for the icon circle */
.modal-icon-container::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.2;
  animation: modalIconPulse 2s infinite;
}

@keyframes modalIconPulse {
  0% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1); opacity: 0.2; }
}

/* ════════════════════════════════════════════════════════
   DEVELOPER BRANDING & ANIMATIONS
════════════════════════════════════════════════════════ */
.shell-navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.dev-brand-animate {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: devFadeCycle 5s ease-in-out infinite;
}

.dev-brand-animate i {
  color: #ff4757;
  font-size: 0.9rem;
  animation: heartPulse 1.2s ease-in-out infinite;
}

@keyframes devFadeCycle {
  0%   { opacity: 0; transform: translateY(5px); }
  10%  { opacity: 1; transform: translateY(0); }
  90%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-5px); }
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255, 71, 87, 0.4)); }
  50%      { transform: scale(1.3); filter: drop-shadow(0 0 8px rgba(255, 71, 87, 0.7)); }
}

@media (max-width: 768px) {
  .shell-navbar-center { display: none; }
}

/* ════════════════════════════════════════════════════════
   PROFESSIONAL PAGINATION
════════════════════════════════════════════════════════ */
.esef-pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--sand);
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-light);
}

.pagination-info strong { color: var(--text-dark); }

.esef-pagination-pills {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pagination-pill {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--sand-light);
  border: 1px solid var(--sand-dark);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  user-select: none;
}

.pagination-pill:hover:not(.disabled):not(.active) {
  background: var(--sand);
  color: var(--blue);
  border-color: var(--blue-light);
  transform: translateY(-2px);
}

.pagination-pill.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(84, 119, 146, 0.3);
}

.pagination-pill.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--sand-light);
}

.pagination-pill.ellipsis {
  border: none;
  background: transparent;
  cursor: default;
}

@media (max-width: 576px) {
  .esef-pagination-container { justify-content: center; text-align: center; }
  .pagination-info { width: 100%; order: 2; }
}
