:root {
  --navigation-width: 18%;
  --border-radius: 5px;
  --primary: #0061a1;
  --secondary: #028dfd;
  --success: #00ac5f;
  --danger: #dc3545;
  --light: #dae4fe;
  --dark: #606d80;
  --accent: #1d1f36;
  --background: #f5f7f9;
  --surface: #fff;
  --form-background: #ebedef;
  --link-base: #212529;
  color: #000;
  background: var(--background);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  display: flex;
  margin: 0;
  overflow: hidden;
  color: #000;
  background: var(--background);
  font-weight: 500;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #68a0ca;
  outline-offset: 2px;
}

button {
  cursor: pointer;
}

#navigation {
  display: flex;
  flex-direction: column;
  width: var(--navigation-width);
  min-width: 250px;
  max-width: 300px;
  height: 100vh;
  padding: 20px 10px 20px 30px;
  overflow: hidden;
  color: #000;
  background: var(--background);
}

.nav-top {
  flex: 0 0 auto;
}

.board-selector {
  position: relative;
}

.board-menu-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  color: #59636d;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 24px;
  text-align: left;
}

.board-menu-button:hover {
  color: #212529;
  background: #eef1f4;
}

.board-menu-button .material-symbols-rounded {
  font-size: 20px;
}

.board-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 2px);
  left: 0;
  width: 260px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid #d9dde1;
  border-radius: 4px;
  box-shadow: 0 8px 20px #0002;
}

.board-menu button {
  display: block;
  width: 100%;
  padding: 6px 16px;
  color: #212529;
  background: transparent;
  border: 0;
  text-align: left;
}

.board-menu button:hover,
.board-menu button.active {
  color: #fff;
  background: var(--primary);
}

#nav-form {
  padding-top: 10px;
}

#nav-form input {
  display: block;
  width: 100%;
  height: 32px;
  margin-bottom: 15px;
  padding: 6px 15px 6px 20px;
  color: #212529;
  background: var(--form-background);
  border: 0;
  border-radius: 7px;
}

#nav-form input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

#navigation hr {
  flex: 0 0 auto;
  width: 100%;
  margin: 5px 0;
  color: inherit;
  border: 0;
  border-top: 1px solid;
  opacity: .25;
}

#assetTree {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 16px 0 20px;
  overflow-y: auto;
}

#assetTree::-webkit-scrollbar,
#details-container::-webkit-scrollbar {
  width: 6px;
}

#assetTree::-webkit-scrollbar-track {
  background: var(--background);
}

#details-container::-webkit-scrollbar-track {
  background: transparent;
}

#assetTree::-webkit-scrollbar-thumb,
#details-container::-webkit-scrollbar-thumb {
  background: var(--light);
  border-radius: 3px;
}

.tree-node {
  position: relative;
  margin-left: 0;
  padding: 2px 0 0 10px;
}

.tree-node .tree-line {
  display: flex;
  align-items: flex-start;
  min-height: 25px;
}

.tree-node .tree-node {
  padding-top: 0;
}

.tree-node .tree-select {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--primary);
  background: transparent;
  border: 0;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-node.selected > .tree-line > .tree-select {
  color: var(--primary);
}

.collapse-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  color: #59636d;
  background: transparent;
  border: 0;
  font-family: "Material Symbols Rounded";
  font-size: 20px;
  line-height: 20px;
}

.collapse-icon::before {
  content: "expand_more";
}

.tree-node.collapsed > .tree-line > .collapse-icon::before {
  content: "chevron_right";
}

.tree-node.collapsed > .tree-node {
  display: none;
}

.tree-node.leaf > .tree-line {
  padding-left: 20px;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding-top: 8px;
}

.sidebar-select {
  position: relative;
  width: 100%;
  text-align: center;
}

.sidebar-select select {
  width: 100%;
  height: 46px;
  padding: 8px 12px;
  appearance: none;
  color: #59636d;
  background: transparent;
  border: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  text-align: center;
}

.sidebar-select:not(#simulationControl)::after {
  position: absolute;
  top: 21px;
  left: calc(50% + 17px);
  width: 0;
  height: 0;
  content: "";
  pointer-events: none;
  border-top: 5px solid #6c757d;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

#simulationControl {
  margin-bottom: 4px;
}

#simulationControl select {
  width: 100%;
  font-size: 14px;
}

#details-container {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 80%;
  height: 97vh;
  min-width: 0;
  margin: 15px;
  padding: 10px 10px 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--surface);
  border: 1.5px solid var(--light);
  border-radius: var(--border-radius);
  box-shadow: 0 0 10px -2px #00000026;
}

.navigation-container {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(150px, 2fr) minmax(0, 5fr);
  align-items: center;
  flex: 0 0 auto;
}

.breadcrumbs {
  display: flex;
  align-self: center;
  align-items: center;
  padding: 0 10px 15px;
  overflow: hidden;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-item {
  color: var(--link-base);
  font-weight: 400;
}

.breadcrumb-item-button {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

.breadcrumb-last {
  color: var(--primary);
  font-weight: 700;
}

.breadcrumb-separator {
  margin: 0 5px;
  color: var(--link-base);
}

.logo-container {
  display: flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.image-long-logo {
  display: block;
  width: 200px;
  margin-top: 10px;
  opacity: .2;
  transform: translateY(-30%);
}

#pageNavigation {
  display: flex;
  align-self: center;
  align-content: flex-start;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 10px;
  min-width: 0;
  padding: 5px 5px 5px 0;
}

#pageNavigation button {
  appearance: none;
  display: block;
  flex: 0 0 auto;
  height: 40px;
  margin: 0;
  padding: 8px 16px;
  color: var(--primary);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
  white-space: nowrap;
}

#pageNavigation button.active {
  color: #fff;
  background: var(--primary);
}

.tab-content,
.dashboard-view {
  min-width: 0;
}

.dashboard-load-error {
  margin: 2rem;
  padding: 1rem;
  color: var(--danger);
  background: var(--surface);
  border: 1px solid currentcolor;
  border-radius: var(--border-radius);
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe2e5;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px #00000014;
}

.card-header {
  min-height: 44px;
  padding: 8px 16px;
  border-bottom: 1px solid #dfe2e5;
}

.card-header-overview {
  height: 42.8125px;
  min-height: 42.8125px;
  color: #6c757d;
  text-align: center;
}

.blue-icon {
  padding-right: 10px;
  color: var(--primary);
  vertical-align: middle;
}

.info-icon {
  padding: 0 0 0 10px;
  color: var(--light);
  background: transparent;
  border: 0;
  font-size: 20px;
  vertical-align: middle;
}

.card-body {
  padding: 16px;
}

.kpi-body {
  min-height: 60px;
  text-align: center;
}

.kpi-value-line {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.kpi-value {
  font-weight: 500;
}

.kpi-unit,
.kpi-trend {
  position: relative;
  color: #6c757d;
  font-size: 12px;
  vertical-align: top;
}

.kpi-trend {
  padding-left: 15px;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
  gap: 1rem;
}

.table-card {
  margin-bottom: 1rem;
}

.card-heading {
  position: relative;
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: center;
  padding: 6px 38px 6px 16px;
  border-bottom: 1px solid #dfe2e5;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.card-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
}

.large-plot {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--light);
  background: transparent;
  border: 0;
  font-family: "Material Symbols Rounded";
  font-size: 18px;
  line-height: 22px;
}

.large-plot:hover {
  color: var(--accent);
}

.large-plot:disabled {
  cursor: default;
  opacity: .5;
}

.plot-content {
  width: 100%;
  height: 350px;
  min-height: 350px;
  margin: 0;
}

.table-content,
.modal-table {
  overflow: auto;
}

.table-content table,
.modal-table table {
  width: 100%;
  margin: 0;
  color: #212529;
  border-collapse: collapse;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
}

.table-content th,
.table-content td,
.modal-table th,
.modal-table td {
  padding: 8px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
}

.table-content tbody tr:nth-of-type(odd),
.modal-table tbody tr:nth-of-type(odd) {
  background: #0000000d;
}

.control-center-trigger {
  position: fixed;
  z-index: 30;
  top: calc(50% - 35px);
  right: 0;
  width: 35px;
  height: 70px;
  padding: 10px 0 0 9px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 70px 0 0 70px;
  text-align: left;
}

.control-center,
.dashboard-modal {
  padding: 0;
  color: #212529;
  background: #fff;
  border: 0;
}

.control-center::backdrop,
.dashboard-modal::backdrop {
  background: #000c;
}

.control-center {
  width: 300px;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0 0 0 auto;
}

.control-center:focus {
  outline: 0;
}

.control-center > header,
.modal-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.control-center > header h2,
.modal-panel > header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
}

.icon-button {
  padding: 0;
  color: #6c757d;
  background: transparent;
  border: 0;
}

.close-button {
  width: 24px;
  height: 24px;
  font-size: 30px;
  font-weight: 300;
  line-height: 20px;
}

.control-center > header .close-button {
  position: absolute;
  top: 15px;
  right: 8px;
  width: 32px;
  height: 32px;
  line-height: 28px;
}

.notification-actions {
  position: relative;
  height: 38px;
  margin-top: 19px;
}

.notification-button {
  position: absolute;
  top: 0;
  display: inline-flex;
  width: 50px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 4px;
}

.notification-button:nth-child(1) { left: 70.546875px; }
.notification-button:nth-child(2) { left: 130.453125px; }
.notification-button:nth-child(3) { left: 183.453125px; }

.badge {
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 20px;
  height: 20px;
  padding: 2px 6px;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  line-height: 16px;
}

.badge-danger {
  background: var(--danger);
}

.badge-dark {
  background: #212529;
}

.control-center-messages {
  padding: 24px 16px 140px;
}

.control-center-messages article {
  position: relative;
  margin-bottom: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
}

.control-center-messages article > button {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: 0;
}

.control-center-messages article p {
  margin: 8px 0 0;
}

.control-center-footer {
  position: absolute;
  right: 16px;
  bottom: 10px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transform: translateX(10.5px);
}

.color-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  transform: translateY(-4px);
}

.color-switch input {
  appearance: none;
  width: 32px;
  height: 16px;
  margin: 0;
  padding: 2px;
  background: #d8d8d8;
  border-radius: 999px;
}

.color-switch input::before {
  display: block;
  width: 12px;
  height: 12px;
  content: "";
  background: #fff;
  border-radius: 50%;
  transition: transform .15s ease;
}

.color-switch input:checked {
  background: var(--primary);
}

.color-switch input:checked::before {
  transform: translateX(16px);
}

.control-center-actions {
  display: flex;
}

.control-center-actions button,
.primary-button {
  padding: 6px 12px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
}

.control-center-actions button {
  width: 71.46875px;
}

.control-center-actions button + button {
  margin-left: -1px;
}

.control-center-actions button:first-child {
  border-radius: 4px 0 0 4px;
}

.control-center-actions button:last-child {
  border-radius: 0 4px 4px 0;
}

.user-logout {
  display: inline-flex;
  min-width: 50px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 4px;
}

#userName {
  display: none;
}

.dashboard-modal {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  overflow-y: auto;
  background: transparent;
}

.dashboard-modal:focus {
  outline: 0;
}

.modal-panel {
  width: min(1140px, calc(100% - 32px));
  margin: 28px auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #0003;
  border-radius: 5px;
}

.modal-panel > header {
  border-bottom: 1px solid #dee2e6;
}

.modal-body {
  padding: 16px;
}

.modal-info {
  margin-top: 0;
}

.modal-chart {
  height: 500px;
  min-height: 500px;
}

.modal-table thead {
  border-bottom: 0;
}

.modal-table table {
  width: calc(100% - 10px);
  margin-right: 10px;
}

.modal-table th {
  padding: 0 8px 8px;
  border-bottom-color: #212529;
}

.modal-panel > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #dee2e6;
}

.modal-panel > footer button {
  padding: 7px 12px;
  border: 1px solid #6c757d;
  border-radius: 4px;
}

.placeholder-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.placeholder-form label {
  display: grid;
  gap: 6px;
}

.placeholder-form input,
.placeholder-form select,
.placeholder-form textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20;
}

@media (max-width: 62rem) {
  .navigation-container {
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
    height: auto;
    max-height: none;
  }

  .logo-container {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .breadcrumbs,
  #pageNavigation {
    grid-row: 2;
  }
}

@media (max-width: 48rem) {
  body {
    display: block;
    height: auto;
    overflow: auto;
  }

  #navigation {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 12px;
  }

  #assetTree {
    max-height: 18rem;
  }

  #details-container {
    width: auto;
    height: auto;
    min-height: calc(100vh - 16px);
    margin: 8px;
  }

  .navigation-container {
    display: block;
  }

  .logo-container {
    display: none;
  }

  .breadcrumbs {
    padding: 10px;
  }

  #pageNavigation {
    justify-content: flex-start;
  }

  .card-row,
  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .placeholder-form {
    grid-template-columns: 1fr;
  }
}
