/* BEAR MINING brand layer. Layout metrics from the supplied GMiner UI stay intact. */
.ant-pro-global-header-logo > a > svg {
  display: none !important;
}

.ant-pro-global-header-logo > a {
  color: inherit !important;
}

@media (min-width: 768px) {
  .ant-pro-global-header-logo {
    width: 224px;
  }

  .ant-pro-global-header-logo > a {
    width: 100%;
    justify-content: center;
  }
}

.ant-pro-global-header-logo > a::before {
  width: 46.08px;
  height: 46.08px;
  flex: 0 0 46.08px;
  content: "";
  background-image: url("./bear-mining-header-logo.png");
  background-repeat: no-repeat;
  background-position: -5.31px -16.69px;
  background-size: 55.60px 78.64px;
}

.ant-pro-global-header-logo > a > h1 {
  margin: 0 0 0 16px;
  color: inherit !important;
  font-size: 0 !important;
}

.ant-pro-global-header-logo > a > h1::after {
  content: "BEAR MINING";
  color: currentColor;
  opacity: 0.78;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-rendering: geometricPrecision;
  white-space: nowrap;
}

.ant-layout-sider {
  display: flex;
  flex-direction: column;
}

.bm-sidebar-links {
  display: grid;
  gap: 2px;
  width: calc(100% - 24px);
  margin: auto 12px 32px;
  padding-top: 24px;
  font-size: 12px;
}

.bm-sidebar-links__separator {
  height: 12px;
  margin: 2px 6px 6px;
}

.bm-sidebar-links__separator--telegram {
  height: 15px;
  margin-bottom: 6px;
}

.bm-sidebar-link {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 36px;
  padding: 7px 16px;
  overflow: hidden;
  color: inherit !important;
  line-height: 18px;
  text-decoration: none !important;
  border: 0;
  border-radius: 6px;
  background: transparent;
  transition: background-color 140ms ease;
}

.bm-sidebar-link:hover,
.bm-sidebar-link:focus-visible,
.bm-sidebar-link.is-active {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.bm-sidebar-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.bm-sidebar-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-right: 8px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bm-sidebar-link[data-bm-href^="https://t.me/"] + .bm-sidebar-link[data-bm-href^="https://t.me/"] {
  margin-top: 2px;
}

.bm-sidebar-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-log-workspace {
  cursor: default;
  position: relative;
  min-height: 620px;
  overflow: auto;
}

.bm-log-workspace > table {
  display: none !important;
}

.bm-log-analyzer {
  --log-hint-color: currentColor;
  --log-blue: #3f8ee8;
  --log-red: #e4565d;
  --log-amber: #d99a3e;
  --log-surface: color-mix(in srgb, currentColor 4%, transparent);
  --log-border: color-mix(in srgb, currentColor 16%, transparent);
  min-height: 618px;
  padding: 28px;
  color: inherit;
  cursor: default;
}

.bm-log-page .bm-log-filter {
  padding: 5px 7px;
  border-radius: 6px;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.bm-log-page .bm-log-filter:has(input:checked) {
  background: color-mix(in srgb, var(--log-blue, #3f8ee8) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--log-blue, #3f8ee8) 28%, transparent);
}

.bm-log-page input[type="checkbox"] {
  accent-color: var(--log-blue, #3f8ee8);
}

.bm-log-page .bm-log-pdf-button[aria-busy="true"] {
  cursor: progress;
}

.bm-log-native-toolbar {
  justify-content: flex-start !important;
  gap: 8px;
}

.bm-log-native-toolbar > input {
  min-width: 220px;
  flex: 1 1 auto;
}

.bm-log-native-filters {
  flex: 0 0 auto;
}

.bm-log-native-monitoring-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  flex: 0 0 auto;
  color: inherit !important;
  border: 1px solid var(--log-border, color-mix(in srgb, currentColor 16%, transparent));
  border-radius: 6px;
  background: color-mix(in srgb, var(--log-blue, #3f8ee8) 8%, transparent);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.bm-log-native-monitoring-button:hover {
  border-color: var(--log-blue, #3f8ee8);
  background: color-mix(in srgb, var(--log-blue, #3f8ee8) 15%, transparent);
  transform: translateY(-1px);
}

.bm-log-native-monitoring-button:focus-visible {
  outline: 2px solid var(--log-blue, #3f8ee8);
  outline-offset: 2px;
}

.bm-log-native-monitoring-button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: currentColor;
}

.bm-log-analyzer button,
.bm-log-analyzer input {
  font: inherit;
}

.bm-log-upload,
.bm-log-processing,
.bm-log-failure,
.bm-log-dashboard {
  display: none;
}

.bm-log-analyzer[data-phase="loading"] .bm-log-upload,
.bm-log-analyzer[data-phase="idle"] .bm-log-upload {
  display: flex;
}

.bm-log-analyzer[data-phase="processing"] .bm-log-processing {
  display: flex;
}

.bm-log-analyzer[data-phase="failure"] .bm-log-failure {
  display: grid;
}

.bm-log-analyzer[data-phase="ready"] .bm-log-dashboard {
  display: block;
}

.bm-log-analyzer[data-phase="ready"][data-view="errors"] .bm-log-dashboard {
  display: none;
}

.bm-log-analyzer[data-phase="ready"][data-view="errors"] .bm-log-errors-view {
  display: block;
}

.bm-log-upload {
  position: relative;
  isolation: isolate;
  min-height: 558px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  text-align: center;
  border: 1px dashed var(--log-border);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--log-blue) 6%, transparent), transparent 52%),
    var(--log-surface);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.bm-log-upload.is-dragging {
  border-color: var(--log-blue);
  background-color: color-mix(in srgb, var(--log-blue) 9%, transparent);
}

.bm-log-upload__glow {
  position: absolute;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--log-blue) 11%, transparent);
  filter: blur(54px);
}

.bm-log-upload__button,
.bm-log-replace,
.bm-log-pagination button {
  appearance: none;
  color: inherit;
  border: 1px solid var(--log-border);
  background: color-mix(in srgb, currentColor 6%, transparent);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.bm-log-upload__button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 22px;
  font-size: 18px;
  font-weight: 700;
  border-color: color-mix(in srgb, var(--log-blue) 62%, var(--log-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--log-blue) 16%, transparent);
  box-shadow: 0 12px 36px color-mix(in srgb, var(--log-blue) 16%, transparent);
}

.bm-log-upload__button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bm-log-upload__button:hover,
.bm-log-replace:hover,
.bm-log-pagination button:not(:disabled):hover {
  border-color: var(--log-blue);
  background-color: color-mix(in srgb, var(--log-blue) 14%, transparent);
  transform: translateY(-1px);
}

.bm-log-upload__button:focus-visible,
.bm-log-replace:focus-visible,
.bm-log-pagination button:focus-visible {
  outline: 2px solid var(--log-blue);
  outline-offset: 3px;
}

.bm-log-upload__truth {
  margin: 15px 0 0;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.82;
}

.bm-log-upload__hint {
  margin: 8px 0 0;
  font-size: 12px;
  opacity: 0.55;
}

.bm-log-processing {
  min-height: 558px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  border: 1px solid var(--log-border);
  border-radius: 14px;
  background: var(--log-surface);
}

.bm-log-processing__mark {
  display: flex;
  gap: 7px;
  margin-bottom: 24px;
}

.bm-log-processing__mark span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--log-blue);
  animation: bm-log-pulse 1.15s ease-in-out infinite;
}

.bm-log-processing__mark span:nth-child(2) { animation-delay: 120ms; }
.bm-log-processing__mark span:nth-child(3) { animation-delay: 240ms; }

.bm-log-processing strong {
  font-size: 18px;
}

.bm-log-processing small {
  max-width: 440px;
  margin-top: 9px;
  line-height: 1.55;
  opacity: 0.6;
}

.bm-log-processing__bar {
  width: min(360px, 72%);
  height: 4px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.bm-log-processing__bar i {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: var(--log-blue);
  animation: bm-log-progress 1.5s ease-in-out infinite;
}

.bm-log-failure {
  min-height: 558px;
  place-items: center;
  padding: 28px;
  border: 1px solid var(--log-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--log-red) 10%, transparent), transparent 38%),
    linear-gradient(145deg, color-mix(in srgb, currentColor 3%, transparent), transparent 64%),
    var(--log-surface);
}

.bm-log-failure__card {
  width: min(620px, 100%);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--log-border);
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 4%, transparent);
  box-shadow: 0 24px 70px color-mix(in srgb, #000 16%, transparent);
}

.bm-log-failure__card h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.2;
}

.bm-log-failure__card p {
  margin: 14px 0 0;
  line-height: 1.65;
  opacity: 0.72;
}

.bm-log-failure__card .bm-log-failure__lead {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.94;
}

.bm-log-failure__links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.bm-log-failure__links a,
.bm-log-failure__card button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  color: inherit;
  border: 1px solid var(--log-border);
  border-radius: 7px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.bm-log-failure__links a:hover,
.bm-log-failure__card button:hover {
  color: inherit;
  border-color: color-mix(in srgb, var(--log-blue) 65%, var(--log-border));
  background-color: color-mix(in srgb, var(--log-blue) 9%, transparent);
  transform: translateY(-1px);
}

.bm-log-failure__links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.bm-log-failure__card .bm-log-failure__signature {
  margin-top: 22px;
  font-size: 12px;
  font-weight: 650;
  opacity: 0.56;
}

.bm-log-failure__card > button {
  margin-top: 24px;
  border-color: color-mix(in srgb, var(--log-blue) 55%, var(--log-border));
}

.bm-log-toast {
  position: sticky;
  z-index: 20;
  top: 10px;
  width: fit-content;
  max-width: min(560px, calc(100% - 24px));
  margin: 0 auto -48px;
  padding: 10px 15px;
  line-height: 1.4;
  border: 1px solid var(--log-border);
  border-radius: 8px;
  background: color-mix(in srgb, #151b22 92%, transparent);
  color: #f7fbff;
  box-shadow: 0 12px 36px rgb(0 0 0 / 20%);
}

.bm-log-toast[data-tone="success"] { border-color: color-mix(in srgb, var(--log-blue) 70%, transparent); }
.bm-log-toast[data-tone="error"] { border-color: color-mix(in srgb, var(--log-red) 75%, transparent); }

.bm-log-dashboard__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 0;
  margin-bottom: 8px;
}

.bm-log-dashboard__overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.bm-log-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--log-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.bm-log-records__header h3 {
  margin: 0;
  color: inherit;
  font-weight: 750;
}

.bm-log-replace {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.bm-log-summary {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.bm-log-summary article,
.bm-log-chart,
.bm-log-records {
  border: 1px solid var(--log-border);
  border-radius: 9px;
  background:
    linear-gradient(145deg, color-mix(in srgb, currentColor 2.4%, transparent), transparent 58%),
    var(--log-surface);
  box-shadow: 0 12px 34px color-mix(in srgb, #000 8%, transparent);
}

.bm-log-summary article {
  display: flex;
  box-sizing: border-box;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  flex-direction: column;
  text-align: center;
}

.bm-log-summary span {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.68;
}

.bm-log-summary small {
  font-size: 8px;
  line-height: 1.2;
  opacity: 0.68;
}

.bm-log-summary strong {
  margin: 4px 0 2px;
  overflow: hidden;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1;
  text-overflow: ellipsis;
}

.bm-log-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.bm-log-chart {
  position: relative;
  min-width: 0;
  padding: 7px 13px 5px;
}

.bm-log-chart__header {
  position: relative;
  min-height: 78px;
  margin: 0 4px;
}

.bm-log-chart__context {
  min-width: 0;
  text-align: center;
}

.bm-log-chart__context .bm-log-eyebrow {
  margin-bottom: 4px;
}

.bm-log-chart__context h2 {
  margin: 0;
  color: inherit;
  font-size: 20px;
  font-weight: 750;
}

.bm-log-chart__context p {
  margin: 4px 0 0;
  font-size: 10px;
  opacity: 0.62;
}

.bm-log-chart__legend {
  position: absolute;
  bottom: 1px;
  left: 7.1%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 9px 17px;
  font-size: 14px;
  line-height: 1.2;
  opacity: 0.82;
}

.bm-log-chart__legend span { display: inline-flex; align-items: center; gap: 7px; }
.bm-log-chart__legend i { width: 20px; height: 3px; background: var(--series-color); }

.bm-log-chart__plot { position: relative; }

.bm-log-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.bm-log-chart__grid line {
  stroke: color-mix(in srgb, currentColor 11%, transparent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.bm-log-chart__grid text {
  fill: currentColor;
  font-size: 13.2px;
  opacity: 0.54;
}

.bm-log-chart__band {
  fill: color-mix(in srgb, var(--series-color) 15%, transparent);
  stroke: none;
}

.bm-log-chart__curve {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.bm-log-chart__axis { fill: var(--series-color) !important; opacity: 0.86 !important; }

.bm-log-chart__hit-area {
  fill: transparent;
  pointer-events: all;
  cursor: pointer;
}

.bm-log-chart[data-chart-hovered="true"] .bm-log-chart__plot {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--log-blue) 34%, transparent);
}

.bm-log-chart__hit-area:focus-visible {
  outline: none;
  stroke: color-mix(in srgb, var(--log-blue) 82%, white);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.bm-log-chart__focus {
  pointer-events: none;
}

.bm-log-chart__focus-band {
  fill: color-mix(in srgb, var(--log-blue) 11%, transparent);
  stroke: color-mix(in srgb, var(--log-blue) 30%, transparent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.bm-log-chart__focus line {
  stroke: color-mix(in srgb, var(--log-blue) 78%, white);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.bm-log-chart__focus-marker {
  fill: var(--log-surface);
  stroke: var(--series-color);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--series-color) 70%, transparent));
}

.bm-log-chart__tooltip {
  position: absolute;
  z-index: 4;
  top: -10px;
  right: 8px;
  width: min(414px, 39.1%);
  max-width: calc(100% - 16px);
  padding: 6px 9px;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--log-blue) 42%, var(--log-border));
  border-radius: 9px;
  background: color-mix(in srgb, var(--log-surface) 94%, transparent);
  box-shadow: 0 14px 37px color-mix(in srgb, #000 20%, transparent);
  backdrop-filter: blur(10px);
  font-size: 11.5px;
  line-height: 1.25;
}

.bm-log-chart__tooltip time,
.bm-log-chart__tooltip strong,
.bm-log-chart__tooltip small { display: block; }
.bm-log-chart__tooltip time { margin-bottom: 3px; font-weight: 800; }
.bm-log-chart__tooltip span { display: inline-flex; align-items: center; gap: 8px; margin: 2px 14px 0 0; }
.bm-log-chart__tooltip span i { width: 21px; height: 3.5px; flex: 0 0 21px; background: var(--series-color); }
.bm-log-chart__tooltip strong { margin-top: 4px; color: var(--log-red); }
.bm-log-chart__tooltip small { margin-top: 4px; color: var(--log-hint-color); opacity: 1; }
.bm-log-analyzer[data-log-theme="light"] { --log-hint-color: #000; }
.bm-log-analyzer[data-log-theme="dark"] { --log-hint-color: #fff; }

.bm-log-chart--empty {
  min-height: 277px;
}

.bm-log-chart__empty,
.bm-log-records__empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  opacity: 0.56;
}

.bm-log-records {
  overflow: hidden;
}

.bm-log-records__viewport {
  position: relative;
  height: clamp(164px, 28vh, 360px);
}

.bm-log-records__list {
  box-sizing: border-box;
  height: 100%;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

.bm-log-records__list::-webkit-scrollbar { width: 0; height: 0; }

.bm-log-records__scroll-indicator {
  box-sizing: border-box;
  position: absolute;
  z-index: 2;
  top: 7px;
  right: 4px;
  bottom: 7px;
  width: 8px;
  padding: 1px;
  overflow: hidden;
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 7%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 13%, transparent);
  opacity: 0.84;
  cursor: ns-resize;
  touch-action: none;
  transition: opacity 120ms ease, background-color 120ms ease;
}

.bm-log-records__scroll-indicator i {
  display: block;
  width: 100%;
  min-height: 30px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--log-blue) 78%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, white 20%, transparent);
  transition: transform 90ms ease-out, height 120ms ease-out, background-color 120ms ease, box-shadow 120ms ease;
  pointer-events: none;
}

.bm-log-records__viewport:hover .bm-log-records__scroll-indicator,
.bm-log-records__scroll-indicator.is-scrolling {
  background: color-mix(in srgb, var(--log-blue) 13%, transparent);
  opacity: 1;
}

.bm-log-records__scroll-indicator.is-scrolling i {
  background: color-mix(in srgb, var(--log-blue) 92%, white);
  box-shadow: 0 0 5px color-mix(in srgb, var(--log-blue) 34%, transparent);
}

.bm-log-records__scroll-indicator.is-dragging {
  background: color-mix(in srgb, var(--log-blue) 16%, transparent);
  opacity: 1;
}

.bm-log-records__scroll-indicator.is-dragging i {
  background: color-mix(in srgb, var(--log-blue) 96%, white);
  box-shadow: 0 0 6px color-mix(in srgb, var(--log-blue) 40%, transparent);
}

.bm-log-records__list:focus-visible {
  outline: 2px solid var(--log-blue);
  outline-offset: -2px;
}

.bm-log-records__header {
  display: grid;
  box-sizing: border-box;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 40px;
  padding: 2px 12px;
  border-bottom: 1px solid var(--log-border);
  background: color-mix(in srgb, currentColor 2.5%, transparent);
}

.bm-log-records__title {
  grid-column: 2;
  text-align: center;
}

.bm-log-records__errors {
  grid-column: 3;
  justify-self: end;
}

.bm-log-records__header h3 { font-size: 15px; }

.bm-log-entry {
  display: grid;
  grid-template-columns: 146px 84px minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 16px;
  border-bottom: 1px solid color-mix(in srgb, currentColor 8%, transparent);
  font-size: 11px;
}

.bm-log-entry:last-child { border-bottom: 0; }
.bm-log-entry:nth-child(even) { background: color-mix(in srgb, currentColor 1.8%, transparent); }
.bm-log-entry:hover { background: color-mix(in srgb, var(--log-blue) 5%, transparent); }
.bm-log-entry.is-focused {
  position: relative;
  z-index: 1;
  background: color-mix(in srgb, var(--log-blue) 15%, transparent);
  box-shadow: inset 3px 0 0 var(--log-blue), inset 0 0 0 1px color-mix(in srgb, var(--log-blue) 42%, transparent);
  animation: bm-log-entry-focus 900ms ease-out both;
}
.bm-log-entry time,
.bm-log-entry small { opacity: 0.56; }
.bm-log-entry strong { color: var(--log-blue); font-size: 10px; }
.bm-log-entry[data-level="warning"] strong { color: var(--log-amber); }
.bm-log-entry[data-level="error"] strong { color: var(--log-red); }
.bm-log-entry p { min-width: 0; margin: 0; overflow-wrap: anywhere; line-height: 1.48; }
.bm-log-entry__evidence,
.bm-log-entry__action { display: block; }
.bm-log-entry__action {
  margin-top: 5px;
  color: color-mix(in srgb, currentColor 78%, var(--log-blue));
  font-weight: 650;
}
.bm-log-entry small { white-space: nowrap; }

.bm-log-pagination {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px;
  border-top: 1px solid var(--log-border);
  font-size: 11px;
}

.bm-log-page-jump--records { grid-column: 2; }
.bm-log-pagination__status {
  grid-column: 3;
  justify-self: end;
  margin-right: 10px;
  font-size: 11px;
  font-weight: 750;
  opacity: 0.72;
}

.bm-log-pagination button {
  min-width: 72px;
  padding: 5px 10px;
  border-radius: 5px;
}

.bm-log-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.bm-log-records__errors,
.bm-log-errors-view button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 12px;
  color: inherit;
  border: 1px solid var(--log-border);
  border-radius: 7px;
  background:
    linear-gradient(145deg, color-mix(in srgb, currentColor 5%, transparent), transparent),
    var(--log-surface);
  box-shadow: 0 9px 28px color-mix(in srgb, #000 8%, transparent);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.bm-log-records__errors:hover,
.bm-log-errors-view button:not(:disabled):hover {
  color: inherit;
  border-color: color-mix(in srgb, var(--log-blue) 65%, var(--log-border));
  background-color: color-mix(in srgb, var(--log-blue) 9%, transparent);
  transform: translateY(-1px);
}

.bm-log-records__errors:focus-visible,
.bm-log-errors-view button:focus-visible {
  outline: 2px solid var(--log-blue);
  outline-offset: 3px;
}

.bm-log-records__errors svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bm-log-records__errors:disabled,
.bm-log-errors-view button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.bm-log-errors-view {
  position: relative;
  min-height: 558px;
  animation: bm-log-error-view-in 260ms ease-out both;
}

.bm-log-errors-view__header {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 58px;
  margin-bottom: 4px;
  padding: 0;
}

.bm-log-errors-view__header > div {
  grid-column: 2;
  text-align: center;
}

.bm-log-errors-view__header > button {
  grid-column: 3;
  justify-self: end;
}

.bm-log-errors-view__header h2 {
  margin: 3px 0 0;
  font-size: 23px;
}

.bm-log-errors-view__header p {
  margin: 6px 0 0;
  font-size: 12px;
  opacity: 0.62;
}

.bm-log-errors__viewport {
  position: relative;
}

.bm-log-errors-page {
  box-sizing: border-box;
  height: clamp(390px, calc(100vh - 330px), 650px);
  padding: 7px 18px 7px 8px;
  overflow-y: scroll;
  overscroll-behavior: contain;
  border: 1px solid var(--log-border);
  border-radius: 11px;
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--log-blue) 4%, transparent), transparent 44%),
    var(--log-surface);
  box-shadow: 0 14px 38px color-mix(in srgb, #000 9%, transparent);
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

.bm-log-errors-page::-webkit-scrollbar { width: 0; height: 0; }

.bm-log-errors__viewport:hover .bm-log-records__scroll-indicator {
  background: color-mix(in srgb, var(--log-blue) 13%, transparent);
  opacity: 1;
}

.bm-log-error-date {
  width: fit-content;
  margin: 2px auto 7px;
  padding: 3px 10px;
  border: 1px solid var(--log-border);
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 7%, transparent);
  font-size: 10px;
  font-weight: 700;
}

.bm-log-error-card {
  display: grid;
  grid-template-columns: 68px 66px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  margin-bottom: 3px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--log-red) 25%, var(--log-border));
  border-radius: 6px;
  background: color-mix(in srgb, currentColor 4%, transparent);
  box-shadow: 0 3px 10px color-mix(in srgb, #000 5%, transparent);
  font-size: 11px;
}

.bm-log-error-card:last-child { margin-bottom: 0; }
.bm-log-error-card time { opacity: 0.7; }
.bm-log-error-card time,
.bm-log-error-card strong { align-self: center; }
.bm-log-error-card strong { color: var(--log-red); text-align: center; }
.bm-log-error-card[data-level="warning"] {
  border-color: color-mix(in srgb, var(--log-amber) 28%, var(--log-border));
}
.bm-log-error-card[data-level="warning"] strong { color: var(--log-amber); }
.bm-log-error-card[data-level="info"] {
  border-color: color-mix(in srgb, var(--log-blue) 28%, var(--log-border));
}
.bm-log-error-card[data-level="info"] strong { color: var(--log-blue); }
.bm-log-error-card p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.28;
}
.bm-log-error-card .bm-log-entry__action {
  margin-top: 3px;
  font-weight: 650;
}
.bm-log-error-card.is-emphasis p { font-weight: 700; }
.bm-log-errors-empty {
  display: grid;
  min-height: 320px;
  place-items: center;
  text-align: center;
  opacity: 0.6;
}

.bm-log-errors-nav {
  margin-top: 10px;
}

.bm-log-page-jump--errors { grid-column: 2; }

.bm-log-page-jump {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 3px 6px;
  border: 1px solid var(--log-border);
  border-radius: 7px;
  background: var(--log-surface);
  font-size: 11px;
  font-weight: 800;
}

.bm-log-page-jump label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.bm-log-page-jump input {
  width: 60px;
  min-height: 27px;
  padding: 2px 6px;
  color: inherit;
  border: 1px solid var(--log-border);
  border-radius: 5px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  text-align: center;
  font-weight: 800;
  appearance: textfield;
}

.bm-log-page-jump input::-webkit-inner-spin-button,
.bm-log-page-jump input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.bm-log-page-jump input:focus-visible {
  outline: 2px solid var(--log-blue);
  outline-offset: 2px;
}

.bm-log-page-jump > button {
  min-width: auto;
  min-height: 27px;
  padding: 3px 9px;
}

@keyframes bm-log-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-6px); opacity: 1; }
}

@keyframes bm-log-progress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}

@keyframes bm-log-entry-focus {
  from { background: color-mix(in srgb, var(--log-blue) 28%, transparent); }
  to { background: color-mix(in srgb, var(--log-blue) 15%, transparent); }
}

@keyframes bm-log-error-view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .bm-log-processing__mark span,
  .bm-log-processing__bar i { animation-duration: 3s; }
  .bm-log-entry.is-focused { animation: none; }
}

@media (min-width: 1101px) and (min-height: 760px) {
  .bm-log-workspace:has(.bm-log-analyzer[data-phase="ready"][data-view="summary"]) {
    height: max(620px, calc(100dvh - 220px));
    overflow: hidden;
  }

  .bm-log-analyzer[data-phase="ready"][data-view="summary"] {
    display: flex;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    padding: 10px 14px;
  }

  .bm-log-analyzer[data-phase="ready"][data-view="summary"] .bm-log-dashboard {
    display: flex;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
  }

  .bm-log-analyzer[data-phase="ready"][data-view="summary"] .bm-log-records {
    display: grid;
    min-height: 214px;
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .bm-log-analyzer[data-phase="ready"][data-view="summary"] .bm-log-records__viewport {
    height: auto;
    min-height: 132px;
  }
}

@media (max-width: 1100px) {
  .bm-log-native-toolbar { flex-wrap: wrap; }
  .bm-log-native-toolbar > input { width: 100%; flex-basis: 100%; }
  .bm-log-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm-log-charts { grid-template-columns: 1fr; }
  .bm-log-entry { grid-template-columns: 130px 74px minmax(180px, 1fr); }
  .bm-log-entry small { display: none; }
}

@media (max-width: 700px) {
  .bm-log-analyzer { min-height: 520px; padding: 14px; }
  .bm-log-upload,
  .bm-log-processing,
  .bm-log-failure { min-height: 490px; }
  .bm-log-failure { padding: 14px; }
  .bm-log-dashboard__overview { grid-template-columns: 1fr; }
  .bm-log-replace { grid-column: 1; grid-row: 2; justify-self: center; }
  .bm-log-summary { grid-column: 1; grid-row: 1; }
  .bm-log-summary { grid-template-columns: 1fr 1fr; }
  .bm-log-summary article { min-height: 82px; }
  .bm-log-entry { grid-template-columns: auto 1fr; gap: 5px 10px; }
  .bm-log-entry p { grid-column: 1 / -1; }
  .bm-log-entry small { display: none; }
  .bm-log-chart__header { display: flex; min-height: 0; align-items: center; gap: 9px; margin-bottom: 8px; flex-direction: column; }
  .bm-log-chart__context { order: 1; }
  .bm-log-chart__legend { position: static; order: 2; justify-content: center; }
  .bm-log-chart__tooltip {
    position: static;
    width: 100%;
    max-width: none;
    margin-bottom: 8px;
  }
  .bm-log-chart__header-spacer { display: none; }
  .bm-log-records__header { grid-template-columns: 1fr; }
  .bm-log-records__header-spacer { display: none; }
  .bm-log-records__title { grid-column: 1; grid-row: 1; }
  .bm-log-records__errors { grid-column: 1; grid-row: 2; justify-self: center; }
  .bm-log-pagination { grid-template-columns: 1fr; }
  .bm-log-page-jump--records { grid-column: 1; grid-row: 1; }
  .bm-log-pagination__status { grid-column: 1; grid-row: 2; justify-self: center; margin-right: 0; }
  .bm-log-errors-view__header { grid-template-columns: 1fr; }
  .bm-log-errors-view__header > div { grid-column: 1; grid-row: 1; }
  .bm-log-errors-view__header > button { grid-column: 1; grid-row: 2; justify-self: center; }
  .bm-log-error-card { grid-template-columns: auto 1fr; }
  .bm-log-error-card p { grid-column: 1 / -1; }
  .bm-log-errors-nav { grid-template-columns: 1fr; }
  .bm-log-page-jump--errors { grid-column: 1; grid-row: 1; }
  .bm-log-errors-nav .bm-log-pagination__status { grid-column: 1; grid-row: 2; justify-self: center; margin-right: 0; }
  .bm-log-page-jump { grid-column: 1 / -1; grid-row: 1; flex-wrap: wrap; }
}

@media (max-height: 760px) {
  .bm-sidebar-links {
    margin-top: 28px;
    margin-bottom: 24px;
  }
}

@media (max-width: 575px) {
  .ant-pro-global-header-logo > a > h1::after {
    font-size: 15px;
  }

  .bm-sidebar-links {
    margin-bottom: 20px;
  }
}

/* Only the log page: reserve real space for every mobile control row. */
@media screen and (max-width: 1100px) {
  /* The firmware frame clips tall content; logs need a scrollable touch area. */
  .bm-log-page .ant-flex-align-center.ant-flex-justify-center.ant-flex-vertical:has(.bm-log-native-toolbar) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }
  .bm-log-page .bm-log-native-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto !important;
    min-height: 0;
    gap: 6px !important;
    align-items: stretch;
    margin-bottom: 8px;
  }

  .bm-log-page .bm-log-native-toolbar > input {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    box-sizing: border-box;
    font-size: 16px;
  }

  .bm-log-page .bm-log-native-filters {
    display: grid !important;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.5fr);
    min-width: 0;
    gap: 6px !important;
  }

  .bm-log-page .bm-log-filter {
    display: flex;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 6px 4px;
    box-sizing: border-box;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    line-height: 1.3;
    white-space: normal;
  }

  .bm-log-page .bm-log-filter .ant-checkbox { flex: 0 0 auto; }
  .bm-log-page .bm-log-filter .ant-checkbox-label { min-width: 0; padding: 0; }

  .bm-log-page .bm-log-native-toolbar > button,
  .bm-log-page .bm-log-native-monitoring-button {
    min-width: 0;
    min-height: 40px;
    height: auto;
    padding: 6px 8px;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
  }

  .bm-log-page .bm-log-native-toolbar > [hidden] { display: none !important; }
  .bm-log-page .bm-log-native-monitoring-button[hidden] + button { grid-column: 1 / -1; }

  .bm-log-page .bm-log-analyzer button,
  .bm-log-page .bm-log-page-jump input {
    min-height: 40px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .bm-log-page .bm-log-page-jump { min-width: 0; gap: 8px; }
  .bm-log-page .bm-log-upload__button {
    gap: 8px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .bm-log-page .bm-log-upload__button svg { width: 18px; height: 18px; }
}

@media screen and (max-width: 359px) {
  .bm-log-page .bm-log-native-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm-log-page .bm-log-filter:last-child { grid-column: 1 / -1; }
}
