#admin-bi {
  --bi-line:#d4e1e5;
  --bi-ink:#112c3d;
  --bi-muted:#4c6675;
  width:min(1220px, 94vw);
  max-width:94vw;
  max-height:92dvh;
  padding:0;
  border:1px solid #88a9b7;
  border-radius:12px;
  color:var(--bi-ink);
  background:#eff4f6;
  overscroll-behavior:contain;
  font-variant-numeric:tabular-nums;
}
#admin-bi .bi-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:21px clamp(16px,2.5vw,32px);
  color:#edfaff;
  background:linear-gradient(110deg,#0b1d2e,#143347 82%,#153e4a);
  border-bottom:3px solid #5bced3;
}
.bi-head h2 {font-size:clamp(23px,2vw,32px);margin:0;line-height:1.2}
.bi-head p {margin:5px 0 0;color:#b7d0dd;font-size:13px}
.bi-head p:empty {display:none}
.bi-exit, .bi-action, .bi-periods button {
  border:1px solid #b7cbd3;
  background:white;
  color:#0b4f65;
  font-size:13px;
  font-weight:620;
  line-height:1.3;
  border-radius:5px;
  padding:8px 13px;
  white-space:nowrap;
  min-height:34px;
}
.bi-action:enabled:hover {background:#e4f4f5}
.bi-exit {background:transparent;border-color:#688894;color:#edfaff}
.bi-exit:hover {background:#23495b}
.bi-toolbar {padding:16px clamp(12px,2.5vw,32px);display:flex;justify-content:space-between;gap:8px;align-items:center}
.bi-periods {display:flex;align-items:stretch;border:1px solid #b7cbd3;border-radius:6px;background:white;padding:2px}
.bi-periods button {border:0;min-height:29px;padding:5px clamp(7px,1vw,15px);background:transparent}
.bi-periods button[aria-pressed=true] {background:#143b4e;color:white}
.bi-status {padding:14px 20px;margin:0 clamp(12px,2.5vw,32px) 18px;background:white;border-left:3px solid #16868d;color:#304e5b}
#bi-results {padding:0 clamp(12px,2.5vw,32px) 12px}
.bi-metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin:0 0 16px;
  border:1px solid #284e5d;
  border-radius:8px;
  background:linear-gradient(106deg,#153849,#113044 75%,#17404c);
  color:#f2fbff;
  padding:15px 0;
}
.bi-metrics>div {padding:3px clamp(12px,1.5vw,21px);border-left:1px solid #3c5e6c}
.bi-metrics>div:first-child {border-left:0}
.bi-metrics dt {font-size:13px;line-height:1.4;color:#c8e3ec}
.bi-metrics dd {font:650 clamp(22px,2.1vw,35px)/1.25 "DM Sans","Microsoft YaHei UI",sans-serif;font-variant-numeric:tabular-nums;margin:8px 0 4px;overflow-wrap:anywhere;letter-spacing:-.035em}
.bi-metrics>div:nth-child(3) dd {color:#8ce9dc}
.bi-metrics small {display:block;color:#c3d9e1;font-size:12px;line-height:1.4}
.bi-middle {display:grid;grid-template-columns:minmax(0,1.55fr) minmax(270px,1fr);gap:14px;margin-bottom:14px;align-items:start}
.bi-section {min-width:0;border:1px solid var(--bi-line);border-radius:8px;background:#fff;padding:clamp(14px,1.5vw,22px)}
.bi-section-head {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-bottom:15px}
.bi-section h3 {font-size:19px;line-height:1.4;margin:0;color:var(--bi-ink)}
.bi-section h4 {font-size:14px;margin:14px 0 5px}
.bi-section-head select {width:auto;min-width:98px;margin:0;padding:3px 8px;min-height:33px;font-size:13px}
.bi-axis {display:flex;justify-content:space-between;font-size:12px;color:var(--bi-muted)}
#bi-chart svg {width:100%;height:108px;display:block}
.bi-trend-detail,.bi-worker details {font-size:13px;color:#125771;margin-top:12px}
.bi-trend-detail summary,.bi-worker summary {width:fit-content;cursor:pointer;font-weight:650}
.bi-trend-detail .bi-scroll {max-height:235px;margin-top:12px}
.bi-badge {display:inline-flex;align-items:center;gap:6px;border-radius:20px;background:#eef2f4;color:#495d69;padding:3px 9px;font-size:12px}
.bi-badge::before {content:"";width:7px;height:7px;border-radius:50%;background:#788a93}
.bi-badge[data-online=true] {background:#ddf4ed;color:#155844}
.bi-badge[data-online=true]::before {background:#17846b}
.bi-credit-line,.bi-window-label {display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap;font-size:14px}
.bi-credit-line a {color:#11677f;font-size:13px}
.bi-balance-number {display:block;color:#154a5b;font-size:24px;line-height:1.3;margin-top:4px}
.bi-note,.bi-window small,.bi-pager {color:var(--bi-muted);font-size:12px;line-height:1.5}
.bi-note {margin:6px 0}
.bi-window {margin-top:8px}
.bi-window progress {display:block;width:100%;height:7px;accent-color:#21888c;margin:4px 0}
#bi-balance-form {margin:9px 0 0;padding:12px;border-radius:6px;background:#f0f6f7}
#bi-balance-form label {margin:0 0 8px;font-size:13px}
#bi-balance-form input {margin:3px 0 0;padding:5px 9px}
#bi-balance-feedback {margin:5px 0 0;color:#465c68}
#bi-search {display:flex;align-items:center;gap:5px;margin:0;max-width:100%}
#bi-search input {width:155px;max-width:100%;margin:0;padding:5px 9px;font-size:14px;line-height:1.4;min-height:34px}
.bi-accounts .bi-section-head {margin-bottom:4px}
.bi-scroll {overflow:auto;max-width:100%;scrollbar-width:thin}
.bi-scroll table {border-collapse:collapse;width:100%;color:var(--bi-ink);font-size:13px;text-align:right;font-variant-numeric:tabular-nums}
.bi-scroll th,.bi-scroll td {padding:9px 7px;white-space:nowrap;border:0;border-bottom:1px solid var(--bi-line);text-align:right}
.bi-scroll th:first-child,.bi-scroll td:first-child {text-align:left}
.bi-scroll thead th {background:#edf4f6;font-weight:600;color:#486170;font-size:12px}
.bi-scroll tbody tr:hover {background:#f4f9fa}
.bi-scroll tbody th {font-weight:600;white-space:normal;overflow-wrap:anywhere;min-width:108px}
.bi-scroll small {display:block;font-size:11px;color:var(--bi-muted);font-weight:400}
.bi-scroll td.bi-empty {text-align:center;padding:23px 7px;color:var(--bi-muted)}
.bi-pager {display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:12px}
.bi-pager span {margin-right:auto}
.bi-asof {text-align:right;margin:9px 0 0}
@media(max-width:780px){
  .bi-metrics {grid-template-columns:repeat(2,minmax(0,1fr));row-gap:14px}
  .bi-metrics>div:nth-child(3) {border-left:0}
  .bi-middle {grid-template-columns:1fr}
  .session-bar:has(#manage-bi:not([hidden])) {flex-wrap:wrap;justify-content:flex-end}
}
@media(max-width:540px){
  #admin-bi {width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
  #admin-bi .bi-head {padding:14px 16px}
  .bi-metrics {margin-bottom:12px}
  .bi-section-head h3 {font-size:17px}
  .bi-toolbar {gap:4px}
  .bi-periods button,.bi-toolbar>.bi-action {font-size:12px;padding-left:7px;padding-right:7px}
  .bi-head h2 {font-size:23px}
}
