/* ============================================================
   SDA Lusaka Conference - Payment System Styles
   With Animations & Modern UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=DM+Serif+Display&display=swap');

:root {
  --primary:       #1B5E35;
  --primary-light: #2E7D52;
  --primary-dark:  #0D3B1F;
  --accent:        #C8962A;
  --accent-light:  #E8C04A;
  --secondary:     #3A9E66;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #C8962A;
  --info:          #3b82f6;
  --purple:        #8b5cf6;
  --sidebar-w:     270px;
  --topbar-h:      68px;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(27,94,53,.08);
  --shadow-md:     0 8px 32px rgba(27,94,53,.14);
  --shadow-lg:     0 16px 48px rgba(27,94,53,.18);
  --transition:    all .3s cubic-bezier(.4,0,.2,1);
  --font:          'Plus Jakarta Sans', sans-serif;
  --bg:            #f0f4f8;
  --card-bg:       #ffffff;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeIn        { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeInUp      { from { opacity:0; transform:translateY(24px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeInDown    { from { opacity:0; transform:translateY(-24px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeInLeft    { from { opacity:0; transform:translateX(-24px) } to { opacity:1; transform:translateX(0) } }
@keyframes fadeInRight   { from { opacity:0; transform:translateX(24px) } to { opacity:1; transform:translateX(0) } }
@keyframes scaleIn       { from { opacity:0; transform:scale(.92) } to { opacity:1; transform:scale(1) } }
@keyframes slideDown     { from { transform:translateY(-100%); opacity:0 } to { transform:translateY(0); opacity:1 } }
@keyframes pulse         { 0%,100%{ transform:scale(1) } 50%{ transform:scale(1.06) } }
@keyframes spin          { to { transform: rotate(360deg) } }
@keyframes shimmer       { 0%{ background-position:-700px 0 } 100%{ background-position:700px 0 } }
@keyframes countUp       { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:translateY(0) } }
@keyframes ripple        { to { transform:scale(4); opacity:0 } }
@keyframes bounce        { 0%,20%,53%,80%,100%{ transform:translateY(0) } 40%,43%{ transform:translateY(-8px) } 70%{ transform:translateY(-4px) } 90%{ transform:translateY(-2px) } }
@keyframes glowPulse     { 0%,100%{ box-shadow:0 0 0 0 rgba(200,150,42,.4) } 50%{ box-shadow:0 0 0 8px rgba(200,150,42,0) } }
@keyframes progressFill  { from { width: 0 } to { width: var(--progress) } }
@keyframes notifSlide    { from { transform:translateX(120%); opacity:0 } to { transform:translateX(0); opacity:1 } }
@keyframes sidebarReveal { from { transform:translateX(-100%) } to { transform:translateX(0) } }
@keyframes dotBlink      { 0%,100%{ opacity:1 } 50%{ opacity:.2 } }
@keyframes floatUp       { 0%{ transform:translateY(0) } 50%{ transform:translateY(-6px) } 100%{ transform:translateY(0) } }
@keyframes borderDance   { 0%{ border-color: var(--primary) } 50%{ border-color: var(--accent) } 100%{ border-color: var(--primary) } }
@keyframes wave          { 0%{ transform:scaleY(1) } 25%{ transform:scaleY(1.6) } 50%{ transform:scaleY(1) } 75%{ transform:scaleY(.8) } 100%{ transform:scaleY(1) } }

/* Animation utilities */
.anim-fade-in      { animation: fadeIn .5s ease both; }
.anim-fade-up      { animation: fadeInUp .5s ease both; }
.anim-fade-down    { animation: fadeInDown .5s ease both; }
.anim-fade-left    { animation: fadeInLeft .5s ease both; }
.anim-scale-in     { animation: scaleIn .4s ease both; }
.anim-bounce       { animation: bounce .8s ease both; }
.anim-float        { animation: floatUp 3s ease-in-out infinite; }

.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }
.delay-6 { animation-delay: .6s; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #0D3B1F 0%, #1B5E35 50%, #2E7D52 100%);
  position: relative;
  overflow: hidden;
}

.login-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  animation: floatUp 4s ease-in-out infinite;
}

.login-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  color: #fff;
  animation: fadeInLeft .8s ease both;
}

.login-brand .logo-circle {
  width: 180px;
  height: 100px;
  background: none;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: floatUp 3s ease-in-out infinite;
}

.login-brand .logo-circle img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.login-brand .logo-circle i {
  font-size: 3.5rem;
  color: #E8C04A;
}

.login-brand h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; line-height: 1.2; }
.login-brand p  { color: rgba(255,255,255,.7); font-size: 1rem; }

.login-features {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  animation: fadeInLeft .6s ease both;
}

.feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(200,150,42,.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  font-size: 1rem;
  flex-shrink: 0;
}

.login-form-panel {
  width: 460px;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  animation: fadeInRight .8s ease both;
  position: relative;
}

.login-form-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--primary));
  animation: borderDance 3s ease-in-out infinite;
}

.login-form-panel h2 { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.login-form-panel p  { color: var(--text-muted); margin-bottom: 32px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .92rem;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(46,125,82,.12);
  transform: translateY(-1px);
}

.form-control.input-icon-left { padding-left: 44px; }

.input-wrapper { position: relative; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: var(--transition);
}

.input-wrapper:focus-within .input-icon { color: var(--primary-light); }

.input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: .5s;
}

.btn:hover::after { left: 100%; }

.btn:active { transform: scale(.97); }

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple .6s linear;
  background: rgba(255,255,255,.4);
  pointer-events: none;
}

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); box-shadow: 0 6px 20px rgba(27,94,53,.35); transform: translateY(-2px); }

.btn-accent    { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-light); box-shadow: 0 6px 20px rgba(200,150,42,.35); transform: translateY(-2px); }

.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.1); transform: translateY(-2px); }

.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); transform: translateY(-2px); }

.btn-warning   { background: var(--warning); color: #fff; }
.btn-info      { background: var(--info); color: #fff; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(27,94,53,.04); }

.btn-sm  { padding: 7px 14px; font-size: .8rem; }
.btn-lg  { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 10px; aspect-ratio: 1; justify-content: center; }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Loading button */
.btn.loading .btn-text { opacity: 0; }
.btn.loading::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0D3B1F 0%, #0F4424 60%, #112E1A 100%);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  animation: sidebarReveal .5s ease both;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  animation: fadeInDown .6s ease both;
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: 100%;
}

.logo-img-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: none;
  border-radius: 0;
  min-height: 60px;
}

.logo-img-wrap img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

.logo-img-wrap .logo-icon-fallback {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #C8962A, #9B6E12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  animation: floatUp 3s ease-in-out infinite;
}

.logo-text {
  line-height: 1.3;
  text-align: center;
  width: 100%;
}
.logo-text span:first-child { display: block; color: #fff; font-weight: 700; font-size: .92rem; letter-spacing: .01em; }
.logo-text span:last-child  { display: block; color: rgba(255,255,255,.45); font-size: .74rem; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 16px 0; }

.nav-section-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.3);
  padding: 16px 22px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  margin: 1px 10px;
  border-radius: 10px;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(200,150,42,.25), rgba(200,150,42,.1));
  color: var(--accent-light);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item.active .nav-icon { color: var(--accent-light); }

.nav-icon { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeInUp .6s ease both;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-info span:first-child  { display: block; color: #fff; font-size: .82rem; font-weight: 600; }
.user-info span:last-child   { display: block; color: rgba(255,255,255,.45); font-size: .74rem; }

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(239,68,68,.15);
  color: #fca5a5;
  font-size: .78rem;
  text-decoration: none;
  margin-left: auto;
  transition: var(--transition);
}

.sidebar-logout:hover { background: rgba(239,68,68,.3); color: #fff; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
  animation: slideDown .5s ease both;
  box-shadow: var(--shadow);
}

.topbar-title { font-size: 1.15rem; font-weight: 700; color: var(--primary); }
.topbar-sub   { font-size: .8rem; color: var(--text-muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.topbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}

.topbar-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }

.notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--card-bg);
  animation: glowPulse 2s ease-in-out infinite;
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
  padding: 28px;
  flex: 1;
  animation: fadeInUp .5s ease both;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  animation: fadeInDown .5s ease both;
}

.page-header-info h1 { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.page-header-info p  { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
}

.card-body { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--border); background: #fafbfc; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp .5s ease both;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-color, var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}

.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.stat-card:hover .stat-icon { transform: scale(1.1) rotate(5deg); }

.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  animation: countUp .6s ease both;
}
.stat-label { font-size: .82rem; color: var(--text-muted); font-weight: 500; }

.stat-trend {
  font-size: .78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}
.stat-trend.up    { color: var(--success); }
.stat-trend.down  { color: var(--danger); }

/* Color variants */
.stat-blue   { --stat-color: var(--primary); }
.stat-blue   .stat-icon { background: rgba(27,94,53,.1); color: var(--primary); }
.stat-amber  { --stat-color: var(--accent); }
.stat-amber  .stat-icon { background: rgba(200,150,42,.1); color: var(--accent); }
.stat-green  { --stat-color: var(--success); }
.stat-green  .stat-icon { background: rgba(16,185,129,.1); color: var(--success); }
.stat-red    { --stat-color: var(--danger); }
.stat-red    .stat-icon { background: rgba(239,68,68,.1); color: var(--danger); }
.stat-purple { --stat-color: var(--purple); }
.stat-purple .stat-icon { background: rgba(139,92,246,.1); color: var(--purple); }
.stat-sky    { --stat-color: var(--secondary); }
.stat-sky    .stat-icon { background: rgba(58,158,102,.1); color: var(--secondary); }

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .875rem;
}

.table th {
  padding: 12px 16px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  transition: background .2s;
}

.table tr:last-child td { border-bottom: none; }

.table tbody tr {
  transition: var(--transition);
  animation: fadeInUp .4s ease both;
}

.table tbody tr:hover td { background: rgba(27,94,53,.02); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-primary   { background: rgba(27,94,53,.1);   color: var(--primary); }
.badge-secondary { background: #f1f5f9;              color: #64748b; }
.badge-success   { background: rgba(16,185,129,.1);  color: #059669; }
.badge-danger    { background: rgba(239,68,68,.1);   color: #dc2626; }
.badge-warning   { background: rgba(200,150,42,.12); color: #9B6E12; }
.badge-info      { background: rgba(59,130,246,.1);  color: #2563eb; }
.badge-purple    { background: rgba(139,92,246,.1);  color: #7c3aed; }

/* Animated badge */
.badge.pulse { animation: glowPulse 2s ease-in-out infinite; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(13,59,31,.55);
  z-index: 9999;
  overflow-x: hidden;
  overflow-y: auto;
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease both;
  /* padding gives breathing room above/below modal */
  padding: 32px 16px;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  /* NO max-height — overlay scrolls, modal is full height */
  display: flex;
  flex-direction: column;
  animation: scaleIn .3s ease both;
  overflow: visible;
  /* Centre horizontally inside the scrollable overlay */
  margin: 0 auto;
  position: relative;
}

.modal-lg  { max-width: 860px; }
.modal-xl  { max-width: 1040px; }
.modal-sm  { max-width: 480px; }

.modal-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
}

.modal-title { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.12);
  border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,.25); transform: rotate(90deg); }

.modal-body   { padding: 26px; }
.modal-footer { padding: 16px 26px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #f8fafc; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ============================================================
   WORKFLOW TIMELINE
   ============================================================ */
.workflow-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
  overflow-x: auto;
  padding: 10px 0;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 100px;
  position: relative;
}

.workflow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.workflow-step.done:not(:last-child)::after { background: var(--success); }
.workflow-step.current:not(:last-child)::after { background: linear-gradient(to right, var(--primary), var(--border)); }

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.workflow-step.done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  animation: scaleIn .4s ease both;
}

.workflow-step.current .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  animation: glowPulse 2s ease-in-out infinite;
}

.workflow-step.rejected .step-circle {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.step-label { font-size: .72rem; font-weight: 600; color: var(--text-muted); text-align: center; line-height: 1.3; }
.workflow-step.done .step-label { color: var(--success); }
.workflow-step.current .step-label { color: var(--primary); font-weight: 700; }

/* ============================================================
   NOTIFICATIONS DROPDOWN
   ============================================================ */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 999;
  animation: fadeInDown .25s ease both;
  overflow: hidden;
}

.notif-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: .9rem;
}

.notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  transition: var(--transition);
  cursor: pointer;
  animation: fadeInRight .3s ease both;
}

.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: rgba(27,94,53,.03); }
.notif-item.unread::before {
  content: '';
  width: 3px;
  background: var(--primary);
  border-radius: 99px;
  flex-shrink: 0;
  margin-right: -4px;
}

.notif-dot-type {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}

.notif-text { flex: 1; }
.notif-title { font-size: .84rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-msg   { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.notif-time  { font-size: .7rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-width: 300px;
  max-width: 400px;
  animation: notifSlide .4s ease both;
  border-left: 4px solid var(--toast-color, var(--primary));
}

.toast.success { --toast-color: var(--success); }
.toast.danger  { --toast-color: var(--danger); }
.toast.warning { --toast-color: var(--warning); }
.toast.info    { --toast-color: var(--info); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-size: .9rem; font-weight: 700; margin-bottom: 2px; }
.toast-msg   { font-size: .82rem; color: var(--text-muted); }
.toast-close { cursor: pointer; color: var(--text-muted); font-size: .9rem; transition: var(--transition); }
.toast-close:hover { color: var(--text); }

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary-light), var(--secondary));
  animation: progressFill 1.2s ease both;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 1.5s infinite;
}

/* ============================================================
   CHARTS
   ============================================================ */
.chart-container {
  position: relative;
  height: 280px;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; }

.tab-btn {
  padding: 10px 18px;
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover { color: var(--primary); background: rgba(27,94,53,.04); }

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(27,94,53,.04);
}

/* ============================================================
   SELECT & TEXTAREA
   ============================================================ */
select.form-control { cursor: pointer; }

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn .5s ease both;
}

.empty-icon {
  font-size: 3rem;
  color: var(--border);
  margin-bottom: 16px;
  animation: floatUp 3s ease-in-out infinite;
}

.empty-state h3 { font-size: 1.1rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.empty-state p  { font-size: .88rem; color: var(--text-muted); }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 700px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); --sidebar-w: 270px; }
  .main-content { margin-left: 0; }
}

@media (max-width: 768px) {
  .login-brand   { display: none; }
  .login-form-panel { width: 100%; padding: 40px 28px; }
  .page-content  { padding: 16px; }
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .modal         { width: calc(100% - 0px); }
  .modal-overlay { padding: 12px; }
  .modal-body    { padding: 18px; }
  .modal-header  { padding: 16px 18px; }
  .modal-footer  { padding: 12px 18px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; align-items: center; gap: 10px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-auto { margin-top: auto; }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: .82rem; }
.text-xs     { font-size: .75rem; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.d-none       { display: none; }
.w-100        { width: 100%; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .sidebar, .topbar, .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}
