:root {
  --bg: #f6f6f6;
  --panel: #ffffff;
  --text: #333333;
  --muted: #666666;
  --secondary: #999999;
  --line: #dcdfe6;
  --line-light: #e4e7ed;
  --brand: #1677ff;
  --accent: #4096ff;
  --brand-soft: #e6f4ff;
  --side-bg: #ffffff;
  --danger: #f56c6c;
  --ok: #67c23a;
  --warn: #e6a23c;
  --info: #909399;
  --shadow: 0 12px 32px 4px rgba(0, 0, 0, .04), 0 8px 20px rgba(0, 0, 0, .08);
  --shadow-light: 0 0 12px rgba(0, 0, 0, .12);
  --side-width: 200px;
  --header-height: 50px;
  --menu-item-height: 46px;
}

* {
  box-sizing: border-box;
}

::selection {
  background: rgba(22, 119, 255, .18);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 7px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background-color: #0000000d;
}

::-webkit-scrollbar-thumb {
  background-color: #9093994d;
  border-radius: 2px;
  box-shadow: inset 0 0 6px #0003;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #b6b7b9;
}

body {
  margin: 0;
  min-width: 375px;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Arial", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.hidden {
  display: none !important;
}

.muted {
  color: var(--secondary);
}

.tiny {
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
}

.ant-layout.app-shell,
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--side-width) minmax(0, 1fr);
  background: var(--bg);
}

.ant-layout-sider.side,
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: var(--side-bg);
  color: var(--text);
  padding: 0 0 16px;
  box-shadow: #dedede 2px 11px 5px;
  scrollbar-gutter: stable;
}

.ant-layout-sider.side .ant-layout-sider-children,
.side .ant-layout-sider-children {
  overflow-y: auto;
}

.side ::selection {
  background: rgba(22, 119, 255, .18);
  color: var(--text);
}

.brand {
  min-height: var(--header-height);
  padding: 0 16px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  background: rgb(9, 88, 217) !important;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.375;
}

.side-subtitle {
  padding: 12px 16px;
  margin-bottom: 8px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.625;
  border-bottom: 1px solid var(--line-light);
}

.nav-tree.ant-menu {
  display: grid;
  gap: 4px;
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 0 8px;
}

.nav-tree.ant-menu .ant-menu-item,
.nav-tree.ant-menu .ant-menu-submenu-title {
  position: relative;
}

.nav-tree.ant-menu .ant-menu-item-icon {
  font-size: 16px;
}

.nav-group {
  display: grid;
}

.nav-group.closed .nav-group-items {
  display: none;
}

.nav-group-title.ant-menu-submenu-title,
.nav-btn.ant-menu-item {
  min-height: var(--menu-item-height);
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #001529;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  transition: background-color .15s ease, color .15s ease;
}

.nav-group-title.ant-menu-submenu-title {
  font-weight: 500;
}

.nav-group-title:after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.nav-group.closed .nav-group-title:after {
  transform: rotate(-45deg);
}

.nav-anticon.anticon,
.nav-tree.ant-menu .ant-menu-item-icon {
  width: 18px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
}

.nav-anticon svg {
  display: block;
}

.nav-group-items {
  display: grid;
  background: transparent;
}

.nav-child.ant-menu-item {
  min-height: 42px;
  padding-left: 38px;
}

.nav-group-title:hover,
.nav-btn:hover {
  background: #f0f0f0;
  color: #001529;
}

.nav-group-title.active {
  background: transparent;
  color: var(--brand);
}

.nav-btn.ant-menu-item-selected,
.nav-btn.active {
  min-height: var(--menu-item-height);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.nav-btn.ant-menu-item-selected .nav-anticon,
.nav-btn.active .nav-anticon {
  color: var(--brand);
}

.ant-layout-content.main,
.main {
  min-width: 0;
  padding: 16px;
}

.topbar.ant-page-header,
.topbar {
  min-height: var(--header-height);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: -16px -16px 16px;
  padding: 0 16px;
  background: rgb(9, 88, 217) !important;
  color: #ffffff;
}

.topbar .title {
  color: #ffffff;
}

.topbar .muted {
  color: rgba(255, 255, 255, .78);
}

.topbar .pill {
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
}

.topbar .ant-btn {
  border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
}

.topbar .ant-btn:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, .2);
  color: #ffffff;
}

.title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.375;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ant-btn.btn,
.btn {
  min-height: 32px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.5;
}

.ant-btn.btn:hover,
.btn:hover {
  border-color: var(--accent);
  color: var(--brand);
}

.ant-btn-primary.btn,
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.ant-btn-primary.btn:hover,
.btn.primary:hover {
  color: #ffffff;
  border-color: var(--brand);
}

.ant-btn-dangerous.btn,
.btn.danger {
  background: #fff7f7;
  border-color: #ffd8d8;
  color: var(--danger);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ant-card.card,
.card,
.ant-card.panel,
.panel {
  background: var(--panel);
  border: 1px solid var(--line-light);
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
}

.card {
  padding: 16px;
}

.metric {
  margin-top: 8px;
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
}

.panel {
  margin-top: 16px;
}

.ant-card-head.panel-hd,
.panel-hd {
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-light);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-weight: 400;
}

.ant-card-body.panel-bd,
.panel-bd {
  padding: 16px;
}

.ant-tabs.tabs,
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ant-tabs-tab.tab,
.tab {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 4px;
  padding: 6px 12px;
  color: var(--text);
  cursor: pointer;
}

.ant-tabs-tab-active.tab,
.tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.ant-input.input,
.input,
.ant-input.json-editor,
.json-editor {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 4px;
  color: var(--text);
  transition: box-shadow ease .1s, border-color ease .1s;
}

.ant-input.input,
.input {
  min-height: 32px;
  min-width: 180px;
  padding: 6px 10px;
}

.ant-input.input:focus,
.input:focus,
.ant-input.json-editor:focus,
.json-editor:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, .2);
}

.ant-table-wrapper.table-wrap,
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line-light);
  border-radius: 4px;
}

.ant-table,
table {
  border-collapse: collapse;
  width: 100%;
  background: #ffffff;
  font-size: 14px;
}

.ant-table-thead th,
th {
  background: #f8f8f8;
  color: var(--text);
  font-weight: 400;
}

th,
td {
  border-bottom: 1px solid var(--line-light);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

tr:hover td {
  background: #fafafa;
}

.ant-input.json-editor,
.json-editor {
  width: 100%;
  min-height: 280px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.625;
  resize: vertical;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ant-card.login-card,
.login-card {
  width: min(400px, 100%);
  background: #ffffff;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 500;
}

.form-row {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.form-row label {
  font-size: 13px;
  color: var(--muted);
}

.ant-alert.message,
.message {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 4px;
  background: #f8f8f8;
  border: 1px solid var(--line-light);
  color: var(--muted);
  white-space: pre-wrap;
}

.message.err {
  background: #fff7f7;
  border-color: #ffd8d8;
  color: var(--danger);
}

.message.ok {
  background: #f5fff0;
  border-color: #d8efc8;
  color: var(--ok);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: 16px;
}

.empty {
  padding: 36px;
  text-align: center;
  color: var(--secondary);
}

.hero {
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  padding: 48px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 24px;
  margin: 0 0 14px;
}

.hero p {
  font-size: 15px;
  line-height: 1.625;
  color: rgba(255, 255, 255, .78);
}

.site-header {
  height: 68px;
  background: #ffffff;
  border-bottom: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 18px;
  cursor: pointer;
}

.mobile-frame {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--line-light);
  border-right: 1px solid var(--line-light);
}

.mobile-top {
  padding: 20px;
  background: var(--brand);
  color: #ffffff;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.mobile-body {
  padding: 16px;
}

.mobile-tabs {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #ffffff;
  border-top: 1px solid var(--line-light);
}

.mobile-tabs button {
  border: 0;
  background: #ffffff;
  padding: 12px 4px;
  color: var(--muted);
}

.mobile-tabs button.active {
  color: var(--brand);
  font-weight: 600;
}

.list-item {
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
  background: #ffffff;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  margin: 7px 0;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f2f2f2;
  border-radius: 4px;
  padding: 2px 6px;
}

@media (max-width: 960px) {
  .ant-layout.app-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .ant-layout-sider.side,
  .side {
    position: relative;
    height: auto;
  }

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

  .split {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 16px;
  }

  .site-header {
    padding: 0 18px;
  }
}

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

  .topbar {
    display: block;
  }

  .actions {
    margin-top: 12px;
  }

  .hero {
    padding: 28px;
  }
}
