/* ============================================================
   GumiSync modern theme overlay
   In Views/Shared/_Layout.cshtml this is loaded LAST in <head>,
   after vendors.bundle.css, demo6/style.bundle.css,
   materialize-social.css, main.css, uppy.min.css, and both Kendo
   stylesheets (kendo.common-material, kendo.material), so it wins
   ties on load order against Kendo.
   Views/Account/_Layout.cshtml (login page) loads neither main.css nor
   Kendo at all - only vendors.bundle.css, style.bundle.css and
   Views/Account/_Layout.css - so there this overlay only needs to load
   after those.
   See docs/superpowers/specs/2026-08-03-modern-ui-theme-overlay-design.md
   ============================================================ */

/* 1. Tokens */
:root {
  --ms-bg: #f6f7f9;
  --ms-surface: #ffffff;
  --ms-border: #e4e7ec;
  --ms-border-strong: #d0d5dd;
  --ms-text: #1a1d21;
  --ms-text-dim: #667085;
  --ms-accent: #2563eb;
  --ms-accent-hover: #1d4ed8;
  --ms-radius: 6px;
  --ms-row-h: 36px;
  --ms-surface-subtle: #fbfbfc;
  --ms-hover: #f4f6fa;
  --ms-selected: #e8effc;
  --ms-accent-ring: rgba(37, 99, 235, .12);
}

/* 2. Grid density
   kendo.common-material.min.css ships .k-grid td{padding:.929em 1.286em;
   line-height:1.6em} which yields ~77px rows. Tighten to hit --ms-row-h. */
.k-grid {
  font-size: 13px;
  color: var(--ms-text);
  border-color: var(--ms-border);
}

.k-grid td {
  padding: 7px 12px;
  line-height: 1.45;
  border-color: var(--ms-border);
}

/* CSS `height` on a table row is a floor, not a fixed size: the browser
   renders max(declared, content-flow height). --ms-row-h is 36px, but the
   measured rendered row is 39px — the extra 3px comes from the td padding/
   line-height above plus the switch/chevron boxes further down this file.
   This rule keeps rows from ever going *below* the token; it does not pin
   them to it. If you tighten the token you may not see it move unless the
   content above also shrinks. */
.k-grid-content tr {
  height: var(--ms-row-h);
}

/* Header: readable text, hairline rule, sticky while scrolling below the
   fixed Metronic page header (see the position:sticky rule further down,
   which also removes .k-grid's overflow so the sticky offset is computed
   against page scroll instead of being trapped inside .k-grid). */
.k-grid-header,
.k-grid-header-wrap {
  border-color: var(--ms-border);
}

.k-grid-header th.k-header {
  /* kendo.common-material.min.css's `.k-grid-header{padding:0!important}` targets the
     .k-grid-header WRAPPER DIV, not the th.k-header cells inside it, and padding is not
     inherited - so that rule is not a competitor here. The real barrier is specificity:
     kendo.common-material.min.css also has a plain (no !important)
     `.k-grid-header th.k-header{padding:.786em .6em}` at (0,2,1), one selector-part ahead
     of the (0,2,0) `.k-grid-header .k-header` this rule used to be. Matching the th
     descendant beats it on specificity alone; no !important needed. */
  padding: 8px 12px;
  background: var(--ms-surface-subtle);
  border-color: var(--ms-border);
}

.k-grid-header .k-header,
.k-grid-header .k-header > .k-link {
  color: var(--ms-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
}

/* Sticky header. main.less:438-441 (compiled into main.css, which
   _Layout.cshtml actually links) forces .k-grid{height:auto!important;
   overflow-y:hidden!important} so Kendo's own internal scroll container is
   disabled and the whole page scrolls instead - by design, since the grid
   is meant to show all rows in page flow, not in an inner scrollport.
   That same rule is what breaks position:sticky on .k-grid-header: an
   ancestor with any overflow other than visible becomes the scrolling
   box sticky measures against, and .k-grid never actually scrolls itself,
   so the header would just sit still relative to .k-grid while .k-grid
   scrolls away with the page. Removing .k-grid's overflow clipping (the
   inner .k-grid-header-wrap/.k-grid-content still clip/scroll themselves
   independently, so this does not reintroduce horizontal overflow) lets
   the sticky offset resolve against the page/viewport as intended. */
.k-grid {
  overflow: visible !important; /* beats main.less:438-441 (main.css) .k-grid{overflow-x:hidden;overflow-y:hidden!important} which would otherwise make .k-grid-header sticky to itself instead of the page */
}

.k-grid-header {
  position: sticky;
  /* .m-header is Metronic's fixed page header; measured 80px tall at
     1600x1000 with body.m-header--fixed (matches its own height:80px
     rule) - offset below it so the sticky grid header doesn't slide
     underneath it. This 80px is desktop-calibrated: below 1024px width
     the header itself shrinks (see the media query immediately below),
     so the sticky offset must follow or a gap opens above the grid
     header. */
  top: 80px;
  z-index: 2;
}

@media (max-width: 1024px) {
  /* style.bundle.css drops .m-header to 60px !important below this width and
     m-header--fixed-mobile keeps it fixed, so the sticky offset must follow. */
  .k-grid-header { top: 60px; }
}

/* We override .k-grid's overflow above (sticky needs it), which also strips
   the horizontal clip from main.less:440 and .scrollable-kendo-grid
   (main.less:693). CSS cannot keep overflow-x:hidden and page-level sticky
   together: when one axis is visible the other computes to auto. So own the
   horizontal guard explicitly at the inner layer rather than relying on
   Kendo's default, and keep it here where the override that made it
   necessary is visible. */
.k-grid-content {
  overflow-x: auto;
}

/* Rows: hairline separators, hover tint, no zebra */
.k-grid-content tr > td {
  border-bottom: 1px solid var(--ms-border);
}

.k-grid-content tr.k-alt,
.k-grid-content tr.k-alt > td {
  background: var(--ms-surface);
}

/* main.less:446-448 compiles to `.k-grid .k-grid-content tr:hover
   {background-color:#F2F2F2!important}`. This rule's hover tint stays
   plain and still wins only because it targets `> td`, not `tr` itself: a
   td's own background paints over its parent tr's background, so painting
   the tint on the td layer shadows the tr-level !important underneath it
   rather than competing with it on specificity. This is load-bearing - if
   a future simplification changes this selector to `tr:hover` (dropping
   `> td`), the tint would again be painted on the tr and main.less's
   !important would win, silently killing it. */
.k-grid-content tr:hover > td,
.k-grid-content tr.k-state-hover > td {
  background: var(--ms-hover);
}

.k-grid-content tr.k-state-selected > td {
  background: var(--ms-selected);
}

/* Row action icons should not inflate the row.
   `.k-grid td a[class*="grid-"]` was a substring match; its only real hit
   in the repo is `a.grid-user-content` in
   Views/StockLists/_StockListSendLogPartial.cshtml:130, an avatar-plus-name
   composite link, not an icon button. Applying icon-button sizing
   (line-height:1, 2px 4px padding) to that composite link is the wrong
   effect on an unverified, tenant-only route, so the anchor half is
   dropped; icon-button sizing now targets only .k-button. */
.k-grid td .k-button {
  line-height: 1;
  padding: 2px 4px;
}

/* Pager */
.k-grid-pager {
  padding: 6px 10px;
  font-size: 12px;
  background: var(--ms-surface-subtle);
  border-color: var(--ms-border);
  color: var(--ms-text-dim);
}

/* Empty grid should read as empty, not broken */
.k-grid-norecords-template {
  color: var(--ms-text-dim);
  font-size: 13px;
}

/* Metronic .m-switch toggle widgets (used as boolean cell editors) are the
   other contributor the brief's own opening line calls out: their native
   size is ~51px tall (30px knob track + 2px*2 own margin + a 5px
   .m--margin-top-5!important utility on the label + .m-switch's own
   0.15rem margin-top), which alone forces the row past --ms-row-h no
   matter what .k-grid td padding is set to. Shrink the widget to fit. */
.k-grid-content .m-switch {
  height: 18px;
  line-height: 18px;
  margin-top: 0;
  vertical-align: middle;
}

.k-grid-content .m-switch label {
  margin: 0 !important; /* beats .m--margin-top-5{margin-top:5px!important} inline utility class */
}

.k-grid-content .m-switch input:empty ~ span {
  height: 18px;
  line-height: 18px;
  width: 34px;
  margin: 0;
  border-radius: 9px;
}

.k-grid-content .m-switch input:empty ~ span:before,
.k-grid-content .m-switch input:empty ~ span:after {
  width: 31px;
  border-radius: 9px;
}

.k-grid-content .m-switch input:empty ~ span:after {
  height: 14px;
  width: 14px;
  line-height: 14px;
  top: 2px;
  bottom: 2px;
  margin-left: 2px;
  font-size: .7em;
}

/* Icon-only row-action buttons (edit/delete) are ~35px tall by default;
   match them to the same reduced footprint. */
.k-grid-content .m-btn--icon-only {
  height: 22px;
  width: 22px;
  line-height: 22px;
}

/* 3. Grouping header
   main.less:564-569 sets background-color/color with !important and
   uppercases the text, so those three properties need !important here.
   The bar is kept visible (thin, quiet, neutral) rather than collapsed to
   display:none. It is the ONLY working drop target for grouping on these
   grids: navigatable is false on itemcategoriesGrid/ordersGrid (and the
   same Groupable() setup on StockLists/SendLogs), so Kendo's keyboard
   grouping module never initialises, even though the header still renders
   a static "Press ctrl + space to group" ARIA hint - that hint is inert
   boilerplate, not a real fallback. Hiding this bar when nobody is
   grouping would remove the only way to start grouping at all, which is a
   feature loss, not a restyle. Do not reintroduce display:none here
   without first re-enabling navigatable on the affected grids. */
.k-grid .k-grouping-header {
  background-color: var(--ms-surface-subtle) !important; /* beats main.less:565 .k-grouping-header{background-color:rgba(53,129,184,.8)!important} */
  color: var(--ms-text-dim) !important; /* beats main.less:566 .k-grouping-header{color:rgba(255,255,255,.79)!important} */
  text-transform: none;
  font-weight: 400;
  font-size: 11px;
  line-height: 14px;
  padding: 4px 12px;
  border-bottom: 1px solid var(--ms-border);
}

/* Once grouping IS active, the indicator chips should read as chips.
   main.less:1558-1561 also sets background-color/border-color on
   .k-group-indicator with !important, so those two need !important
   here too (shorthand `background`/`border` would not reliably beat
   a longhand !important, hence background-color/border-color below). */
.k-grid .k-grouping-header .k-group-indicator {
  background-color: var(--ms-surface) !important; /* beats main.less:1559 .k-group-indicator{background-color:#2874ab!important} */
  border-color: var(--ms-border-strong) !important; /* beats main.less:1560 .k-group-indicator{border-color:#2874ab!important} */
  border-width: 1px;
  border-style: solid;
  border-radius: var(--ms-radius);
  color: var(--ms-text);
  padding: 2px 8px;
}

/* kendo.material.min.css separately sets
   .k-grouping-header .k-link, .k-grouping-header .k-link:link{color:#fff}
   (no !important). An explicit color on a descendant always wins over an
   inherited value from the chip above regardless of specificity, so
   setting color on the indicator alone leaves this white text invisible
   against the now-light chip background; override the link explicitly.
   No !important needed since Kendo's own rule carries none. */
.k-grid .k-grouping-header .k-group-indicator .k-link,
.k-grid .k-grouping-header .k-group-indicator .k-link:link {
  color: var(--ms-text);
}

/* 4. Buttons
   Pre-flight grep of main.less/Metronic bundle for competing !important on
   btn/radius/uppercase/background found nothing on .btn, .btn-primary,
   .btn-secondary, .m-btn--pill (border-radius:60px, not !important) or
   .k-button - those are safe to override with plain cascade order (this
   file loads last). The one real conflict is main.less:1412-1415
   `.btn-brand{background-color:#ffbc77!important;font-weight:500!important;
   text-transform:uppercase;border:none}` - that is the actual class on the
   orange "New tenant"/"New user"/"New role" etc. portlet-head buttons, not
   .btn-primary as the brief assumed. text-transform there is NOT
   !important (our .btn rule below beats it on source order alone) and
   font-weight:500 already matches what we set, so only background-color
   needs !important, and only for the portlet-head instance - .btn-brand is
   used identically as the primary create-action colour on every portlet
   head in the app (Tenants, Users, Roles, StockLists, PartnerMails,
   PartnerFTPs), so recolouring it there is exactly the re-theme intended,
   not scope creep. border-color is NOT touched below: main.less:1416 sets
   `border: none` (border-style:none, plain, no !important), which no
   border-color value can paint over, so a border-color rule here would be
   completely inert - there is nothing for it to beat and nothing for it to
   render. */
.btn {
  border-radius: var(--ms-radius);
  text-transform: none;
  font-weight: 500;
  font-size: 13px;
  padding: 7px 14px;
  transition: background-color .12s ease, border-color .12s ease;
}

/* Metronic pill modifier loses its pill, deliberately */
.btn.m-btn--pill {
  border-radius: var(--ms-radius);
}

/* Row-action icon buttons (_KendoTemplate.cshtml: edit/delete on essentially
   every grid) carry m-btn--icon-only m-btn--pill and are rendered by
   Metronic as circles via .btn.m-btn--pill{border-radius:60px} (no
   !important, so the plain .btn.m-btn--pill rule above already drops them
   to --ms-radius as a side effect). Called out here as its own rule,
   deliberate and verified rather than incidental: squaring them to
   --ms-radius keeps one consistent radius across every button in the app
   (the approved direction), and is arguably more current than circles.
   Section 2 already sizes these to 22x22px; no width/height change here. */
.btn.m-btn--icon-only.m-btn--pill {
  border-radius: var(--ms-radius);
}

.btn-primary,
.btn.m-btn--air.btn-primary {
  background-color: var(--ms-accent);
  border-color: var(--ms-accent);
  color: var(--ms-surface);
  box-shadow: none;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--ms-accent-hover);
  border-color: var(--ms-accent-hover);
}

/* The real orange "New X" portlet-head button is .btn-brand, not
   .btn-primary (see comment above). Scoped to .m-portlet__head so other
   uses of Metronic's colour classes elsewhere keep their own meaning.
   No border-color here: main.less:1416 sets border:none (border-style:none)
   on .btn-brand, plain, with no !important, and the overlay never sets a
   border-style that would let a border-color paint - so a border-color
   declaration would be inert. */
.m-portlet__head .btn-brand {
  background-color: var(--ms-accent) !important; /* beats main.less:1413 .btn-brand{background-color:#ffbc77!important} */
  color: var(--ms-surface);
}

.m-portlet__head .btn-brand:hover,
.m-portlet__head .btn-brand:focus {
  background-color: var(--ms-accent-hover) !important; /* beats main.less:1413 .btn-brand{background-color:#ffbc77!important} */
}

/* Secondary/default reads as quiet, not as another primary */
.btn-secondary,
.btn-default {
  background-color: var(--ms-surface);
  border-color: var(--ms-border-strong);
  color: var(--ms-text);
  box-shadow: none;
}

.btn-secondary:hover,
.btn-default:hover {
  background-color: var(--ms-hover);
}

/* Accessible focus ring on every button and Kendo button.
   style.bundle.css has `html a, html button, body a, body button
   {outline:none!important}` - a low-specificity element selector that the
   initial pre-flight grep (anchored to selectors starting with ".btn")
   missed entirely, discovered only by testing real keyboard focus and
   finding the ring silently not rendering despite this rule matching by
   specificity/order alone. !important is required here to beat it. */
.btn:focus-visible,
.k-button:focus-visible {
  outline: 2px solid var(--ms-accent) !important; /* beats style.bundle.css `html a, html button, body a, body button{outline:none!important}` */
  outline-offset: 2px;
  box-shadow: none;
}

.k-button {
  border-radius: var(--ms-radius);
  font-size: 13px;
}

/* 5. Form controls
   Competing rules found in main.less/style.bundle.css/Kendo (the app links
   kendo.common-material.min.css and kendo.material.min.css, not
   kendo.material-v2):
   - .k-state-focused (kendo.material.min.css) sets border-color/box-shadow
     via a single class selector, no !important. Our
     `.k-state-focused.k-dropdown-wrap` etc. below is a two-class compound
     selector, which already outranks it by specificity alone - no
     !important needed.
   - Bare `label`: no competing rule anywhere. Kept unscoped, because
     Metronic's own label-bearing widgets (.m-checkbox, .m-switch, the
     login page's "Remember me" checkbox) style their text through class
     selectors (e.g. `.m-checkbox{font-size:1rem}`), which by specificity
     outrank a bare element selector - so this rule cannot touch their
     unrelated text sizing/weight even though it matches the same <label>
     element.
   - style.bundle.css `.form-control.m-input--square{border-radius:0}` is a
     two-class compound selector, same (0,2,0) specificity as our
     multi-class group below once .m-input is added, so cascade order
     (this file loads last) decides it rather than !important. Every input
     in the app that carries m-input--square also carries the plain
     m-input class (asp-for markup is always `form-control m-input
     m-input--square`), so matching `.form-control.m-input` reaches the
     same elements without needing to name every modifier.
   - main.less:3345 `textarea:focus, .m-input:focus{border-color:#f5f5f5
     !important;box-shadow:...!important}` is a real !important conflict -
     every .form-control here also carries .m-input, so the focus rule
     below needs !important to win.
   - style.bundle.css `.text-danger{color:#f4516c!important}` is equal
     (0,1,0) specificity to the field-validation-error rule below, so that
     rule needs !important too.
   Checkboxes: this app marks them up as
   `<input type="checkbox" class="form-control m-input m-input--square">`
   (confirmed in ItemCategories/_ItemCategoryFormPartial.cshtml and 20+
   other partials), so a bare `.form-control` selector - and the
   `.form-control.m-input` compound added above to beat
   `.form-control.m-input--square{border-radius:0}` - both also match
   checkboxes/radios. Applying text-input sizing (`min-height:34px`) to a
   checkbox is wrong regardless of whether it happens to render visibly
   broken, so both the base rule and its `:focus` counterpart below now
   exclude `[type="checkbox"]`/`[type="radio"]`. */
.form-control:not([type="checkbox"]):not([type="radio"]),
.form-control.m-input:not([type="checkbox"]):not([type="radio"]),
.custom-select {
  border-radius: var(--ms-radius);
  border-color: var(--ms-border-strong);
  color: var(--ms-text);
  font-size: 13px;
  min-height: 34px;
  box-shadow: none;
}

/* main.less:3345 `textarea:focus, .m-input:focus{border-color:#f5f5f5!important;
   box-shadow:0 2px 6px rgba(0,0,0,.2),0 2px 3px rgba(0,0,0,.05)!important}`
   is a real !important conflict - every .form-control here also carries
   .m-input, so this is the one focus rule in this section that needs
   !important to win. Same checkbox/radio exclusion as above. */
.form-control:focus:not([type="checkbox"]):not([type="radio"]),
.form-control.m-input:focus:not([type="checkbox"]):not([type="radio"]),
.custom-select:focus {
  border-color: var(--ms-accent) !important; /* beats main.less:3349 .m-input:focus{border-color:#f5f5f5!important} */
  box-shadow: 0 0 0 3px var(--ms-accent-ring) !important; /* beats main.less:3350 .m-input:focus{box-shadow:...!important} */
}

.form-control::placeholder {
  color: var(--ms-text-dim);
}

/* Kendo inputs matched to the Bootstrap ones.
   kendo.material.min.css sets border-color on these wrappers through
   `.k-dropdown-wrap.k-state-default, .k-numeric-wrap.k-state-default,
   .k-picker-wrap.k-state-default{border-color:#f0f0f0}` - Kendo always
   adds k-state-default to these wrapper spans by default, and that
   compound selector is (0,2,0) specificity, one class ahead of a plain
   `.k-picker-wrap` rule, so it wins on specificity regardless of load
   order. Repeating the `.k-state-default` compound below (still no
   !important - matching specificity plus this file loading last is
   enough) is the fix. */
.k-textbox,
.k-dropdown-wrap,
.k-dropdown-wrap.k-state-default,
.k-picker-wrap,
.k-picker-wrap.k-state-default,
.k-numeric-wrap,
.k-numeric-wrap.k-state-default,
.k-multiselect-wrap {
  border-radius: var(--ms-radius);
  border-color: var(--ms-border-strong);
  background: var(--ms-surface);
  min-height: 34px;
  font-size: 13px;
  box-shadow: none;
}

.k-state-focused.k-dropdown-wrap,
.k-state-focused.k-picker-wrap,
.k-textbox:focus,
.k-state-focused.k-numeric-wrap {
  border-color: var(--ms-accent); /* outranks kendo.material .k-state-focused{border-color:#e6e6e6} by specificity (compound class selector), no !important needed - see section header note */
  box-shadow: 0 0 0 3px var(--ms-accent-ring);
}

/* Labels */
label,
.k-edit-label label {
  color: var(--ms-text);
  font-size: 12px;
  font-weight: 500;
}

/* Validation */
.form-control.input-validation-error,
.form-control.is-invalid {
  border-color: #d92d20;
}

/* asp-validation-summary/asp-validation-for render `class="text-danger
   field-validation-error"` - style.bundle.css has
   `.text-danger{color:#f4516c!important}` at equal (0,1,0) specificity
   (found by testing the real error, not by the initial grep list, which
   only checked background-color, not bare color), so color needs
   !important here to read as our red rather than Bootstrap's pink-red. */
.field-validation-error,
.invalid-feedback {
  color: #d92d20 !important; /* beats style.bundle.css .text-danger{color:#f4516c!important} */
  font-size: 12px;
}

/* 6. Cards
   Pre-flight: no !important on m-portlet/m-portlet__head/m-portlet__body/
   m-subheader/m-content in main.less. The Metronic bundle rule itself
   (.m-portlet .m-portlet__head{padding:0 2.2rem;height:5.1rem}) carries no
   !important either, so plain cascade order (this file loads last) is
   enough - no !important needed anywhere in this section.
   One real specificity/importance conflict found in main.less, but it does
   not touch the three pages this task was verified against (ItemCategories,
   OrganizationUnits, Tenants): main.less has
   `.m-portlet--skin-light .m-portlet__head{padding:0 1rem!important}` and
   `.m-portlet--skin-light .m-portlet__body{padding:1.2rem 1rem}` (inside a
   dashboard-widget media query). .m-portlet--skin-light is only used on the
   Items/Users/StockLists/Partners "details" partials (not reachable with
   this task's test account), where its !important padding would beat our
   plain .m-portlet__head rule below. Flagged for awareness, not fixed here
   - those partials are out of scope and the brief does not ask for a
   .m-portlet--skin-light override.
   Nested portlets: _ItemDetailsPartial.cshtml nests a
   `.m-portlet.m-portlet--tabs` inside the outer `.m-portlet--skin-light`
   portlet's body (also out of scope per the account above). Our reduced
   16px body/head padding would compound there (outer 16px body padding +
   inner portlet's own 16px margin-bottom + 0 16px head padding again) - not
   verified visually since the page isn't reachable, but noted as a likely
   contributor to it. */
.m-portlet {
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  box-shadow: none;
  margin-bottom: 16px;
}

.m-portlet .m-portlet__head {
  border-bottom: 1px solid var(--ms-border);
  padding: 0 16px;
  min-height: 48px;
  height: auto;
}

.m-portlet .m-portlet__head .m-portlet__head-text {
  color: var(--ms-text);
  font-size: 15px;
  font-weight: 600;
}

/* The per-page flaticon adds nothing; reclaim its space */
.m-portlet .m-portlet__head .m-portlet__head-icon {
  padding-right: 8px;
  font-size: 16px;
  color: var(--ms-text-dim);
}

.m-portlet .m-portlet__body {
  padding: 16px;
}

/* Grid sits flush inside its card */
.m-portlet .m-portlet__body > .k-grid {
  border-left: none;
  border-right: none;
}

/* Page background and subheader */
.m-content,
.m-grid--root {
  background: var(--ms-bg);
}

.m-subheader {
  padding: 12px 0;
}

.m-subheader .m-subheader__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ms-text);
}

/* Modals: keep elevation, modernize the frame */
.modal .modal-content {
  border: none;
  border-radius: var(--ms-radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .16);
}

.modal .modal-header,
.modal .modal-footer {
  border-color: var(--ms-border);
}

/* 7. Toggles and badges
   Markup: kendoTemplates.js:1323 -> .m-switch > label(.m--margin-top-5) >
   input + span. The same shape is reused in
   Views/Notifications/_NotificationSettings.cshtml for a standalone,
   non-grid "Enable/disable subscriptions" switch (no .m--margin-top-5
   there, but the same input:empty ~ span structure).
   Switch SIZING (height/width/margin/knob geometry) already lives in
   section 2 under .k-grid-content .m-switch - Task 2 needed it there to
   hit --ms-row-h. Not re-declared here.
   Pre-flight: main.less has no !important (or any rule at all) touching
   .m-switch/.m-badge - grep for box-shadow/border-radius/background/
   color/font-size!important scoped to those class names came back empty.
   The Metronic bundle (style.bundle.css) DOES define the glow, but only
   on the checked state, and with NO !important:
     .m-switch input:checked ~ span:before{...box-shadow:0px 3px 20px
       0px rgba(235,237,242,.41)}
     .m-switch input:checked ~ span:after{...box-shadow:0px 3px 20px
       0px rgba(34,185,255,.41)}
   Both are `.m-switch input:PSEUDO ~ span:PSEUDO-ELEMENT`, specificity
   (0,2,3). Our rules below use the same shape (`input:empty ~
   span:before/:after`, also (0,2,3)) so they tie on specificity; this
   file loads last in _Layout.cshtml (see file header), so plain cascade
   order already wins without !important. Unscoped (not `.k-grid-content
   .m-switch`) so it also reaches the non-grid switch in
   _NotificationSettings.cshtml and any other modal/form use. */
.m-switch input:empty ~ span:before,
.m-switch input:empty ~ span:after {
  box-shadow: none;
}

/* Badges read as quiet status chips instead of solid Metronic pills.
   style.bundle.css's .m-badge and its color modifiers (--success/--danger/
   --warning/--dot etc.) carry no box-shadow and no !important on
   background/color/border-radius/font-size, so no !important is needed to
   beat style.bundle.css. main.less DOES carry !important on two m-badge
   rules a naive line-based grep can miss (the class name lands on the
   selector line, the !important on the property line below it - use a
   block-aware grep, e.g. `grep -n -B4 "!important" main.less | grep -iE
   -A4 "m-badge"`, not a two-stage line filter):
   - main.less:1553-1556 `.m-badge.m-badge--warning{background-color:
     #ffbc77!important;color:#ffffff!important}` - see the --warning rule
     below, which needs !important to beat it.
   - main.less:1856-1857 `.m-badge.m-badge--wide{letter-spacing:.3px
     !important}` - this section DOES set letter-spacing (below), so this
     is a real conflict, not the "no conflict, different property" claim
     an earlier pass made. Accepted rather than fought with !important:
     the overlay's .02em at 11px is ~0.22px, against Metronic's 0.3px - a
     sub-pixel difference with no visible impact, so main.less silently
     winning here is fine.
   - main.less:3703 `.m-divider>span.m-badge{padding:0 1rem!important}` -
     a compound selector this section's plain `.m-badge`/`.m-badge--wide`
     rules do not match - no conflict.
   --success/--danger/--info/--brand carry no main.less !important and are
   not touched here.
   Tenants' "Is active" Yes/No badge markup is `.m-badge.m-badge--success
   .m-badge--wide`. style.bundle.css's own `.m-badge.m-badge--wide
   {border-radius:.75rem}` is a two-class compound selector, (0,2,0)
   specificity - one class ahead of the plain one-class `.m-badge` rule
   below, at (0,1,0) - so it outranks `.m-badge` by specificity regardless
   of load order. `.m-badge.m-badge--wide` is repeated below at the same
   (0,2,0) specificity so this file's load order (last) decides it,
   keeping one consistent radius across every badge variant. */
.m-badge {
  border-radius: var(--ms-radius);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}

.m-badge.m-badge--wide {
  border-radius: var(--ms-radius);
}

.m-badge.m-badge--success {
  background-color: #ecfdf3;
  color: #027a48;
}

.m-badge.m-badge--danger {
  background-color: #fef3f2;
  color: #b42318;
}

/* main.less:1553-1556 `.m-badge.m-badge--warning{background-color:
   #ffbc77!important;color:#ffffff!important}` is the same (0,2,0)
   specificity as this rule, so without !important main.less wins
   regardless of load order and the warning badge stays Metronic's solid
   orange (see section header comment above for how this rule was found). */
.m-badge.m-badge--warning {
  background-color: #fffaeb !important; /* beats main.less:1554 .m-badge--warning{background-color:#ffbc77!important} */
  color: #b54708 !important; /* beats main.less:1555 .m-badge--warning{color:#ffffff!important} */
}

/* Dot badges are the topbar notification indicator, not a status chip -
   style.bundle.css's own `.m-badge.m-badge--dot{...border-radius:100%}`
   already outranks the plain `.m-badge` rule above by specificity
   (0,2,0) vs (0,1,0) regardless of load order, so it stays circular
   without any change here. Re-declared explicitly anyway, at the same
   0,2,0 specificity as Metronic's own rule (this file still wins on
   load order), purely as a documented guardrail against a future edit
   to the block above accidentally raising its specificity past it. */
.m-badge.m-badge--dot {
  border-radius: 50%;
}

/* 8. Shell
   CORRECTION (final review): an earlier pass here claimed a block-based
   grep of main.less "found no !important on any property this section
   sets ... so no !important is needed anywhere below." That claim was
   false for the sidebar menu link background. main.less carries three
   !important rules on .m-menu__link background:
   - main.less:1476-1478 `.m-menu__link:hover{background-color:transparent
     !important}` - a bare single-class selector, so it applies in every
     state, including inside .m-aside-left.
   - main.less:1472-1474
     `.m-aside-left--minimize .m-aside-menu .m-menu__nav >
     .m-menu__item > .m-menu__link:hover{background-color:#ECF3F8
     !important}` - applies when the sidebar is minimized.
   - main.less:1994-2008, a large selector group whose property block is
     `background:#ECF3F8!important`; Views/Shared/_Layout.cshtml:386 puts
     `m-aside-menu--skin-light` on #m_ver_menu, so two of that group's
     selectors match this sidebar directly: line 2000 (unminimized hover,
     `:not(.m-menu__item--parent):hover`) and line 2001 (unminimized
     active, `.m-menu__item--active`). Lines 2005-2006 are the same
     group's minimized variants.
   Because all of these carry !important and the plain hover/active rules
   below did not, main.less's transparent/#ECF3F8 always won and neither
   tint ever rendered. The "hover still shows a state change" observed
   during earlier testing was Metronic's own #ECF3F8 showing through, not
   this overlay's #f4f6fa - a different colour that happened to look like
   a working hover. Both rules below now carry !important to actually
   win. Everything else in this section (.m-header, .m-brand, .m-aside-left
   border, .m-header-search__input, .m-header__title, .m-nav__item
   .m-nav__link-text, .m-footer, .m-nav-sticky) was re-checked and has no
   competing !important - only the menu-link background was wrong. */
.m-header {
  border-bottom: 1px solid var(--ms-border);
  box-shadow: none;
}

.m-brand {
  border-bottom: 1px solid var(--ms-border);
}

.m-aside-left {
  border-right: 1px solid var(--ms-border);
}

.m-aside-left .m-menu__link-text {
  color: var(--ms-text);
  font-size: 13px;
}

.m-aside-left .m-menu__item--active > .m-menu__link {
  background: var(--ms-selected) !important; /* beats main.less:1994-2008 (line 2001 selector) .m-menu__link{background:#ECF3F8!important} */
  box-shadow: inset 2px 0 0 var(--ms-accent);
}

.m-aside-left .m-menu__link:hover {
  background: var(--ms-hover) !important; /* beats main.less:1476-1478 .m-menu__link:hover{background-color:transparent!important} and main.less:1994-2008 (line 2000 selector) .m-menu__link{background:#ECF3F8!important} */
}

/* Topbar search */
.m-header-search__input {
  font-size: 13px;
  color: var(--ms-text);
}

/* Breadcrumb */
.m-header__title,
.m-nav__item .m-nav__link-text {
  font-size: 13px;
  color: var(--ms-text-dim);
}

/* Footer */
.m-footer {
  border-top: 1px solid var(--ms-border);
  background: var(--ms-surface);
  font-size: 12px;
  color: var(--ms-text-dim);
}

/* Floating quick-action toolbar must not sit on top of grid content.
   The classes .m-quick-sidebar and .m-quick-sidebar-toggle do not exist
   anywhere in this app's Views - the live widget at that position (fixed,
   ~x=1560 y=380-465 at 1600x1000) is `<ul class="m-nav-sticky">` in
   Views/Shared/_Layout.cshtml ("Set as homepage" / "Switch to user").
   Only .m-nav-sticky is targeted below; if a quick-sidebar drawer is ever
   added to a view, re-adding its selector here is a one-line change.
   main.less has no !important on .m-nav-sticky (only a `display:none`
   inside a narrow-viewport media query, not a conflict), so no
   !important is needed here either.

   style.bundle.css gives it `position: fixed; top: 35%; right: 0;
   z-index: 110`, so at 35% viewport height it landed on top of the grid
   filter row on every grid screen. Lowering opacity alone (the previous
   attempt) only made the collision translucent. The z-index has to go
   negative to actually paint behind the grid: page content here is
   non-positioned, and per CSS painting order a positioned element with
   z-index 0 or auto still paints above non-positioned content, so only a
   negative value puts the bar behind it. Consequence, accepted
   deliberately: wherever an opaque portlet or grid overlaps the bar it is
   covered and not clickable. The same two actions remain available from
   the tenant and user screens. */
.m-nav-sticky {
  z-index: -1;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius) 0 0 var(--ms-radius);
  opacity: .55;
  transition: opacity .12s ease;
}

.m-nav-sticky:hover {
  opacity: 1;
}
