/* MODUL Workspace — the corporate portal layout.
   ---------------------------------------------------------------------------
   Workspace is the one preset that changes the *shape* of the product, not
   just its colour: global navigation leaves the top bar and becomes a vertical
   rail on the left, the header shrinks to a working strip, and the content
   area gains the width that the app switcher used to waste.

   Its signature is the rail itself. It is a deep graphite column in both light
   and dark, because a corporate shell needs one fixed anchor the eye returns
   to — the same reason a physical building has a lobby. Everything to the
   right of it is a calm, near-opaque working surface. */

:root {
	--mt-preset: 'workspace';
	color-scheme: light dark;

	/* --- surfaces --------------------------------------------------------
	   Slightly cooler and flatter than Air: this is a theme for reading
	   tables and lists for hours, not for admiring a photograph. */
	--mt-page-bg: light-dark(#eff1f6, #121419);
	--mt-surface: light-dark(#ffffff, #1a1d23);
	--mt-surface-raised: light-dark(#ffffff, #20242b);
	--mt-surface-sunken: light-dark(#f1f3f7, #16181d);
	--mt-surface-inset: light-dark(#f7f8fb, #1d2027);
	--mt-surface-rgb: 255, 255, 255;

	--mt-text: light-dark(#0f1729, #eef0f4);
	--mt-text-muted: light-dark(#525d73, #99a1ae);
	--mt-text-faint: light-dark(#828c9e, #6b7381);
	--mt-text-inverse: light-dark(#ffffff, #0f1729);

	--mt-border: light-dark(#dfe3ea, rgba(255, 255, 255, 0.08));
	--mt-border-strong: light-dark(#c7cdda, rgba(255, 255, 255, 0.14));

	--mt-success: light-dark(#12864a, #45cd82);
	--mt-warning: light-dark(#b45309, #f0b13b);
	--mt-danger: light-dark(#cc2b2b, #f57676);
	--mt-info: light-dark(#1d6fd8, #5ea7ff);

	--mt-shadow-tone-soft: light-dark(rgba(16, 24, 40, 0.05), rgba(0, 0, 0, 0.34));
	--mt-shadow-tone: light-dark(rgba(16, 24, 40, 0.07), rgba(0, 0, 0, 0.46));
	--mt-shadow-tone-deep: light-dark(rgba(16, 24, 40, 0.13), rgba(0, 0, 0, 0.62));

	--mt-highlight-tone: light-dark(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.05));
	--mt-glass-edge: light-dark(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.09));

	/* --- the rail --------------------------------------------------------
	   Fallbacks only. The rail's palette is chosen by the user now — «Как
	   тема», «Тёмная» or «Акцентная» on the Интерфейс tab — and the generated
	   stylesheet overrides all of these. This preset used to force graphite in
	   both modes as a signature; in a light workspace that read as a black
	   slab, so following the theme is the default and the graphite column is
	   one option among three. */
	--mt-rail-bg: light-dark(#171a21, #101216);
	--mt-rail-text: rgba(255, 255, 255, 0.9);
	--mt-rail-text-muted: rgba(255, 255, 255, 0.52);
	--mt-rail-hover: rgba(255, 255, 255, 0.08);
	--mt-rail-active-bg: rgba(255, 255, 255, 0.12);
	--mt-rail-active-text: #ffffff;
	--mt-rail-border: rgba(255, 255, 255, 0.08);
	--mt-rail-brand-bg: var(--mt-primary);
	--mt-rail-brand-text: var(--mt-on-primary);

	/* --- layout ----------------------------------------------------------
	   This is what actually rebuilds the shell. The rail's width and the
	   header's height are variables, so the layout is already in place on the
	   first paint and nothing reflows when the rail's markup arrives. */
	--mt-rail-display: flex;
	--mt-rail-width-base: 60px;
	--mt-appmenu-display: none;
	--mt-header-base: 46px;

	--mt-radius-scale: 0.85;
	--mt-scrim-color: light-dark(#111826, #04060a);
	--mt-scrim-alpha: 0.5;
	--mt-bg-visible: 1;
	--mt-hover-lift: 0px;
}

@media (prefers-color-scheme: dark) {
	html:not([data-mt-theme='light']) { --mt-surface-rgb: 26, 29, 35; }
}
html[data-mt-theme='dark'] { --mt-surface-rgb: 26, 29, 35; }
html[data-mt-theme='light'] { --mt-surface-rgb: 255, 255, 255; }
