/* ============================================================
   SDA Reporting System — Animations & Motion (Safe Edition)
   ============================================================ */

@keyframes sda-spin    { to { transform:rotate(360deg); } }
@keyframes fadeIn      { from{opacity:0} to{opacity:1} }
@keyframes fadeUp      { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
@keyframes scalePop    { 0%{opacity:0;transform:scale(.88)} 70%{transform:scale(1.03)} 100%{opacity:1;transform:scale(1)} }
@keyframes slideInLeft { from{opacity:0;transform:translateX(-20px)} to{opacity:1;transform:translateX(0)} }
@keyframes slideInTop  { from{opacity:0;transform:translateY(-12px)} to{opacity:1;transform:translateY(0)} }
@keyframes floatUD     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }
@keyframes zoomIn      { from{opacity:0;transform:scale(.94)} to{opacity:1;transform:scale(1)} }
@keyframes ping        { 0%{transform:scale(1);opacity:.8} 80%,100%{transform:scale(2);opacity:0} }
@keyframes pulse-ring  { 0%,100%{box-shadow:0 0 0 0 currentColor} 50%{box-shadow:0 0 0 6px transparent} }

/* Page content — opacity only, NO transform (transform on parent breaks position:fixed children like AI loader) */
.page-content { animation: fadeIn .4s ease; }

/* Stat card stagger */
.stat-grid .stat-card              { animation:scalePop .38s cubic-bezier(.4,0,.2,1) both; }
.stat-grid .stat-card:nth-child(1) { animation-delay:.04s }
.stat-grid .stat-card:nth-child(2) { animation-delay:.09s }
.stat-grid .stat-card:nth-child(3) { animation-delay:.14s }
.stat-grid .stat-card:nth-child(4) { animation-delay:.19s }
.stat-grid .stat-card:nth-child(5) { animation-delay:.24s }
.stat-grid .stat-card:nth-child(6) { animation-delay:.29s }
.stat-grid .stat-card:nth-child(7) { animation-delay:.34s }
.stat-grid .stat-card:nth-child(8) { animation-delay:.39s }

/* Stat card hover */
.stat-card { transition:transform .2s cubic-bezier(.4,0,.2,1),box-shadow .2s ease !important; }
.stat-card:hover { transform:translateY(-4px) scale(1.02)!important; box-shadow:0 14px 32px rgba(13,27,60,.14)!important; }
.stat-card .stat-icon { transition:transform .28s ease; }
.stat-card:hover .stat-icon { transform:scale(1.15) rotate(-6deg); }

/* Buttons */
.btn { transition:transform .15s cubic-bezier(.4,0,.2,1),box-shadow .15s ease,opacity .15s ease !important; }
.btn:hover:not(:disabled)  { transform:translateY(-2px); }
.btn:active:not(:disabled) { transform:translateY(0) scale(.97); }
.btn-gold:hover:not(:disabled)    { box-shadow:0 6px 18px rgba(212,160,23,.4)!important; }
.btn-primary:hover:not(:disabled) { box-shadow:0 6px 18px rgba(26,74,138,.38)!important; }
.btn-success:hover:not(:disabled) { box-shadow:0 6px 18px rgba(22,163,74,.38)!important; }
.btn-danger:hover:not(:disabled)  { box-shadow:0 6px 18px rgba(220,38,38,.38)!important; }

/* Status badges */
.badge-info    { color:#0891B2; animation:pulse-ring 2.5s ease-in-out infinite; }
.badge-warning { color:#D97706; animation:pulse-ring 2.5s ease-in-out infinite; }
.badge-danger  { color:#DC2626; animation:pulse-ring 2.5s ease-in-out infinite; }
.badge-primary { color:#1A4A8A; animation:pulse-ring 3s ease-in-out infinite; }

/* Sidebar */
.nav-item { transition:transform .12s ease; }
.nav-item:hover { transform:translateX(3px); }
.nav-item.active { transform:translateX(4px); }
.nav-item a { transition:background .18s,color .18s,padding-left .18s !important; }
.nav-item a:hover  { padding-left:15px !important; }
.nav-item.active a { padding-left:14px !important; }
.nav-section { animation:slideInLeft .3s ease both; }
.nav-section:nth-child(2){ animation-delay:.05s }
.nav-section:nth-child(3){ animation-delay:.10s }
.nav-section:nth-child(4){ animation-delay:.15s }
.nav-section:nth-child(5){ animation-delay:.20s }

/* Table rows */
table tbody tr { transition:background .14s ease,transform .14s ease !important; }
table tbody tr:hover { transform:translateX(3px); }

/* Alerts */
.alert-success,.alert-error,.alert-warning,.alert-info { animation:slideInTop .3s cubic-bezier(.4,0,.2,1) both; }

/* AI box float */
.ai-report-box { animation:floatUD 4s ease-in-out infinite; }

/* Login */
.login-shell { animation:zoomIn .42s cubic-bezier(.4,0,.2,1) both; }

/* Workflow steps */
.wf-step { transition:transform .18s ease,box-shadow .18s ease; }
.wf-step:hover { transform:translateY(-3px) scale(1.04); box-shadow:0 8px 18px rgba(0,0,0,.13); }

/* Inputs */
input,select,textarea { transition:border-color .18s ease,box-shadow .18s ease !important; }

/* Table action buttons */
td .btn-sm { transition:transform .15s ease,box-shadow .15s ease !important; }
td .btn-sm:hover { transform:scale(1.14)!important; }

/* Notification ping */
.notif-count { position:relative; }
.notif-count::before { content:'';position:absolute;inset:-2px;border-radius:50%;background:var(--danger,#DC2626);animation:ping 1.5s cubic-bezier(0,0,.2,1) infinite; }

/* Print & reduced motion */
@media print { *,*::before,*::after { animation:none!important; transition:none!important; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; } }
