/* WeChat-Ai bot 璇︽儏椤?鈥?绉诲姩绔紭鍏堬紝瀵归綈鍙傝€冩埅鍥?*/

:root {
  --bot-bg: #fffbf7;
  --bot-card: #ffffff;
  --bot-text: #44403c;
  --bot-muted: #78716c;
  --bot-border: var(--bot-text);
  --bot-dark: #ea580c;
  --bot-dark-hover: #c2410c;
  --bot-accent: #ea580c;
  --bot-accent-hover: #c2410c;
  --bot-accent-soft: rgba(234, 88, 12, 0.06);
  --bot-btn-bg: rgba(255, 255, 255, 0.88);
  --bot-btn-text: #44403c;
  --bot-grad: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  --bot-btn-grad: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  --bot-btn-hover: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
  --bot-btn-shadow: rgba(194, 65, 12, 0.28);
  --bot-shadow: rgba(234, 88, 12, 0.14);
  --bot-green-bg: #ecfdf5;
  --bot-green-text: #059669;
  --bot-green-border: rgba(16, 185, 129, 0.22);
  --bot-radius-lg: 24px;
  --bot-radius-md: 18px;
  --bot-radius-sm: 14px;
  --bot-gap: 16px;
  --bot-gap-sm: 12px;
  --bot-page-x: 16px;
  --bot-shadow-sm: 0 2px 12px rgba(63, 63, 70, 0.03);
  --bot-shadow-md: 0 6px 22px rgba(234, 88, 12, 0.045);
  --bot-shadow-lg: 0 10px 30px rgba(234, 88, 12, 0.06);
  --bot-ease: cubic-bezier(0.25, 0.8, 0.45, 1);
  --bot-ease-soft: cubic-bezier(0.33, 1, 0.48, 1);
}

html.bot-dash-root.page-landing-root {
  --bot-text: #44403c;
  --bot-btn-text: #44403c;
  --bot-dark: #ea580c;
  --bot-dark-hover: #c2410c;
  --bot-accent: #ea580c;
  --bot-accent-hover: #c2410c;
  --bot-border: var(--bot-text);
}

html.bot-dash-root {
  background: transparent !important;
  background-color: transparent !important;
}

html.bot-dash-root body {
  background: transparent !important;
  color: var(--bot-text);
  font-family: 'Manrope', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  -webkit-font-smoothing: antialiased;
}

html.bot-dash-root:has(.bot-dash) {
  overflow: hidden;
  height: 100%;
}

html.bot-dash-root:has(.bot-dash) body {
  overflow: hidden;
  height: 100%;
}

.bot-dash.ss-dashboard {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.bot-dash .ss-content-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100dvh;
  overflow: hidden;
}

/* ===== 顶栏（对齐落地页 ss-nav 胶囊风格） ===== */
.bot-dash-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  margin: max(10px, env(safe-area-inset-top)) var(--bot-page-x) 0;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--bot-shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.35s var(--bot-ease-soft);
  overflow: hidden;
}

.bot-dash-top::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 -0.7px 0 var(--bot-accent),
    inset 0 -4px 10px -5px rgba(234, 88, 12, 0.12);
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.45s var(--bot-ease-soft);
}

.bot-dash-top.is-scrolled::after {
  opacity: 0;
}

.bot-dash-top__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
  color: var(--bot-text);
}

.bot-dash-top__mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--bot-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--bot-shadow);
}

.bot-dash-top__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--bot-text);
}

.bot-dash-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--bot-text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
  z-index: 52;
}

.bot-dash-menu-btn:active {
  transform: scale(0.96);
  background: var(--bot-accent-soft);
  color: var(--bot-dark);
}

.bot-dash-menu-btn[aria-expanded="true"] {
  background: var(--bot-accent-soft);
  color: var(--bot-dark);
  border: none;
}

.bot-dash-menu-btn__label {
  line-height: 1;
}

.bot-dash-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(63, 63, 70, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.bot-dash-drawer-backdrop:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

html.bot-drawer-lock,
html.bot-drawer-lock body {
  overflow: hidden !important;
  touch-action: none;
}

@media (min-width: 769px) {
  .bot-dash-menu-btn,
  .bot-dash-sidebar__close,
  .bot-dash-drawer-backdrop {
    display: none !important;
  }
}

.bot-dash-sidebar {
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 50;
  width: min(300px, 86vw);
  height: 100dvh;
  max-height: 100dvh;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid var(--bot-border);
  box-shadow: 8px 0 40px rgba(63, 63, 70, 0.12);
  transform: translateX(-105%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
}

.bot-dash.drawer-open .bot-dash-sidebar {
  transform: translateX(0);
}

.bot-dash.drawer-open .ss-content-col {
  overflow: hidden;
  touch-action: none;
}

.bot-dash-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid rgba(232, 223, 212, 0.8);
  flex-shrink: 0;
}

.bot-dash-sidebar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--bot-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.bot-dash-sidebar__mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--bot-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--bot-shadow);
}

.bot-dash-sidebar__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--bot-border);
  border-radius: 12px;
  background: var(--bot-card);
  color: var(--bot-text);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.bot-dash-sidebar__close:active {
  background: #f3f4f6;
}

.bot-dash-sidebar__menu {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bot-dash-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #57534e;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.bot-dash-sidebar__link:active {
  background: #f3f4f6;
}

.bot-dash-sidebar__link.is-active {
  background: var(--bot-accent-soft);
  color: var(--bot-dark);
  font-weight: 600;
}

.bot-dash-sidebar__icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.bot-dash-sidebar__foot {
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--bot-border);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.98);
}

.bot-dash-sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--bot-border);
  background: #fff;
}

.bot-dash-sidebar__user--static {
  cursor: default;
}

.bot-dash-sidebar__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bot-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.bot-dash-sidebar__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.bot-dash-sidebar__meta strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--bot-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-dash-sidebar__meta span {
  font-size: 11px;
  color: var(--bot-dark);
  font-weight: 500;
}

/* ===== 主内容 ===== */
.bot-dash-main.ss-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px var(--bot-page-x) calc(76px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--bot-gap);
}

.bot-dash-grid {
  display: flex;
  flex-direction: column;
  gap: var(--bot-gap);
}

.bot-dash-grid__primary,
.bot-dash-grid__secondary {
  display: flex;
  flex-direction: column;
  gap: var(--bot-gap);
  min-width: 0;
}

/* ===== 入场动画（轻柔） ===== */
@keyframes bot-enter-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes bot-chart-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes bot-chart-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bot-enter {
  opacity: 0;
  animation: bot-enter-rise 0.9s var(--bot-ease-soft) both;
  animation-delay: var(--bot-enter-delay, 0s);
}

.bot-profile-card,
.bot-stat-card,
.bot-chart-card {
  transition: transform 0.4s var(--bot-ease-soft), box-shadow 0.4s var(--bot-ease-soft);
}

@media (prefers-reduced-motion: reduce) {
  .bot-enter {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }

  .bot-chart-svg polyline,
  .bot-chart-svg circle,
  .bot-chart-svg path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== 资料卡片 ===== */
.bot-profile-card {
  background: rgba(255, 255, 255, 0.86);
  border-radius: var(--bot-radius-lg);
  border: none;
  box-shadow: var(--bot-shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 20px 18px 18px;
}

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

.bot-profile-card__main {
  min-width: 0;
  flex: 1;
}

.bot-profile-card__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.bot-profile-card__name {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bot-text);
  line-height: 1.2;
}

.bot-profile-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bot-green-bg);
  color: var(--bot-green-text);
  border: 1px solid var(--bot-green-border);
  font-size: 11px;
  font-weight: 600;
}

.bot-profile-card__sub {
  margin: 0;
  font-size: 14px;
  color: var(--bot-muted);
  line-height: 1.4;
}

.bot-profile-card--empty .bot-profile-card__sub {
  max-width: 240px;
}

.bot-profile-card__back {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid rgba(28, 25, 23, 0.06);
  color: #57534e;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
}

.bot-profile-card__back:active {
  background: #e8e5e1;
}

/* ===== 鍔熻兘鎸夐挳 2脳3 ===== */
.bot-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bot-gap-sm);
}

.bot-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 999px;
  border: none;
  background: var(--bot-btn-bg);
  color: var(--bot-btn-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: none;
  transition: background 0.3s var(--bot-ease-soft), color 0.3s var(--bot-ease-soft), transform 0.35s var(--bot-ease-soft), box-shadow 0.35s var(--bot-ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.bot-action-btn:active {
  transform: scale(0.99);
}

.bot-action-btn.is-active {
  background: var(--bot-btn-grad);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 16px var(--bot-btn-shadow);
}

/* ===== 缁熻 2脳2 ===== */
.bot-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bot-gap-sm);
}

.bot-stat-card {
  background: rgba(255, 255, 255, 0.84);
  border-radius: var(--bot-radius-md);
  border: none;
  box-shadow: var(--bot-shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px 14px 13px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bot-stat-card__label {
  display: block;
  font-size: 12px;
  color: var(--bot-muted);
  margin-bottom: 4px;
  line-height: 1.3;
}

.bot-stat-card__value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--bot-text);
  line-height: 1.2;
}

/* ===== 鍥捐〃鍗＄墖 ===== */
.bot-chart-card {
  background: rgba(255, 255, 255, 0.86);
  border-radius: var(--bot-radius-lg);
  border: none;
  box-shadow: var(--bot-shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 16px 14px;
}

.bot-chart-card__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bot-text);
}

.bot-chart-card__canvas {
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.bot-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.bot-chart-svg polyline {
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: bot-chart-draw 1.6s var(--bot-ease-soft) forwards;
  animation-delay: calc(var(--bot-enter-delay, 0s) + 0.3s);
}

.bot-chart-svg path {
  opacity: 0;
  animation: bot-chart-fade 1.2s var(--bot-ease-soft) forwards;
  animation-delay: calc(var(--bot-enter-delay, 0s) + 0.4s);
}

.bot-chart-svg circle {
  opacity: 0;
  animation: bot-chart-fade 0.9s var(--bot-ease-soft) forwards;
  animation-delay: calc(var(--bot-enter-delay, 0s) + 1.1s);
}

/* ===== 移动端底部导航 ===== */
.bot-dash-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 46;
  align-items: stretch;
  gap: 4px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.9);
  border-top: none;
  box-shadow: 0 -4px 20px rgba(234, 88, 12, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.bot-dash-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 4px 2px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--bot-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 0.28s var(--bot-ease-soft), background 0.28s var(--bot-ease-soft), transform 0.2s var(--bot-ease-soft);
}

.bot-dash-bottom-nav__item:active {
  transform: scale(0.97);
}

.bot-dash-bottom-nav__item.is-active {
  color: var(--bot-dark);
  font-weight: 600;
  background: var(--bot-accent-soft);
}

.bot-dash-bottom-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  line-height: 1;
}

.bot-dash-bottom-nav__label {
  line-height: 1.1;
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .bot-dash-bottom-nav {
    display: flex;
  }
}

/* ===== Toast ===== */
html.bot-dash-root .toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(28, 28, 30, 0.88);
  color: #fff;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  backdrop-filter: blur(8px);
}

html.bot-dash-root .toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== PC 端布局 ===== */
@media (min-width: 769px) {
  html.bot-dash-root:has(.bot-dash) {
    overflow: auto;
    height: auto;
  }

  html.bot-dash-root:has(.bot-dash) body {
    overflow: auto;
    height: auto;
  }

  .bot-dash.ss-dashboard {
    display: flex;
    flex-direction: row;
    height: 100vh;
    max-height: none;
    min-height: 100vh;
    overflow: hidden;
  }

  .bot-dash-sidebar {
    display: flex;
    flex-direction: column;
    width: 248px;
    flex-shrink: 0;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    border-right: 1px solid var(--bot-border);
    box-shadow: 4px 0 24px rgba(63, 63, 70, 0.03);
    position: sticky;
    top: 0;
    z-index: 40;
    transform: none;
    transition: none;
    padding-bottom: 0;
    overflow: hidden;
  }

  .bot-dash-sidebar__head {
    padding: 24px 20px 14px;
    border-bottom: none;
  }

  .bot-dash-sidebar__link:hover {
    background: var(--bot-accent-soft);
    color: var(--bot-dark);
  }

  .bot-dash-sidebar__link.is-active {
    background: var(--bot-accent-soft);
    color: var(--bot-dark);
  }

  .bot-dash-sidebar__foot {
    padding: 16px;
    background: transparent;
  }

  .bot-dash .ss-content-col {
    flex: 1;
    min-width: 0;
    height: 100vh;
    max-width: none;
    margin: 0;
    border: none;
    box-shadow: none;
    overflow: hidden;
  }

  .bot-dash-top {
    margin: 0;
    padding: 18px 28px 14px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.98);
  }

  .bot-dash-top::after {
    border-radius: inherit;
    box-shadow:
      inset 0 -0.7px 0 var(--bot-accent),
      inset 0 -4px 10px -5px rgba(234, 88, 12, 0.1);
    opacity: 0.5;
  }

  .bot-dash-top__name {
    font-size: 17px;
  }

  .bot-dash-main.ss-main {
    padding: 20px 28px 36px;
    gap: 20px;
    max-width: 1080px;
  }

  .bot-dash-bottom-nav {
    display: none !important;
  }

  .bot-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 20px;
    align-items: start;
  }

  .bot-dash-grid__primary,
  .bot-dash-grid__secondary {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
  }

  .bot-profile-card {
    padding: 22px 24px 18px;
  }

  .bot-profile-card__name {
    font-size: 30px;
  }

  .bot-profile-card__back:hover {
    background: #e8e5e1;
  }

  .bot-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .bot-action-btn {
    min-height: 48px;
    font-size: 14px;
  }

  .bot-action-btn:hover:not(.is-active) {
    background: rgba(255, 247, 251, 0.95);
    transform: translateY(-1px);
    box-shadow: var(--bot-shadow-sm);
  }

  .bot-action-btn.is-active:hover {
    background: var(--bot-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--bot-btn-shadow);
  }

  .bot-profile-card:hover,
  .bot-chart-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--bot-shadow-lg);
  }

  .bot-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .bot-stat-card {
    padding: 16px 14px;
    min-height: 84px;
    transition: transform 0.4s var(--bot-ease-soft), box-shadow 0.4s var(--bot-ease-soft);
  }

  .bot-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--bot-shadow-md);
  }

  .bot-stat-card__value {
    font-size: 24px;
  }

  .bot-chart-card {
    padding: 20px 18px 16px;
    flex: 1;
  }

  .bot-chart-card__title {
    font-size: 17px;
    margin-bottom: 14px;
  }

  .bot-chart-card__canvas {
    height: 180px;
  }
}

@media (min-width: 1024px) {
  .bot-dash-main.ss-main {
    padding: 24px 36px 44px;
    gap: 22px;
  }

  .bot-dash-grid {
    gap: 22px;
  }

  .bot-dash-grid__primary,
  .bot-dash-grid__secondary {
    gap: 22px;
  }

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

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

  .bot-chart-card__canvas {
    height: 220px;
  }
}

@media (min-width: 1280px) {
  .bot-dash-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 24px;
  }

  .bot-dash-grid__primary,
  .bot-dash-grid__secondary {
    gap: 24px;
  }

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

  .bot-chart-card__canvas {
    height: 260px;
  }
}

/* ===== 智能体空状态 ===== */
.bot-dash-main--agents,
.bot-dash-main--form {
  justify-content: flex-start;
}

.bot-agents-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: min(420px, calc(100dvh - 220px));
  padding: 32px 20px;
}

.bot-agents-empty__title {
  margin: 0 0 12px;
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bot-text);
}

.bot-agents-empty__desc {
  margin: 0 0 28px;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--bot-muted);
}

.bot-agents-empty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 44px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--bot-btn-grad);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--bot-btn-shadow);
  transition: background 0.3s var(--bot-ease-soft), transform 0.2s var(--bot-ease-soft), box-shadow 0.3s var(--bot-ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.bot-agents-empty__btn:active {
  transform: scale(0.98);
}

/* ===== 子页面顶栏 ===== */
.bot-dash-subhead {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
  margin: max(10px, env(safe-area-inset-top)) var(--bot-page-x) 0;
  padding: 8px 4px 4px;
}

.bot-dash-subhead__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border-radius: 12px;
  border: 1px solid var(--bot-border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--bot-text);
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: var(--bot-shadow-sm);
}

.bot-dash-subhead__meta {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.bot-dash-subhead__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bot-text);
  line-height: 1.25;
}

.bot-dash-subhead__sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--bot-muted);
}

@media (min-width: 769px) {
  .bot-dash-subhead {
    margin: 0;
    padding: 16px 28px 8px;
  }

  .bot-dash-subhead__title {
    font-size: 22px;
  }
}

/* ===== 弹窗 ===== */
html.bot-modal-lock,
html.bot-modal-lock body {
  overflow: hidden !important;
}

.bot-modal-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bot-modal-root[hidden] {
  display: none !important;
}

.bot-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(63, 63, 70, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bot-modal {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90dvh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--bot-radius-lg);
  border: none;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--bot-shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 22px 18px 20px;
}

.bot-modal[hidden] {
  display: none !important;
}

.bot-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.bot-modal__titles {
  min-width: 0;
  flex: 1;
}

.bot-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bot-text);
}

.bot-modal__sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--bot-muted);
}

.bot-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--bot-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--bot-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.bot-create-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.bot-create-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 16px 14px;
  border: none;
  border-radius: var(--bot-radius-md);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--bot-shadow-sm);
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.3s var(--bot-ease-soft), box-shadow 0.3s var(--bot-ease-soft), border-color 0.3s var(--bot-ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.bot-create-card:active {
  transform: scale(0.99);
}

.bot-create-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.bot-create-card__icon--custom {
  background: var(--bot-accent-soft);
  color: var(--bot-dark);
}

.bot-create-card__icon--ai {
  background: rgba(167, 139, 250, 0.14);
  color: #7c3aed;
}

.bot-create-card__icon--clone {
  background: rgba(251, 191, 36, 0.14);
  color: #d97706;
}

.bot-create-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bot-text);
}

.bot-create-card__desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--bot-muted);
}

@media (min-width: 640px) {
  .bot-modal {
    padding: 24px 22px 22px;
  }

  .bot-create-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .bot-create-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--bot-shadow-md);
  }
}

/* ===== 创建方式弹窗 ===== */
.bot-modal--create {
  width: min(560px, calc(100vw - 40px));
  max-height: min(84dvh, 520px);
  padding: 16px 14px 14px;
}

.bot-modal--create .bot-modal__head {
  margin-bottom: 12px;
}

.bot-modal--create .bot-modal__title {
  font-size: 17px;
}

.bot-modal--create .bot-modal__sub {
  margin-top: 4px;
  font-size: 12px;
}

.bot-modal--create .bot-create-cards {
  gap: 10px;
}

.bot-modal--create .bot-create-card {
  padding: 12px 10px;
  gap: 6px;
}

.bot-modal--create .bot-create-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
}

.bot-modal--create .bot-create-card__title {
  font-size: 14px;
}

.bot-modal--create .bot-create-card__desc {
  font-size: 12px;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .bot-modal--create .bot-create-cards {
    gap: 10px;
  }
}

/* ===== 表单弹窗（自定义创建 / AI 创造）===== */
.bot-modal--form {
  width: min(420px, calc(100vw - 40px));
  max-height: min(84dvh, 580px);
  padding: 16px 14px 14px;
}

.bot-modal--form .bot-modal__head {
  margin-bottom: 12px;
}

.bot-modal--form .bot-modal__title {
  font-size: 17px;
}

.bot-modal--form .bot-modal__sub {
  margin-top: 4px;
  font-size: 12px;
}

.bot-modal--form .bot-agent-form {
  gap: 10px;
}

.bot-modal--form .bot-agent-form__field {
  gap: 6px;
}

.bot-modal--form .bot-agent-form__label {
  font-size: 12px;
}

.bot-modal--form .bot-agent-form__input,
.bot-modal--form .bot-agent-form__textarea {
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 12px;
}

.bot-modal--form .bot-agent-form__textarea--lg {
  min-height: 140px;
}

.bot-modal--form .bot-agent-form__hint {
  font-size: 11px;
}

.bot-modal--form .bot-agent-form__actions {
  gap: 8px;
  margin-top: 2px;
}

.bot-modal--form .bot-agent-form__btn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.bot-modal--form .bot-agent-result {
  padding: 10px 12px;
  font-size: 13px;
}

/* ===== 表单 ===== */
.bot-agent-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bot-agent-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-agent-form__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--bot-muted);
}

.bot-agent-form__label em {
  font-style: normal;
  color: var(--bot-dark);
}

.bot-agent-form__input,
.bot-agent-form__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--bot-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--bot-text);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bot-agent-form__input:focus,
.bot-agent-form__textarea:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.bot-agent-form__textarea--lg {
  min-height: 180px;
}

.bot-agent-form__hint {
  font-size: 12px;
  color: var(--bot-muted);
  line-height: 1.4;
}

.bot-agent-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.bot-agent-form__actions--page {
  margin-top: 8px;
}

.bot-agent-form__actions--full {
  justify-content: stretch;
}

.bot-agent-form__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s var(--bot-ease-soft), transform 0.2s var(--bot-ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.bot-agent-form__btn--ghost {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--bot-text);
}

.bot-agent-form__btn--primary {
  background: var(--bot-btn-grad);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px var(--bot-btn-shadow);
}

.bot-agent-form__btn--block {
  width: 100%;
  min-height: 48px;
}

.bot-agent-form__btn:active {
  transform: scale(0.98);
}

.bot-agent-page {
  border-radius: var(--bot-radius-lg);
  border: none;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--bot-shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 16px 20px;
}

.bot-agent-page__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bot-agent-result {
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--bot-shadow-sm);
  color: var(--bot-text);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

/* ===== 上传区 ===== */
.bot-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  padding: 24px 16px;
  border: 1.5px dashed rgba(124, 58, 237, 0.22);
  border-radius: var(--bot-radius-md);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.bot-upload-zone.has-file {
  border-style: solid;
  border-color: rgba(124, 58, 237, 0.28);
  background: var(--bot-accent-soft);
}

.bot-upload-zone__icon {
  color: var(--bot-dark);
  opacity: 0.85;
}

.bot-upload-zone__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bot-text);
}

.bot-upload-zone__sub {
  font-size: 12px;
  color: var(--bot-muted);
}

.bot-upload-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bot-muted);
  font-size: 12px;
}

.bot-upload-divider::before,
.bot-upload-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bot-border);
}

@media (min-width: 769px) {
  .bot-agent-page {
    padding: 22px 24px 24px;
  }

  .bot-agents-empty {
    min-height: 480px;
  }
}

/* ===== 绑定二维码弹窗 ===== */
.bot-modal--bind {
  width: min(380px, calc(100vw - 40px));
  max-height: min(84dvh, 600px);
  padding: 16px 14px 14px;
}

.bot-modal--bind .bot-modal__head {
  margin-bottom: 12px;
}

.bot-modal--bind .bot-modal__title {
  font-size: 17px;
}

.bot-modal--bind .bot-modal__sub {
  margin-top: 4px;
  font-size: 12px;
}

.bot-bind-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.bot-bind-card__agent {
  font-size: 15px;
  font-weight: 700;
  color: var(--bot-text);
}

.bot-bind-card__code {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f5efe8;
  color: var(--bot-text);
  font-size: 14px;
  letter-spacing: 0.04em;
  user-select: all;
}

.bot-bind-card__qr {
  width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid var(--bot-border);
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--bot-shadow-sm);
}

.bot-bind-card__qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bot-bind-card__code {
  font-size: 13px;
  color: var(--bot-muted);
}

.bot-bind-card__code strong {
  color: var(--bot-text);
  letter-spacing: 0.08em;
}

.bot-bind-card__copy {
  margin-left: 8px;
  padding: 2px 10px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
}

.bot-bind-card__copy:hover {
  background: rgba(37, 99, 235, 0.14);
}

.bot-bind-card__tips {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--bot-shadow-sm);
}

.bot-bind-card__tips p {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--bot-muted);
}

.bot-bind-card__tips p:last-child {
  margin-bottom: 0;
}

.bot-bind-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--bot-muted);
}

.bot-bind-card__status[data-state="connected"] {
  color: #059669;
}

.bot-bind-card__status[data-state="scanned"] {
  color: #2563eb;
}

.bot-bind-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: bot-bind-pulse 1.4s ease-in-out infinite;
}

.bot-bind-card__status[data-state="connected"] .bot-bind-card__dot {
  background: #059669;
  animation: none;
}

.bot-bind-card__status[data-state="scanned"] .bot-bind-card__dot {
  background: #2563eb;
}

.bot-bind-card__switch-tip {
  margin-top: 8px;
  color: #2563eb;
  font-size: 12px;
}

.bot-bind-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.bot-bind-card__actions .bot-agent-form__btn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.bot-profile-card__badge--pending {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

@keyframes bot-bind-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1); }
}

/* ===== 绑定页 ===== */
.bot-bind-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 18px;
  border-radius: var(--bot-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--bot-shadow-md);
  text-align: center;
}

.bot-bind-page__ok {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.bot-bind-page__title {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--bot-text);
}

.bot-bind-page__sub,
.bot-bind-page__meta,
.bot-bind-page__hint,
.bot-bind-page__error {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--bot-muted);
}

.bot-bind-page__error {
  color: #dc2626;
}

.bot-bind-page__form {
  text-align: left;
  margin-top: 16px;
}

/* ===== 智能体列表 ===== */
.bot-agents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bot-agent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px;
  border-radius: var(--bot-radius-md);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--bot-shadow-sm);
}

.bot-agent-item__main {
  min-width: 0;
  flex: 1;
}

.bot-agent-item__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.bot-agent-item__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
}

.bot-agent-item__name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--bot-text);
  line-height: 1.25;
}

.bot-agent-item__core {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--bot-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bot-agent-item__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--bot-shadow-sm);
  color: var(--bot-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.bot-agent-item__btn:active {
  transform: scale(0.98);
}

.bot-agent-item__btn--wechat {
  background: #07c160;
  color: #fff;
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.28);
}

.bot-agent-item__btn--wechat:active {
  background: #06ad56;
}

/* ===== 智能体详情 ===== */
.bot-dash-subhead--detail {
  display: block;
  padding-left: 0;
  padding-right: 0;
}

.bot-dash-subhead__backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--bot-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.bot-dash-subhead--detail .bot-dash-subhead__title {
  font-size: 24px;
}

.bot-agent-detail__summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 18px;
  border-radius: var(--bot-radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--bot-shadow-md);
}

.bot-agent-detail__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.bot-agent-detail__name {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bot-text);
  line-height: 1.15;
}

.bot-agent-detail__core {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--bot-muted);
}

.bot-agent-detail__bind {
  margin: -8px 0 14px;
  font-size: 13px;
  color: #b45309;
}

.bot-agent-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bot-agent-detail__ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--bot-shadow-sm);
  color: var(--bot-text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.bot-agent-detail__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.bot-agent-detail__stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--bot-muted);
}

.bot-agent-detail__stat-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--bot-text);
}

.bot-agent-detail__footer-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.bot-agent-detail__edit-btn,
.bot-agent-detail__delete-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bot-agent-detail__edit-btn {
  background: var(--bot-btn-grad);
  box-shadow: 0 4px 14px var(--bot-btn-shadow);
}

.bot-agent-detail__delete-btn {
  background: #ef4444;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28);
}

.bot-agent-detail__edit-btn:active,
.bot-agent-detail__delete-btn:active {
  transform: scale(0.98);
}

.bot-profile-card__badge--companion {
  background: var(--bot-green-bg);
  color: var(--bot-green-text);
  border: none;
  gap: 6px;
}

.bot-profile-card__badge--companion i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.bot-profile-card__badge--bound {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: none;
}

.bot-profile-card__badge--frozen {
  background: rgba(234, 88, 12, 0.1);
  color: #c2410c;
  border: none;
}

.bot-agent-item__badge--frozen {
  background: rgba(234, 88, 12, 0.1);
  color: #c2410c;
}

.bot-agent-detail__ghost-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bot-live-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bot-live-badges--detail {
  margin-top: 2px;
}

.bot-profile-card__live-hint,
.bot-agent-detail__live-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--bot-muted, #64748b);
}

.bot-live-badge--wx-online {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: none;
}

.bot-live-badge--wx-offline {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: none;
}

.bot-chat-recovery {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid rgba(234, 88, 12, 0.18);
}

.bot-chat-recovery__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.bot-chat-recovery__text {
  flex: 1;
  min-width: 200px;
}

.bot-chat-recovery__text strong {
  display: block;
  margin-bottom: 6px;
  color: #9a3412;
}

.bot-chat-recovery__text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #7c2d12;
}

.bot-chat-recovery__qr {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  background: #fff;
}

.bot-chat-recovery--notice .bot-chat-recovery__body {
  align-items: flex-start;
}

@media (min-width: 769px) {
  .bot-agent-detail__summary {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px;
  }

  .bot-agent-detail__left {
    flex: 1;
    min-width: 0;
  }

  .bot-agent-detail__stats {
    flex-shrink: 0;
    min-width: 220px;
  }
}
