/*
 * EVOLUTION BRAND THEME (Direction A "Industrial Trust", 14-11-2026)
 *
 * Loaded on EVERY server, straight after Bootstrap and before style.css (index.php).
 * The environment theme (themes/<env>/theme.css) loads after this one. It only adds
 * the environment ribbon and the dev-only .development rule, so every box looks like
 * production and nobody mistakes dev for prod.
 *
 * Palette (shared with the website, projects/evo_website theme.json):
 *   navy           #13294B  chrome, primary, links, headings
 *   safety orange  #C4531F  orange on white only (4.56:1); fails on the canvas (4.18) and on navy (3.18)
 *   bright orange  #E8792F  NAVY GROUNDS ONLY (4.98:1 on navy). Never text or icons on a light ground (2.91)
 *   hover orange   #A3441A  6.18:1 on white; the icon accent
 *   slate          #4A5A72  secondary text, table heads
 *   steel          #F3F5F8  quiet fills
 *   line           #D5DCE6  borders
 *   mist           #C9D2DE  text on navy, light tints
 *   navy-line      #2A4066  rules and edges on navy
 * Status colours (success / warning / danger / info) are NOT brand colours and stay Bootstrap's.
 */

/* Brand face: IBM Plex Sans (OFL, assets/fonts/ibm-plex/OFL.txt), self-hosted, same files as the
   website. Used by the logo wordmark only for now (the app's body font is a later decision). */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../../assets/fonts/ibm-plex/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../../assets/fonts/ibm-plex/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../../assets/fonts/ibm-plex/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }

:root {
	/* ---- Brand palette ---- */
	--evo-navy: #13294B;
	--evo-navy-hover: #0F2140;
	--evo-navy-active: #0B1931;
	--evo-navy-line: #2A4066;
	--evo-orange: #C4531F;
	--evo-orange-bright: #E8792F;
	--evo-orange-hover: #A3441A;
	--evo-slate: #4A5A72;
	--evo-steel: #F3F5F8;
	--evo-line: #D5DCE6;
	--evo-mist: #C9D2DE;
	/* Body ink: a navy-hued near-black, so dense tables don't read as blue text. Headings,
	   links and chrome use the navy itself. */
	--evo-ink: #1E2A3B;
	--evo-font-brand: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	/* Light navy tint for selected / "primary" washes (alerts, table rows, accordion). */
	--evo-navy-tint: #E6EBF3;
	--evo-navy-tint-2: #D9E0EC;

	/* Neutral ramp: the brand's cool slate greys, darkest to lightest. These replace
	   Bootstrap's warm greys (#212529 ... #f8f9fa) across the house stylesheets
	   (evoHouse, evochip, evoTabs, globalSearch, style.css), so the greys are one edit here.
	   Contrast on white: ink 14.6, ink-2 10.1, muted 5.5, subtle 3.6 (icons, large text only),
	   faint 2.5 (disabled, decoration only). */
	--evo-ink-2: #34435A;     /* was #495057, #374151: secondary headings, strong labels */
	--evo-muted: #5D6A7E;     /* was #6c757d, #5c6673: muted text, captions, field labels */
	--evo-subtle: #7B889B;    /* was #8a8f98, #8b95a1: meta text, idle icons */
	--evo-faint: #97A3B4;     /* was #adb5bd, #9aa3ae: placeholders, disabled, empty-state icons */
	/* --evo-mist  #C9D2DE    was #ced4da: input borders, strong rules */
	/* --evo-line  #D5DCE6    was #dee2e6: borders, table rules */
	--evo-line-soft: #E3E8EF; /* was #e9ecef, #e3e7ec: hairlines, quiet dividers */
	/* --evo-steel #F3F5F8    was #f1f3f5, #eef0f3: quiet fills, chips, table heads */
	--evo-wash: #F8F9FB;      /* was #f8f9fa: the faintest fill, striping, footers */

	/* Focus: navy family, so a focused field never reads as an error or a warning. */
	--evo-focus-border: #5B7099;
	--evo-focus-ring: 0 0 0 .25rem rgba(19, 41, 75, .22);

	/* Primary button. To trial ORANGE buttons, point these three at
	   var(--evo-orange) / var(--evo-orange-hover) / #8A3916 (and --evo-btn-primary-rgb at 196, 83, 31). */
	--evo-btn-primary: var(--evo-navy);
	--evo-btn-primary-hover: var(--evo-navy-hover);
	--evo-btn-primary-active: var(--evo-navy-active);
	--evo-btn-primary-rgb: 66, 84, 111;

	/* ---- House tokens (the names every stylesheet already uses) ---- */
	--main-highlight-color: var(--evo-navy);
	--main-highlight-color-opaque: var(--evo-slate);
	/* Icon accent (styling.inc 1.6f): hover orange, because the band tile sits on a 12% tint
	   and safety orange drops under 4.5:1 there. */
	--main-accent-color: var(--evo-orange-hover);
	/* Add-line colour (styling.inc 5.11) stays green: "add" must never read as a warning. */
	--evo-add-color: #146c43;
	--main-special-color: var(--evo-steel);
	--main-selected-color: var(--evo-navy);
	--default-highlight-color: var(--evo-mist);
	--warning-highlight-color: red;
	--border-color1: var(--evo-line);
	--border-color2: var(--evo-slate);
	--main-text-color: var(--evo-ink);
	--main-link-color: var(--evo-navy);
	--main-link-underline-color: var(--evo-mist);

	/* ---- Bootstrap 5.2 globals ---- */
	--bs-primary: #13294B;
	--bs-primary-rgb: 19, 41, 75;
	--bs-blue: #13294B;
	--bs-body-color: var(--evo-ink);
	--bs-link-color: var(--evo-navy);
	--bs-link-hover-color: var(--evo-navy-hover);
	/* Bootstrap's neutrals onto the brand ramp (5.2 reads these for .border, tables,
	   .text-secondary, .bg-light, .text-bg-secondary ...). */
	--bs-border-color: var(--evo-line);
	--bs-secondary: #5D6A7E;
	--bs-secondary-rgb: 93, 106, 126;
	--bs-light: #F8F9FB;
	--bs-light-rgb: 248, 249, 251;
	--bs-gray-100: #F8F9FB;
	--bs-gray-200: #E3E8EF;
	--bs-gray-300: #D5DCE6;
	--bs-gray-400: #C9D2DE;
	--bs-gray-500: #97A3B4;
	--bs-gray-600: #5D6A7E;
	--bs-gray-700: #34435A;
	--bs-gray-800: #2A3546;
	--bs-gray-900: #1E2A3B;
}

/* ---- Bootstrap neutrals that are hard-coded rather than read from a variable (5.2.0) ---- */
.text-muted { color: var(--evo-muted) !important; }
.form-control, .form-select { border-color: var(--evo-mist); }
.form-control::placeholder { color: var(--evo-faint); }
.form-control:disabled, .form-select:disabled { background-color: var(--evo-steel); }
.input-group-text { background-color: var(--evo-steel); border-color: var(--evo-mist); color: var(--evo-muted); }
.btn-secondary {
	--bs-btn-bg: var(--evo-slate);
	--bs-btn-border-color: var(--evo-slate);
	--bs-btn-hover-bg: #3D4B60;
	--bs-btn-hover-border-color: #3D4B60;
	--bs-btn-active-bg: #34435A;
	--bs-btn-active-border-color: #34435A;
	--bs-btn-disabled-bg: var(--evo-slate);
	--bs-btn-disabled-border-color: var(--evo-slate);
	--bs-btn-focus-shadow-rgb: 74, 90, 114;
}
.btn-outline-secondary {
	--bs-btn-color: var(--evo-slate);
	--bs-btn-border-color: var(--evo-mist);
	--bs-btn-hover-color: var(--evo-navy);
	--bs-btn-hover-bg: var(--evo-steel);
	--bs-btn-hover-border-color: var(--evo-slate);
	--bs-btn-active-color: var(--evo-navy);
	--bs-btn-active-bg: var(--evo-navy-tint);
	--bs-btn-active-border-color: var(--evo-slate);
	--bs-btn-disabled-color: var(--evo-faint);
	--bs-btn-disabled-border-color: var(--evo-line);
	--bs-btn-focus-shadow-rgb: 74, 90, 114;
}
.btn-light {
	--bs-btn-bg: var(--evo-steel);
	--bs-btn-border-color: var(--evo-line);
	--bs-btn-hover-bg: var(--evo-line-soft);
	--bs-btn-hover-border-color: var(--evo-mist);
	--bs-btn-active-bg: var(--evo-line);
	--bs-btn-active-border-color: var(--evo-mist);
}

/* ---- Bootstrap components that hard-code the primary blue (5.2.0) ---- */
/* Icons take their button's text colour, hover and active included (16-11-2026). style.css paints
   every icon --main-text-color, the ink, which is invisible on the navy buttons. (0,2,0) beats that
   base rule although this file loads first; a page rule that colours a button icon on purpose wins. */
.btn .material-symbols-rounded { color: inherit; }
.btn-primary {
	--bs-btn-color: #fff;
	--bs-btn-bg: var(--evo-btn-primary);
	--bs-btn-border-color: var(--evo-btn-primary);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--evo-btn-primary-hover);
	--bs-btn-hover-border-color: var(--evo-btn-primary-hover);
	--bs-btn-focus-shadow-rgb: var(--evo-btn-primary-rgb);
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: var(--evo-btn-primary-active);
	--bs-btn-active-border-color: var(--evo-btn-primary-active);
	--bs-btn-disabled-color: #fff;
	--bs-btn-disabled-bg: var(--evo-btn-primary);
	--bs-btn-disabled-border-color: var(--evo-btn-primary);
}
.btn-outline-primary {
	--bs-btn-color: var(--evo-btn-primary);
	--bs-btn-border-color: var(--evo-btn-primary);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--evo-btn-primary);
	--bs-btn-hover-border-color: var(--evo-btn-primary);
	--bs-btn-focus-shadow-rgb: var(--evo-btn-primary-rgb);
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: var(--evo-btn-primary);
	--bs-btn-active-border-color: var(--evo-btn-primary);
	--bs-btn-disabled-color: var(--evo-btn-primary);
	--bs-btn-disabled-border-color: var(--evo-btn-primary);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
	border-color: var(--evo-focus-border);
	box-shadow: var(--evo-focus-ring);
}
.btn-close:focus { box-shadow: var(--evo-focus-ring); }
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
	background-color: var(--evo-navy);
	border-color: var(--evo-navy);
}
.form-switch .form-check-input:focus {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%235B7099'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:checked {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}
.form-range::-webkit-slider-thumb { background-color: var(--evo-navy); }
.form-range::-moz-range-thumb { background-color: var(--evo-navy); }
.form-range::-webkit-slider-thumb:active,
.form-range::-moz-range-thumb:active { background-color: var(--evo-mist); }
.form-range:focus::-webkit-slider-thumb,
.form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px #fff, var(--evo-focus-ring); }

.nav-pills { --bs-nav-pills-link-active-bg: var(--evo-navy); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--evo-navy); }
.list-group {
	--bs-list-group-active-bg: var(--evo-navy);
	--bs-list-group-active-border-color: var(--evo-navy);
}
.pagination {
	--bs-pagination-active-bg: var(--evo-navy);
	--bs-pagination-active-border-color: var(--evo-navy);
	--bs-pagination-focus-box-shadow: var(--evo-focus-ring);
}
.progress { --bs-progress-bar-bg: var(--evo-navy); }
.accordion {
	--bs-accordion-active-bg: var(--evo-navy-tint);
	--bs-accordion-active-color: var(--evo-navy);
	--bs-accordion-btn-focus-border-color: var(--evo-focus-border);
	--bs-accordion-btn-focus-box-shadow: var(--evo-focus-ring);
	--bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2313294B'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.text-bg-primary { color: #fff !important; background-color: RGBA(19, 41, 75, var(--bs-bg-opacity, 1)) !important; }
.link-primary { color: var(--evo-navy) !important; }
.link-primary:focus, .link-primary:hover { color: var(--evo-navy-hover) !important; }

.alert-primary {
	--bs-alert-color: var(--evo-navy);
	--bs-alert-bg: var(--evo-navy-tint);
	--bs-alert-border-color: var(--evo-mist);
}
.alert-primary .alert-link { color: var(--evo-navy-active); }
.table-primary {
	--bs-table-color: var(--evo-ink);
	--bs-table-bg: var(--evo-navy-tint);
	--bs-table-border-color: var(--evo-mist);
	--bs-table-striped-bg: var(--evo-navy-tint-2);
	--bs-table-striped-color: var(--evo-ink);
	--bs-table-active-bg: var(--evo-mist);
	--bs-table-active-color: var(--evo-ink);
	--bs-table-hover-bg: var(--evo-navy-tint-2);
	--bs-table-hover-color: var(--evo-ink);
}
.list-group-item-primary { color: var(--evo-navy); background-color: var(--evo-navy-tint); }
.list-group-item-primary.list-group-item-action:focus,
.list-group-item-primary.list-group-item-action:hover { color: var(--evo-navy); background-color: var(--evo-navy-tint-2); }
.list-group-item-primary.list-group-item-action.active { color: #fff; background-color: var(--evo-navy); border-color: var(--evo-navy); }

/* ---- Logo (evoLogo() in functions.php) ----
 * Navy shield + "EVOLUTION ERP" in Plex Sans, the website's lockup (700, wide tracking, ERP in
 * slate 500). In the top bar the shield is centred over the 60px menu rail. Here rather than in
 * evoHouse.css so pages that only load the brand theme (invimportpricing.php) get it too;
 * #header > .site_heading outranks style.css's old gradient heading whatever the load order.
 */
#header > .site_heading {
	background: none;
	min-height: 0;
	padding: 0;
	letter-spacing: normal;
	text-transform: none;
	font-size: inherit;
	color: inherit;
}
.evo-logo {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	height: 57px;
	padding: 0 14px 0 15px;		/* 15 + 30px mark = centred on the 60px rail */
	color: var(--evo-navy, #13294B);
	text-decoration: none;
	vertical-align: middle;
}
.evo-logo:hover, .evo-logo:focus-visible { color: var(--evo-navy, #13294B); text-decoration: none; }
.evo-logo:focus-visible { outline: 2px solid var(--evo-focus-border, #5B7099); outline-offset: -4px; border-radius: 6px; }
.evo-logo-mark { display: block; width: 30px; height: 35px; flex: none; }
.evo-logo-word {
	font-family: var(--evo-font-brand, "IBM Plex Sans", system-ui, sans-serif);
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .05em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--evo-navy, #13294B);
}
.evo-logo-word > span { font-weight: 500; color: var(--evo-slate, #4A5A72); }

/* ---- Brand face on titles only (D4, ruled 14-11-2026: "chrome-only") ----
   IBM Plex Sans on page titles, record names, panel captions, widget and modal titles and the
   sign-in heading. Tables, forms, tabs, menus and body copy keep the system font, so dense
   screens don't reflow and the measured column widths stay as built. Only 500/600/700 are
   self-hosted: a title set at 400 renders at 500. */
.pagetitle,
.evo-band-name,
.evo-panel > h6,
.evo-widget-title,
.modal-title,
.evo-splash-title {
	font-family: var(--evo-font-brand, "IBM Plex Sans", system-ui, sans-serif);
}

/* ---- Environment ribbon ----
 * An environment theme sets --evo-env-label (a quoted string), --evo-env-stripe ("")
 * and --evo-env-color. Production sets none, so nothing draws. A 3px stripe runs along
 * the top of the header, with a small label tab hanging from it over the logo's wordmark.
 * Recordings and website captures add class "evo-capture" to <html> to hide it.
 */
#header::before {
	content: var(--evo-env-stripe, none);
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: var(--evo-env-color, transparent);
	pointer-events: none;
	z-index: 2;
}
#header::after {
	content: var(--evo-env-label, none);
	position: absolute;
	top: 0; left: 56px;	/* over the wordmark, left edges aligned: free at every width (the caps start ~23px down) */
	padding: 2px 10px 3px;
	border-radius: 0 0 6px 6px;
	background: var(--evo-env-color, transparent);
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .08em;
	pointer-events: none;
	z-index: 2;
}
html.evo-capture #header::before,
html.evo-capture #header::after { display: none; }

/* .development (dev-only elements) is set per environment: hidden on production and sandbox,
   shown on development and staging. Not set here, so the environment rule needs no !important. */
