:root {
  color: #161616;
  background: #f5e8d8;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

button {
  font: inherit;
}

.wea-right-menu-show {
  display: none !important;
}

.wea-right-menu,
.wea-right-menu-show {
  display: none !important;
}

.dashboard-shell {
  position: relative;
  min-height: 100vh;
  background: #f5e8d8;
  overflow: hidden;
}

.watermark-layer {
  position: absolute;
  inset: -30px;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  grid-auto-rows: 128px;
  align-items: center;
  pointer-events: none;
  color: rgba(150, 140, 128, 0.2);
  font-size: 16px;
  letter-spacing: 0;
  transform: rotate(-18deg);
}

.watermark-layer span {
  display: block;
  white-space: nowrap;
}

.workspace {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(540px, 52vw) 1fr;
  gap: 28px;
  height: 100vh;
  padding: 8px 28px 18px 64px;
}

.chart-area {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
}

.chart-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.chart-title h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.chart-title button {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(95, 88, 80, 0.18);
  border-radius: 2px;
  color: #6d6258;
  background: rgba(255, 249, 241, 0.36);
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.chart-title button:hover {
  border-color: rgba(0, 120, 168, 0.36);
  color: #0078a8;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: 0 1px 5px rgba(69, 54, 36, 0.12);
}

.chart-title button:active {
  transform: translateY(1px);
}

.chart-title button:focus-visible {
  outline: 2px solid rgba(0, 120, 168, 0.34);
  outline-offset: 2px;
}

.chart-title button span {
  position: relative;
  width: 11px;
  height: 11px;
}

.chart-title button span::before {
  position: absolute;
  top: 5px;
  left: 1px;
  width: 10px;
  height: 1px;
  background: currentColor;
  transform: rotate(-35deg);
  content: "";
}

.chart-title button span::after {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 4px;
  height: 1px;
  background: currentColor;
  content: "";
}

.chart-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 26px 0 0;
}

.workspace:fullscreen {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(540px, 52vw) 1fr;
  gap: 28px;
  width: 100vw;
  height: 100vh;
  padding: 8px 28px 18px 64px;
  background: #f5e8d8;
}

.workspace:fullscreen .chart-area {
  height: calc(100vh - 26px);
}

.workspace:fullscreen .right-placeholder {
  display: block;
  min-width: 0;
  height: 100%;
}

.chart-frame > div {
  height: 100%;
}

.chart-frame .ag-charts-wrapper {
  --ag-charts-accent-color: #0078a8;
  --ag-charts-button-background-color: rgba(255, 249, 241, 0.72);
  --ag-charts-button-border-radius: 3px;
  --ag-charts-border-color: rgba(90, 82, 72, 0.22);
  --ag-charts-chrome-background-color: rgba(255, 249, 241, 0.84);
}

.chart-frame .ag-charts-toolbar {
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.chart-frame .ag-charts-annotations__toolbar {
  left: -46px;
  top: 24px;
  overflow: visible !important;
}

.chart-frame .ag-charts-annotations__toolbar .ag-charts-toolbar {
  overflow: visible !important;
}

.metric-switcher {
  position: absolute;
  left: 74px;
  top: 272px;
  z-index: 12;
}

.metric-switcher-button {
  display: block;
  width: 22px;
  min-height: 112px;
  padding: 8px 2px;
  border: 1px solid rgba(90, 82, 72, 0.16);
  border-radius: 3px;
  color: #111827;
  background: rgba(255, 241, 229, 0.68);
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.metric-switcher-button:hover,
.metric-switcher-button[aria-expanded="true"] {
  color: #0078a8;
  border-color: rgba(0, 120, 168, 0.36);
  background: rgba(255, 252, 248, 0.94);
  box-shadow: 0 1px 5px rgba(69, 54, 36, 0.12);
}

.metric-switcher-menu {
  position: absolute;
  left: 30px;
  top: 8px;
  width: max-content;
  min-width: 196px;
  padding: 4px 0;
  border: 1px solid rgba(90, 82, 72, 0.22);
  border-radius: 3px;
  background: #fbede1;
  box-shadow: 0 4px 14px rgba(69, 54, 36, 0.14);
}

.metric-switcher-menu-item {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  color: #262a33;
  background: transparent;
  font-size: 13px;
  line-height: 30px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.metric-switcher-menu-item:hover,
.metric-switcher-menu-item[aria-current="true"] {
  color: #0078a8;
  background: rgba(255, 252, 248, 0.94);
}

.chart-frame .chart-fullscreen-button {
  position: absolute;
  left: 24px;
  top: 210px;
  z-index: 9;
  display: grid;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(90, 82, 72, 0.22);
  border-radius: 3px;
  color: #46413b;
  background: rgba(255, 249, 241, 0.72);
  box-shadow: none;
}

.chart-frame .ag-charts-toolbar__button[title="Clear annotations"] {
  transform: translateY(42px);
}

.chart-frame .ag-charts-zoom-buttons {
  top: auto !important;
  right: 24px !important;
  bottom: 34px !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.chart-frame:hover .ag-charts-zoom-buttons,
.chart-frame:focus-within .ag-charts-zoom-buttons,
.chart-frame .ag-charts-zoom-buttons:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chart-frame .ag-charts-zoom-buttons .ag-charts-toolbar {
  position: relative !important;
  z-index: 9;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
}

.chart-frame .ag-charts-toolbar__button {
  width: 26px;
  height: 26px;
  color: #46413b;
  border-color: rgba(90, 82, 72, 0.22);
  background: rgba(255, 249, 241, 0.72);
  cursor: pointer;
}

.chart-frame .ag-charts-zoom-buttons .ag-charts-toolbar__button {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  padding: 3px;
  background: rgba(255, 249, 241, 0.72);
}

.chart-frame .ag-charts-toolbar__button:hover,
.chart-frame .ag-charts-toolbar__button--active {
  color: #0078a8;
  border-color: rgba(0, 120, 168, 0.36);
  background: rgba(255, 252, 248, 0.94);
  box-shadow: 0 1px 5px rgba(69, 54, 36, 0.12);
}

.chart-frame .ag-charts-myButton-fullScreen {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
}

.chart-frame .ag-charts-myButton-fullScreen::before,
.chart-frame .ag-charts-myButton-fullScreen::after {
  position: absolute;
  inset: 0;
  display: block;
  width: 16px;
  height: 16px;
  content: "";
}

.chart-frame .anticon-arrow-salt::before {
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  clip-path: polygon(54% 0, 100% 0, 100% 46%, 86% 46%, 86% 14%, 54% 14%);
}

.chart-frame .anticon-arrow-salt::after {
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  clip-path: polygon(0 54%, 14% 54%, 14% 86%, 46% 86%, 46% 100%, 0 100%);
}

.chart-frame .anticon-shrink::before {
  top: 2px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.chart-frame .anticon-shrink::after {
  right: 2px;
  bottom: 2px;
  left: auto;
  top: auto;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
}

.chart-frame .ag-charts-toolbar__button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.chart-frame .ag-charts-toolbar__button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.38;
}

.right-placeholder {
  min-width: 0;
  height: 100%;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    padding: 8px 18px 18px 56px;
  }

  .chart-area {
    min-height: 520px;
  }

  .right-placeholder {
    min-height: 280px;
  }
}
