/* ezmes Desk chrome.

 * WHAT THIS FILE IS FOR
 *   Tokens our Custom HTML Block panels read (--ez-*), and the machine-state
 *   chips we draw. It restyles NOTHING of Frappe's own chrome.
 *
 * 2026-09-04 D-320 — Desk chrome back to stock Frappe (Mohan).
 *   The 44px control floor, focus ring and transitions on .btn/.form-control
 *   were removed; --ez-target-desk / --ez-focus-desk stay as tokens for our
 *   own panels only. Frappe's controls now render exactly as Frappe ships them.
 *
 * 2026-08-31 D-314 — kit orange remap WITHDRAWN.
 *   The :root remap of Frappe --primary / --btn-primary / --bg-color /
 *   --green-500 / border-radius onto brand-kit hex (#D46A1F orange, kit
 *   status greens, 4px radius) is the look Mohan called "not good at all".
 *   Brand kit v5 = marks (navbar / login / favicon / workspace icons). It
 *   does not paint Desk chrome.
 *
 * Raven (read 2026-08-31, local copy /Users/mohanrachuri/code/raven):
 *   SPA ThemeProvider (App.tsx:204, ThemeProvider.tsx:17/27):
 *     accentColor = 'iris'  → Radix iris-9 #5B5BD6 (measured unpkg
 *                             @radix-ui/colors@3.0.0 iris.css)
 *     light chrome          → #FFFFFF
 *     dark chrome           → #191919
 *   Desk-embedded CSS (raven/public/scss/chat.scss) consumes Frappe's own
 *     --border-color, --control-bg, --gray-8. It does NOT remap --primary.
 *   Stealing iris onto Frappe --primary is the same remap class that failed.
 *   Radix is refused in Desk (D-091, D-309). So: Frappe defaults for chrome.
 *
 * Machine state stays Okabe-Ito (D-296). Those tokens drive OUR .ez-state
 * chips, not Frappe's --green-500.
 */

/* Tokens (--ez-*): ONE source in packages/tokens/src/index.ts, shared with the /ezmes shell
 * (D-379, note 27 §4 row 14). Okabe-Ito state (D-296) unchanged; brand orange is not
 * remapped onto Frappe chrome (D-314, D-320). */
/* tokens:begin — GENERATED by packages/tokens (task tokens:build). Do not edit. */
:root {
	--ez-target-desk: 44px;
	--ez-text-desk-sm: 13px;
	--ez-text-desk: 14px;
	--ez-line-desk: 1.5;
	--ez-space-1: 4px;
	--ez-space-2: 8px;
	--ez-space-3: 12px;
	--ez-space-4: 16px;
	--ez-space-5: 24px;
	--ez-space-6: 32px;
	--ez-radius-1: 6px;
	--ez-dur-fast: 150ms;
	--ez-dur: 200ms;
	--ez-font: "InterVariable", "Inter", "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--ez-brand-charcoal: #171717;
	--ez-brand-grey: #525252;
	--ez-brand-orange: #B95A18;
	--ez-brand-grey-light: #e2e2e2;
	--ez-brand-off-white: #f3f3f3;
	--ez-state-run: #009e73;
	--ez-state-run-fg: #000000;
	--ez-state-idle: #6b7280;
	--ez-state-idle-fg: #ffffff;
	--ez-state-setup: #0072b2;
	--ez-state-setup-fg: #ffffff;
	--ez-state-down: #d55e00;
	--ez-state-down-fg: #000000;
	--ez-state-alarm: #d32f2f;
	--ez-state-alarm-fg: #ffffff;
	--ez-state-planned: #e69f00;
	--ez-state-planned-fg: #000000;
	--ez-state-hold: #cc79a7;
	--ez-state-hold-fg: #000000;
	--ez-state-nodata: #3f4348;
	--ez-state-nodata-fg: #9ca3af;
	--ez-state-run-ink: #005c43;
	--ez-state-planned-ink: #8a3d00;
	--ez-state-alarm-ink: #b71c1c;
	--ez-focus-desk: 0 0 0 2px #ffffff, 0 0 0 4px #171717;
	--ez-canvas: #f8f8f8;
	--ez-sidebar-w: 256px;
	--ez-sidebar-w-collapsed: 64px;
	--ez-header-h: 48px;
	--ez-content-max: 1680px;
	--ez-text-title: 20px;
	--ez-text-kpi: 28px;
	--ez-shadow-card: 0 0 0 1px #e2e2e2, inset 0px 0.25px 1.5px 0px #ffffff29, 0px 0px 1px 0px #00000033, 0px 1px 3px 0px #00000024;
	--ez-weight-regular: 420;
	--ez-weight-medium: 500;
	--ez-weight-semibold: 600;
	--ez-weight-bold: 700;
	--ez-text-12: 12px;
	--ez-text-13: 13px;
	--ez-text-14: 14px;
	--ez-text-16: 16px;
	--ez-text-20: 20px;
	--ez-text-24: 24px;
	--ez-text-28: 28px;
	--ez-tracking-ui: 0.01em;
	--ez-space-7: 48px;
	--ez-control-xs: 24px;
	--ez-control-sm: 32px;
	--ez-control-md: 36px;
	--ez-control-lg: 44px;
	--ez-floor-tile: 111px;
	--ez-floor-primary: 149px;
	--ez-floor-danger: 186px;
	--ez-floor-gap: 59px;
	--ez-floor-text: 22px;
	--ez-floor-label: 18px;
	--ez-radius-sm: 6px;
	--ez-radius-md: 8px;
	--ez-radius-card: 10px;
	--ez-radius-dialog: 16px;
	--ez-radius-full: 9999px;
	--ez-gray-50: #f8f8f8;
	--ez-gray-100: #f3f3f3;
	--ez-gray-200: #ededed;
	--ez-gray-300: #e2e2e2;
	--ez-gray-400: #c7c7c7;
	--ez-gray-500: #999999;
	--ez-gray-600: #7c7c7c;
	--ez-gray-700: #525252;
	--ez-gray-800: #383838;
	--ez-gray-900: #171717;
	--ez-ink: #171717;
	--ez-ink-muted: #525252;
	--ez-border: #e2e2e2;
	--ez-brand-orange-hover: #9c4a12;
	--ez-focus-color: #171717;
	--ez-focus-width: 2px;
	--ez-focus-width-floor: 3px;
	--ez-focus-offset: 2px;
	--ez-shadow-sm: inset 0px 0.25px 1.5px 0px #ffffff29, 0px 0px 1px 0px #00000033, 0px 1px 3px 0px #00000024;
	--ez-shadow-md: inset 0px 0.25px 1.5px 0px #ffffff29, 0px 0px 1.5px 0px #00000026, 0px 0px 6px 2px #0000000a, 0px 6px 12px -2px #00000014;
	--ez-shadow-xl: inset 0px 0.25px 1.5px 0px #ffffff29, 0px 0px 1px 0px #00000033, 0px 0px 10px 2px #0000000a, 0px 24px 30px -8px #0000001a;
	--ez-dur-hover: 150ms;
	--ez-dur-dialog: 200ms;
	--ez-gutter: 24px;
	--ez-gutter-narrow: 16px;
}
/* tokens:end */

/* ---- State chips for ezmes reports/dashboards rendered in Desk ----------
 * D-095 rule 4: never colour alone. */
.ez-state {
	display: inline-flex;
	align-items: center;
	gap: var(--ez-space-2);
	padding: var(--ez-space-1) var(--ez-space-3);
	border-radius: var(--ez-radius-1);
	font-weight: 600;
	font-size: var(--ez-text-desk-sm);
	line-height: var(--ez-line-desk);
}

.ez-state--run {
	background: var(--ez-state-run);
	color: var(--ez-state-run-fg);
}

.ez-state--idle {
	background: var(--ez-state-idle);
	color: var(--ez-state-idle-fg);
	border: 1px solid var(--border-color, #e5e5e5);
}

.ez-state--setup {
	background: var(--ez-state-setup);
	color: var(--ez-state-setup-fg);
}

.ez-state--down {
	background: var(--ez-state-down);
	color: var(--ez-state-down-fg);
	border-left: 6px solid var(--text-color, #1a1a1a);
}

.ez-state--alarm {
	background: var(--ez-state-alarm);
	color: var(--ez-state-alarm-fg);
}

.ez-state--planned {
	background: repeating-linear-gradient(
		45deg,
		var(--ez-state-planned),
		var(--ez-state-planned) 6px,
		#f5c451 6px,
		#f5c451 12px
	);
	color: var(--ez-state-planned-fg);
}

.ez-state--hold {
	background: var(--ez-state-hold);
	color: var(--ez-state-hold-fg);
}

.ez-state--nodata {
	background-color: var(--ez-state-nodata);
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 4px,
		rgb(255 255 255 / 0.18) 4px,
		rgb(255 255 255 / 0.18) 8px
	);
	color: var(--ez-state-nodata-fg);
}

/* Sidebar header mark — NOT SOLVED. frappe.utils.desktop_icon() has no image
 * branch. Needs v16.33 (D-283) or a client override we refuse. Logo IS ours
 * on navbar + login via branding.py, not this file. */

/* ---- Route strip on Work Order / Job Card forms (public/js/route_strip.js)
 * D-095: state is text + shape (✓ ▶ ·), never colour alone. */
.ez-route { font-size: var(--ez-text-desk); line-height: var(--ez-line-desk); }
.ez-route__head { margin-bottom: var(--ez-space-2); }
.ez-route__strip { display: flex; flex-wrap: wrap; gap: var(--ez-space-1); }
.ez-route-cell {
	display: flex; flex-direction: column; justify-content: center;
	min-height: var(--ez-target-desk); min-width: 120px; flex: 1 1 0;
	padding: var(--ez-space-1) var(--ez-space-3);
	border: 1px solid var(--border-color, #e5e5e5); border-radius: var(--ez-radius-1);
	color: var(--text-color, #1a1a1a); text-decoration: none; background: var(--card-bg, #fff);
}
.ez-route-cell:hover { text-decoration: none; border-color: var(--ez-brand-grey); }
.ez-route-cell__op { font-weight: 500; }
.ez-route-cell__state { font-size: var(--ez-text-desk-sm); color: var(--text-muted, #6b7177); }
.ez-route-cell--done { background: var(--ez-brand-off-white); }
.ez-route-cell--now { font-weight: 700; border: 2px solid var(--ez-brand-orange); }
.ez-route-cell--now .ez-route-cell__state { color: var(--ez-brand-orange); }
.ez-route-cell--this { outline: 2px dashed var(--ez-brand-charcoal); outline-offset: 2px; }
.ez-route-msg {
	padding: var(--ez-space-3); border-radius: var(--ez-radius-1);
	background: var(--ez-brand-off-white); color: var(--text-muted, #6b7177);
	font-size: var(--ez-text-desk); font-style: italic;
}
.ez-route-msg--err { border-left: 4px solid var(--ez-state-down); font-style: normal; }
