/* Motion and interaction layer for the authenticated admin interface. */
.admin-enhanced {
  --admin-ease: cubic-bezier(.22, 1, .36, 1);
  --admin-green: 21, 128, 61;
}

.admin-enhanced main {
  animation: admin-page-in .48s var(--admin-ease) both;
}

.admin-enhanced aside {
  box-shadow: 12px 0 35px rgba(20, 83, 45, .10);
  animation: admin-sidebar-in .5s var(--admin-ease) both;
}

.admin-enhanced aside a {
  position: relative;
  overflow: hidden;
  transition: transform .22s var(--admin-ease), background-color .22s ease,
    color .22s ease, box-shadow .22s ease;
}

.admin-enhanced aside a:hover {
  transform: translateX(5px);
  box-shadow: 0 7px 18px rgba(var(--admin-green), .12);
}

.admin-enhanced aside a svg {
  transition: transform .28s var(--admin-ease);
}

.admin-enhanced aside a:hover svg { transform: scale(1.13) rotate(-3deg); }

.admin-enhanced .card,
.admin-enhanced .stat-card {
  position: relative;
  overflow: hidden;
  transition: transform .28s var(--admin-ease), box-shadow .28s ease,
    border-color .28s ease;
  animation: admin-rise .45s var(--admin-ease) both;
}

.admin-enhanced .card::before,
.admin-enhanced .stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #22c55e, #15803d);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .28s var(--admin-ease);
}

.admin-enhanced .card:hover,
.admin-enhanced .stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--admin-green), .25);
  box-shadow: 0 16px 35px rgba(20, 83, 45, .11);
}

.admin-enhanced .card:hover::before,
.admin-enhanced .stat-card:hover::before { transform: scaleY(1); }

.admin-enhanced .table-row {
  animation: admin-row-in .36s var(--admin-ease) both;
  animation-delay: var(--row-delay, 0ms);
  transition: background-color .18s ease, transform .18s var(--admin-ease),
    box-shadow .18s ease;
}

.admin-enhanced .table-row:hover {
  transform: translateX(3px);
  box-shadow: inset 3px 0 #22c55e;
}

.admin-enhanced button,
.admin-enhanced .btn-primary,
.admin-enhanced .btn-secondary,
.admin-enhanced .btn-danger {
  position: relative;
  overflow: hidden;
  transition: transform .18s var(--admin-ease), box-shadow .22s ease,
    filter .2s ease;
}

.admin-enhanced button:hover:not(:disabled) { filter: brightness(1.025); }
.admin-enhanced button:active:not(:disabled) { transform: scale(.96); }
.admin-enhanced .btn-primary:hover { box-shadow: 0 9px 22px rgba(var(--admin-green), .24); }

.admin-enhanced .admin-ripple {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  background: rgba(255, 255, 255, .44);
  transform: translate(-50%, -50%) scale(0);
  animation: admin-ripple .55s ease-out forwards;
}

.admin-enhanced .input-field {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.admin-enhanced .input-field:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .13), 0 7px 18px rgba(20, 83, 45, .07);
}

.admin-enhanced .fixed.inset-0 > div,
.admin-enhanced [role="dialog"] {
  animation: admin-modal-in .32s var(--admin-ease) both;
}

.admin-enhanced .fixed.inset-0 { animation: admin-fade-in .22s ease both; }

.admin-enhanced tbody tr:nth-child(1) { --row-delay: 20ms; }
.admin-enhanced tbody tr:nth-child(2) { --row-delay: 45ms; }
.admin-enhanced tbody tr:nth-child(3) { --row-delay: 70ms; }
.admin-enhanced tbody tr:nth-child(4) { --row-delay: 95ms; }
.admin-enhanced tbody tr:nth-child(5) { --row-delay: 120ms; }
.admin-enhanced tbody tr:nth-child(n+6) { --row-delay: 145ms; }

@keyframes admin-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes admin-sidebar-in {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes admin-rise {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes admin-row-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes admin-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes admin-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes admin-ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .admin-enhanced *, .admin-enhanced *::before, .admin-enhanced *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .admin-enhanced *, .admin-enhanced *::before, .admin-enhanced *::after {
    animation: none !important;
    transition: none !important;
  }
}
