/* STS Vend — operational console. One bilingual family, utility colour-coding, RTL via logical props. */
:root {
  --brand: #104E8C;
  --accent: #00AEEF;
  --side: color-mix(in srgb, var(--brand) 72%, #02121F);
  --brand-ink: #ffffff;
  --bg: #EEF2F7;
  --surface: #ffffff;
  --surface-2: #F6F9F9;
  --ink: #14262B;
  --muted: #5A6D72;
  --line: #D9E3E4;
  --water: #1D6FB0;
  --water-soft: #E3EFF9;
  --gas: #C96F12;
  --gas-soft: #FBEEDD;
  --electricity: #C2185B;
  --electricity-soft: #FBE6EE;
  --ok: #24804F;
  --ok-soft: #E2F3EA;
  --err: #B83A2E;
  --err-soft: #FBE7E4;
  --warn-soft: #FFF5D9;
  --radius: 10px;
  --radius-sm: 6px;
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 15px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; font-weight: 600; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 .75rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
[dir="rtl"] .num, [dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  background: var(--side); color: var(--brand-ink); padding: 1rem .75rem 2rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .65rem; padding: .25rem .5rem 1.1rem; color: inherit; }
.brand:hover { text-decoration: none; }
.brand img { height: 38px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.brand.logo-card { display: block; background: #fff; border-radius: 10px; padding: .7rem .8rem .6rem; margin: .1rem .1rem 1rem; }
.brand.logo-card img { display: block; height: auto; width: 100%; max-width: 100%; max-height: 64px; padding: 0; border-radius: 0; }
.brand.logo-card span { display: block; color: var(--brand); font-size: .74rem; font-weight: 600; margin-top: .35rem; opacity: .85; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,.14);
  display: grid; place-items: center; font-weight: 700;
}
.brand b { display: block; font-size: .98rem; line-height: 1.2; }
.brand span { font-size: .78rem; opacity: .75; }
/* menu groups (STS Vend 1.16.1; STS Vend 1.16.2: no page count, same design in ITEC HES, STS Vend and the STS Gateway): the group heading uses the same font as
   the pages; a chevron points right when the group is folded and down when it is open; an open group has a light band and its pages are indented on a guide line; a folded group that holds
   the current page keeps the cyan marker */
.nav-group { margin-top: .15rem; }
.ng-h {
  display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; color: #fff; font: inherit;
  font-size: .93rem; font-weight: 600; letter-spacing: 0; text-transform: none; padding: .48rem .6rem; border-radius: 7px;
  cursor: pointer; text-align: start;
}
.ng-h span { flex: 1; min-width: 0; }
.ng-h:hover { background: rgba(255,255,255,.09); }
.ng-h:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ng-h svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.ng-h svg:last-child { width: 16px; height: 16px; opacity: .85; transition: transform .15s; }
.nav-group.closed .ng-h svg:last-child { transform: rotate(-90deg); }
[dir="rtl"] .nav-group.closed .ng-h svg:last-child { transform: rotate(90deg); }
.nav-group:not(.closed) > .ng-h { background: rgba(255,255,255,.07); }
.nav-group:not(.closed) > .ng-h:hover { background: rgba(255,255,255,.11); }
.nav-group.closed:has(a.nav.on) > .ng-h { box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .nav-group.closed:has(a.nav.on) > .ng-h { box-shadow: inset -3px 0 0 var(--accent); }
.ng-b { margin: .15rem 0 .35rem; margin-inline-start: 1.15rem; padding-inline-start: .4rem; border-inline-start: 1px solid rgba(255,255,255,.22); }
.nav-group.closed .ng-b { display: none; }
.util-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.util-switch button {
  border: 0; background: none; font: inherit; font-size: .82rem; color: var(--ink); padding: .2rem .75rem;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.util-switch button:hover { background: var(--surface); }
.util-switch button.on { background: var(--brand); color: #fff; }
.side a.nav {
  display: flex; align-items: center; gap: .6rem; padding: .48rem .6rem; border-radius: 7px;
  color: rgba(255,255,255,.86); font-size: .93rem;
}
.side a.nav:hover { background: rgba(255,255,255,.09); text-decoration: none; color: #fff; }
.side a.nav.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .side a.nav.on { box-shadow: inset -3px 0 0 var(--accent); }
.side a.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.side a.sell {
  background: #fff; color: var(--brand); font-weight: 600; margin-bottom: .4rem; justify-content: center;
}
.side a.sell:hover, .side a.sell.on { background: #fff; color: var(--brand); filter: brightness(.96); }

.main { min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
.top {
  display: flex; align-items: center; gap: .75rem; padding: .6rem 1.5rem; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap;
}
.top .spacer { flex: 1; }
.btn.menu-btn { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px;
  font-size: .82rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); white-space: nowrap;
}
.chip svg { width: 16px; height: 16px; flex: none; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip.live .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.chip.idle .dot { background: #C9A227; }
.pos-select select { border: 0; background: transparent; font: inherit; font-size: .85rem; color: var(--ink); padding: 0; max-width: 210px; text-overflow: ellipsis; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--brand); color: #fff;
  display: inline-grid; place-items: center; font-size: .8rem; font-weight: 600; flex: none;
}
.avatar.lg { width: 72px; height: 72px; font-size: 1.4rem; }
.who { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.who small { display: block; line-height: 1.1; }
.content { padding: 1.5rem; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }
.page-head p { margin: 0; color: var(--muted); }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.panel + .panel { margin-top: 1rem; }
.grid > .panel + .panel, .split > .panel + .panel { margin-top: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; }
.panel-head .spacer { flex: 1; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }

.stat { padding: 1rem 1.25rem; }
.stat .v { font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .l { color: var(--muted); font-size: .86rem; }
.stat .sub { font-size: .82rem; margin-top: .25rem; display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- utility tags ---------- */
.u { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 500; }
.u::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.u.water { background: var(--water-soft); color: var(--water); }
.u.gas { background: var(--gas-soft); color: var(--gas); }
.u.electricity { background: var(--electricity-soft); color: var(--electricity); }
.badge { display: inline-block; padding: .08rem .5rem; border-radius: var(--radius-sm); font-size: .78rem; background: var(--surface-2); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: #8A6500; border-color: transparent; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: start; font-weight: 500; color: var(--muted); font-size: .8rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: .6rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFCFC; }
td.r, th.r { text-align: end; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

/* ---------- forms ---------- */
label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .3rem; }
.field { margin-bottom: .9rem; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=date], input[type=search],
input[type=tel], input[type=url], input[type=month], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #C8D4D6;
  border-radius: var(--radius-sm); padding: .5rem .65rem; min-height: 38px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=color] { width: 56px; height: 38px; padding: 2px; border: 1px solid #C8D4D6; border-radius: var(--radius-sm); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; font-size: .9rem; margin-bottom: .5rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; padding: .9rem 1.25rem; border-bottom: 1px solid var(--line); }
.filters .field { margin: 0; min-width: 140px; }
.filters .grow { flex: 1; min-width: 200px; }
.form-actions { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 500;
  font-size: .92rem; padding: .5rem 1rem; min-height: 38px; border-radius: var(--radius-sm); border: 1px solid #C8D4D6;
  background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); border-color: #E7B8B2; }
.btn.danger:hover { background: var(--err-soft); }
.btn.big { min-height: 52px; font-size: 1.05rem; padding: .7rem 1.4rem; }
.btn.sm { min-height: 30px; padding: .2rem .6rem; font-size: .82rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }

.flash { padding: .7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .92rem; }
.flash.ok { background: var(--ok-soft); color: #175C37; }
.flash.err { background: var(--err-soft); color: #8E2A20; }
.flash.warn { background: var(--warn-soft, #FFF4DB); color: #7A4B00; }
.lic-banner a { color: inherit; font-weight: 600; }
.lic-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .04em; }
.note { background: var(--warn-soft); padding: .7rem 1rem; border-radius: var(--radius-sm); font-size: .88rem; }

.pager { display: flex; gap: .5rem; align-items: center; justify-content: space-between; padding: .75rem 1.25rem; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; font-size: .92rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

/* ---------- vend screen ---------- */
.lookup { display: flex; gap: .6rem; }
.lookup input { font-size: 1.15rem; min-height: 48px; letter-spacing: .02em; }
.lookup .btn { min-height: 48px; }
.meter-card { border-inline-start: 5px solid var(--water); }
.meter-card.gas { border-inline-start-color: var(--gas); }
.meter-card.electricity { border-inline-start-color: var(--electricity); }
.meter-card .mno { font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.amount-input { font-size: 1.9rem !important; font-weight: 600; min-height: 62px !important; font-variant-numeric: tabular-nums; }
.presets { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.presets button { flex: 1; min-width: 70px; }
.pay-methods { display: flex; gap: .4rem; flex-wrap: wrap; }
.pay-methods label { margin: 0; }
.pay-methods input { position: absolute; opacity: 0; pointer-events: none; }
.pay-methods span { display: inline-block; padding: .45rem .85rem; border: 1px solid #C8D4D6; border-radius: 999px; font-weight: 400; cursor: pointer; font-size: .88rem; }
.pay-methods input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pay-methods input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.quote dl { grid-template-columns: 1fr max-content; }
.quote dd { text-align: end; font-variant-numeric: tabular-nums; }
.quote .units-line { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .75rem; display: flex; align-items: baseline; justify-content: space-between; }
.quote .units-line b { font-size: 2rem; font-variant-numeric: tabular-nums; }
.quote .err { color: var(--err); }

/* The token: the one bold element in the product. */
.token-strip {
  position: relative; background: #fff; border: 2px dashed color-mix(in srgb, var(--water) 55%, #fff);
  border-radius: 14px; padding: 1.4rem 1.5rem 1.2rem; text-align: center; margin: .5rem 0 1rem;
}
.token-strip.gas { border-color: color-mix(in srgb, var(--gas) 55%, #fff); }
.token-strip.electricity { border-color: color-mix(in srgb, var(--electricity) 55%, #fff); }
.token-strip .label { font-size: .85rem; color: var(--muted); }
.token-digits {
  direction: ltr; font-size: clamp(1.45rem, 5.2vw, 3.2rem); font-weight: 600; font-variant-numeric: tabular-nums;
  letter-spacing: .03em; display: flex; justify-content: center; gap: .5em; flex-wrap: wrap; margin: .35rem 0 .2rem;
  color: var(--ink);
}
.token-digits span { white-space: nowrap; }
.token-strip .units-big { font-size: 1.1rem; }
.token-strip .units-big b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.copy-btn { position: absolute; inset-inline-end: .8rem; top: .8rem; }
@media (prefers-reduced-motion: no-preference) {
  .token-strip.fresh { animation: stamp .45s cubic-bezier(.2,.9,.3,1.2); }
  @keyframes stamp { from { transform: scale(.97); } to { transform: none; } }
}

/* chart */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: .5rem; }
.bars .col { flex: 1; display: flex; flex-direction: column-reverse; gap: 1px; min-width: 4px; position: relative; }
.bars .seg.water { background: var(--water); border-radius: 2px 2px 0 0; }
.bars .seg.gas { background: var(--gas); border-radius: 2px 2px 0 0; }
.bars .seg.electricity { background: var(--electricity); border-radius: 2px 2px 0 0; }
.bars .col:hover::after {
  content: attr(data-tip); position: absolute; bottom: 100%; inset-inline-start: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: .75rem; padding: .2rem .45rem; border-radius: 4px; white-space: nowrap; z-index: 2;
}
.legend { display: flex; gap: 1rem; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: .35rem; vertical-align: -1px; }

/* permissions matrix */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .25rem 1.25rem; }
.perm-row { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.perm-row .from-role { color: var(--ok); font-size: .78rem; }
.perm-row label { margin: 0; font-weight: 400; font-size: .78rem; display: flex; gap: .25rem; align-items: center; }

/* simulator keypad */
.sim-meter {
  background: #1E2A2E; color: #D8F3DC; border-radius: 18px; padding: 1.25rem; max-width: 420px;
  box-shadow: inset 0 0 0 6px #2C3B40;
}
.sim-lcd { background: #B9D7A8; color: #1D2B16; border-radius: 8px; padding: .8rem 1rem; font-variant-numeric: tabular-nums; min-height: 92px; direction: ltr; }
.sim-lcd .big { font-size: 2rem; font-weight: 700; }
.sim-meter input { background: #EEF5EE; font-size: 1.1rem; letter-spacing: .05em; direction: ltr; text-align: center; margin-top: .8rem; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--side); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { font-size: 2.2rem; max-width: 18ch; line-height: 1.25; }
.login-art .logo-card { background: #fff; border-radius: 14px; padding: 1.1rem 1.3rem; display: inline-block; margin-bottom: 2rem; }
.login-art .logo-card img { display: block; height: 72px; width: auto; }
.login-art .accent-rule { width: 56px; height: 4px; background: var(--accent); border-radius: 2px; margin: 1rem 0 1.25rem; }
.login-art .sample { direction: ltr; font-size: 1.8rem; letter-spacing: .05em; font-variant-numeric: tabular-nums; opacity: .95; border: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 14px; padding: 1rem 1.25rem; display: inline-block; }
.login-art .login-illus { display: block; width: min(100%, 440px); height: auto; margin-bottom: 1.75rem; }
@media (max-height: 760px) { .login-art .login-illus { display: none; } }
.login-form { display: grid; place-items: center; padding: 2rem; background: var(--surface); }
.login-form form { width: 100%; max-width: 340px; }
.login-logo { display: none; height: 56px; margin-bottom: 1.5rem; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .who > span, .top .chip.pos-select svg { display: none; }
  .side { position: fixed; inset-inline-start: 0; top: 0; width: 260px; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  [dir="rtl"] .side { transform: translateX(100%); }
  body.nav-open .side { transform: none; }
  .btn.menu-btn { display: inline-flex; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 1rem; }
  .top { padding: .5rem 1rem; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-logo { display: block; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: minmax(0, 1fr); } .lookup { flex-direction: column; } .presets button { min-width: 0; } .content { padding: .75rem; } }

@media print {
  .side, .top, .no-print { display: none !important; }
  body { background: #fff; }
  .shell { display: block; }
}

/* ---------------------------------------------------------------- analytics */
:root {
  /* categorical slots for chart series (validated: adjacent CVD ΔE ≥ 9, normal ≥ 19.6) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s-other: #9aa6ab;
}
.an-tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.an-tabs a { padding: .5rem .8rem; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: .92rem; white-space: nowrap; }
.an-tabs a:hover { color: var(--ink); }
.an-tabs a.on { color: var(--brand); border-bottom-color: var(--accent); font-weight: 600; }
.an-kpis .stat .sub { font-size: .82rem; margin-top: .2rem; }
.delta { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--err); }
.seg-links { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-inline-start: .5rem; }
.seg-links a { padding: .3rem .7rem; font-size: .82rem; color: var(--muted); text-decoration: none; }
.seg-links a + a { border-inline-start: 1px solid var(--line); }
.seg-links a.on { background: var(--brand); color: #fff; }
.ch-host { position: relative; width: 100%; }
.ch-host svg { display: block; overflow: visible; }
.ch-axis text, text.ch-axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.ch-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.ch-base { stroke: #b9c6c9; stroke-width: 1; }
.ch-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(20, 38, 43, .12); padding: .5rem .65rem; font-size: .8rem; min-width: 150px; z-index: 3; color: var(--ink); }
.ch-tip b { display: block; margin-bottom: .25rem; }
.ch-tip div { display: flex; align-items: center; gap: .4rem; }
.ch-tip div span { margin-inline-start: auto; font-variant-numeric: tabular-nums; padding-inline-start: .75rem; }
.ch-tip i, .ch-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ch-tip .tot { border-top: 1px solid var(--line); margin-top: .25rem; padding-top: .25rem; font-weight: 600; }
.ch-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--ink); margin-bottom: .5rem; }
.ch-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.sharebar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.sharebar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.heat { display: grid; gap: 2px; overflow-x: auto; padding-bottom: .25rem; }
.heat-row { display: grid; grid-template-columns: 3.2rem repeat(24, minmax(22px, 1fr)); gap: 2px; }
.heat-row span { font-size: .7rem; text-align: center; line-height: 24px; height: 24px; }
.heat .hh, .heat .hd { color: var(--muted); }
.heat .hd { text-align: start; }
.heat .hc { border-radius: 4px; background: rgba(16, 78, 140, var(--a)); color: transparent; }
.heat .hc:hover { outline: 2px solid var(--accent); outline-offset: -1px; }
.heat-scale { display: flex; align-items: center; gap: .5rem; font-size: .78rem; margin-top: .5rem; }
.heat-scale i { width: 140px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(16,78,140,.08), rgba(16,78,140,1)); }
[dir="rtl"] .heat-scale i { background: linear-gradient(270deg, rgba(16,78,140,.08), rgba(16,78,140,1)); }
@media print { .an-tabs, .seg-links { display: none; } }

/* ---------------------------------------------------------------- TOU editor */
.tou-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--surface-2); }
.tou-bands td, .tou-bands th { padding: .3rem .4rem; }
.tou-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-inline-end: .3rem; }
.tou-season { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: .75rem; margin-bottom: .75rem; }
.tou-row { display: grid; grid-template-columns: 6.5rem repeat(24, minmax(16px, 1fr)); gap: 2px; margin-top: .5rem; align-items: center; direction: ltr; }
.tou-dt { font-size: .8rem; color: var(--muted); }
.tou-h { height: 26px; border: 0; border-radius: 4px; font-size: .62rem; color: #fff; cursor: crosshair; padding: 0; touch-action: none; }
.tou-h:hover { outline: 2px solid var(--ink); outline-offset: -2px; }
.tou-m { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; font-size: .78rem; cursor: pointer; background: var(--surface); }
.tou-m.on { background: var(--brand); color: #fff; border-color: var(--brand); }
pre.xml { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .75rem; font-size: .74rem; line-height: 1.45; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-all; direction: ltr; text-align: left; }

/* ---------------------------------------------------------------- global search */
.gsearch { position: relative; display: flex; align-items: center; gap: .4rem; flex: 1 1 260px; max-width: 460px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 .6rem; }
.gsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 174, 239, .18); background: var(--surface); }
.gsearch svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.gsearch input { border: 0; background: transparent; padding: .5rem 0; width: 100%; font: inherit; font-size: .9rem; outline: none; box-shadow: none; }
.gs-kbd { font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 .35rem; }
.gsearch:focus-within .gs-kbd { display: none; }
.gs-results { position: absolute; top: calc(100% + 6px); inset-inline: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(20, 38, 43, .16); z-index: 30; max-height: 70vh; overflow: auto; min-width: 320px; }
.gs-results a { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "type main sell" "type sub sell"; column-gap: .6rem;
  padding: .5rem .75rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); align-items: center; }
.gs-results a:hover, .gs-results a.on { background: var(--surface-2); }
.gs-type { grid-area: type; font-size: .68rem; font-weight: 600; border-radius: 5px; padding: .1rem .4rem; background: var(--surface-2); color: var(--muted); text-transform: uppercase; }
.gs-meter { background: var(--water-soft); color: var(--water); } .gs-customer { background: var(--ok-soft); color: var(--ok); }
.gs-receipt { background: var(--gas-soft); color: var(--gas); }
.gs-main { grid-area: main; font-weight: 600; font-size: .9rem; }
.gs-sub { grid-area: sub; font-size: .78rem; color: var(--muted); }
.gs-sell { grid-area: sell; font-size: .75rem; background: var(--brand); color: #fff; border-radius: 6px; padding: .2rem .55rem; }
.gs-results a.gs-all { display: block; text-align: center; font-size: .82rem; color: var(--brand); border-bottom: 0; }
.gs-empty { padding: .75rem; color: var(--muted); font-size: .85rem; }
@media (max-width: 720px) { .gsearch { order: 10; flex-basis: 100%; max-width: none; } .gs-kbd { display: none; } }

.gsearch input { border: 0 !important; background: transparent !important; outline: none !important; padding: .5rem 0 !important; }
dl.kv dd.num, .kv dd { overflow-wrap: anywhere; }
@media (max-width: 1500px) { .top .chip.pos-select { max-width: 250px; } .gsearch { max-width: 360px; } }
@media (max-width: 1380px) and (min-width: 721px) {
  .top .who > span:not(.avatar) { display: none; }
  .gsearch { flex: 1 1 180px; min-width: 0; }
  .top .chip.pos-select select { max-width: 150px; }
}

/* tabs (About, Notifications & alarms) */
.tab-link { padding: .55rem .9rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tab-link:hover { color: inherit; }
.tab-link.on { color: var(--brand, #104E8C); border-bottom-color: var(--brand, #104E8C); }
.alarm-bell svg { color: var(--err); }

/* ---------- customisable dashboard (1.5.0) ---------- */
.dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.dcard { position: relative; min-width: 0; }
.dash > .dcard.panel { margin: 0; }
.dcard.w1 { grid-column: span 1; } .dcard.w2 { grid-column: span 2; } .dcard.w4 { grid-column: 1 / -1; }
.dcard.k-kpi .l { font-size: .85rem; color: var(--muted); }
.dcard.k-kpi .v { font-size: 1.7rem; font-weight: 700; margin: .2rem 0; font-variant-numeric: tabular-nums; }
.dcard.k-kpi .v.alert { color: var(--err); }
.dcard.k-kpi .sub { display: flex; flex-wrap: wrap; gap: .35rem .7rem; font-size: .82rem; }
.dcard .dlink { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.dcard .dlink:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.dcard .delta { font-size: .8rem; font-weight: 600; }
.dcard .delta.up { color: var(--ok); } .dcard .delta.down { color: var(--err); }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.dhead h2 { margin: 0; font-size: 1rem; }
.seg-tabs { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.seg-tabs a { padding: .25rem .75rem; border-radius: 999px; font-size: .85rem; color: var(--ink); white-space: nowrap; }
.seg-tabs a:hover { text-decoration: none; background: var(--surface); }
.seg-tabs a.on { background: var(--brand); color: #fff; }
.ch-hbars { display: flex; flex-direction: column; gap: .35rem; }
.ch-hbars .hb { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; gap: .6rem; align-items: center; font-size: .85rem; color: var(--ink); }
.ch-hbars a.hb:hover { text-decoration: none; background: var(--surface-2); border-radius: 6px; }
.ch-hbars .hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-hbars .hb-t { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.ch-hbars .hb-t i { display: block; height: 100%; border-radius: 6px; }
.ch-hbars .hb-v { color: var(--muted); font-size: .8rem; }
.ch-donut { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ch-donut svg { flex: none; width: 124px; height: 124px; }
.dhint { font-size: .78rem; margin: -.25rem 0 .4rem; }
.ch-donut-t { font-size: 15px; font-weight: 700; fill: var(--ink); font-family: var(--font); }
.ch-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; min-width: 130px; flex: 1; }
.ch-legend li { display: flex; align-items: center; gap: .45rem; }
.ch-legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.ch-legend .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-legend .num { color: var(--muted); }
@media (max-width: 1100px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dcard.w2 { grid-column: 1 / -1; } }
@media (max-width: 640px) { .dash { grid-template-columns: minmax(0, 1fr); } .dcard.w1, .dcard.w2 { grid-column: 1 / -1; } }
/* dashboard editor */
.dw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.dw-list li { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.dw-list li .nm { flex: 1; min-width: 0; }
.dw-list li .nm small { display: block; color: var(--muted); }
.dw-list li select { width: auto; }
.dw-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .4rem; }
.dw-cat button { text-align: start; justify-content: flex-start; }
.dw-cat button[disabled] { opacity: .45; }
.dw-cat button svg { flex: none; }
/* 1.5.0: the utility selector shares the top bar — keep it on one line on laptop screens */
@media (max-width: 1600px) and (min-width: 721px) {
  .top { gap: .5rem; }
  .gsearch { flex: 1 1 170px; min-width: 0; }
  .top .chip.pos-select { max-width: 220px; }
  .top .chip.pos-select select { max-width: 170px; }
  .top .who > span:not(.avatar) { display: none; }
}
@media (max-width: 1100px) and (min-width: 721px) { .util-switch button { padding: .2rem .5rem; } }

/* Help → Troubleshooting (1.5.1) */
.kb-toc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem 1.5rem; }
.kb-toc ul { margin: .25rem 0 .75rem; padding-inline-start: 1.1rem; font-size: .88rem; }
.kb-toc li { margin: .1rem 0; }
.kb-sec { margin: 1.5rem 0 .5rem; font-size: 1.1rem; }
.kb-art { margin-bottom: .5rem; scroll-margin-top: 4.5rem; }
.kb-art > summary { cursor: pointer; }
.kb-body { margin-top: .5rem; line-height: 1.55; }
.kb-body h4 { margin: 1rem 0 .3rem; font-size: .95rem; color: var(--muted, #555); }
.kb-body ul, .kb-body ol { padding-inline-start: 1.3rem; }
.kb-code { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; overflow-x: auto; font-size: .82rem; text-align: left; }
.kb-body code { font-size: .85em; }
.kb-body p code, .kb-body li code { background: var(--surface-2); padding: 0 .25rem; border-radius: 3px; unicode-bidi: isolate; direction: ltr; }
.chip.help-btn { text-decoration: none; color: inherit; }
.chip.help-btn svg { width: 16px; height: 16px; }
@media (max-width: 1600px) { .chip.help-btn span { display: none; } }

/* AI assistant (1.6.0) */
.ai-chat { display: flex; flex-direction: column; gap: .75rem; }
.ai-log { display: flex; flex-direction: column; gap: .75rem; max-height: 62vh; min-height: 260px; overflow-y: auto; padding: .25rem; }
.ai-msg { max-width: 88%; border-radius: var(--radius-sm); padding: .6rem .85rem; line-height: 1.55; }
.ai-msg p { margin: .25rem 0; }
.ai-msg ol, .ai-msg ul { margin: .25rem 0; padding-inline-start: 1.3rem; }
.ai-user { align-self: flex-end; background: var(--brand); color: #fff; }
.ai-bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); }
.ai-who { font-size: .72rem; opacity: .75; margin-bottom: .15rem; }
.ai-msg code { background: rgba(127,127,127,.15); padding: 0 .25rem; border-radius: 3px; }
.ai-src { font-size: .78rem; margin-top: .4rem; }
.ai-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.ai-chips .chip { cursor: pointer; font: inherit; font-size: .85rem; }
.ai-form { display: flex; gap: .5rem; align-items: flex-end; }
.ai-form textarea { flex: 1; resize: vertical; min-height: 2.6rem; }
.ai-note { font-size: .78rem; margin: 0; }
.ai-wait::after { content: ' …'; animation: aiblink 1.2s infinite; }
@keyframes aiblink { 50% { opacity: .2; } }
@media (max-width: 700px) { .ai-msg { max-width: 100%; } .ai-form { flex-direction: column; align-items: stretch; } }
.ai-msg pre code { background: none; padding: 0; }
.ai-msg pre { margin: .4rem 0; }

/* AI revenue risk and anomalies (1.7.0) */
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ai-kpis a.panel { text-decoration: none; color: inherit; }
.ai-kpis a.panel:hover { border-color: var(--brand); }
.ai-score { font-weight: 700; min-width: 2.4rem; text-align: center; font-variant-numeric: tabular-nums; }
.ai-reasons ul { margin: 0; padding-inline-start: 1rem; font-size: .86rem; line-height: 1.45; }
.ai-case-form { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.ai-case-form select, .ai-case-form input { font-size: .82rem; padding: .25rem .4rem; min-width: 0; }
.ai-case-form input { width: 11rem; }
.ai-big { font-size: 2.4rem; font-weight: 800; width: 4.5rem; height: 4.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 3px solid var(--line); font-variant-numeric: tabular-nums; }
.ai-big.high { border-color: var(--err); color: var(--err); } .ai-big.medium { border-color: #D68910; color: #A65F00; }
.ai-notes { white-space: pre-wrap; font-size: .82rem; background: var(--surface-2); padding: .5rem .7rem; border-radius: var(--radius-sm); }
@media (max-width: 1100px) { .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ai-case-form select { width: auto; max-width: 13rem; }
.ai-sum-list { line-height: 1.7; padding-inline-start: 1.2rem; }
.ai-sum-list li { margin: .25rem 0; }
.ai-summary h3 { margin: 1.25rem 0 .5rem; }
/* 1.10.0 AI operations */
.ait-blocks { border-collapse: collapse; }
.ait-blocks th, .ait-blocks td { padding: .25rem .4rem; text-align: start; }
.ait-blocks input { width: 9rem; }
.ai-group { margin-bottom: .6rem; }
.ai-group textarea[readonly], .ai-group input[readonly] { background: var(--surface-2); }
tr.sel td { background: var(--surface-2); }
.log-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.log-filter .field { margin: 0; }
.log-pre { white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: .8rem; max-height: 70vh; overflow: auto; margin: 0; padding: .75rem; }

/* ---------- 1.15.1: tabbed workspace (same as ITEC HES 1.43.0) ---------- */
.ws .shell { height: 100vh; height: 100dvh; min-height: 0; }
.ws .main { height: 100vh; height: 100dvh; overflow: hidden; }
.ws .top { position: static; }
.tabbar {
  display: flex; align-items: stretch; gap: .25rem; background: var(--surface-2); border-bottom: 1px solid var(--line);
  padding: .35rem .5rem 0; min-height: 40px; flex: none;
}
.tabs-list { display: flex; align-items: flex-end; gap: 2px; overflow-x: auto; overflow-y: hidden; flex: 1; min-width: 0; scrollbar-width: thin; }
.tab {
  display: inline-flex; align-items: center; gap: .4rem; max-width: 220px; min-width: 96px; height: 34px; flex: none;
  padding: 0 .35rem 0 .7rem; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
  color: var(--muted); font-size: .85rem; cursor: pointer; user-select: none; position: relative;
}
[dir="rtl"] .tab { padding: 0 .7rem 0 .35rem; }
.tab:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); }
.tab[aria-selected="true"] {
  background: var(--bg); border-color: var(--line); color: var(--ink); font-weight: 600; margin-bottom: -1px; height: 35px;
  box-shadow: inset 0 2px 0 var(--accent);
}
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tab .tab-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tab .tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .55; flex: none; }
.tab.loading .tab-dot { background: var(--accent); opacity: 1; animation: tabpulse .9s ease-in-out infinite; }
@keyframes tabpulse { 50% { transform: scale(.45); opacity: .4; } }
.tab .tab-x {
  border: 0; background: transparent; color: inherit; width: 20px; height: 20px; border-radius: 5px; padding: 0;
  display: grid; place-items: center; cursor: pointer; font-size: 15px; line-height: 1; opacity: .6; flex: none;
}
.tab .tab-x:hover { background: color-mix(in srgb, var(--ink) 12%, transparent); opacity: 1; }
.tabs-tools { display: flex; align-items: center; gap: 2px; padding-bottom: .3rem; flex: none; }
.tab-tool {
  border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 7px; padding: 6px; cursor: pointer;
}
.tab-tool:hover { background: var(--surface); color: var(--ink); }
.tab-tool svg { width: 18px; height: 18px; display: block; }
[dir="rtl"] .tab-tool[data-tabs="reload"] svg, [dir="rtl"] .tab-tool[data-tabs="window"] svg { transform: scaleX(-1); }
.tabframes { position: relative; flex: 1; min-height: 0; background: var(--bg); }
.tabframes iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
/* a page inside a tab */
html.in-frame body { background: var(--bg); }
@media (max-width: 860px) {
  .tab { min-width: 80px; max-width: 160px; }
  .tabs-tools .tab-tool[data-tabs="window"], .tabs-tools .tab-tool[data-tabs="others"] { display: none; }
}
@media print { .tabbar, .side, .top { display: none !important; } }

/* 1.25.0 (REV1-20): AI hint icon in vendor tables */
.ai-hint svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--accent); }

/* Vendors management & monitoring tab strip (VMT-1) */
.vmt-tabs { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; border-bottom: 1px solid var(--line); margin: 0 0 1rem; }
.vmt-group { display: flex; align-items: flex-end; gap: .1rem; overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.vmt-glabel { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 .4rem .65rem 0; white-space: nowrap; }
.vmt-group .tab-link { white-space: nowrap; padding: .5rem .7rem; }
@media print { .vmt-tabs { display: none; } }
.vmt-tabs .vmt-provider { margin-inline-start: auto; display: flex; align-items: center; }
.vmt-tabs .vmt-provider label { display: flex; gap: .4rem; align-items: center; font-size: .85rem; }

/* VMT-6: the bell flashes while something new waits (approvals, alarms) until Notifications is opened */
@keyframes bell-flash { 0%, 100% { background: transparent; } 50% { background: color-mix(in srgb, var(--err) 22%, transparent); } }
.alarm-bell.bell-flash { animation: bell-flash 1.1s ease-in-out infinite; border-color: var(--err); }
@media (prefers-reduced-motion: reduce) { .alarm-bell.bell-flash { animation: none; background: color-mix(in srgb, var(--err) 18%, transparent); } }
.signin-notice { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }

/* ---------------------------------------------------------------- 1.34.0 (RPT-1, RPT-2): report charts, exports, PDF */
.rpt-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .86rem; color: var(--muted); margin: -.35rem 0 1rem; }
.rpt-meta b { color: var(--ink); font-weight: 600; }
.rpt-exports { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.rpt-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.rpt-charts .panel { margin: 0; min-width: 0; }
.rpt-charts .panel.wide { grid-column: 1 / -1; }
.rpt-charts h3 { font-size: .95rem; margin: 0 0 .75rem; font-weight: 600; }
.rpt-charts .ch-legend.row { flex-direction: row; min-width: 0; margin-bottom: .5rem; }
.rpt-head { display: none; }
body.print-mode .side, body.print-mode .top, body.print-mode .no-print, body.print-mode .lic-banner,
body.print-mode .flash, body.print-mode .tabbar { display: none !important; }
body.print-mode .shell { display: block; }
body.print-mode .content { max-width: none; padding: 1rem 1.25rem; }
body.print-mode .rpt-head { display: flex; align-items: center; gap: 1rem; border-bottom: 2px solid var(--brand);
  padding-bottom: .75rem; margin-bottom: 1rem; }
body.print-mode .rpt-head img { height: 54px; width: auto; }
body.print-mode .rpt-head div { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; color: var(--muted); }
body.print-mode .rpt-head div b { font-size: 1.05rem; color: var(--ink); }
body.print-mode .rpt-head button { margin-inline-start: auto; }
body.print-mode .table-wrap { overflow: visible; }
body.print-mode { page: report; }
@page report { size: A4 landscape; margin: 12mm; }
@media print {
  body.print-mode { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rpt-charts { grid-template-columns: repeat(2, 1fr); }
  .rpt-charts .panel, tr { break-inside: avoid; }
  .rpt-exports { display: none; }
  thead { display: table-header-group; }
  .panel { box-shadow: none; }
}
