/* Custom Scrollbar - Global & Mobile-Friendly */
* {
  scrollbar-width: thin;
  scrollbar-color: #404040 transparent;
}

::-webkit-scrollbar {
  width: 8px; /* Slightly wider total area for better containment control */
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #111111; /* Solid dark background */
  border-radius: 10px;
  margin: 4px 0; /* Keeps the scrollbar from hitting top/bottom edges */
}

::-webkit-scrollbar-thumb {
  background: #404040; /* 3 AM Design - Ultra Thinner */
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #555555;
  border: 1px solid transparent;
}

/* Hide buttons to prevent mobile overflow glitches */
::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

/* Specific for Mobile Scrollable Areas */
.table-container,
body {
  -webkit-overflow-scrolling: touch; /* Smooth mobile scroll for large areas */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: var(--bg-app);
  min-height: 100vh;
  /* NOTE: Do NOT add overflow-x: hidden here — it breaks position: sticky on the header */
}

body {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0;
  background-color: transparent;
  color: var(--text-main);
  font-family: var(--font-ui);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

/* Global Focus Styles for Accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove default outline for mouse users if :focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}
