:root {
  --nav: #263653;
  --nav-active: #0076e8;
  --page: #f4f8fb;
  --panel: #ffffff;
  --line: #edf0f5;
  --head: #f2f4f8;
  --text: #1d2b3a;
  --muted: #8793a3;
  --blue: #0078f0;
  --green: #13c783;
  --cyan: #17c9c6;
  --orange: #ff9f35;
  --yellow: #ffd55c;
  --gray: #b8c0ca;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
select,
textarea { font: inherit; }

.layout {
  width: 100vw;
  min-width: 1268px;
  min-height: 100vh;
  background: var(--page);
}

.topbar {
  height: 41px;
  display: flex;
  align-items: center;
  background: var(--nav);
  color: #fff;
}

.brand {
  width: 330px;
  height: 41px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.logo {
  width: 25px;
  height: 25px;
  object-fit: contain;
  flex: none;
}

.nav {
  flex: 1;
  height: 41px;
  display: flex;
  align-items: stretch;
}

.nav button {
  min-width: 100px;
  height: 41px;
  border: 0;
  color: rgba(255,255,255,.9);
  background: transparent;
  cursor: pointer;
}

.nav button.active {
  background: var(--nav-active);
  font-weight: 600;
}

.user {
  width: 104px;
  height: 41px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: rgba(255,255,255,.88);
  position: relative;
  cursor: pointer;
}

.user-menu {
  position: absolute;
  right: 9px;
  top: 42px;
  width: 132px;
  background: #fff;
  color: #263442;
  border: 1px solid #e5e9ef;
  box-shadow: 0 4px 14px rgba(18, 35, 58, .16);
  z-index: 20;
  padding: 6px 0;
  text-align: left;
}

.user-menu b,
.user-menu span {
  display: block;
  height: 32px;
  line-height: 32px;
  padding: 0 14px;
}

.user-menu b {
  border-bottom: 1px solid #eef2f6;
}

.user-menu span:hover {
  background: #eaf5ff;
  color: #0075d9;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #75df6d;
  border: 2px solid #1eb760;
  display: none;
}

.layout.has-avatar .avatar { display: block; }

.body {
  display: flex;
  min-height: calc(100vh - 41px);
}

.sider {
  width: 178px;
  background: #fff;
  border-right: 1px solid #e8edf3;
  padding-top: 6px;
  flex: none;
}

.sider.wide { width: 200px; }

.menu-title,
.menu-item {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #263645;
  cursor: pointer;
}

.menu-title .chev { margin-left: auto; color: #9ba7b5; }
.menu-item { padding-left: 32px; color: #3b4958; }
.menu-item.muted {
  color: #b7bec8;
  cursor: default;
  pointer-events: none;
}
.menu-item.active,
.menu-title.active {
  background: #eaf5ff;
  color: #0075d9;
  font-weight: 600;
}

.mi {
  width: 12px;
  height: 12px;
  display: inline-grid;
  grid-template-columns: repeat(2, 4px);
  grid-template-rows: repeat(2, 4px);
  gap: 2px;
}

.mi span {
  border: 1px solid currentColor;
  border-radius: 1px;
}

.main {
  flex: 1;
  min-width: 0;
}

.page-title {
  height: 41px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #eef2f6;
  font-weight: 700;
}

.content {
  padding: 14px;
}

.card {
  background: #fff;
  border-radius: 2px;
  padding: 16px;
  margin-bottom: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar.right { justify-content: flex-end; }
.toolbar.split { justify-content: space-between; }
.grow { flex: 1; }

.btn {
  height: 28px;
  min-width: 58px;
  padding: 0 14px;
  border: 1px solid #d9dee7;
  border-radius: 2px;
  background: #fff;
  color: #2f3d4c;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn:hover {
  border-color: #1b8ff3;
  color: #0075d9;
}

.btn:active,
.btn.clicked {
  background: #eaf5ff;
  border-color: #0075d9;
  box-shadow: inset 0 1px 2px rgba(0, 117, 217, .18);
}

.btn.link {
  border: 0;
  background: transparent;
  color: #0075d9;
  padding: 0 4px;
  min-width: 0;
}

.input,
.select,
textarea {
  height: 28px;
  border: 1px solid #dfe4eb;
  border-radius: 2px;
  background: #fff;
  color: #98a2ae;
  padding: 0 11px;
  outline: none;
}

.input { width: 180px; }
.input.long { width: 280px; }
.select { min-width: 120px; }
textarea {
  height: 46px;
  padding-top: 8px;
  resize: none;
}

.tabs {
  height: 37px;
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #e8edf3;
  margin-bottom: 14px;
}

.tab {
  height: 37px;
  border: 0;
  background: none;
  color: #6c7785;
  cursor: pointer;
  position: relative;
}

.tab.active {
  color: #0075d9;
  font-weight: 600;
}

.tab.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #0075d9;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th {
  height: 46px;
  background: var(--head);
  color: #4b5968;
  text-align: left;
  font-weight: 500;
  padding: 0 14px;
  border-right: 1px solid #e3e8ef;
}

th:last-child { border-right: 0; }
td {
  height: 54px;
  padding: 0 14px;
  border-bottom: 1px solid #eef1f5;
  color: #263442;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tr:nth-child(even) td { background: #f7f8fb; }
.link-text { color: #0075d9; }
.link-text,
.tab,
.menu-item:not(.muted),
.menu-title { cursor: pointer; }
.muted-text { color: #8793a3; }
.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  vertical-align: middle;
}
.dot.blue { background: #0b8cf0; }
.dot.red { background: #ff4d4f; }
.dot.yellow { background: #f9c74f; }

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.state-pill:before {
  content: "...";
  width: 14px;
  height: 14px;
  line-height: 8px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  text-align: center;
  font-size: 12px;
}

.pager {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: #435061;
}

.pagebox {
  width: 28px;
  height: 28px;
  border: 1px solid #0085d5;
  color: #0075d9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: #fff;
}

.page-link {
  min-width: 28px;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: #435061;
  border-radius: 3px;
  cursor: pointer;
}

.page-link:hover {
  border-color: #b8dfff;
  color: #0075d9;
  background: #f4fbff;
}

.page-size {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #dfe4eb;
  border-radius: 3px;
}

.empty {
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #c4cad2;
}

.empty-box {
  width: 34px;
  height: 22px;
  border: 2px solid #e1e5eb;
  border-radius: 4px;
  position: relative;
  margin-bottom: 8px;
}

.empty-box:before {
  content: "";
  position: absolute;
  left: 7px;
  top: -8px;
  width: 16px;
  height: 10px;
  border: 2px solid #e1e5eb;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.check {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  margin-right: 8px;
  font-size: 10px;
}

.checkbox {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 1px solid #dfe4eb;
  border-radius: 2px;
  vertical-align: middle;
}

.node-check {
  cursor: pointer;
  background: #fff;
}

.node-check.checked {
  border-color: #0075d9;
  background: #0075d9;
  position: relative;
}

.node-check.checked:after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 6px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.node-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.node-status i {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-style: normal;
  font-size: 10px;
}

.node-status.status-self i { background: #13c783; }
.node-status.status-contract i { background: #0b8cf0; }
.node-status.status-stop i { background: #aeb7c2; }

.switch {
  width: 29px;
  height: 16px;
  border-radius: 10px;
  background: var(--blue);
  display: inline-block;
  position: relative;
  vertical-align: middle;
}

.switch:after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  right: 2px;
  top: 2px;
  background: #fff;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-section {
  background: #fff;
  padding: 14px;
  margin-bottom: 12px;
}

.section-title {
  font-weight: 700;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 90px 1fr 90px 1fr;
  gap: 12px 10px;
  align-items: center;
}

.form-grid .label {
  text-align: right;
  color: #3f4d5b;
}

.form-grid .req:before,
.modal .req:before { content: "* "; color: #ff4d4f; }

.fixed-actions {
  position: fixed;
  left: 178px;
  right: 0;
  bottom: 0;
  height: 40px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 -3px 10px rgba(24,44,67,.08);
  display: flex;
  gap: 12px;
  align-items: center;
  padding-left: 26px;
}

.modal-mask {
  position: fixed;
  inset: 41px 0 0;
  background: rgba(0,0,0,.43);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  width: 414px;
  background: #fff;
  border-radius: 3px;
  padding: 18px 30px 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
}

.small-modal {
  width: 360px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 14px;
}

.close-btn {
  border: 0;
  background: transparent;
  color: #8b96a5;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.move-target {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #dfe4eb;
  border-radius: 2px;
  margin-bottom: 18px;
}

.move-target.active {
  border-color: #0075d9;
  background: #eaf5ff;
  color: #0075d9;
}

.modal-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 11px;
}

.modal-row label { text-align: right; }
.modal-row .input,
.modal-row .select,
.modal-row textarea { width: 100%; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.back {
  width: 20px;
  color: #8d98a7;
  font-size: 24px;
  line-height: 1;
}

.monitor-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.svc {
  height: 93px;
  background: #fff;
  padding: 17px;
}

.svc b {
  display: block;
  margin-bottom: 14px;
}

.money {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  margin-right: 18px;
  background: #dff1fd;
  color: #0078f0;
  font-weight: 700;
}

.mini {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin: 0 5px 5px 0;
}

.mini.blue { background: #13a8ec; }
.mini.yellow { background: #ffc33d; }
.mini.cyan { background: #08a79f; }
.mini.fade { opacity: .16; }

.panel-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #5b6876;
  font-size: 12px;
}

.legend i {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: -1px;
}

.legend .g { background: #0cc779; }
.legend .b { background: #1a9feb; }
.legend .o { background: #ff8d32; }

.tile-card {
  min-height: 104px;
}

.tile {
  width: 29px;
  height: 29px;
  display: inline-block;
  border-radius: 4px;
  background: #06bd72;
  margin-right: 10px;
}

.nodebox {
  width: 30px;
  height: 36px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 4px;
  border-radius: 3px;
  background: #05c278;
  margin-right: 8px;
}

.nodebox em {
  width: 6px;
  height: 7px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 1px;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.warn {
  color: #ef9a29;
  background: #fff6e8;
  padding: 2px 9px;
}

.donut-wrap,
.pie-wrap {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.donut {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(#3bcc82 0 84%, #1598e9 84% 88%, #d9dfe7 88% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut.cyan {
  background: conic-gradient(#16c4c1 0 100%);
}

.donut.node-donut {
  background: conic-gradient(#3bcc82 0 100%);
}

.donut > div {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #596676;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #2c3946;
  font-size: 12px;
}

.donut-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.c0 { background: #1598e9; }
.c1 { background: #3bcc82; }
.c2 { background: #d9dfe7; }
.c3 { background: #ff46a0; }
.c4 { background: #50b7f5; }
.c5 { background: #0cc7bb; }

.pie {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: conic-gradient(#1598e9 0 34%, #3bcc82 34% 100%);
}

.pie.gpu-pie {
  background: conic-gradient(#1598e9 0 88.89%, #3bcc82 88.89% 100%);
}

.chart,
.small-chart {
  height: 225px;
  position: relative;
  border-bottom: 1px solid #dfe4ea;
  background: repeating-linear-gradient(to bottom, transparent, transparent 34px, #e9edf2 35px);
  margin: 4px 20px 0 38px;
}

.unit {
  position: absolute;
  left: -18px;
  top: -3px;
  color: #6e7a87;
}

.bar {
  position: absolute;
  bottom: 0;
  left: 28px;
  width: 18px;
  background: #31c982;
}

.bar.tall { height: 211px; }
.axis {
  position: absolute;
  left: -2px;
  right: 0;
  bottom: -25px;
  color: #5d6874;
  font-size: 12px;
}

.small-chart {
  height: 138px;
  margin: 14px 12px 0;
}

.small-chart .v {
  height: 118px;
  left: 53%;
}

.node-layout {
  display: grid;
  grid-template-columns: 172px 1fr;
  gap: 12px;
  padding: 0;
}

.group {
  border-right: 1px solid #eef1f5;
  padding: 17px 12px;
  min-height: 326px;
}

.group .input {
  width: 145px;
  margin: 18px 0 10px;
}

.group-active {
  width: 142px;
  height: 33px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #eaf5ff;
  color: #0075d9;
  font-weight: 600;
}

.table-area { padding: 17px 14px; }

.ops {
  min-height: 675px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-bottom: 16px;
}

.stats div {
  height: 70px;
  background: #f1f1f1;
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  padding: 0 38px;
}

.stats i {
  width: 42px;
  height: 42px;
  grid-row: span 2;
  border-radius: 2px;
  opacity: .75;
}

.stats .blue { background: #80d5f3; }
.stats .purple { background: #c697e7; }
.stats .green { background: #91eee1; }
.stats .yellow { background: #f5de7d; }

.node-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.node-card {
  height: 57px;
  background: #f1f3f6;
  border-radius: 3px;
  padding: 8px 12px;
  position: relative;
  color: #223144;
}

.node-card.blue {
  background: #16a8e8;
  color: #fff;
}

.node-card.green {
  background: #10c873;
  color: #fff;
}

.node-card span {
  border: 1px solid currentColor;
  color: inherit;
  font-size: 12px;
  margin-left: 6px;
  border-radius: 2px;
  padding: 0 4px;
}

.node-card small {
  display: block;
  margin-top: 5px;
  color: inherit;
  opacity: .8;
}

.node-card em {
  position: absolute;
  right: 9px;
  top: 8px;
  font-style: normal;
  opacity: .7;
}

.pop {
  position: absolute;
  left: 30px;
  top: 28px;
  width: 110px;
  background: #fff;
  color: #3a4653;
  line-height: 32px;
  padding: 4px 11px;
  box-shadow: 0 3px 12px rgba(0,0,0,.14);
  z-index: 4;
}

.toast {
  position: fixed;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  min-width: 180px;
  height: 34px;
  line-height: 34px;
  padding: 0 18px;
  border-radius: 3px;
  background: #fff;
  color: #263442;
  box-shadow: 0 4px 18px rgba(16, 34, 58, .18);
  border-left: 3px solid #0075d9;
  z-index: 30;
  text-align: center;
}

.frp-line {
  height: 33px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e0e5ec;
  padding-left: 10px;
}

@media (max-width: 1267px) {
  .layout {
    min-width: 1180px;
  }
}
