/* HappyLoy Admin — Custom Styles (minimal, Tailwind handles most) */

/* Smooth scrollbar for dark mode */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.2);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.4);
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

.admin-brand-badge {
  width: 224px;
  padding: 18px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.admin-brand-badge-logo {
  width: 100%;
  height: 48px;
  object-fit: contain;
  display: block;
}

.admin-sidebar-logo {
  width: 108px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.admin-brand-tagline {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.admin-brand-tagline-light {
  color: rgba(224, 231, 255, 0.92);
}

@keyframes drawerIn {
  from {
    transform: translateX(100%);
    opacity: 0.96;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-drawer-in {
  animation: drawerIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.finance-detail-overlay {
  opacity: 0;
  transition: opacity 220ms ease;
}

.finance-detail-overlay.is-visible {
  opacity: 1;
}

.finance-detail-drawer {
  transform: translateX(100%);
  opacity: 0.96;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.finance-detail-drawer.is-visible {
  transform: translateX(0);
  opacity: 1;
}

/* Hide scrollbar for sidebar nav */
aside nav::-webkit-scrollbar {
  width: 0;
}

/* Glass morphism fallback for older browsers */
@supports not (backdrop-filter: blur(1px)) {
  header, #loading-overlay {
    background: white !important;
  }
  .dark header, .dark #loading-overlay {
    background: #111827 !important;
  }
}

/* Responsive sidebar for mobile */
@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    transition: transform 0.3s ease;
  }
  #sidebar.fixed {
    transform: translateX(0);
  }

  .admin-brand-badge {
    width: min(100%, 220px);
  }
}

/* Print styles */
@media print {
  #sidebar, header, #btn-sidebar-toggle, [data-action] {
    display: none !important;
  }
  main {
    padding: 0 !important;
  }
}
