/* Головне меню */
:root {
  --width-expanded: 280px;
  --width-collapsed: 60px;
  --bg: #0f152a;
  --accent: #0ea5a4;
  --text: #e6eef6;
  --muted: #9aa8bf;
}

/* * {
  box-sizing: border-box
} */

/* body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  background: #f3f6fb;
  color: #0b1220
} */

/* Контейнер сторінки */
.idb-app {
  display: flex;
  min-height: 100vh;
}

main {
  background-color: #fff;
}

/* Бічне меню */
/* .idb-sidebar {
  width: var(--width-expanded);
  background: linear-gradient(180deg, var(--bg), #071020);
  color: var(--text);
  transition: width .25s ease-in-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  max-height: 100vh;
} */

/* Згорнуте меню — лишаються лише іконки */
/* .idb-sidebar.idb-collapsed {
  width: var(--width-collapsed);
} */

/* Шапка меню */
/* .idb-sidebar .idb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 0px;
  margin-bottom: 8px;
} */

/* .idb-brand .idb-logo {
  width: 46px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #032226
} */

/* .idb-brand .idb-title {
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  transition: opacity .18s ease-in-out, transform .18s ease-in-out;
} */

/* .idb-sidebar.idb-collapsed .idb-brand .idb-title {
  opacity: 0;
  transform: translateX(-8px)
} */

/* Список пунктів */
/* .idb-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px
}

.idb-nav button {
  height: 40px;
  border: none;
  background-color: var(--bg);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  transition: background .12s, transform .12s;
}

.idb-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px)
}

.idb-nav button .idb-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px
}

.idb-nav button .idb-label {
  transition: opacity .18s, transform .18s;
}

.idb-sidebar.idb-collapsed .idb-nav button .idb-label {
  opacity: 0;
  transform: translateX(-6px)
} */

/* Кнопка згорнути/розгорнути */
/* .idb-toggle {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.04);
  user-select: none
}

.idb-toggle .idb-txt {
  transition: opacity .18s;
}

.idb-sidebar.idb-collapsed .idb-toggle .idb-txt {
  opacity: 0
} */

/* Контент сторінки */
.idb-app main {
  flex: 1;
}

/* main {
  flex: 1;
  padding: 28px;
} */

/* ??? */
.db-flex {
  display: flex !important;
  /* flex-direction: column; */
}

.dashboard-caption {
  padding: 5px 5px 5px 10px;
  background: #ddd;
  /* position: relative; */
  /* cursor: pointer; */
  /* border-top-left-radius: 8px; */
  /* border-top-right-radius: 8px; */
}

.dashboard-caption .control-button-box {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.dashboard-caption:hover .control-button-box {
  opacity: 1;
  visibility: visible;
}

.dashboard-caption .control-button-box button {
  margin-right: 3px;
}

.chart-grid {
  display: grid;
  gap: 10px;
  /* grid-template-columns: repeat(auto-fill, minmax(640px, 1fr)); */
  margin: 5px;
}

.chart-block {
  /* margin-bottom: 10px; */
  height: 480px;
  display: flex;
  flex-direction: column;
  border: 1px solid #ccc;
  border-radius: 8px;
  min-height: 100%;
}

.chart-header {
  flex: 0;
  background: #eee;
  padding: 5px;
  position: relative;
  cursor: pointer;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.chart-block .control-button-box {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.chart-block:hover .control-button-box {
  opacity: 1;
  visibility: visible;
}

.chart-block .control-button-box button {
  margin-right: 3px;
}

.chart-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-color: #fff;
  padding-top: 5px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.chart-chart {
  flex: 1;
  overflow: hidden;
  margin: 3px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.bb-tooltip-wrap {
  table-layout: fixed;
}

.bb-tooltip-wrap th {
  white-space: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  text-align: center;
}

.name2 {
  text-align: center;
}

.bb-tooltip .tt-level12 {
  font-size: 12px;
}

.bb-tooltip .tt-level11 {
  font-size: 11px;
}

.bb-tt-btn {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 0;
  font: 600 14px / 28px system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #eee;
  cursor: pointer;
  opacity: .85;
}

.update-time {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 11px;
  color: #666;
}

/* Підписи на осях */
.bb-axis text {
  font-size: 14px;
}

/* Підписи точок (label'и) */
.bb-texts text {
  font-size: 36px;
}

/* Легенда */
.bb-legend-item text {
  font-size: 24px;
}

@media (max-width:720px) {
  /* .idb-sidebar{
    transition: transform .25s ease-in-out, width .25s
  }
  .idb-sidebar.idb-sidebar-hiden-mob{
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .25s ease-in-out, width .25s
  }

  .idb-sidebar.open {
    transform: translateX(0)
  } */

  /* main {
    padding-top: 70px
  } */

  .idb-app main {
    max-width: 100vw;
  }

  .chart-grid {
    grid-template-columns: repeat(auto-fill, minmax(640px, 1fr));
    max-width: 100%;
  }

  .chart-block {
    max-width: calc(100vw - 10px);
  }
}

@media (min-width:721px) {
  .idb-app main {
    max-height: 100vh;
    /* overflow: scroll; */
  }

  .bb-tt-btn {
    display: none;
  }

  .chart-grid {
    grid-template-columns: repeat(auto-fill, minmax(640px, 1fr));
    min-height: calc(100% - 45px);
  }

  .chart-block {
    min-height: 100%;
  }
}