/* Reset & Lock Body */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Inter', "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "kern";
  letter-spacing: -0.006em;
}

/* ========================================================
   RISUS SYSTEM - MODERN CUSTOM SCROLLBAR ENGINE
   ======================================================== */

/* Standard Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

/* Global WebKit / Blink (Chrome, Edge, Brave, Opera) */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(100, 116, 139, 0.4);
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.6);
  background-clip: padding-box;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #6366f1 100%);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.55);
  border: none;
}

::-webkit-scrollbar-thumb:active {
  background: #2563eb;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.85);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Custom Scrollbar Container (with subtle track backdrop) */
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 9999px;
}

/* Ultra-Slim Variant for High-Density Monospace Logs / Tables */
.scrollbar-slim::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.scrollbar-slim::-webkit-scrollbar-thumb {
  background-color: rgba(71, 85, 105, 0.5);
  border-radius: 9999px;
  border: none;
}

.scrollbar-slim::-webkit-scrollbar-thumb:hover {
  background-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

/* Utility to completely hide scrollbar while preserving scrolling */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Sidebar Nav Item Active State */
.nav-item.active {
  background-color: rgba(37, 99, 235, 0.15) !important;
  color: #ffffff !important;
  border-left: 3px solid #3b82f6;
  padding-left: calc(0.875rem - 3px);
}
.nav-item.active svg {
  color: #60a5fa !important;
}

/* Clients Filter Button Active State */
.cfilter-btn.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Login Screen Viewport Lock */
#loginScreen {
  overflow: hidden !important;
}

@media (max-height: 520px) {
  #loginScreen {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

/* Animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-in {
  animation: fadeInScale 0.15s ease-out forwards;
}
