:root {
  --ff-primary: 'Inter', sans-serif;
}

/* Override DHTMLX font at the widget level where it's originally defined */
.dhx_widget {
  --dhx-font-family: 'Inter', sans-serif;

  --fw-400: 500;
  --fw-700: 600;

  --fs-300: 0.6875rem;
  --fs-400: 0.8125rem;
  --fs-500: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  overflow: hidden;
  font-family: var(--ff-primary);
  font-weight: var(--fw-400);
}

a:not([class]) {
  text-decoration-skip-ink: auto;
}

img,
picture {
  max-width: 100%;
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3 {
  font-weight: var(--fw-700);
}

/* App shell typography & page background (tokens from theme-tokens.css). */
body,
.dhx_widget {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  color: var(--re-ink);
}

html,
body {
  background: var(--re-bg) !important;
}

/* Global scrollbars.
   Firefox: scrollbar-color / scrollbar-width (no ::-webkit-scrollbar).
   Chromium/Safari/Edge: ::-webkit-scrollbar only — do NOT set scrollbar-color there;
   Chrome 121+ treats both together as overlay scrollbars (thumb vanishes / undraggable). */
@supports not selector(::-webkit-scrollbar) {
  *,
  html {
    scrollbar-width: auto;
    scrollbar-color: var(--re-scrollbar-thumb-moz) var(--re-scrollbar-track-moz);
  }
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--re-scrollbar-track);
  padding: 10px;
}

*::-webkit-scrollbar-thumb {
  background: var(--re-scrollbar-thumb);
  border-radius: 20px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--re-scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: var(--re-scrollbar-corner);
}

/* DHTMLX Layout: collapsible panel headers (collapsable: true). */
.dhx_layout-cell-header--collapseble,
.dhx_layout-cell-header--collapsible {
  border-bottom: 1px solid var(--dhx-border-color) !important;
  background-color: var(--re-surface) !important;
}

.dhx_layout-cell-header--collapseble .dhx_layout-cell-header__title,
.dhx_layout-cell-header--collapsible .dhx_layout-cell-header__title {
  font-weight: 600;
  color: var(--re-ink);
  letter-spacing: -0.01em;
}

/* Collapsed column headers rotate the title; DHTMLX removes the bottom border. */
.dhx_layout-cell-header--collapsed.dhx_layout-cell-header--col {
  border-bottom: 0 !important;
}
