/* Shared dashboard layer: menu groups, label fitting, table headings, figures and motion. */
:root { --ux-ease: cubic-bezier(.32, .72, 0, 1); }

/* One easing and one press response */
button, .btn, [role="button"], a[class*="btn"] { transition-timing-function: var(--ux-ease); }
button:not(:disabled):active, a.btn:active { scale: .97; }
dialog[open], .toast, .popover, .usermenu, .results { animation-timing-function: var(--ux-ease) !important; }

/* Figures line up in columns */
table, .stats, [class*="kpi"], [class*="stat-"] { font-variant-numeric: tabular-nums; }

@media (min-width: 761px) {
  /* Pop-ups and notices follow each demo's own corner sizes */
  dialog:not(.is-side):not([class*="side"]):not([class*="drawer"]):not([class*="sheet"]) { border-radius: var(--radius-lg, 12px); }
  .toast { border-radius: var(--radius, 8px); }

  /* Side menu headings */
  li.ux-group { list-style: none; padding: 12px 12px 3px; font-size: 11.5px; font-weight: 600; line-height: 1.3; opacity: .62; white-space: nowrap; pointer-events: none; }
  li.ux-group:first-child { padding-top: 2px; }
  /* When the window is short the headings shrink to dividing lines */
  .ux-compact:not(.ux-bare) li.ux-group { height: 1px; margin: 5px 12px; padding: 0; overflow: hidden; font-size: 0; background: currentColor; opacity: .18; }
  .ux-compact li.ux-group:first-child { display: none; }
  .ux-bare li.ux-group, .ux-bare li.ux-rule { display: none; }
  /* Narrow icon rail: lines only */
  li.ux-rule { list-style: none; height: 1px; margin: 5px 18px; background: currentColor; opacity: .16; pointer-events: none; }

  /* Top menu: a short upright line between groups */
  .ux-start { position: relative; margin-left: 17px !important; }
  .ux-start::before { content: ""; position: absolute; left: -10px; top: 50%; width: 1px; height: 18px; translate: 0 -50%; background: currentColor; opacity: .22; pointer-events: none; }
  /* Top menu fitting, applied only when it would wrap */
  .ux-tight ul { gap: 0 !important; }
  .ux-tight a[href^="#"] { padding-left: 8px !important; padding-right: 8px !important; gap: 5px !important; }
  .ux-tight .ux-start { margin-left: 11px !important; }
  .ux-tight .ux-start::before { left: -6px; }
  .ux-tighter a[href^="#"] > svg { display: none; }
  .ux-tightest a[href^="#"] { padding-left: 6px !important; padding-right: 6px !important; font-size: 13px !important; }
  .ux-tightest .ux-start { margin-left: 9px !important; }
  .ux-tightest .ux-start::before { left: -5px; }

  /* Table headings stay in view */
  .ux-clip { overflow: clip !important; }
  .ux-free { overflow: visible !important; }
  table.ux-stick > thead th { position: sticky !important; top: var(--ux-top, 0px); z-index: 4; background-color: var(--ux-th, #fff); box-shadow: 0 1px 0 var(--line, rgba(0, 0, 0, .12)); }
  .ux-box { max-height: max(360px, calc(100vh - 210px)); }
}

@media (prefers-reduced-motion: reduce) { button:not(:disabled):active, a.btn:active { scale: 1; } }
@media print { table.ux-stick > thead th { position: static !important; } .ux-box { max-height: none; } }
