/* GetSmart Dark: the desk theme picked in Toggle Theme (``public/js/platform/getsmart_desk.js``).
 *
 * The theme is Frappe's dark theme with the GetSmart / OkosCucc brand on top: the root keeps
 * data-theme="dark", so every dark rule of the desk applies, and data-theme-mode="getsmart-dark" swaps the
 * colour variables those rules read. Nothing here styles a single component: the desk's gray scale, its layout
 * colours and the Espresso surface/ink/outline tokens are remapped, so every page, list, form, report and dialog
 * follows. The Toggle Theme dialog draws its GetSmart Dark preview with data-theme="getsmart-dark", which the first rule
 * below also matches.
 *
 * A web page (the login page) has no data-theme until ``getsmart_login.js`` runs at the end of the page, so
 * ``html:not([data-theme])`` is matched like the dark root and the page does not flash light first.
 *
 * Source of the values: the brand repository BarnabasTuzko/shopify-theme, ``design/tokens.css`` and
 * ``design/brand-brief.md`` (direction C "Mélytenger / Deep sea", final 20 Oct 2026): ground #0B1420, surfaces
 * #101B2A #142235 #1A2B42 #22364F, lines #1F3249 #4F6A8C, text #EDF4FB #C3D2E2 #9FB2C8, accent #4FD1FF, every
 * call to action orchid #CF5CFF with the dark label #160A1E, focus ring orchid at 30 %, Montserrat everywhere
 * (self-hosted variable font, ``public/fonts/montserrat``, SIL OFL 1.1).
 */

@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/montserrat/montserrat-var-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
		U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/montserrat/montserrat-var-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
		U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:is([data-theme="dark"][data-theme-mode="getsmart-dark"], html:not([data-theme])),
[data-theme="getsmart-dark"] {
	color-scheme: dark;

	/* The brand tokens (design/tokens.css), for the GetSmart workspace's own blocks. */
	--gs-bg: #0b1420;
	--gs-s1: #101b2a;
	--gs-s2: #142235;
	--gs-s3: #1a2b42;
	--gs-s4: #22364f;
	--gs-line: #1f3249;
	--gs-line-strong: #4f6a8c;
	--gs-fg: #edf4fb;
	--gs-fg-2: #c3d2e2;
	--gs-fg-3: #9fb2c8;
	--gs-accent: #4fd1ff;
	--gs-aqua: #69f0ff;
	--gs-sky: #5cbbff;
	--gs-indigo: #4f61f5;
	--gs-violet: #8b4ef2;
	--gs-orchid: #cf5cff;
	--gs-orchid-hover: #db82ff;
	--gs-on-orchid: #160a1e;
	--gs-hexi-bg: rgba(79, 209, 255, 0.14);
	--gs-hexi-fg: #8fe2ff;
	--gs-hexi-bg-2: rgba(207, 92, 255, 0.16);
	--gs-hexi-fg-2: #e3a6ff;
	--gs-ok: #5bd38a;
	--gs-warn: #f5b83d;
	--gs-err: #ff6b6b;
	--gs-glow-1: rgba(79, 209, 255, 0.18);
	--gs-glow-2: rgba(207, 92, 255, 0.14);

	--font-stack: "Montserrat", "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		sans-serif;

	/* Frappe's gray scale: light end = brand text, dark end = brand ground and surfaces. */
	--gray-50: #edf4fb;
	--gray-100: #e1eaf4;
	--gray-200: #d2deea;
	--gray-300: #c3d2e2;
	--gray-400: #9fb2c8;
	--gray-500: #6e87a6;
	--gray-600: #4f6a8c;
	--gray-700: #22364f;
	--gray-800: #142235;
	--gray-900: #0b1420;

	/* Layout */
	--bg-color: var(--gs-bg);
	--fg-color: var(--gs-bg);
	--card-bg: var(--gs-s1);
	--modal-bg: var(--gs-s1);
	--popover-bg: var(--gs-s1);
	--toast-bg: var(--gs-s2);
	--subtle-accent: var(--gs-s2);
	--subtle-fg: var(--gs-s3);
	--fg-hover-color: var(--gs-s3);
	--control-bg: var(--gs-s2);
	--control-bg-on-gray: var(--gs-s3);
	--disabled-control-bg: var(--gs-s1);
	--awesomplete-hover-bg: var(--gs-s3);
	--sidebar-select-color: var(--gs-s3);
	--highlight-color: var(--gs-s4);
	--border-color: var(--gs-line);
	--dark-border-color: var(--gs-line-strong);
	--table-border-color: var(--gs-line);
	--btn-group-border-color: var(--gs-line);
	--placeholder-color: var(--gray-500);
	--scrollbar-thumb-color: var(--gs-s4);
	--scrollbar-track-color: var(--gs-s1);
	--skeleton-bg: var(--gs-s2);

	/* Text */
	--text-color: var(--gs-fg);
	--heading-color: var(--gs-fg);
	--text-neutral: var(--gs-fg);
	--text-light: var(--gs-fg-2);
	--text-muted: var(--gs-fg-3);
	--icon-stroke: var(--gs-fg-2);

	/* Accent, call to action, focus */
	--primary: var(--gs-accent);
	--primary-color: var(--gs-accent);
	--brand-color: var(--gs-accent);
	--btn-primary: var(--gs-orchid);
	--btn-default-bg: var(--gs-s2);
	--btn-default-hover-bg: var(--gs-s3);
	--btn-ghost-hover-bg: var(--gs-s3);
	--focus-default: 0 0 0 2px rgba(207, 92, 255, 0.3);
	--checkbox-focus-shadow: var(--focus-default);
	--progress-bar-bg: var(--gs-accent);
	--date-active-bg: var(--gs-s4);
	--date-range-bg: var(--gs-s3);
	--shadow-base: 0 12px 30px rgba(0, 0, 0, 0.4);
	--highlight-shadow: 0 0 0 1px var(--gs-line-strong), 0 0 10px var(--gs-glow-1);

	/* Espresso tokens (the v16 sidebar, menus, dialogs) */
	--surface-white: var(--gs-bg);
	--surface-menu-bar: var(--gs-s1);
	--surface-cards: var(--gs-s1);
	--surface-modal: var(--gs-s1);
	--surface-selected: var(--gs-s4);
	--surface-gray-1: var(--gs-s2);
	--surface-gray-2: var(--gs-s3);
	--surface-gray-3: var(--gs-s4);
	--surface-gray-4: #2c4361;
	--surface-gray-5: var(--gs-fg-3);
	--surface-gray-6: var(--gs-fg-2);
	--surface-gray-7: var(--gs-fg);
	--surface-blue-1: #10304a;
	--surface-blue-2: #14405f;
	--surface-blue-3: var(--gs-sky);
	--surface-cyan-1: #0e2f3d;
	--surface-violet-1: #241c4a;
	--outline-white: var(--gs-s1);
	--outline-gray-1: var(--gs-line);
	--outline-gray-2: #263d59;
	--outline-gray-3: #2f4a6a;
	--outline-gray-4: var(--gs-line-strong);
	--outline-gray-modals: #263d59;
	--outline-blue-1: #14405f;
	--ink-white: var(--gs-bg);
	--ink-gray-1: var(--gs-s2);
	--ink-gray-2: #2c4361;
	--ink-gray-3: #5f7898;
	--ink-gray-4: #6e87a6;
	--ink-gray-5: #7f97b4;
	--ink-gray-6: var(--gs-fg-3);
	--ink-gray-7: #b3c4d6;
	--ink-gray-8: var(--gs-fg-2);
	--ink-gray-9: var(--gs-fg);
	--ink-blue-2: var(--gs-sky);
	--ink-blue-3: var(--gs-accent);
	--ink-cyan-1: var(--gs-aqua);
	--ink-violet-1: #b18cff;
	--ink-pink-1: var(--gs-orchid);
	--ink-blue-link: var(--gs-accent);

	/* Charts (Frappe Charts reads these) */
	--charts-label-color: var(--gs-fg-3);
	--charts-axis-line-color: var(--gs-line);
	--charts-tooltip-bg: var(--gs-s2);
}

/* Every call to action is orchid with the dark label (brand rule). */
:is([data-theme="dark"][data-theme-mode="getsmart-dark"], html:not([data-theme])) .btn.btn-primary {
	color: var(--gs-on-orchid);
	--icon-stroke: currentColor;
}

:is([data-theme="dark"][data-theme-mode="getsmart-dark"], html:not([data-theme])) .btn.btn-primary:hover,
:is([data-theme="dark"][data-theme-mode="getsmart-dark"], html:not([data-theme])) .btn.btn-primary:focus {
	background-color: var(--gs-orchid-hover);
	color: var(--gs-on-orchid);
}

:is([data-theme="dark"][data-theme-mode="getsmart-dark"], html:not([data-theme])) ::selection {
	background: rgba(79, 209, 255, 0.3);
}

/* Montserrat is wider than the desk's Inter, so a sidebar row such as "Product management" ran out of its row and was
 * cut with an ellipsis in GetSmart Dark only (home check, 13 Nov 2026, finding 6): the rows lose Frappe's 0.02em
 * tracking and the label's right padding and are set 6 % smaller, which leaves the longest label its whole width at
 * every sidebar width. Group headings (``.section-break``) keep their size. */
[data-theme="dark"][data-theme-mode="getsmart-dark"] .body-sidebar .sidebar-item-label {
	letter-spacing: 0;
	padding-right: 0;
	font-size: calc(var(--text-sm) * 0.94);
}

[data-theme="dark"][data-theme-mode="getsmart-dark"] .body-sidebar .section-break .sidebar-item-label {
	font-size: var(--text-base);
}
