/* HES & MDMS console theme.
   Loaded after the template (backend.css), Bootstrap 4 and DevExtreme, and scoped to body.hes so it wins
   without touching page logic. Change the look by editing the tokens below. */

:root {
  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --surface-2: #EEF0F6;
  --line: #DCE0EB;
  --fg: #151935;
  --fg-2: #4A5072;
  --fg-3: #747B9C;
  --primary: #2C3D8F;
  --primary-ink: #FFFFFF;
  --primary-soft: #E5E8F6;
  --accent: #C8366E;
  --nav-bg: #161C42;
  --nav-fg: #C9CDE6;
  --nav-fg-strong: #FFFFFF;
  --nav-hover: #232A57;
  --ok: #1D8455;
  --warn: #A86A0C;
  --crit: #C2342F;
  --info: #2765A8;
  --shadow: 0 1px 2px rgb(21 25 53 / .06), 0 4px 16px rgb(21 25 53 / .06);

  --font-ui: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 8px;
  --row-h: 42px;
  --rail-w: 252px;
}

/* ---------- Base ---------- */
body.hes { background: var(--bg) !important; color: var(--fg); font-family: var(--font-ui); font-size: 14px; line-height: 1.45; }
body.hes h1, body.hes h2, body.hes h3, body.hes h4, body.hes h5, body.hes h6 { font-family: var(--font-ui); color: var(--fg); font-weight: 600; letter-spacing: -.005em; }
body.hes a { color: var(--primary); }
body.hes .text-primary { color: var(--primary) !important; }
body.hes .bg-primary { background-color: var(--primary) !important; }
body.hes .text-muted { color: var(--fg-3) !important; }
body.hes .mono, body.hes .num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
body.hes :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
body.hes #loading { background: var(--bg); }

/* ---------- Shell ---------- */
.hes-app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.hes-rail { background: var(--nav-bg); color: var(--nav-fg); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 1030; scrollbar-width: thin; scrollbar-color: var(--nav-hover) transparent; }
.hes-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; text-decoration: none !important; }
.hes-brand-plate { background: #FFFFFF; border-radius: 6px; padding: 6px 10px; display: flex; }
.hes-brand-plate img { height: 26px; width: auto; display: block; }
.hes-brand-sub { font-size: 11.5px; color: var(--nav-fg); line-height: 1.2; }
.hes-rail-foot { margin-top: auto; padding: 14px 18px; font-size: 11.5px; color: var(--nav-fg); opacity: .7; border-top: 1px solid var(--nav-hover); }

/* Navigation (Views/Shared/_HesNav.cshtml) */
.hes-nav { padding: 4px 10px 18px; display: flex; flex-direction: column; gap: 12px; }
.hes-nav-group { display: flex; flex-direction: column; gap: 1px; }
.hes-nav-label { display: block; padding: 6px 10px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; color: var(--nav-fg); opacity: .65; }
.hes-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--nav-fg) !important; text-decoration: none !important; font-size: 13.5px; line-height: 1.3; }
.hes-nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.hes-nav a:hover { background: var(--nav-hover); color: var(--nav-fg-strong) !important; }
.hes-nav a[aria-current="page"] { background: var(--nav-hover); color: var(--nav-fg-strong) !important; box-shadow: inset 3px 0 0 var(--accent); }
.hes-nav-ext summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.hes-nav-ext summary::-webkit-details-marker { display: none; }
.hes-nav-ext summary::after { content: "+"; font-size: 13px; letter-spacing: 0; }
.hes-nav-ext[open] summary::after { content: "–"; }
.hes-nav-ext a { font-size: 13px; }

.hes-main { min-width: 0; display: flex; flex-direction: column; }
.hes-topbar { position: sticky; top: 0; z-index: 1020; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 24px; min-height: 58px; }
.hes-crumbs { font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hes-crumbs b { color: var(--fg); font-weight: 600; }
.hes-topbar .hes-spacer { margin-left: auto; }
.hes-icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); cursor: pointer; flex: none; color: var(--fg-2); }
.hes-icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.hes-icon-btn svg { width: 18px; height: 18px; }
.hes-menu-btn { display: none; }
.hes-user { position: relative; }
.hes-user > button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 4px 10px 4px 4px; cursor: pointer; font-size: 13px; color: var(--fg); }
.hes-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 11.5px; }
.hes-user-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 220px; padding: 12px; display: none; z-index: 1040; }
.hes-user.open .hes-user-menu { display: block; }
.hes-user-menu .who { font-weight: 600; }
.hes-user-menu .sub { font-size: 12px; color: var(--fg-3); margin-bottom: 10px; overflow-wrap: anywhere; }
#google_translate_element { font-size: 12px; }
#google_translate_element select { height: 32px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 6px; background: var(--surface); color: var(--fg-2); }

.hes-content { padding: 22px 24px 40px; flex: 1; min-width: 0; }
.hes-content > .container-fluid { padding: 0; }
.hes-footer { padding: 14px 24px; font-size: 12px; color: var(--fg-3); border-top: 1px solid var(--line); background: var(--surface); }

@media (max-width: 991px) {
  .hes-app { grid-template-columns: minmax(0, 1fr); }
  .hes-rail { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; }
  .hes-app.rail-open .hes-rail { transform: none; box-shadow: var(--shadow); }
  .hes-menu-btn { display: grid; }
  .hes-user .name { display: none; }
  .hes-content { padding: 16px; }
  .hes-topbar { padding: 10px 16px; }
}

/* ---------- Page header (new pages) ---------- */
.hes-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; width: 100%; }
.hes-page-head h1 { font-size: 26px; margin: 0; }
.hes-page-head p { margin: 4px 0 0; color: var(--fg-2); max-width: 75ch; }
.hes-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); font-weight: 600; }

/* ---------- Cards (template .card used on most pages) ---------- */
body.hes .card { background: var(--surface) !important; backdrop-filter: none; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; box-shadow: none !important; margin-bottom: 18px; }
body.hes .card .card-header { background: var(--surface) !important; padding: 14px 20px !important; border-bottom: 1px solid var(--line) !important; border-radius: var(--radius) var(--radius) 0 0 !important; }
body.hes .card-body { padding: 20px; }
body.hes .card-title, body.hes .header-title h4, body.hes .header-title .card-title { font-size: 17px; font-weight: 600; color: var(--fg); margin: 0; }
body.hes .card-block.card-stretch { box-shadow: none; }
body.hes .metric-card, body.hes .card.metric-card { border-radius: var(--radius) !important; }

/* ---------- Buttons ---------- */
body.hes .btn { border-radius: var(--radius); font-weight: 500; font-size: 13.5px; padding: .42rem .95rem; box-shadow: none !important; transition: background .15s, border-color .15s; }
body.hes .btn-primary, body.hes .btn-primary:not(:disabled):not(.disabled):active { background: var(--primary) !important; border-color: var(--primary) !important; color: var(--primary-ink) !important; }
body.hes .btn-primary:hover { filter: brightness(1.08); }
body.hes .btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; background: transparent !important; }
body.hes .btn-outline-primary:hover { background: var(--primary-soft) !important; }
body.hes .btn-secondary { background: var(--surface) !important; border-color: var(--line) !important; color: var(--fg) !important; }
body.hes .btn-secondary:hover { background: var(--surface-2) !important; }
body.hes .btn-success { background: var(--ok) !important; border-color: var(--ok) !important; }
body.hes .btn-danger { background: var(--crit) !important; border-color: var(--crit) !important; }
body.hes .btn-warning { background: var(--warn) !important; border-color: var(--warn) !important; color: #fff !important; }
body.hes .btn-info { background: var(--info) !important; border-color: var(--info) !important; }

/* ---------- Forms ---------- */
body.hes .form-control, body.hes .custom-select, body.hes select.form-control { height: 38px; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; background-color: var(--surface) !important; color: var(--fg) !important; font-size: 13.5px; box-shadow: none !important; }
body.hes textarea.form-control { height: auto; }
body.hes .form-control:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px var(--primary-soft) !important; }
body.hes label, body.hes .form-label { font-size: 12px; font-weight: 600; color: var(--fg-2); margin-bottom: 5px; }
body.hes .input-group-text { background: var(--surface-2) !important; border: 1px solid var(--line) !important; color: var(--fg-2); }
body.hes .input-group > .form-control { border-radius: 0 var(--radius) var(--radius) 0 !important; }
body.hes .input-group-prepend .input-group-text { border-radius: var(--radius) 0 0 var(--radius) !important; }

/* ---------- Tables ---------- */
body.hes .table { color: var(--fg); font-size: 13px; }
body.hes .table thead th { background: var(--surface-2); color: var(--fg-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; border-bottom: 1px solid var(--line) !important; border-top: 0 !important; white-space: nowrap; }
body.hes .table td { border-top: 1px solid var(--line) !important; vertical-align: middle; }
body.hes .table-hover tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }

/* ---------- Badges, alerts, modals ---------- */
body.hes .badge { border-radius: 999px; font-weight: 600; padding: .32em .7em; }
body.hes .badge-primary { background: var(--primary-soft); color: var(--primary); }
body.hes .badge-success { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
body.hes .badge-danger { background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--crit); }
body.hes .badge-warning { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
body.hes .badge-info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
body.hes .alert { border-radius: var(--radius); }
body.hes .modal-content { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
body.hes .modal-header { border-bottom: 1px solid var(--line); }
body.hes .modal-footer { border-top: 1px solid var(--line); }

/* ---------- DevExtreme (dx 20.1) ---------- */
body.hes .dx-widget { font-family: var(--font-ui); color: var(--fg); }
body.hes .dx-datagrid { background: var(--surface); }
body.hes .dx-datagrid-headers { color: var(--fg-3); background: var(--surface-2); border-bottom: 1px solid var(--line) !important; }
body.hes .dx-datagrid-headers .dx-datagrid-table .dx-row > td { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600 !important; border-bottom: 1px solid var(--line); }
body.hes .dx-datagrid-rowsview .dx-row > td { border-top: 1px solid var(--line); font-size: 13px; }
body.hes .dx-datagrid-rowsview .dx-row.dx-data-row:hover > td { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
body.hes .dx-datagrid-borders > .dx-datagrid-headers, body.hes .dx-datagrid-borders > .dx-datagrid-rowsview, body.hes .dx-datagrid-borders > .dx-datagrid-total-footer { border-color: var(--line); }
body.hes .dx-pager .dx-pages .dx-selection, body.hes .dx-pager .dx-page-sizes .dx-selection { background: var(--primary); color: var(--primary-ink); border-radius: 6px; }
body.hes .dx-button-mode-contained.dx-button-default { background: var(--primary); }
body.hes .dx-texteditor.dx-editor-outlined { border-radius: var(--radius); border-color: var(--line); }
body.hes .dx-texteditor.dx-state-focused.dx-editor-outlined { border-color: var(--primary); }
body.hes .dx-checkbox-checked .dx-checkbox-icon { background: var(--primary); border-color: var(--primary); }

/* ---------- New-design components (used by redesigned pages) ---------- */
.hes-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; margin-bottom: 18px; }
.hes-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hes-panel-head h2 { font-size: 16.5px; margin: 0; }
.hes-panel-head .sub { font-size: 12.5px; color: var(--fg-3); }
.hes-panel-body { padding: 20px; }
.hes-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1280px) { .hes-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hes-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hes-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hes-kpi .v { font-family: var(--font-data); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hes-kpi .v small { font-size: 13px; color: var(--fg-3); margin-left: 3px; }
.hes-kpi .d { font-size: 11.5px; color: var(--fg-3); }
.hes-kpi.warn { box-shadow: inset 0 3px 0 var(--warn); }
.hes-kpi.crit { box-shadow: inset 0 3px 0 var(--crit); }
.hes-up { color: var(--ok); } .hes-down { color: var(--crit); }
.hes-grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.hes-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .hes-grid-2, .hes-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.hes-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.hes-seg a, .hes-seg button { border: 0; background: transparent; padding: 0 12px; height: 34px; line-height: 34px; cursor: pointer; font-size: 13px; color: var(--fg-2); border-right: 1px solid var(--line); text-decoration: none !important; white-space: nowrap; }
.hes-seg a:last-child, .hes-seg button:last-child { border-right: 0; }
.hes-seg [aria-pressed="true"], .hes-seg [aria-current="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.hes-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--fg-2); }
.hes-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hes-chip.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.hes-chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.hes-chip.crit { background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--crit); }
.hes-chip.info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.hes-chip.plain::before { display: none; }
.hes-table-wrap { overflow-x: auto; }
.hes-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hes-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); font-weight: 600; padding: 0 12px; height: 38px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.hes-table td { padding: 0 12px; height: var(--row-h); border-bottom: 1px solid var(--line); white-space: nowrap; }
.hes-table .r, .hes-table th.r { text-align: right; }
.hes-table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.hes-hbar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 56px; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; }
.hes-hbar .track { height: 10px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.hes-hbar .track b { display: block; height: 100%; border-radius: 3px; }
.hes-hint { font-size: 12px; color: var(--fg-3); margin: 10px 0 0; }
.hes-src { display: inline-block; margin-left: 6px; font-family: var(--font-data); font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--fg-3); }
.hes-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--fg-2); }
.hes-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hes-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.hes-batt { display: inline-flex; align-items: center; gap: 8px; }
.hes-batt i { width: 34px; height: 8px; border-radius: 2px; background: var(--surface-2); position: relative; overflow: hidden; display: inline-block; border: 1px solid var(--line); }
.hes-batt i b { position: absolute; inset: 0 auto 0 0; background: var(--ok); }
.hes-batt.mid i b { background: var(--warn); }
.hes-batt.low i b { background: var(--crit); }
.hes-list-item { display: flex; gap: 12px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.hes-list-item:last-child { border-bottom: 0; }
.hes-sev { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.hes-empty { padding: 40px 20px; text-align: center; color: var(--fg-2); }

/* charts (inline SVG drawn by hes-charts.js) */
.hes-chart { width: 100%; height: auto; display: block; }
.hes-chart .grid line { stroke: var(--line); }
.hes-chart text { fill: var(--fg-3); font-family: var(--font-data); font-size: 10px; }
.hes-chart .bar { fill: var(--primary); }
.hes-chart .bar.hl { fill: var(--accent); }
.hes-chart .area { fill: color-mix(in srgb, var(--primary) 16%, transparent); }
.hes-chart .line { fill: none; stroke: var(--primary); stroke-width: 2; }
.hes-chart .pt { fill: var(--accent); }
.hes-chart .line.muted-line { stroke: var(--fg-3); stroke-dasharray: 5 4; stroke-width: 1.5; }
.hes-chart .pt.muted-line { fill: var(--fg-3); }
.hes-chart .line.warn-line { stroke: var(--warn); } .hes-chart .pt.warn-line { fill: var(--warn); }
.hes-chart .line.crit-line { stroke: var(--crit); } .hes-chart .pt.crit-line { fill: var(--crit); }
.hes-chart .target { stroke: var(--warn); stroke-dasharray: 4 4; stroke-width: 1.5; }
.hes-chart text.target-l { fill: var(--warn); }
.hes-chart .hit { fill: transparent; }
.hes-chart .hit:hover { fill: color-mix(in srgb, var(--primary) 30%, transparent); }

/* ---------- Login ---------- */
.hes-login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); }
.hes-login-art { background: var(--nav-bg); color: var(--nav-fg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.hes-login-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--nav-hover) 1px, transparent 1px), linear-gradient(90deg, var(--nav-hover) 1px, transparent 1px); background-size: 44px 44px; opacity: .55; -webkit-mask-image: radial-gradient(circle at 80% 30%, #000 0%, transparent 70%); mask-image: radial-gradient(circle at 80% 30%, #000 0%, transparent 70%); pointer-events: none; }
.hes-login-art > * { position: relative; z-index: 1; }
body.hes .hes-login-art h2 { color: var(--nav-fg-strong); font-size: 32px; line-height: 1.15; max-width: 18ch; margin: 0; }
.hes-login-form { display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.hes-login-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.hes-login-form h1 { font-size: 28px; margin: 0; }
@media (max-width: 900px) { .hes-login { grid-template-columns: minmax(0, 1fr); } .hes-login-art { padding: 28px 20px; } }

@media (prefers-reduced-motion: reduce) { body.hes *, body.hes *::before, body.hes *::after { transition: none !important; animation: none !important; } }

/* ---------- Page actions, toggles ---------- */
.hes-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hes-seg .count, .hes-check .count { font-family: var(--font-data); font-size: 11px; margin-left: 6px; opacity: .75; font-weight: 500; }
.hes-check { display: inline-flex !important; align-items: center; gap: 8px; font-size: 13px !important; color: var(--fg-2) !important; font-weight: 500 !important; cursor: pointer; }
.hes-check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- DevExtreme grids in the prototype table style ---------- */
body.hes .dx-datagrid { color: var(--fg); background: var(--surface) !important; font-size: 13px; }
body.hes .dx-datagrid .dx-datagrid-header-panel { padding: 12px 20px; border-bottom: 0; background: var(--surface); }
body.hes .dx-datagrid .dx-toolbar { background: transparent !important; }
body.hes .dx-datagrid-headers { background: var(--surface-2) !important; border-top: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; }
body.hes .dx-datagrid-headers .dx-header-row > td { color: var(--fg-3) !important; font-size: 11px !important; text-transform: uppercase; letter-spacing: .06em; font-weight: 600 !important; padding-top: 11px !important; padding-bottom: 11px !important; text-align: left !important; border-left: 0 !important; border-right: 0 !important; }
body.hes .dx-datagrid-headers .dx-header-row > td.dx-datagrid-action:hover { color: var(--fg) !important; }
body.hes .dx-datagrid .dx-sort { color: var(--primary); }
body.hes .dx-datagrid-filter-row { background: var(--surface) !important; }
body.hes .dx-datagrid-filter-row > td { border-left: 0 !important; border-right: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 6px 8px !important; }
body.hes .dx-datagrid-filter-row .dx-texteditor-input { font-size: 12.5px; }
body.hes .dx-datagrid-rowsview .dx-row > td { padding-top: 11px !important; padding-bottom: 11px !important; vertical-align: middle !important; border-left: 0 !important; border-right: 0 !important; }
body.hes .dx-datagrid-rowsview .dx-row.dx-data-row > td { border-top: 1px solid var(--line) !important; }
body.hes .dx-datagrid-rowsview .dx-row.dx-data-row.dx-state-hover > td, body.hes .dx-datagrid-rowsview .dx-row.dx-data-row:hover > td { background: color-mix(in srgb, var(--primary-soft) 55%, transparent) !important; color: var(--fg) !important; }
body.hes .dx-datagrid-rowsview .dx-selection > td { background: var(--primary-soft) !important; color: var(--fg) !important; }
body.hes .dx-datagrid .mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
body.hes .dx-datagrid-pager { padding: 10px 20px !important; border-top: 1px solid var(--line) !important; color: var(--fg-2); font-size: 13px; }
body.hes .dx-datagrid-pager .dx-page, body.hes .dx-datagrid-pager .dx-page-size { border-radius: 6px; padding: 5px 9px; }
body.hes .dx-datagrid-pager .dx-page.dx-selection, body.hes .dx-datagrid-pager .dx-page-size.dx-selection { background: var(--primary) !important; color: var(--primary-ink) !important; }
body.hes .dx-datagrid-nodata { color: var(--fg-2); font-size: 13px; }
body.hes .hes-grid .dx-datagrid-borders > .dx-datagrid-headers, body.hes .hes-grid .dx-datagrid-borders > .dx-datagrid-rowsview, body.hes .hes-grid .dx-datagrid-borders > .dx-datagrid-total-footer { border-left: 0 !important; border-right: 0 !important; }
body.hes .dx-datagrid .dx-searchbox .dx-texteditor-input { padding-left: 34px; }

/* Money: positive balance green, negative red (Customer Data, dashboard meter table) */
.hes-money { font-family: var(--font-data); font-variant-numeric: tabular-nums; font-weight: 500; }
.hes-money.pos { color: var(--ok); }
.hes-money.neg { color: var(--crit); }

/* Older pages: left-align card titles like the new page headers */
body.hes .card .card-header { text-align: left !important; }
