:root {
  color: #1f2329;
  background: #f5f6f8;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 22% 10%, rgba(51, 112, 255, 0.07), transparent 26%),
    linear-gradient(180deg, #f8faff 0%, #f5f6f8 46%, #f2f4f7 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 232px;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid #e5e6eb;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid #f0f1f5;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #3370ff;
  color: #fff;
  box-shadow: 0 8px 18px rgba(51, 112, 255, 0.24);
}

.nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
}

.nav-group + .nav-group {
  margin-top: 14px;
}

.nav-title {
  padding: 8px 10px 6px;
  color: #86909c;
  font-size: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4e5969;
  font-size: 14px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.nav-item svg {
  flex: 0 0 auto;
}

.nav-item .icon-glyph {
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  font-size: 0;
  line-height: 1;
  opacity: 0.82;
}

.nav-item .icon-glyph::before {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.brand-mark .icon-glyph {
  color: inherit;
}

.nav-item span:not(.icon-glyph):not(.nav-caret) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-caret {
  flex: 0 0 auto;
}

.nav-item:hover {
  background: #f2f3f5;
  color: #1f2329;
}

.nav-item.active {
  background: #e8f0ff;
  color: #245bdb;
  font-weight: 600;
}

.settings {
  margin: 10px 12px 16px;
  border-top: 1px solid #f0f1f5;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid #e5e6eb;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.page-title h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.page-title p {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  flex: 1 1 420px;
  max-width: 520px;
  min-width: 260px;
  height: 38px;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #f7f8fa;
  color: #86909c;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2329;
  font-size: 14px;
}

.search-box kbd {
  flex: 0 0 auto;
  border: 1px solid #d8dbe3;
  border-radius: 5px;
  background: #fff;
  color: #86909c;
  font-size: 12px;
  line-height: 20px;
  padding: 0 6px;
}

.top-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.icon-button,
.date-button,
.profile,
.soft-button,
.link-button,
.primary-button,
.quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #fff;
  color: #4e5969;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.icon-button.small {
  width: 28px;
  height: 28px;
  border-color: transparent;
}

.icon-button:hover,
.date-button:hover,
.profile:hover,
.soft-button:hover,
.quick-action:hover {
  border-color: #bedaff;
  color: #245bdb;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.06);
}

.dot {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #f53f3f;
  color: #fff;
  font-size: 11px;
  line-height: 14px;
}

.date-button {
  flex: 0 0 auto;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.profile {
  flex: 0 0 142px;
  gap: 9px;
  height: 40px;
  justify-content: flex-start;
  padding: 0 8px 0 6px;
  border-color: transparent;
}

.avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #3370ff, #00b578);
  color: #fff;
  font-weight: 700;
}

.profile span + span {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.profile strong {
  overflow: hidden;
  color: #1f2329;
  font-size: 13px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile small {
  overflow: hidden;
  color: #86909c;
  font-size: 12px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
}

.bell-icon::before {
  position: absolute;
  inset: 2px 4px 4px;
  border: 1.8px solid currentColor;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  content: "";
}

.bell-icon::after {
  position: absolute;
  left: 6px;
  bottom: 1px;
  width: 4px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.help-icon::before {
  position: absolute;
  inset: 1px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  content: "";
}

.help-icon::after {
  position: absolute;
  left: 7px;
  top: 4px;
  width: 2px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 9px 0 currentColor;
  content: "";
}

.calendar-icon::before {
  position: absolute;
  inset: 2px 1px 1px;
  border: 1.8px solid currentColor;
  border-radius: 4px;
  content: "";
}

.calendar-icon::after {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 6px;
  height: 1.8px;
  background: currentColor;
  content: "";
}

.mobile-menu {
  display: none;
}

.content {
  padding: 22px;
  max-width: 1560px;
  margin: 0 auto;
}

.welcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.welcome-row h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}

.welcome-row p {
  margin: 0;
  color: #86909c;
  font-size: 14px;
}

.primary-button {
  height: 38px;
  gap: 8px;
  padding: 0 14px;
  border-color: #3370ff;
  background: #3370ff;
  color: #fff;
  font-weight: 600;
}

.primary-button:hover {
  background: #245bdb;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(160px, 1fr));
  gap: 12px;
}

.metric-card,
.panel {
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(31, 35, 41, 0.04);
}

.metric-card {
  min-height: 126px;
  padding: 16px;
  overflow: hidden;
}

.metric-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metric-head p,
.panel-header h2 {
  margin: 0;
}

.metric-head p {
  color: #646a73;
  font-size: 13px;
}

.metric-head strong {
  display: block;
  margin-top: 8px;
  color: #1f2329;
  font-size: clamp(19px, 1.25vw, 22px);
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  margin-left: 8px;
}

.metric-icon.blue {
  background: #e8f0ff;
  color: #245bdb;
}

.metric-icon.green {
  background: #e5f7ef;
  color: #009a63;
}

.metric-icon.purple {
  background: #f1ebff;
  color: #7f4ee8;
}

.metric-icon.cyan {
  background: #e6f7ff;
  color: #0b83c5;
}

.metric-icon.amber {
  background: #fff4df;
  color: #b56b00;
}

.metric-icon.indigo {
  background: #eef1ff;
  color: #4e5bd5;
}

.metric-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #00a870;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.sparkline {
  width: 104px;
  height: 34px;
}

.sparkline path {
  fill: none;
  stroke: #3370ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(430px, 1.25fr) minmax(340px, 0.9fr) minmax(380px, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.trend-panel {
  grid-row: auto;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  margin-bottom: 12px;
}

.panel-header h2 {
  min-width: 0;
  color: #1f2329;
  font-size: 16px;
  font-weight: 700;
}

.link-button,
.soft-button {
  height: 28px;
  gap: 4px;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
  color: #86909c;
  font-size: 13px;
}

.soft-button {
  border-color: #e5e6eb;
  background: #fff;
  color: #4e5969;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 70px);
  padding: 3px;
  border-radius: 8px;
  background: #f2f3f5;
}

.segmented button {
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #646a73;
}

.segmented .selected {
  background: #3370ff;
  color: #fff;
  box-shadow: 0 2px 8px rgba(51, 112, 255, 0.22);
}

.line-chart {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  margin-top: 12px;
  min-height: 292px;
}

.line-chart svg,
.growth-chart {
  width: 100%;
  height: auto;
}

.y-axis {
  display: grid;
  align-content: space-between;
  height: 236px;
  padding: 16px 0 18px;
  color: #86909c;
  font-size: 12px;
}

.x-axis {
  display: flex;
  grid-column: 2;
  justify-content: space-between;
  color: #86909c;
  font-size: 12px;
}

.grid path {
  stroke: #edf0f5;
  stroke-width: 1;
}

.chart-area {
  fill: url(#tokenArea);
}

.chart-line,
.growth-line {
  fill: none;
  stroke: #3370ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point,
.growth-dot {
  fill: #fff;
  stroke: #3370ff;
  stroke-width: 3;
}

.tooltip-card rect {
  fill: #1f2329;
  opacity: 0.92;
}

.tooltip-card text {
  fill: #fff;
  font-size: 12px;
}

.health-table {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(118px, 1.15fr) 64px 62px minmax(92px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 33px;
  color: #4e5969;
  font-size: 13px;
}

.table-head {
  min-height: 26px;
  color: #86909c;
  font-size: 12px;
}

.channel-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #1f2329;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-name svg {
  color: #3370ff;
}

.status-pill {
  width: fit-content;
  min-width: 48px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.status-pill.good {
  background: #e5f7ef;
  color: #00875a;
}

.status-pill.warn {
  background: #fff4df;
  color: #b56b00;
}

.status-pill.bad {
  background: #ffece8;
  color: #d83931;
}

.latency {
  display: grid;
  grid-template-columns: minmax(48px, 1fr) 40px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.latency::before {
  grid-column: 1;
  grid-row: 1;
  height: 6px;
  border-radius: 999px;
  background: #edf0f5;
  content: "";
}

.latency i {
  grid-column: 1;
  grid-row: 1;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00b578, #78d63b);
}

.table-row:has(.bad) .latency i {
  background: linear-gradient(90deg, #f76964, #ffb020);
}

.table-row:has(.warn) .latency i {
  background: linear-gradient(90deg, #ffb020, #ffcf5c);
}

.request-list {
  display: grid;
}

.request-row {
  display: grid;
  grid-template-columns: 64px 48px minmax(120px, 1fr) 88px 36px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid #f0f1f5;
  color: #646a73;
  font-size: 13px;
}

.request-row:last-child {
  border-bottom: 0;
}

.method {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e5f7ef;
  color: #00875a;
  font-size: 12px;
  font-weight: 700;
}

.request-row strong {
  display: block;
  color: #1f2329;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-row small {
  display: block;
  overflow: hidden;
  color: #86909c;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-row > span {
  min-width: 0;
}

.request-row > span:nth-child(4) {
  white-space: nowrap;
}

.request-row b {
  justify-self: end;
}

.ok {
  color: #00a870;
}

.error {
  color: #d83931;
}

.donut-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 22px;
  min-height: 250px;
}

.donut {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 45%, transparent 46%),
    conic-gradient(#3370ff 0 45.2%, #00b578 45.2% 67.3%, #ffb020 67.3% 82.6%, #8f63ff 82.6% 92.4%, #f76964 92.4% 100%);
}

.donut > div {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  text-align: center;
}

.donut span,
.donut small {
  color: #86909c;
  font-size: 12px;
}

.donut strong {
  color: #1f2329;
  font-size: 16px;
}

.legend-list {
  display: grid;
  gap: 12px;
  width: 100%;
}

.legend-item {
  display: grid;
  grid-template-columns: 10px minmax(88px, 1fr) 48px 62px;
  align-items: center;
  gap: 9px;
  color: #4e5969;
  font-size: 13px;
}

.legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.legend-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-item strong {
  color: #1f2329;
}

.legend-item em {
  color: #86909c;
  font-style: normal;
}

.growth-chart {
  display: block;
  margin-top: 4px;
  max-height: 250px;
}

.growth-area {
  fill: url(#growthArea);
}

.growth-line {
  stroke: #8f63ff;
}

.growth-dot {
  stroke: #8f63ff;
}

.growth-label rect {
  fill: #8f63ff;
}

.growth-label text {
  fill: #fff;
  font-size: 13px;
  font-weight: 700;
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-item {
  min-height: 76px;
}

.notice-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 84px;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid #f0f1f5;
  border-radius: 8px;
  background: #fbfcff;
}

.notice-tag {
  display: inline-grid;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.notice-tag.系统 {
  background: #3370ff;
}

.notice-tag.维护 {
  background: #ffb020;
}

.notice-tag.活动 {
  background: #8f63ff;
}

.notice-item strong {
  display: block;
  overflow: hidden;
  color: #1f2329;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-item > div {
  min-width: 0;
}

.notice-item p {
  overflow: hidden;
  margin: 4px 0 0;
  color: #86909c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-item time {
  color: #86909c;
  font-size: 12px;
  text-align: right;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 10px;
}

.quick-action {
  display: grid;
  height: 72px;
  gap: 8px;
  padding: 8px;
  color: #4e5969;
}

.quick-action span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #e8f0ff;
  color: #245bdb;
  font-size: 16px;
  font-weight: 700;
}

.quick-action svg {
  color: #3370ff;
}

.quick-action span {
  font-size: 12px;
}

.mini-report {
  position: relative;
  min-height: 132px;
  overflow: hidden;
}

.mini-report strong,
.profit-rate strong {
  display: block;
  color: #1f2329;
  font-size: 21px;
}

.mini-report span,
.profit-rate span {
  display: block;
  margin-top: 8px;
  color: #86909c;
  font-size: 13px;
}

.mini-report b,
.profit-rate b {
  color: #00a870;
}

.mini-report svg {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 48%;
  height: 46px;
}

.mini-report path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.rate-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ring {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 57%, transparent 58%),
    conic-gradient(#00b578 0 72%, #e5e6eb 72% 100%);
}

.footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 18px 0 2px;
  color: #86909c;
  font-size: 12px;
}

@media (max-width: 1500px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: minmax(420px, 1.08fr) minmax(330px, 0.92fr);
  }

  .trend-panel {
    grid-column: 1;
  }

  .bottom-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .quick-panel {
    grid-column: span 2;
  }
}

@media (max-width: 1080px) {
  .sidebar {
    display: none;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    gap: 12px;
  }

  .date-button {
    display: none;
  }

  .search-box {
    max-width: none;
    min-width: 220px;
  }
}

@media (max-width: 860px) {
  .search-box {
    display: none;
  }

  .profile span + span {
    display: none;
  }

  .profile {
    width: 40px;
    flex: 0 0 40px;
    justify-content: center;
    padding: 0;
  }

  .profile > span:last-child {
    display: none;
  }

  .content {
    padding: 16px;
  }

  .welcome-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .dashboard-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .trend-panel,
  .quick-panel {
    grid-column: auto;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .legend-list {
    width: 100%;
  }

  .action-grid {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 8px;
    padding: 0 12px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .icon-button[aria-label="帮助"] {
    display: none;
  }

  .metric-grid {
    gap: 10px;
  }

  .metric-head strong {
    font-size: 20px;
  }

  .line-chart {
    grid-template-columns: 38px 1fr;
  }

  .request-row {
    grid-template-columns: 62px 50px 1fr;
  }

  .request-row > span:nth-child(4),
  .request-row b {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr 62px 58px;
  }

  .table-row span:last-child {
    display: none;
  }

  .notice-item {
    grid-template-columns: 42px 1fr;
  }

  .notice-item time {
    display: none;
  }

  .action-grid {
    grid-template-columns: repeat(2, minmax(72px, 1fr));
  }
}

/* Stable operations-console layout. Keep this block last so it wins over earlier prototype rules. */
.topbar {
  display: grid;
  grid-template-columns: 160px minmax(260px, 520px) minmax(360px, 1fr);
  gap: 18px;
  height: 64px;
  padding: 0 24px;
}

.mobile-menu {
  display: none;
}

.page-title {
  min-width: 0;
}

.search-box {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.search-box kbd {
  display: none;
}

.top-actions {
  justify-self: end;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 10px;
  margin-left: 0;
}

.top-actions .icon-button {
  display: none;
}

.date-button {
  height: 38px;
  min-width: 244px;
  justify-content: flex-start;
}

.profile {
  width: 150px;
  flex-basis: auto;
}

.profile span + span {
  display: grid;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.dashboard-grid {
  grid-template-columns: minmax(520px, 1.35fr) minmax(420px, 1fr);
}

.trend-panel {
  grid-column: 1;
}

.dashboard-grid > .panel:nth-child(3) {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.dashboard-grid > .panel:nth-child(4),
.dashboard-grid > .panel:nth-child(5),
.dashboard-grid > .panel:nth-child(6) {
  grid-column: auto;
}

.health-table .table-row {
  grid-template-columns: minmax(160px, 1fr) 64px 72px minmax(112px, 1fr);
}

.request-row {
  grid-template-columns: 70px 54px minmax(150px, 1fr) 96px 40px;
}

.bottom-grid {
  grid-template-columns: minmax(360px, 1.5fr) repeat(2, minmax(220px, 1fr));
}

.profit-rate {
  grid-column: auto;
}

@media (min-width: 1500px) {
  .metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: minmax(520px, 1.25fr) minmax(420px, 1fr) minmax(430px, 1fr);
  }

  .dashboard-grid > .panel:nth-child(3) {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 150px minmax(220px, 1fr) auto;
  }

  .date-button {
    display: none;
  }

  .dashboard-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid > .panel:nth-child(3) {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 0 14px;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .search-box {
    display: none;
  }

  .profile {
    width: 40px;
  }

  .profile span + span,
  .profile > span:last-child {
    display: none;
  }
}

@media (max-width: 640px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .health-table .table-row {
    grid-template-columns: minmax(0, 1fr) 58px 54px;
    width: 100%;
  }

  .health-table .table-row > span:last-child {
    display: none;
  }

  .request-row {
    grid-template-columns: 62px 48px minmax(0, 1fr);
    width: 100%;
  }

  .request-row > span:nth-child(4),
  .request-row b {
    display: none;
  }
}
