.bb-stats-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
}

.bb-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}

.bb-orb-a {
  width: 220px;
  height: 220px;
  top: -60px;
  left: -70px;
  background: rgba(74, 216, 255, 0.50);
}

.bb-orb-b {
  width: 200px;
  height: 200px;
  top: 12%;
  right: -70px;
  background: rgba(146, 87, 255, 0.46);
}

.bb-orb-c {
  width: 180px;
  height: 180px;
  bottom: -60px;
  left: 30%;
  background: rgba(0, 255, 178, 0.16);
}

.bb-panel {
  position: relative;
  z-index: 1;
  padding: 18px;
  border-radius: 22px;
  color: #f4f8ff;
  background: linear-gradient(145deg, rgba(14, 20, 34, 0.83), rgba(7, 10, 20, 0.90));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 12px 34px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}

.bb-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #79e6ff;
  margin-bottom: 8px;
}

.bb-title-wrap h2 {
  margin: 0 0 8px 0;
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 0 12px rgba(121, 230, 255, 0.10);
}

.bb-title-wrap p {
  margin: 0;
  color: rgba(255,255,255,0.70);
  font-size: 13px;
  max-width: 580px;
  line-height: 1.45;
}

.bb-topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.bb-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 800;
  color: #e8fcff;
}

.bb-live-pill.is-live .bb-live-dot {
  background: #39ff9f;
  box-shadow: 0 0 12px rgba(57,255,159,0.45);
}

.bb-live-pill.is-offline .bb-live-dot {
  background: #ff5d7a;
  box-shadow: 0 0 12px rgba(255,93,122,0.35);
}

.bb-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.bb-updated {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
}

/* =========================
   SERVER MINI WIDGET
========================= */

.bb-server-mini {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  width: 290px;
  max-width: 90vw;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(10, 14, 24, 0.28);
  border: 1px solid rgba(172,245,32,0.14);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.18),
    0 0 10px rgba(172,245,32,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.18s ease;
}

.bb-server-mini:hover {
  transform: translateY(-2px);
  border-color: rgba(172,245,32,0.24);
  background: rgba(10, 14, 24, 0.38);
}

.bb-server-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.bb-server-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255,255,255,0.42);
}

.bb-server-mini-status,
.bb-server-details-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 800;
  color: #39ff9f;
}

.bb-server-mini-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bb-server-mini-line {
  display: grid;
  grid-template-columns: minmax(118px, auto) 1fr;
  align-items: center;
  gap: 10px;
}

.bb-server-mini-line-net {
  align-items: start;
}

@media (max-width: 600px) {
  .bb-server-mini {
    top: 72px;
    right: 10px;
    width: min(220px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    padding: 10px 11px;
    border-radius: 14px;
  }

  .bb-server-mini-head {
    margin-bottom: 8px;
  }

  .bb-server-title {
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .bb-server-mini-status {
    font-size: 9px;
    gap: 6px;
  }

  .bb-server-mini-dot {
    width: 7px;
    height: 7px;
  }

  .bb-server-mini-rows {
    gap: 6px;
  }

  .bb-server-mini-line {
    grid-template-columns: minmax(92px, auto) 1fr;
    gap: 8px;
  }

  .bb-server-row {
    font-size: 10px;
    gap: 6px;
    min-height: 18px;
  }

  .bb-server-row-net {
    min-height: 30px;
  }

  .bb-server-icon {
    width: 14px;
    flex: 0 0 14px;
    font-size: 11px;
  }

  .bb-net-wrap {
    gap: 4px;
  }

  .bb-net-label {
    font-size: 10px;
  }

  .bb-net-lines {
    gap: 1px;
    line-height: 1.1;
  }

  .bb-net-down,
  .bb-net-up {
    font-size: 10px;
  }

  .bb-server-line-chart {
    height: 16px;
    min-width: 68px;
  }

  .bb-server-line-chart canvas {
    height: 16px !important;
  }

  .bb-server-line-chart-net {
    height: 30px;
  }

  .bb-server-line-chart-net canvas {
    height: 30px !important;
  }

  .bb-server-mini-footer {
    margin-top: 8px;
    font-size: 9px;
  }

  .bb-server-mini-arrow {
    font-size: 12px;
  }
}

.bb-server-line-chart {
  height: 20px;
  min-width: 90px;
  display: flex;
  align-items: center;
}

.bb-server-line-chart canvas {
  width: 100% !important;
  height: 20px !important;
  display: block;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}

.bb-server-line-chart-net {
  height: 34px;
}

.bb-server-line-chart-net canvas {
  height: 34px !important;
}

.bb-server-mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #39ff9f;
  box-shadow: 0 0 10px rgba(57,255,159,0.35);
}

.bb-server-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.78);  
  line-height: 1.35;
  min-height: 20px;
}

.bb-server-row-net {
  align-items: flex-start;
  min-height: 34px;
}

.bb-server-row b {
  font-weight: 800;
}

.bb-server-icon {
  width: 18px;
  text-align: center;
  opacity: 0.9;
  flex: 0 0 18px;
  margin-top: 1px;
}

.bb-server-row-net {
  align-items: flex-start;
}

.bb-net-wrap {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.bb-net-label {
  color: rgba(255,255,255,0.78);
}

.bb-net-lines {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.bb-net-down,
.bb-net-down b,
.bb-net-down span {
  color: #4ade80 !important;
}

.bb-net-up,
.bb-net-up b,
.bb-net-up span {
  color: #60a5fa !important;
}

.bb-net-sep {
  margin: 0 6px;
  opacity: 0.5;
}

.bb-server-mini-right {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.bb-server-mini-right canvas {
  width: 100% !important;
  height: 20px !important;
  display: block;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}

.bb-server-mini-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,0.42);
  font-size: 11px;
}

.bb-server-mini-arrow {
  font-size: 14px;
  opacity: 0.75;
}

/* =========================
   SERVER DETAILS MODAL
========================= */

.bb-server-details {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
}

.bb-server-details.hidden {
  display: none;
}

.bb-server-details-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bb-server-details-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 24px;
  padding: 22px;
  background: rgba(10, 14, 24, 0.78);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.bb-server-details-inner::-webkit-scrollbar {
  width: 8px;
}

.bb-server-details-inner::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
}

.bb-server-details-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.bb-server-details-title-wrap h3 {
  margin: 0 0 8px 0;
  color: #fff;
  font-size: 32px;
}

.bb-server-details-title-wrap p {
  margin: 0;
  color: rgba(255,255,255,0.66);
  font-size: 13px;
}

.bb-server-details-topright {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bb-server-close {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;

  border-radius: 12px;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);

  font-size: 18px;
  line-height: 1;

  padding: 0;
  margin: 0;

  cursor: pointer;

  transition: all 0.2s ease;
}

.bb-server-close:hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.05);
}

.bb-server-meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.bb-server-meta-card,
.bb-server-card,
.bb-server-bottom-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 6px 16px rgba(0,0,0,0.12);
}

.bb-server-meta-card {
  padding: 14px;
}

.bb-server-meta-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.46);
  margin-bottom: 6px;
  font-weight: 800;
}

.bb-server-meta-value {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.bb-server-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.bb-server-card {
  padding: 16px;
}

.bb-server-card-wide {
  grid-column: 1 / -1;
}

.bb-server-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.bb-server-card-head h4 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

.bb-server-card-live {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.bb-server-card-subline {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  margin-bottom: 10px;
}

.bb-server-chart-wrap {
  position: relative;
  height: 170px;
}

.bb-server-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.bb-server-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.bb-server-bottom-card {
  padding: 16px;
}

.bb-server-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bb-server-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,0.74);
  font-size: 13px;
}

.bb-server-info-list div span {
  opacity: 0.75;
}

.bb-server-info-list div b {
  color: #fff;
  font-weight: 800;
}

/* =========================
   ALARM FLASH
========================= */

.bb-server-alarm-flash {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 42px;
  pointer-events: none;
  background: rgba(255, 40, 40, 0.06);
}

.bb-server-alarm-flash.hidden {
  display: none;
}

.bb-server-alarm-box {
  min-width: 300px;
  max-width: 90vw;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(25, 8, 12, 0.82);
  border: 1px solid rgba(255, 88, 88, 0.28);
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
  color: #fff;
  text-align: center;
}

.bb-server-alarm-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #ff7878;
  font-weight: 900;
  margin-bottom: 6px;
}

.bb-server-alarm-text {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

/* =========================
   HERO / TWITCH DASHBOARD
========================= */

.bb-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.bb-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 16px rgba(120,200,255,0.22);
  object-fit: cover;
  background: rgba(255,255,255,0.06);
}

.bb-hero-text h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
}

.bb-hero-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 4px;
  line-height: 1.45;
}

.bb-hero-game {
  font-size: 12px;
  color: #79e6ff;
  line-height: 1.45;
}

.bb-goal {
  margin-left: auto;
  min-width: 200px;
}

.bb-goal-label {
  font-size: 11px;
  margin-bottom: 5px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 800;
}

.bb-goal-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bb-goal-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #76e5ff, #b48bff);
  box-shadow: 0 0 10px rgba(118,229,255,0.5);
  transition: width 0.6s ease;
}

.bb-goal-text {
  font-size: 11px;
  margin-top: 5px;
  opacity: 0.7;
}

/* =========================
   STATS + EVENTS LAYOUT
========================= */

.bb-stats-events-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.bb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bb-events-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 16px;
  height: 329px;
  align-self: start;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 8px 20px rgba(0,0,0,0.18);
}

.bb-events-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bb-events-head h3 {
  margin: 2px 0 0 0;
  color: #fff;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.bb-events-status {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.68);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 7px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.bb-events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 198px;
  overflow-y: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
}

.bb-events-list::-webkit-scrollbar {
  width: 6px;
}

.bb-events-list::-webkit-scrollbar-track {
  background: transparent;
}

.bb-events-list::-webkit-scrollbar-thumb {
  background: rgba(120, 200, 255, 0.25);
  border-radius: 999px;
}

.bb-events-list::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 200, 255, 0.45);
}

.bb-event-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 6px 16px rgba(0,0,0,0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.bb-event-item:hover {
  transform: translateY(-2px);
  border-color: rgba(82,151,254,0.20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 10px 22px rgba(0,0,0,0.18),
    0 0 12px rgba(82,151,254,0.08);
}

.bb-event-item.bb-event-new {
  animation: bbEventSlideIn 0.45s ease both;
}

.bb-event-item.bb-event-highlight {
  animation: bbEventHighlight 2.2s ease;
}

.bb-event-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, rgba(82,151,254,0.30), rgba(82,151,254,0.12));
  border: 1px solid rgba(82,151,254,0.22);
  box-shadow: 0 0 12px rgba(82,151,254,0.12);
}

.bb-event-item[data-type="follow"] .bb-event-icon {
  background: linear-gradient(180deg, rgba(172,245,32,0.28), rgba(172,245,32,0.12));
  border-color: rgba(172,245,32,0.28);
  box-shadow: 0 0 12px rgba(172,245,32,0.10);
}

.bb-event-item[data-type="sub"] .bb-event-icon,
.bb-event-item[data-type="subscription"] .bb-event-icon,
.bb-event-item[data-type="resub"] .bb-event-icon {
  background: linear-gradient(180deg, rgba(180,139,255,0.28), rgba(180,139,255,0.12));
  border-color: rgba(180,139,255,0.26);
  box-shadow: 0 0 12px rgba(180,139,255,0.10);
}

.bb-event-item[data-type="gift_sub"] .bb-event-icon {
  background: linear-gradient(180deg, rgba(255,214,102,0.30), rgba(255,214,102,0.12));
  border-color: rgba(255,214,102,0.26);
  box-shadow: 0 0 12px rgba(255,214,102,0.10);
}

.bb-event-item[data-type="sub_bomb"] .bb-event-icon {
  background: linear-gradient(180deg, rgba(255,92,92,0.34), rgba(255,92,92,0.14));
  border-color: rgba(255,92,92,0.30);
  box-shadow: 0 0 16px rgba(255,92,92,0.14);
}

.bb-event-item[data-type="raid"] .bb-event-icon {
  background: linear-gradient(180deg, rgba(255,120,120,0.28), rgba(255,120,120,0.12));
  border-color: rgba(255,120,120,0.24);
  box-shadow: 0 0 12px rgba(255,120,120,0.10);
}

.bb-event-item[data-type="bits"] .bb-event-icon,
.bb-event-item[data-type="cheer"] .bb-event-icon {
  background: linear-gradient(180deg, rgba(255,190,70,0.28), rgba(255,190,70,0.12));
  border-color: rgba(255,190,70,0.24);
  box-shadow: 0 0 12px rgba(255,190,70,0.10);
}

.bb-event-item[data-type="knochen"] .bb-event-icon {
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.10));
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 0 12px rgba(255,255,255,0.06);
}

.bb-event-item[data-type="ghost"] .bb-event-icon {
  background: linear-gradient(180deg, rgba(130,220,255,0.24), rgba(130,220,255,0.10));
  border-color: rgba(130,220,255,0.20);
  box-shadow: 0 0 12px rgba(130,220,255,0.08);
}

.bb-event-body {
  min-width: 0;
}

.bb-event-title {
  margin: 0 0 4px 0;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.bb-event-text {
  margin: 0 0 5px 0;
  color: rgba(255,255,255,0.76);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.bb-event-time {
  color: rgba(255,255,255,0.50);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bb-event-empty {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 6px 16px rgba(0,0,0,0.14);
  color: rgba(255,255,255,0.70);
  line-height: 1.5;
}

/* =========================
   KPI / CHART CARDS
========================= */

.bb-kpi-card,
.bb-chart-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 8px 20px rgba(0,0,0,0.18);
}

.bb-kpi-card {
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-height: 158px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.bb-kpi-card::after {
  display: none;
}

.bb-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 24px rgba(0,0,0,0.22),
    0 0 16px rgba(99,215,255,0.06);
}

.bb-kpi-main {
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.05));
}

.bb-kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.58);
  font-weight: 800;
  margin-bottom: 10px;
  min-height: 28px;
}

.bb-kpi-value {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  font-weight: 900;
  margin-bottom: 10px;
  color: #fff;
  text-shadow:
    0 0 18px rgba(116,228,255,0.10),
    0 0 6px rgba(255,255,255,0.10);
  min-height: 52px;
  display: flex;
  align-items: center;
}

.bb-kpi-mini {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 10px;
  color: #fff;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.bb-name {
  font-size: clamp(18px, 2vw, 24px);
  word-break: break-word;
}

.bb-kpi-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
  margin-top: auto;
}

.bb-kpi-sub.is-positive {
  color: #53ffab;
}

.bb-kpi-sub.is-negative {
  color: #ff6f8f;
}

.bb-chart-card {
  padding: 14px 16px 8px 16px;
}

.bb-chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 8px;
}

.bb-chart-head h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  color: #fff;
}

.bb-chart-head p {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.66);
  line-height: 1.45;
}

.bb-chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.bb-toggle-group {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.bb-toggle {
  appearance: none;
  border: 0;
  outline: 0;
  padding: 0 12px;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
}

.bb-toggle:hover {
  color: #fff;
}

.bb-toggle.active {
  background: rgba(118,229,255,0.14);
  color: #fff;
  box-shadow: 0 0 12px rgba(118,229,255,0.08);
}

.bb-chart-wrap {
  position: relative;
  height: 210px;
  margin-bottom: 0;
}

.bb-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes bbEventSlideIn {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bbEventHighlight {
  0% {
    border-color: rgba(82,151,254,0.18);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.03),
      0 0 0 rgba(82,151,254,0);
    background: rgba(255,255,255,0.04);
  }
  20% {
    border-color: rgba(82,151,254,0.40);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.03),
      0 0 18px rgba(82,151,254,0.14);
    background: rgba(82,151,254,0.10);
  }
  100% {
    border-color: rgba(255,255,255,0.06);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.03),
      0 6px 16px rgba(0,0,0,0.14);
    background: rgba(255,255,255,0.04);
  }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
  .bb-server-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bb-server-card-wide {
    grid-column: 1 / -1;
  }

  .bb-server-bottom-grid,
  .bb-server-meta-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .bb-stats-events-layout {
    grid-template-columns: 1fr;
  }

  .bb-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .bb-topbar,
  .bb-chart-toolbar,
  .bb-server-details-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .bb-topbar-right,
  .bb-chart-controls,
  .bb-server-details-topright {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .bb-goal {
    margin-left: 0;
    width: 100%;
  }

  .bb-server-mini {
    width: calc(100vw - 36px);
  }

  .bb-server-detail-grid,
  .bb-server-bottom-grid,
  .bb-server-meta-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .bb-panel {
    padding: 16px 16px 8px 16px;
    border-radius: 20px;
  }

  .bb-kpi-grid {
    grid-template-columns: 1fr;
  }

  .bb-chart-wrap {
    height: 190px;
  }

  .bb-kpi-value {
    font-size: 34px;
  }

  .bb-toggle-group {
    flex-wrap: wrap;
    border-radius: 18px;
  }

  .bb-avatar {
    width: 50px;
    height: 50px;
  }

  .bb-events-list {
    max-height: 228px;
  }

  .bb-server-details {
    padding: 10px;
  }

  .bb-server-details-inner {
    padding: 16px;
    border-radius: 18px;
  }

  .bb-server-chart-wrap {
    height: 150px;
  }

  .bb-server-mini {
    top: 6px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}

/* =========================
   MOBILE COLLAPSE
========================= */

.bb-server-mini-collapsed-bar {
  display: none;
}

.bb-server-mini-expanded {
  display: block;
}

.bb-server-mini-collapse-btn {
  appearance: none;
  border: 0;
  outline: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.bb-server-mini-collapse-btn-small {
  width: 28px;
  height: 28px;
  font-size: 14px;
  display: none;
}

.bb-server-mini-quickline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  line-height: 1.2;
}

.bb-server-mini-quickline b {
  color: #4ade80;
  font-weight: 800;
}

.bb-server-mini-quick-sep {
  opacity: 0.45;
}

.bb-server-mini.is-mobile-collapsed .bb-server-mini-expanded {
  display: none;
}

.bb-server-mini.is-mobile-collapsed .bb-server-mini-collapsed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bb-server-mini-collapsed-left {
  min-width: 0;
  flex: 1;
}

@media (max-width: 600px) {
  .bb-server-mini {
    top: 0px;
    right: 8px;
    width: min(320px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    padding: 10px 12px;
    border-radius: 16px;
  }

  .bb-server-mini:not(.is-mobile-open) .bb-server-mini-expanded {
    display: none;
  }

  .bb-server-mini:not(.is-mobile-open) .bb-server-mini-collapsed-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .bb-server-mini.is-mobile-open .bb-server-mini-expanded {
    display: block;
  }

  .bb-server-mini.is-mobile-open .bb-server-mini-collapsed-bar {
    display: none;
  }

  .bb-server-mini-line {
    grid-template-columns: 100px 1fr;
    gap: 8px;
  }

  .bb-server-row {
    font-size: 10px;
    gap: 6px;
    min-height: 18px;
  }

  .bb-server-row-net {
    min-height: 30px;
  }

  .bb-server-icon {
    width: 14px;
    flex: 0 0 14px;
    font-size: 11px;
  }

  .bb-server-line-chart {
    height: 14px;
    min-width: 60px;
  }

  .bb-server-line-chart canvas {
    height: 14px !important;
    opacity: 0.72;
  }

  .bb-server-line-chart-net {
    height: 28px;
  }

  .bb-server-line-chart-net canvas {
    height: 28px !important;
    opacity: 0.72;
  }

  .bb-server-mini-footer {
    margin-top: 8px;
    font-size: 10px;
  }
}

.bb-server-mini-collapse-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.10);
  outline: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;
  border-radius: 8px;

  background: linear-gradient(180deg, rgba(34,41,61,0.96), rgba(13,18,31,0.96));
  color: rgba(255,255,255,0.92);

  font-size: 14px;
  line-height: 1;
  padding: 0;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 6px 14px rgba(0,0,0,0.28);

  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.bb-server-mini-collapse-btn:hover {
  background: linear-gradient(180deg, rgba(45,54,78,0.98), rgba(18,24,39,0.98));
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.bb-server-mini-collapse-btn-small {
  width: 26px;
  height: 26px;
  font-size: 12px;
}