/* ==========================================================================
   GELEX HUB — Base (reset, body, nền, scrollbar, a11y, motion)
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Nền phẳng trắng — enterprise sạch (Linear/Height). Phân tầng bằng surface, không dot-grid. */
body {
  min-height: 100vh;
  background-color: var(--surface-sunken);
}

/* Dock đã ẩn (giữ selector cho compat) */
.dock { display: none !important; }

/* Scrollbar — mảnh, macOS style */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.14); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.24); background-clip: content-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(15, 23, 42, 0.18) transparent; }

/* Focus ring — rõ, đỏ */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Selection */
::selection { background: var(--brand-tint-strong); color: var(--text); }

/* Accessibility helpers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

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