:root {
  color-scheme: light;
  --paper: #fbfaf5;
  --side: #f4f2ec;
  --hover: #ebe9e2;
  --ink: #111111;
  --muted: #77756f;
  --soft: #d9d6ce;
  --line: #e7e3da;
  --card: #ffffff;
  --danger: #b3261e;
  --app-height: 100dvh;
  --composer-height: 118px;
}

/* Compact pricing page */
#pricingView .pricing-page-content,
#pricingView .page-content {
  padding: 16px 18px 28px;
}

#pricingView .pricing-company-list {
  gap: 12px;
}

#pricingView .pricing-toolbar {
  gap: 10px;
  margin-bottom: 2px;
}

#pricingView .usage-toggle.pricing-mode-toggle {
  height: 30px;
  border-radius: 8px;
}

#pricingView .usage-toggle.pricing-mode-toggle button {
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

#pricingView .pricing-company-nav {
  gap: 6px;
}

#pricingView .pricing-company-nav-item {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

#pricingView .pricing-company-group {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

#pricingView .pricing-company-head {
  min-height: 42px;
  padding: 9px 12px;
  gap: 8px;
  background: #f8fafc;
  border-bottom-color: #e5e7eb;
}

#pricingView .pricing-company-head h3 {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

#pricingView .pricing-discount-badge {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}

#pricingView .pricing-model-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 8px;
  padding: 8px;
}

#pricingView .pricing-model-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

#pricingView .pricing-model-card:hover {
  border-color: #cbd5e1;
  box-shadow: none;
}

#pricingView .pricing-model-card-main {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

#pricingView .pricing-model-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: none;
}

#pricingView .pricing-model-icon img {
  width: 22px;
  height: 22px;
}

#pricingView .pricing-model-copy {
  gap: 5px;
}

#pricingView .pricing-model-copy > strong {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
  color: #111827;
}

#pricingView .pricing-model-line-list {
  gap: 1px;
}

#pricingView .pricing-model-line-list p {
  font-size: 13px;
  line-height: 1.35;
  color: #374151;
}

#pricingView .pricing-model-line-list span {
  margin-right: 4px;
  color: #64748b;
}

#pricingView .pricing-model-line-list b {
  font-weight: 500;
  color: #111827;
}

#pricingView .pricing-model-line-list .pricing-model-discount-line {
  margin: 0 0 3px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  height: 100dvh;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.chatgpt-theme {
  --paper: #ffffff;
  --side: #f9f9f9;
  --hover: #ececec;
  --line: #e5e5e5;
  --card: #ffffff;
  --muted: #676767;
  --ink: #0d0d0d;
}

body.deepseek-theme {
  --paper: #f7f9ff;
  --side: #f4f7ff;
  --hover: #eef4ff;
  --line: #dbe6f8;
  --card: #ffffff;
  --muted: #64748b;
  --ink: #162033;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 100vw;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  padding: 0 clamp(18px, 4vw, 56px) 72px;
  background: #fff;
  color: #252525;
}

.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  color: #252525;
  font-size: 20px;
  font-weight: 700;
}

.landing-brand-button {
  padding: 0;
  background: transparent;
}

.landing-brand img {
  width: 28px;
  height: 28px;
}

.landing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.landing-link-button,
.landing-login-button,
.top-doc-button,
.login-pill {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: #34414a;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.landing-link-button:hover {
  background: #f4f6f8;
  color: #252525;
}

.landing-login-button,
.login-pill {
  background: #252525;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 37, 37, 0.1);
}

.landing-login-button:hover {
  background: #34414a;
  box-shadow: 0 10px 24px rgba(52, 65, 74, 0.14);
}

.landing-hero {
  position: relative;
  width: min(760px, 100%);
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: clamp(92px, 17vh, 170px) 0 72px;
  overflow: hidden;
}

.landing-mesh {
  position: absolute;
  top: 20px;
  right: 0;
  z-index: 0;
  width: min(620px, 70vw);
  height: min(420px, 52vw);
  pointer-events: none;
  opacity: 0.42;
  transform: translateX(42%);
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.14) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 65% 88% at 80% 42%, rgba(0, 0, 0, 0.65), transparent 72%);
}

.landing-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  justify-items: center;
  text-align: center;
}

.landing-headline-rotator {
  position: relative;
  width: 100%;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.landing-headline-rotator h1 {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(24px);
  animation: landingHeadlineRotate 9s infinite;
  max-width: 760px;
  width: 100%;
  padding: 0 10px;
  font-size: 30px;
  line-height: 1.28;
  letter-spacing: 0;
  font-weight: 500;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.landing-headline-rotator h1:nth-child(2) {
  animation-delay: 3s;
}

.landing-headline-rotator h1:nth-child(3) {
  animation-delay: 6s;
}

@keyframes landingHeadlineRotate {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  6%, 30% {
    opacity: 1;
    transform: translateY(0);
  }
  34%, 100% {
    opacity: 0;
    transform: translateY(-24px);
  }
}

.landing-tool-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.landing-tool-row span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #e4e7eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #34414a;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(52, 65, 74, 0.08);
}

.landing-tool-row img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 5px;
}

.landing-tool-row strong {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #252525;
  color: #fff;
  font-size: 11px;
}

.landing-composer {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 9px 22px;
  border: 1px solid #e4e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 44px rgba(52, 65, 74, 0.12);
}

.landing-composer textarea {
  min-height: 34px;
  max-height: 112px;
  padding: 5px 0;
  flex: 1 1 auto;
  border: none;
  background: transparent;
  color: #252525;
  font-size: 16px;
  line-height: 1.5;
}

.landing-composer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-composer button {
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 999px;
  background: #252525;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
}

.landing-tagline {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  color: #6a8497;
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}

.landing-feature-intro {
  width: min(820px, 100%);
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 28px 0 40px;
  text-align: center;
}

.landing-feature-intro span {
  color: #7d8187;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.landing-feature-intro h2 {
  margin: 0;
  color: #252525;
  font-size: 42px;
  line-height: 1.18;
  font-weight: 500;
}

.landing-feature-intro p {
  max-width: 700px;
  margin: 0;
  color: #7d8187;
  font-size: 16px;
  line-height: 1.8;
}

.landing-feature-grid {
  width: min(1180px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 72px;
}

.landing-feature-card {
  min-height: 376px;
  display: grid;
  grid-template-rows: minmax(190px, 1fr) auto;
  gap: 22px;
  padding: 24px;
  border: 1px solid #e9ecf0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.landing-feature-card h3 {
  margin: 0 0 12px;
  color: #252525;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
}

.landing-feature-card p {
  margin: 0;
  color: #7d8187;
  font-size: 14px;
  line-height: 1.7;
}

.landing-card-art {
  min-height: 190px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background:
    radial-gradient(circle at center, rgba(52, 65, 74, 0.08), transparent 62%),
    repeating-radial-gradient(circle at center, rgba(52, 65, 74, 0.14) 0 1px, transparent 1px 34px);
}

.tool-art {
  padding: 22px;
}

.tool-logo-list {
  width: min(320px, 100%);
  display: grid;
  gap: 12px;
}

.tool-logo-list span {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid #dfe5eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #252525;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(52, 65, 74, 0.08);
}

.tool-logo-list img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 6px;
}

.tool-logo-list strong {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #252525;
  color: #fff;
  font-size: 13px;
}

.model-art {
  align-content: center;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(234, 242, 255, 0.9), rgba(255, 255, 255, 0.2)),
    repeating-linear-gradient(90deg, rgba(52, 65, 74, 0.08) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(52, 65, 74, 0.08) 0 1px, transparent 1px 28px);
}

.model-art span {
  width: min(260px, 82%);
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(52, 65, 74, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #34414a;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(52, 65, 74, 0.07);
}

.terminal-art {
  align-content: center;
  justify-items: stretch;
  gap: 10px;
  padding: 24px;
  background: #252525;
  color: #f6f8fa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.terminal-art span {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.landing-link-button.active {
  background: #252525;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 37, 37, 0.1);
}

.landing-pricing-section {
  width: min(1240px, 100%);
  justify-self: center;
  display: grid;
  gap: 22px;
  padding: 10px 0 68px;
}

.landing-section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #8a7760;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-pricing-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px;
  border: 1px solid #e8dfd0;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(217, 184, 116, 0.18), transparent 28%),
    linear-gradient(180deg, #fffdfa 0%, #f7f3eb 100%);
}

.landing-pricing-intro h2 {
  margin: 0;
  color: #252525;
  font-size: 38px;
  line-height: 1.14;
  font-weight: 600;
}

.landing-pricing-intro p,
.landing-pricing-cta p,
.landing-pricing-note p {
  margin: 0;
  color: #6d6960;
  font-size: 15px;
  line-height: 1.75;
}

.landing-pricing-cta {
  min-width: 240px;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.landing-pricing-cta .landing-login-button {
  width: auto;
  margin: 0;
  padding: 0 18px;
}

.pricing-company-list {
  display: grid;
  gap: 14px;
}

.pricing-toolbar {
  display: grid;
  gap: 8px;
}

.usage-toggle.pricing-mode-toggle {
  width: fit-content;
  max-width: 100%;
  height: 32px;
  padding: 2px;
}

.usage-toggle.pricing-mode-toggle button {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

.pricing-company-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pricing-empty {
  padding: 16px;
  border: 1px solid #e8dfd0;
  border-radius: 12px;
  background: #fff;
  color: #6d6258;
  font-size: 13px;
}

.pricing-company-nav-item {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #e7dece;
  border-radius: 999px;
  background: #fffefa;
  color: #4f4a43;
  font-size: 12px;
  font-weight: 700;
}

.pricing-company-group {
  border: 1px solid #e8dfd0;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  scroll-margin-top: 14px;
}

.pricing-company-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  background: #faf7f1;
  border-bottom: 1px solid #eee5d8;
}

.pricing-company-head h3 {
  margin: 0;
  color: #252525;
  font-size: 16px;
  line-height: 1.15;
}

.pricing-discount-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #1f8a6a;
  border-radius: 999px;
  background: #eaf8f1;
  color: #116349;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

.pricing-model-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  padding: 10px;
}

.pricing-model-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border: 1px solid #e8e1d6;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffefd 0%, #fffdf9 100%);
  box-shadow: 0 4px 14px rgba(70, 58, 40, 0.03);
}

.pricing-model-card-main {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.pricing-model-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #efe7dc;
  box-shadow: 0 6px 14px rgba(64, 57, 48, 0.07);
}

.pricing-model-icon img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.pricing-model-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.pricing-model-copy > strong {
  color: #444952;
  font-size: 20px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pricing-model-line-list {
  display: grid;
  gap: 2px;
}

.pricing-model-line-list p {
  margin: 0;
  color: #50545d;
  font-size: 13px;
  line-height: 1.45;
}

.pricing-model-line-list span,
.pricing-model-line-list b {
  font: inherit;
}

.pricing-model-line-list span {
  margin-right: 6px;
}

.pricing-model-line-list b {
  font-weight: 500;
}

.pricing-model-line-list .pricing-model-discount-line {
  width: fit-content;
  margin: 2px 0 4px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eaf8f1;
  color: #116349;
  font-size: 13px;
  font-weight: 800;
}

.pricing-model-line-list .pricing-model-discount-line span {
  color: #22785c;
}

.pricing-model-line-list .pricing-model-discount-line b {
  color: #0f5f46;
  font-weight: 800;
}

.pricing-page-content,
#pricingView .page-content {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.login-panel {
  width: min(380px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(25, 23, 18, 0.08);
}

.brand-mark,
.bai-center-mark {
  color: #7f7d78;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: transparent;
  font-size: 28px;
}

.brand-mark img {
  width: 38px;
  height: 38px;
  display: block;
}

.login-panel h1 {
  margin: 18px 0 6px;
  font-size: 34px;
  letter-spacing: 0;
}

.login-panel p,
.chat-subtitle,
.settings-note,
.api-hero p,
.profile-card p {
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #4f6172;
  font-size: 13px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfdff;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 46px;
  padding: 0 14px;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfdff;
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 48px;
  max-height: 180px;
  resize: none;
  padding: 13px 6px;
  border: 0;
  background: transparent;
}

input:focus,
textarea:focus {
  border-color: #6c93b7;
  box-shadow: 0 0 0 4px rgba(57, 107, 155, 0.08);
}

.login-panel button,
.primary {
  width: 100%;
  min-height: 44px;
  margin-top: 22px;
  border-radius: 12px;
  background: #050505;
  color: #fff;
  font-weight: 700;
}

.login-helper-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
}

.simple-login-modal {
  width: min(400px, calc(100vw - 28px));
}

.simple-login-modal .modal-header p {
  margin-top: 6px;
}

.simple-login-modal label:first-of-type {
  margin-top: 0;
}

.simple-login-modal .modal-actions {
  margin-top: 4px;
}

.simple-login-submit {
  min-width: 120px;
}

#quickStartDialog,
#landingLoginDialog,
#landingPriceDialog {
  padding: clamp(18px, 4vw, 40px);
}

#quickStartDialog .modal-backdrop,
#landingLoginDialog .modal-backdrop,
#landingPriceDialog .modal-backdrop {
  background:
    radial-gradient(circle at 50% 100%, rgba(122, 121, 255, 0.17), transparent 34%),
    radial-gradient(circle, rgba(99, 111, 132, 0.18) 1.2px, transparent 1.2px),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  background-size: auto, 24px 24px, auto;
}

#landingPriceDialog .modal-backdrop {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(2px);
}

#quickStartDialog .account-modal,
#landingLoginDialog .account-modal {
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100dvh - 56px);
  overflow-y: auto;
  gap: 14px;
  padding: 24px 26px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 26px 80px rgba(58, 71, 91, 0.16);
}

#quickStartDialog .modal-header,
#landingLoginDialog .modal-header {
  display: grid;
  justify-items: center;
  text-align: center;
}

#quickStartDialog .modal-header > div,
#landingLoginDialog .modal-header > div {
  min-width: 0;
}

#quickStartDialog .modal-header h2,
#landingLoginDialog .modal-header h2 {
  color: #4f46e5;
  font-size: 28px;
  line-height: 1.18;
  font-weight: 800;
}

#quickStartDialog .modal-header p,
#landingLoginDialog .modal-header p {
  margin-top: 8px;
  color: #5d6470;
  font-size: 15px;
  line-height: 1.5;
}

#quickStartDialog .modal-close,
#landingLoginDialog .modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  color: #7b8490;
}

#quickStartDialog .modal-close:hover,
#landingLoginDialog .modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.auth-mode-tabs {
  height: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  border-radius: 8px;
  background: #f3f4f6;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.78);
}

.auth-mode-tab {
  min-width: 0;
  border-radius: 6px;
  background: transparent;
  color: #676f7d;
  font-size: 15px;
  font-weight: 800;
}

.auth-mode-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.11);
}

#quickStartDialog .account-modal label,
#landingLoginDialog .account-modal label {
  gap: 7px;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

#quickStartDialog .account-modal .remember-password-row,
#landingLoginDialog .account-modal .remember-password-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: -2px;
  color: #5d6470;
  font-size: 13px;
  font-weight: 700;
}

#quickStartDialog .account-modal input,
#landingLoginDialog .account-modal input {
  height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

#quickStartDialog .account-modal .remember-password-row input,
#landingLoginDialog .account-modal .remember-password-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #4f46e5;
  box-shadow: none;
}

#quickStartDialog .account-modal input::placeholder,
#landingLoginDialog .account-modal input::placeholder {
  color: #a3a7ae;
}

#quickStartDialog .account-modal input:focus,
#landingLoginDialog .account-modal input:focus {
  border-color: #9ca3ff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.11);
}

#quickStartDialog .modal-note,
#landingLoginDialog .modal-login-helper {
  margin-top: -4px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

#landingLoginDialog .modal-login-helper .ghost-button {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4f46e5;
  font-weight: 700;
}

#quickStartDialog .page-error,
#landingLoginDialog .error {
  min-height: 18px;
  margin: -4px 0 0;
  font-size: 13px;
}

#quickStartDialog .modal-actions,
#landingLoginDialog .modal-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 0;
}

#quickStartDialog .modal-actions .primary,
#landingLoginDialog .modal-actions .primary {
  width: 100%;
  min-height: 46px;
  margin: 0;
  border-radius: 8px;
  background: linear-gradient(100deg, #8fb4f5 0%, #b975e5 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 14px 26px rgba(124, 96, 214, 0.22);
}

#quickStartDialog .modal-actions .primary:hover,
#landingLoginDialog .modal-actions .primary:hover {
  background: linear-gradient(100deg, #7ea6ef 0%, #ad68dc 100%);
}

#quickStartDialog .modal-actions .primary:disabled,
#landingLoginDialog .modal-actions .primary:disabled {
  opacity: 0.72;
}

#landingLoginDialog .simple-login-submit.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-loading-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 999px;
  animation: login-loading-spin 0.75s linear infinite;
}

@keyframes login-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.landing-price-modal {
  width: min(560px, calc(100vw - 32px));
  gap: 14px;
  padding: 22px;
  border: 1px solid #d7eadf;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(31, 138, 106, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f5fbf7 100%);
  color: #17221c;
  box-shadow: 0 26px 80px rgba(23, 34, 28, 0.16);
}

.landing-price-modal .modal-header h2 {
  margin-top: 8px;
  color: #142019;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 800;
}

.landing-price-modal .modal-header p {
  margin-top: 7px;
  color: #52685c;
  font-size: 15px;
  line-height: 1.6;
}

.landing-price-modal .modal-close {
  color: #476256;
}

.landing-price-modal .modal-close:hover {
  background: rgba(17, 99, 73, 0.08);
  color: #123d2f;
}

.landing-price-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf8f1;
  color: #116349;
  font-size: 12px;
  font-weight: 900;
}

.landing-price-offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.landing-price-offers article {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid #d6eadf;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 99, 73, 0.08);
}

.landing-price-offers span {
  color: #5d7166;
  font-size: 13px;
  font-weight: 800;
}

.landing-price-offers strong {
  color: #0f5f46;
  font-size: 24px;
  line-height: 1.12;
  font-weight: 900;
}

.landing-price-offers em {
  align-self: end;
  color: #1f8a6a;
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.landing-price-note {
  margin: 0;
  color: #52685c;
  font-size: 14px;
  line-height: 1.55;
}

.landing-price-modal .modal-actions .ghost-button {
  border: 1px solid #d6eadf;
  color: #225443;
}

.landing-price-modal .modal-actions .ghost-button:hover {
  background: #eaf8f1;
}

.landing-price-modal .modal-actions {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  margin-top: 2px;
}

.landing-price-modal .modal-actions .primary {
  width: min(180px, 100%);
  min-height: 42px;
  margin: 0;
  border-radius: 999px;
  background: #116349;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(17, 99, 73, 0.18);
}

.landing-price-modal .modal-actions .primary:hover {
  background: #0f5f46;
}

#quickStartDialog .account-modal,
#landingLoginDialog .account-modal {
  width: min(326px, calc(100vw - 24px));
  max-height: calc(100dvh - 36px);
  gap: 9px;
  padding: 16px 18px;
}

#quickStartDialog .modal-header h2,
#landingLoginDialog .modal-header h2 {
  font-size: 19px;
}

#quickStartDialog .modal-header p,
#landingLoginDialog .modal-header p {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.35;
}

#quickStartDialog .modal-close,
#landingLoginDialog .modal-close {
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  font-size: 20px;
}

#quickStartDialog .auth-mode-tabs,
#landingLoginDialog .auth-mode-tabs {
  height: 34px;
  padding: 3px;
}

#quickStartDialog .auth-mode-tab,
#landingLoginDialog .auth-mode-tab {
  border-radius: 5px;
  font-size: 10px;
}

#quickStartDialog .account-modal label,
#landingLoginDialog .account-modal label {
  gap: 5px;
  font-size: 10px;
}

#quickStartDialog .account-modal input,
#landingLoginDialog .account-modal input {
  height: 34px;
  padding: 0 10px;
  font-size: 11px;
}

#quickStartDialog .account-modal .remember-password-row,
#landingLoginDialog .account-modal .remember-password-row {
  gap: 6px;
  margin-top: -1px;
  font-size: 10px;
}

#quickStartDialog .account-modal .remember-password-row input,
#landingLoginDialog .account-modal .remember-password-row input {
  width: 12px;
  height: 12px;
}

#quickStartDialog .modal-note,
#landingLoginDialog .modal-login-helper {
  margin-top: -2px;
  font-size: 10px;
  line-height: 1.35;
}

#quickStartDialog .page-error,
#landingLoginDialog .error {
  min-height: 14px;
  margin: -2px 0 0;
  font-size: 10px;
}

#quickStartDialog .modal-actions .primary,
#landingLoginDialog .modal-actions .primary {
  min-height: 34px;
  border-radius: 7px;
  font-size: 10px;
}

.inline-primary {
  width: auto;
  min-width: 112px;
  margin-top: 18px;
  padding: 0 18px;
}

.error {
  min-height: 20px;
  margin-top: 14px;
  color: var(--danger);
  font-size: 13px;
}

.app {
  height: 100vh;
  height: 100svh;
  height: var(--app-height);
  min-height: 0;
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  overflow: hidden;
  background: var(--paper);
}

.sidebar {
  height: 100vh;
  height: 100svh;
  height: var(--app-height);
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  padding: 20px 10px 14px;
  overflow: hidden;
  background: var(--side);
  border-right: 1px solid var(--line);
}

.sidebar-scrim {
  display: none;
}

.floating-theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 120;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: #475569;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(12px);
}

#themeToggleBtn,
.floating-theme-toggle {
  display: none !important;
}

.floating-theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bai-logo {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: #050505;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0;
}

.bai-logo img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.bai-nav {
  display: grid;
  gap: 6px;
}

.bai-nav-item {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 7px;
  background: transparent;
  color: #151515;
  font-size: 14px;
  text-align: left;
}

.bai-nav-item span {
  width: 16px;
  display: inline-grid;
  place-items: center;
  color: #111;
  font-size: 15px;
}

.bai-nav-item.active,
.bai-nav-item:hover {
  background: var(--hover);
}

.bai-nav-item.compact {
  height: 34px;
  color: #383631;
}

.search-wrap {
  padding: 14px 0 6px;
}

.search-wrap input {
  height: 34px;
  border-radius: 7px;
  background: #efede7;
  font-size: 13px;
}

.thread-list {
  min-height: 0;
  overflow: auto;
}

.thread-group {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
}

.thread-group-title {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 6px;
  border-radius: 8px;
  background: #e9e5da;
  color: #332f29;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.thread-group-title:hover {
  background: #ddd8ca;
  color: var(--ink);
}

.thread-group-chevron {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #fffaf0;
  color: inherit;
}

.thread-group-chevron svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thread-group-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.thread-group-count {
  min-width: 22px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #fffaf0;
  color: #6f6758;
  font-size: 11px;
  font-weight: 800;
}

.thread-group-items {
  display: grid;
  gap: 2px;
  padding-left: 2px;
}

.thread-empty {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

.thread-row {
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-radius: 7px;
  background: transparent;
}

.thread-row.active,
.thread-row:hover {
  background: var(--hover);
}

.thread-item {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 8px 8px 12px;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.thread-item strong,
.thread-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-item strong {
  font-size: 13px;
  font-weight: 500;
}

.thread-item span {
  color: var(--muted);
  font-size: 12px;
}

.thread-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1px;
  padding-right: 5px;
  opacity: 0;
  pointer-events: none;
}

.thread-row:hover .thread-actions,
.thread-row.active .thread-actions,
.thread-actions:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.thread-actions button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: #6d6960;
}

.thread-actions button:hover {
  background: #dedbd2;
  color: #111;
}

.thread-actions button.danger:hover {
  background: #f5e4df;
  color: var(--danger);
}

.thread-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thread-menu {
  position: absolute;
  top: 30px;
  right: 4px;
  z-index: 30;
  width: 164px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.16);
}

.thread-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 10px;
  width: 100%;
  height: 10px;
}

.thread-menu button {
  width: 100%;
  height: 36px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 10px;
  border-radius: 8px;
  color: #0d0d0d;
  font-size: 14px;
  text-align: left;
}

.thread-menu button:hover {
  background: #f2f2f2;
}

.thread-menu button.danger {
  color: var(--danger);
}

.thread-menu button.danger:hover {
  background: #fff0ed;
}

.thread-menu svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.thread-rename-form {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px 28px;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d9d9d9;
}

.thread-rename-form input {
  height: 30px;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.thread-rename-form input:focus {
  border-color: transparent;
}

.thread-rename-form button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: #5f5f5f;
}

.thread-rename-form button:hover {
  background: #f2f2f2;
  color: #0d0d0d;
}

.thread-rename-form svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-bottom {
  display: grid;
  gap: 4px;
}

.sidebar-logout-button {
  margin-top: 4px;
  background: #1f1f1f;
  color: #ffffff;
  font-weight: 700;
}

.sidebar-logout-button span {
  color: inherit;
}

.sidebar-logout-button [data-logout-label] {
  width: auto;
  display: inline;
}

.sidebar-logout-button:hover {
  background: #303030;
}

.admin-version {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.admin-version span {
  font-weight: 700;
  color: #3a3a36;
}

.admin-version a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lang-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: #111;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(20, 20, 20, 0.08);
}

.chat-area,
.page-view {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  height: 100svh;
  height: var(--app-height);
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--paper);
}

.page-view {
  grid-template-rows: 64px minmax(0, 1fr);
}

.chat-header {
  position: relative;
  z-index: 40;
  min-height: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: var(--paper);
  overflow: visible;
}

.top-left {
  position: relative;
  z-index: 42;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-sidebar-button {
  width: 36px;
  height: 36px;
  display: none;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
}

.mobile-sidebar-button:hover {
  background: var(--hover);
}

.mobile-sidebar-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}


.top-skeleton {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-skeleton span {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 999px;
  background: transparent url("/chatgpt-pink.svg") center / 20px 20px no-repeat;
}

.top-skeleton i {
  width: 200px;
  height: 18px;
  display: block;
  border-radius: 5px;
  background: #efede7;
}

.chat-meta {
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}

.chat-title {
  font-weight: 700;
}

.chat-subtitle {
  margin-top: 3px;
  font-size: 12px;
}

.top-actions {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  isolation: isolate;
}

.model-picker {
  position: relative;
  z-index: 45;
}

.codex-picker {
  position: relative;
  z-index: 31;
  pointer-events: auto;
}

.model-button {
  width: auto;
  max-width: min(220px, calc(100vw - 198px));
  height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 8px;
  border: 1px solid #e8e3d9;
  border-radius: 999px;
  background: #fffefa;
  color: #171511;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  box-shadow: 0 4px 14px rgba(25, 23, 18, 0.04);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.model-button:hover,
.model-button[aria-expanded="true"] {
  background: #ffffff;
  border-color: #ddd8ce;
  box-shadow: 0 8px 22px rgba(25, 23, 18, 0.08);
}

.model-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #efede7;
  color: #33302b;
  font-size: 11px;
  font-weight: 800;
}

.model-icon img {
  width: 17px;
  height: 17px;
  display: block;
}

.model-icon.claude {
  background: #f4e4d3;
  color: #9a4d22;
}

.model-icon.gemini {
  background: #e8f0ff;
  color: #3157b7;
}

.model-icon.deepseek {
  background: #e8f3ff;
  color: #2266aa;
}

.model-icon.deepseek img {
  width: 20px;
  height: auto;
}

.model-icon.kimi {
  background: #f0eaff;
  color: #5f3cad;
}

.model-icon.glm {
  background: #e8f8ee;
  color: #16834b;
}

.model-icon.minimax {
  background: #fff3df;
  color: #a66200;
}

.model-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-button #modelButtonText {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
}

.model-button-name {
  min-width: 0;
  max-width: 100%;
}

.model-button b {
  color: #76736d;
  font-size: 13px;
  line-height: 1;
}

.model-menu {
  position: fixed;
  top: var(--model-menu-top, 56px);
  left: var(--model-menu-left, 12px);
  width: var(--model-menu-width, min(560px, calc(100vw - 24px)));
  max-height: var(--model-menu-max-height, min(560px, calc(100vh - 92px)));
  overflow: auto;
  z-index: 60;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffefa;
  box-shadow: 0 18px 50px rgba(25, 23, 18, 0.14);
}

.model-pricing-switch {
  position: sticky;
  top: -8px;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 6px;
  align-items: center;
  padding: 8px;
  margin: -8px -8px 8px;
  border-bottom: 1px solid #ede6dc;
  background: #fffefa;
}

.model-pricing-switch span {
  color: #7a7166;
  font-size: 12px;
  font-weight: 700;
}

.model-pricing-switch button {
  min-height: 28px;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #e4ded4;
  border-radius: 6px;
  background: #f7f3eb;
  color: #4d473f;
  font-size: 12px;
  font-weight: 700;
}

.model-pricing-switch button.active {
  border-color: #cdb27e;
  background: #2e2a24;
  color: #fffefa;
}

.model-option {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  color: #111;
  font-size: 13px;
  text-align: left;
}

.model-option-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.model-option-copy strong,
.model-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-option-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.model-option-copy small {
  min-width: 0;
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 4px;
  background: #efede7;
  color: #403b34;
  font-size: 11px;
  line-height: 1;
}

.model-option-tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.model-option-meter {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 5px;
}

.model-rate-badge,
.model-price-pills i {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #ebe6dc;
  border-radius: 999px;
  background: #fffefa;
  color: #4a463f;
  font-style: normal;
  line-height: 1;
}

.model-rate-badge {
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.model-price-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.model-price-pills i {
  padding: 0 6px;
  color: #666057;
  font-size: 11px;
  font-weight: 600;
}

.model-option:hover,
.model-option.active {
  background: #efede7;
}

.login-pill {
  min-width: 62px;
  height: 33px;
  padding: 0 18px;
  border-radius: 999px;
  background: #030303;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.top-doc-button {
  position: relative;
  z-index: 32;
  cursor: pointer;
  pointer-events: auto;
  height: 33px;
  min-width: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffefa;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.top-doc-button:hover {
  background: #efede7;
}

.ghost-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffefa;
  color: var(--ink);
}

.backChat {
  justify-self: end;
}

.messages {
  position: relative;
  min-height: 0;
  overflow: auto;
  padding: 18px max(22px, calc((100vw - 1020px) / 2)) calc(var(--composer-height) + 24px);
  overflow-anchor: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  line-height: 1;
}

.empty-state strong img {
  width: 64px;
  height: 64px;
  display: block;
}

.empty-state strong img.deepseek {
  width: 76px;
  height: 76px;
}

.message {
  display: flex;
  gap: 12px;
  margin: 0 auto 16px;
  max-width: 820px;
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

.message.model-notice {
  justify-content: center;
  margin: 8px auto 18px;
}

.model-switch-notice {
  max-width: min(680px, 92%);
  padding: 5px 14px;
  border-radius: 999px;
  background: #efede7;
  color: #6f6a61;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.avatar {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #efede7;
  color: #5f5c56;
  font-weight: 800;
}

.avatar img {
  width: 22px;
  height: 22px;
  display: block;
}

.avatar.deepseek {
  background: #e8f3ff;
}

.avatar.deepseek img {
  width: 28px;
  height: auto;
}

.message.user {
  flex-direction: row-reverse;
}

.message.user .avatar {
  background: #050505;
  color: #fff;
}

.bubble {
  max-width: min(680px, 88%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.generated-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  width: min(680px, 88%);
  margin-top: 10px;
}

.generated-image-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.generated-image-card-preview {
  display: block;
}

.generated-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f7f4ec;
}

.message-attachment-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  width: min(680px, 88%);
  margin-bottom: 8px;
}

.message-image-attachment {
  width: 112px;
  height: 112px;
  display: block;
  overflow: hidden;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
  background: #f8fbff;
}

.message-image-attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.generated-image-download {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 30px;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.2);
}

.generated-image-download:hover {
  background: rgba(17, 24, 39, 1);
  color: #fff;
}

.image-generation-placeholder {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(680px, 88%);
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.image-generation-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.64), transparent),
    repeating-linear-gradient(45deg, #f3f0e8 0 10px, #ebe7dc 10px 20px);
  background-size: 80px 100%, auto;
  animation: image-placeholder-sweep 1.2s linear infinite;
}

.image-generation-preview-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  color: #7a7469;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.image-generation-preview-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-generation-status {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.image-generation-status strong {
  font-size: 13px;
  line-height: 1.35;
}

.image-generation-status span {
  color: var(--muted);
  font-size: 12px;
}

.image-generation-progress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(251,250,245,0.94));
  box-shadow: 0 8px 28px rgba(17, 17, 17, 0.04);
}

.image-generation-progress.is-hidden {
  display: none;
}

.image-generation-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: #2d2a25;
  font-size: 13px;
  font-weight: 700;
}

.image-generation-progress-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-generation-progress-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.image-generation-progress-countdown {
  color: #111827;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.image-generation-progress-meter {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe7dc;
}

.image-generation-progress-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #111827 0%, #3b82f6 100%);
  transition: width 260ms ease;
}

.image-generation-meter {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe7dc;
}

.image-generation-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #111827;
  transition: width 280ms ease;
}

@keyframes image-placeholder-sweep {
  from { background-position: -80px 0, 0 0; }
  to { background-position: 120px 0, 0 0; }
}

.image-generation-panel {
  display: grid;
  gap: 14px;
  max-width: 820px;
  padding-bottom: 32px;
}

.image-generation-panel label {
  display: grid;
  gap: 8px;
  color: #47433c;
  font-size: 14px;
  font-weight: 700;
}

.image-generation-panel textarea,
.image-generation-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: #171511;
  font: inherit;
  font-size: 16px;
}

.image-generation-panel textarea {
  min-height: 140px;
  padding: 12px;
  resize: vertical;
}

.image-generation-panel select {
  height: 40px;
  padding: 0 10px;
  min-width: 164px;
}

#imageView .page-content {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 220px;
}

.image-generation-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.image-generation-result {
  max-width: 820px;
  margin-top: 18px;
}

.image-result-head {
  margin-bottom: 10px;
  color: #5f5a50;
  font-size: 14px;
  font-weight: 700;
}

.image-generation-result .generated-image-grid {
  width: 100%;
  margin-top: 0;
}

.image-generation-history {
  display: grid;
  gap: 14px;
}

.image-generation-history-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(251,249,242,0.96));
  box-shadow: 0 10px 26px rgba(17, 17, 17, 0.04);
}

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

.image-generation-history-head strong {
  display: block;
  margin-bottom: 4px;
  color: #171511;
  font-size: 15px;
  line-height: 1.35;
}

.image-generation-history-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.image-generation-history-card .generated-image-grid {
  width: 100%;
  margin-top: 0;
}

.markdown-body {
  white-space: normal;
}

.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body > *:last-child {
  margin-bottom: 0;
}

.markdown-body p {
  margin: 0 0 12px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 18px 0 8px;
  color: #0d0d0d;
  font-weight: 700;
  line-height: 1.3;
}

.markdown-body h1 {
  font-size: 24px;
}

.markdown-body h2 {
  font-size: 21px;
}

.markdown-body h3 {
  font-size: 18px;
}

.markdown-body h4 {
  font-size: 16px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 12px;
  padding-left: 24px;
}

.markdown-body li {
  margin: 4px 0;
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f1f1f1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.markdown-body pre {
  margin: 12px 0;
  overflow: auto;
  border-radius: 10px;
  background: #171717;
}

.markdown-body pre code {
  display: block;
  padding: 14px;
  background: transparent;
  color: #f7f7f7;
  line-height: 1.55;
  white-space: pre;
}

.markdown-body .large-message-text {
  max-height: min(60vh, 720px);
  margin: 12px 0;
  padding: 14px;
  overflow: auto;
  border-radius: 10px;
  background: #171717;
  color: #f7f7f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.markdown-body blockquote {
  margin: 12px 0;
  padding-left: 14px;
  border-left: 3px solid #d7d7d7;
  color: #555;
}

.markdown-body hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid #dedede;
}

.markdown-body a {
  color: #0b57d0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-body .table-scroll {
  max-width: 100%;
  margin: 12px 0;
  overflow: auto;
}

.markdown-body table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 14px;
}

.markdown-body th,
.markdown-body td {
  padding: 9px 11px;
  border: 1px solid #dedede;
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: #f7f7f7;
  font-weight: 700;
}

.message-body {
  max-width: min(680px, 88%);
  display: grid;
  gap: 6px;
}

.message-body .bubble {
  max-width: 100%;
}

.thinking-panel {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.thinking-panel summary {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  border-radius: 999px;
  color: #6d6960;
}

.thinking-panel summary::-webkit-details-marker {
  display: none;
}

.thinking-panel summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.thinking-panel[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.thinking-panel summary i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  animation: thinkingPulse 1.1s ease-in-out infinite;
}

.thinking-content {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 2px solid #d7d7d7;
  color: #555;
  font-size: 14px;
}

.search-results-panel {
  width: min(680px, 100%);
  display: grid;
  gap: 8px;
  margin: 0 0 8px;
  color: #0d0d0d;
}

.search-results-title {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.search-results-title::-webkit-details-marker {
  display: none;
}

.search-results-title::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.search-results-panel[open] .search-results-title::after {
  transform: rotate(225deg) translateY(-1px);
}

.search-result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.search-result-card {
  min-width: 0;
  min-height: 74px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffefa;
  color: inherit;
  text-decoration: none;
}

.search-result-card:hover {
  background: #f6f6f6;
}

.search-result-card strong,
.search-result-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-card strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.35;
}

.search-result-card span {
  display: block;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.stream-cursor {
  width: 7px;
  height: 18px;
  display: inline-block;
  border-radius: 999px;
  background: currentColor;
  vertical-align: -3px;
  animation: streamCursor 1s ease-in-out infinite;
}

@keyframes streamCursor {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

@keyframes thinkingPulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.message.user .bubble {
  border-color: #edf3ff;
  background: #edf4ff;
  color: #111827;
}

.message.user .message-body {
  justify-items: end;
}

.message.user .message-actions {
  width: 100%;
}

.user-message-actions {
  justify-content: space-between;
  padding-right: 2px;
  padding-left: 2px;
}

.user-message-actions time {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: max-width 160ms ease, opacity 160ms ease;
}

.message-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.message-action-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-icon-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #6d6960;
}

.message-icon-button:hover {
  background: #efede7;
  color: #111;
}

.message-icon-button.danger {
  color: var(--danger);
}

.message-icon-button.danger:hover {
  background: #f5e4df;
}

.message-icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message-action-buttons time {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  transition: max-width 160ms ease, opacity 160ms ease, margin-left 160ms ease;
}

.message:hover .message-actions time,
.message-actions:hover time,
.message-action-buttons:focus-within time {
  max-width: 130px;
  margin-left: 4px;
  opacity: 1;
}

.message-actions span {
  margin-left: auto;
  white-space: nowrap;
}

body.chatgpt-theme .sidebar {
  background: #f9f9f9;
}

body.chatgpt-theme .bai-logo {
  height: 50px;
  font-size: 21px;
  font-weight: 600;
}

body.chatgpt-theme .bai-nav {
  gap: 2px;
}

body.chatgpt-theme .bai-nav-item {
  height: 36px;
  border-radius: 9px;
  color: #0d0d0d;
  font-weight: 500;
}

body.chatgpt-theme .sidebar-logout-button {
  background: #1f1f1f;
  color: #ffffff;
  font-weight: 700;
}

body.chatgpt-theme .sidebar-logout-button span {
  color: inherit;
}

body.chatgpt-theme .sidebar-logout-button:hover {
  background: #303030;
}

body.chatgpt-theme .search-wrap input {
  background: #ffffff;
}

body.chatgpt-theme .thread-group {
  gap: 6px;
  margin: 8px 0 12px;
}

body.chatgpt-theme .thread-group-title {
  min-height: 32px;
  padding: 0 8px 0 6px;
  background: #f3f3f3;
  color: #555;
  font-size: 12px;
  font-weight: 800;
}

body.chatgpt-theme .thread-group-title:hover {
  background: #e9e9e9;
  color: #0d0d0d;
}

body.chatgpt-theme .thread-group-chevron,
body.chatgpt-theme .thread-group-count {
  background: #ffffff;
}

body.chatgpt-theme .thread-row {
  border-radius: 9px;
}

body.chatgpt-theme .thread-row.active,
body.chatgpt-theme .thread-row:hover {
  background: #ececec;
}

body.chatgpt-theme .thread-item {
  padding: 8px 8px 8px 12px;
}

body.chatgpt-theme .thread-item strong {
  color: #0d0d0d;
  font-size: 14px;
  font-weight: 400;
}

body.chatgpt-theme .thread-item > span {
  display: none;
}

body.chatgpt-theme .thread-actions button:hover,
body.chatgpt-theme .thread-rename-form button:hover {
  background: #dedede;
}

body.chatgpt-theme .thread-menu {
  border-color: rgba(0, 0, 0, 0.08);
  background: #ffffff;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
}

body.chatgpt-theme .thread-rename-form {
  background: #ffffff;
}

body.chatgpt-theme .usage-chart-card {
  border-color: #e5e5e5;
  background: #ffffff;
}

body.chatgpt-theme .usage-chart-header h3 span {
  background: #f4f4f4;
}

body.chatgpt-theme .usage-bar-value,
body.chatgpt-theme .usage-hour-bar span {
  background: rgba(255, 255, 255, 0.96);
  color: #0d0d0d;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

body.chatgpt-theme .usage-toggle {
  border-color: #e5e5e5;
  background: #f4f4f4;
}

body.chatgpt-theme .usage-toggle button {
  background: #ececec;
  color: #5f5f5f;
}

body.chatgpt-theme .usage-toggle button.active {
  background: #0d0d0d;
  color: #ffffff;
  border-color: #0d0d0d;
}

body.chatgpt-theme .usage-day-candle i {
  background: #e7e7e7;
}

body.chatgpt-theme .usage-hour-bar i {
  background: #d8d8d8;
}

body.chatgpt-theme .usage-hour-bar.has-value i {
  background: #4f8f70;
  box-shadow: 0 7px 16px rgba(79, 143, 112, 0.22);
}

body.chatgpt-theme .usage-month-bar:hover .usage-day-candle i,
body.chatgpt-theme .usage-month-bar.active .usage-day-candle i,
body.chatgpt-theme .usage-hour-bar:hover i {
  background: #0d0d0d;
}

body.chatgpt-theme .usage-day-candle b.rising,
body.chatgpt-theme .usage-day-candle b.falling {
  background: #9a9a9a;
}

body.chatgpt-theme .usage-month-bar:hover .usage-day-candle b,
body.chatgpt-theme .usage-month-bar.active .usage-day-candle b {
  background: #0d0d0d;
}

body.chatgpt-theme .chat-header,
body.chatgpt-theme .chat-area,
body.chatgpt-theme .page-view {
  background: #ffffff;
}

body.chatgpt-theme .messages {
  padding: 18px max(22px, calc((100vw - 1020px) / 2)) calc(var(--composer-height) + 24px);
}

body.chatgpt-theme .message {
  max-width: 820px;
  gap: 12px;
  margin-bottom: 16px;
}

body.chatgpt-theme .message.assistant {
  justify-content: flex-start;
}

body.chatgpt-theme .message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

body.chatgpt-theme .bubble {
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
  color: #0d0d0d;
  font-size: 15px;
  line-height: 1.55;
}

body.chatgpt-theme .message.assistant .bubble {
  background: #fffefa;
  border-color: var(--line);
  padding: 12px 14px;
}

body.chatgpt-theme .message.user .bubble {
  background: #edf4ff;
  color: #111827;
  border-color: #edf3ff;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
}

body.chatgpt-theme .message-body {
  max-width: min(680px, 88%);
  display: grid;
  gap: 6px;
}

body.chatgpt-theme .message.assistant .message-body {
  width: auto;
}

body.chatgpt-theme .message.user .message-body {
  max-width: min(680px, 88%);
  justify-items: end;
}

body.chatgpt-theme .avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: #efede7;
  color: #5f5c56;
}

body.chatgpt-theme .avatar img {
  width: 22px;
  height: 22px;
}

body.chatgpt-theme .avatar.deepseek img {
  width: 28px;
  height: auto;
}

body.chatgpt-theme .message.user .avatar {
  display: grid;
}

body.chatgpt-theme .message.user .avatar {
  background: #050505;
  color: #ffffff;
}

body.chatgpt-theme .message-actions {
  min-height: 0;
  padding: 0 4px;
  color: var(--muted);
}

body.chatgpt-theme .thinking-panel {
  margin-bottom: 8px;
  color: #8f8f8f;
}

body.chatgpt-theme .thinking-panel summary {
  min-height: 28px;
  padding: 0;
  color: #8f8f8f;
  font-size: 14px;
}

body.chatgpt-theme .thinking-content {
  max-width: 680px;
  padding: 8px 0 8px 14px;
  border-left-color: #d9d9d9;
  color: #5f5f5f;
}

body.chatgpt-theme .search-results-panel {
  width: min(680px, 100%);
  margin-bottom: 12px;
}

body.chatgpt-theme .search-results-title {
  color: #6f6f6f;
  font-size: 14px;
}

body.chatgpt-theme .search-result-card {
  border-color: #e3e3e3;
  border-radius: 12px;
  background: #ffffff;
}

body.chatgpt-theme .search-result-card:hover {
  background: #f7f7f7;
}

body.chatgpt-theme .message.user .message-actions {
  padding-right: 2px;
  padding-left: 2px;
}

body.chatgpt-theme .message-icon-button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #6b6b6b;
}

body.chatgpt-theme .message-icon-button:hover {
  background: #f2f2f2;
}

body.chatgpt-theme .composer {
  right: max(24px, calc((100vw - 255px - 768px) / 2));
  left: calc(255px + max(24px, calc((100vw - 255px - 768px) / 2)));
  max-width: 768px;
  gap: 6px;
  padding: 12px;
  border-color: #d9d9d9;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
}

body.chatgpt-theme .composer textarea {
  min-height: 48px;
  padding: 10px 8px 4px;
  color: #0d0d0d;
  font-size: 16px;
  line-height: 1.5;
}

body.chatgpt-theme .composer textarea::placeholder {
  color: #8f8f8f;
}

body.chatgpt-theme .tool-button,
body.chatgpt-theme .tool-pill {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f4f4f4;
  color: #2f2f2f;
  font-weight: 600;
}

body.chatgpt-theme .tool-button {
  width: 36px;
  font-size: 22px;
  font-weight: 400;
}

body.chatgpt-theme .tool-pill svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.chatgpt-theme .send-button,
body.chatgpt-theme .tool-pill.active {
  background: #0d0d0d;
  color: #ffffff;
}

body.chatgpt-theme .send-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  font-size: 18px;
}

body.chatgpt-theme .model-button {
  background: #f4f4f4;
  border-radius: 999px;
  height: 34px;
}

body.chatgpt-theme .codex-button {
  background: #f4f4f4;
  border-radius: 999px;
  height: 28px;
}

body.deepseek-theme .chat-header {
  background: #f7f9ff;
}

body.deepseek-theme .composer {
  right: max(24px, calc((100vw - 255px - 840px) / 2));
  left: calc(255px + max(24px, calc((100vw - 255px - 840px) / 2)));
  max-width: 840px;
  gap: 8px;
  padding: 14px 16px 12px;
  border-color: #d6e2f4;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(28, 82, 164, 0.12);
}

body.deepseek-theme .composer textarea {
  min-height: 44px;
  padding: 8px 2px 2px;
  color: #111827;
  font-size: 15px;
  line-height: 1.55;
}

body.deepseek-theme .composer textarea::placeholder {
  color: #8a96aa;
}

body.deepseek-theme .composer-toolbar {
  padding-top: 2px;
}

body.deepseek-theme .composer-tools,
body.deepseek-theme .composer-actions {
  gap: 7px;
}

body.deepseek-theme .tool-button {
  width: 32px;
  height: 32px;
  border: 1px solid #d8e2f0;
  background: #ffffff;
  color: #516276;
  font-size: 18px;
  font-weight: 400;
}

body.deepseek-theme #attach {
  font-size: 16px;
}

body.deepseek-theme .tool-pill {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #d8e2f0;
  background: #ffffff;
  color: #4f6075;
  font-size: 13px;
  font-weight: 600;
}

body.deepseek-theme .tool-button:hover,
body.deepseek-theme .tool-pill:hover {
  border-color: #b8cff0;
  background: #f5f9ff;
  color: #2563d9;
}

body.deepseek-theme .tool-pill.active {
  border-color: #0d0d0d;
  background: #0d0d0d;
  color: #ffffff;
}

body.deepseek-theme .codex-picker {
  display: none;
}

body.deepseek-theme .send-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  background: #2563eb;
  color: #ffffff;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

body.deepseek-theme .send-button:hover {
  background: #1d4ed8;
}

body.deepseek-theme .send-button.is-stop span {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

body.deepseek-theme .model-button {
  height: 34px;
  border: 1px solid #d8e2f0;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2a44;
}

body.deepseek-theme .attachment-list {
  gap: 6px;
}

body.deepseek-theme .attachment-card {
  width: min(216px, 100%);
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  gap: 8px;
  padding: 6px;
  border-color: #d6e2f4;
  border-radius: 10px;
  background: #f7faff;
  color: #1f2a44;
}

body.deepseek-theme .attachment-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ffffff;
  color: #4b6fae;
}

body.deepseek-theme .attachment-meta strong {
  font-size: 11px;
}

body.deepseek-theme .attachment-meta span {
  color: #71809a;
  font-size: 10px;
}

body.deepseek-theme .attachment-meta i {
  background: #2563eb;
}

body.deepseek-theme .attachment-card button {
  background: #e4edf9;
  color: #53677f;
}

.composer {
  position: fixed;
  right: max(18px, calc((100vw - 255px - 820px) / 2));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
  left: calc(255px + max(18px, calc((100vw - 255px - 820px) / 2)));
  z-index: 10;
  display: grid;
  gap: 8px;
  width: auto;
  max-width: 820px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffefa;
  box-shadow: 0 16px 50px rgba(25, 23, 18, 0.08);
  will-change: transform;
}

.composer textarea {
  min-height: 42px;
  max-height: 150px;
  padding: 8px 10px;
  font-size: 15px;
  line-height: 1.5;
  overflow-y: auto;
  overflow-anchor: none;
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.tool-button,
.send-button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #efede7;
  color: #111;
  font-size: 20px;
}

.tool-pill {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #efede7;
  color: #2f2d28;
  font-size: 13px;
  font-weight: 700;
}

.tool-pill.active {
  background: #050505;
  color: #fff;
}

.codex-picker {
  position: relative;
}

.codex-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #efede7;
  color: #2f2d28;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.codex-picker:focus-within .codex-menu {
  display: grid;
}

.codex-button b {
  font-size: 12px;
  line-height: 1;
}

.codex-button.disabled,
.codex-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.codex-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 186px;
  max-height: min(260px, calc(var(--app-height) - 160px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #ded8cb;
  border-radius: 14px;
  background: #fffefa;
  box-shadow: 0 16px 42px rgba(25, 23, 18, 0.16);
  z-index: 50;
}

.codex-section-label {
  padding: 8px 10px 6px;
  color: #6a6458;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.codex-option {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 10px;
  text-align: left;
  background: transparent;
  color: #2f2d28;
}

.codex-option span {
  font-size: 13px;
  font-weight: 700;
}

.codex-option small {
  font-size: 11px;
  color: #726b5f;
}

.codex-option:hover,
.codex-option.active {
  background: #f4f1e8;
}

.send-button {
  background: #050505;
  color: #fff;
}

.send-button.is-stop {
  display: grid;
  place-items: center;
}

.send-button.is-stop span {
  width: 12px;
  height: 12px;
  display: block;
  border-radius: 3px;
  background: currentColor;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-card {
  width: min(230px, 100%);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid #e0ddd5;
  border-radius: 12px;
  background: #efede7;
  color: #37342f;
}

.attachment-card.error {
  border-color: #efc4bc;
  background: #fff2ef;
}

.attachment-thumb {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: #fffefa;
  color: #6d6960;
  font-size: 12px;
  font-weight: 800;
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.attachment-meta strong,
.attachment-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta strong {
  font-size: 12px;
}

.attachment-meta span {
  color: #77736a;
  font-size: 11px;
}

.attachment-card.error .attachment-meta span {
  color: var(--danger);
}

.attachment-meta i {
  height: 3px;
  border-radius: 999px;
  background: #050505;
}

.attachment-card.ready .attachment-meta i,
.attachment-card.error .attachment-meta i {
  display: none;
}

.attachment-card button {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #d8d4cb;
  color: #111;
  font-size: 12px;
  line-height: 1;
}

.page-error {
  min-height: 20px;
  margin: 12px 0;
  color: var(--danger);
  font-size: 13px;
}

.page-error.success-message {
  color: #237a3b;
}

.page-content {
  width: min(1180px, calc(100% - 40px));
  min-height: 0;
  margin: 0 auto;
  padding: 34px 0 calc(34px + env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-block: 24px calc(96px + env(safe-area-inset-bottom));
}

.pricing-page-content {
  width: min(1080px, calc(100% - 32px));
  padding-top: 18px;
}

#openclawConfigView .page-content,
#claudeCodeView .page-content {
  width: min(1280px, calc(100% - 40px));
}

#rechargeView .page-content {
  width: min(1180px, calc(100% - 40px));
}

.api-hero,
.profile-card,
.history-card,
.info-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
}

.api-hero {
  padding: 26px;
}

.usage-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.usage-referrer-line {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.usage-admin-tabs {
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
}

.admin-usage-tab-panel {
  margin-top: 14px;
}

.admin-usage-subscription-layout {
  display: grid;
  gap: 14px;
}

.admin-usage-overview-grid,
.admin-usage-window-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.admin-usage-window-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

.admin-usage-window-card {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.admin-usage-window-card strong {
  font-size: 15px;
}

.admin-usage-window-card small,
.admin-usage-window-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.provider-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.api-hero h2,
.profile-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.info-grid article {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

.info-grid span,
.history-card span {
  color: var(--muted);
  font-size: 12px;
}

.info-grid strong {
  overflow-wrap: anywhere;
}

.info-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-balance-card strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.account-secret-card {
  display: grid;
  gap: 10px;
}

.account-secret-card > span {
  color: var(--muted);
  font-size: 12px;
}

.account-secret-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.account-secret-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-secret-row strong {
  min-width: 0;
}

.account-copy-button {
  white-space: nowrap;
}

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

.usage-summary-grid article {
  min-height: auto;
  padding: 16px;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}

.usage-stat-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.usage-stat-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.usage-stat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.usage-stat-blue {
  background: #dbeafe;
  color: #2563eb;
}

.usage-stat-amber {
  background: #fef3c7;
  color: #d97706;
}

.usage-stat-green {
  background: #dcfce7;
  color: #16a34a;
}

.usage-stat-purple {
  background: #f3e8ff;
  color: #9333ea;
}

.usage-summary-grid span {
  display: block;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.usage-summary-grid small {
  display: block;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 6px;
  word-break: break-word;
}

.usage-summary-grid strong {
  display: block;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.usage-stat-green-text {
  color: #16a34a !important;
}

.usage-stat-muted-line {
  color: #9ca3af !important;
}

.usage-user-stats #usageBalance,
.usage-user-stats #usageTotalTokens {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#usageBalance {
  font-size: clamp(13px, 1.35vw, 16px);
  letter-spacing: 0;
  line-height: 1.15;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

#rechargeStatBalance {
  font-size: clamp(12px, 1.15vw, 15px);
  letter-spacing: 0;
  line-height: 1.18;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.usage-summary-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.usage-summary-grid small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.usage-chart-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.usage-page-hero {
  display: none;
}

#usageView .page-content {
  width: 100%;
  margin: 0;
  padding: 16px 20px calc(28px + env(safe-area-inset-bottom));
  background: #f9fafb;
}

#adminUsageUsageSection {
  display: grid;
  gap: 24px;
  padding-top: 0;
}

.admin-usage-tab-panel.hidden {
  display: none !important;
}

/* Keep admin-only recharge/subscription panels close to the legacy spacing. */
#adminUsageRechargeSection,
#adminUsageSubscriptionSection {
  gap: 16px;
}

.usage-page-hero h2 {
  margin-bottom: 4px;
}

.usage-page-hero p {
  max-width: 720px;
}

.usage-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 0;
  align-items: stretch;
}

.usage-filter-card {
  display: grid;
  gap: 14px;
  margin-top: 0;
  padding: 16px;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.usage-filter-card .usage-chart-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

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

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

.usage-toggle {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.usage-toggle button {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.usage-toggle button.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
}

.usage-chart-header h3 {
  margin: 0 0 5px;
  font-size: 15px;
  letter-spacing: 0;
}

.usage-chart-header h3 span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  border-radius: 7px;
  background: #efede7;
  font-size: 14px;
}

.usage-chart-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.usage-chart {
  min-height: 232px;
  overflow-x: hidden;
  padding: 8px 0 0;
}

.usage-chart-frame {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
}

.usage-hour-frame {
  min-width: 720px;
}

.usage-y-axis {
  height: 206px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.usage-plot {
  position: relative;
  min-height: 206px;
}

.usage-grid-lines {
  position: absolute;
  inset: 0 0 28px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.usage-grid-lines i {
  display: block;
  border-top: 1px solid #e5e7eb;
}

.usage-month-bars {
  position: relative;
  z-index: 1;
  height: 206px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: clamp(5px, 1vw, 12px);
}

.usage-month-bar {
  position: relative;
  min-width: 0;
  height: 206px;
  display: grid;
  grid-template-rows: 28px 1fr 22px;
  align-items: end;
  justify-items: center;
  gap: 6px;
  padding: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.usage-bar-value,
.usage-hour-bar span {
  position: relative;
  z-index: 2;
  max-width: 72px;
  padding: 2px 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #050505;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.usage-month-bar:hover .usage-bar-value,
.usage-month-bar.value-pinned .usage-bar-value,
.usage-hour-bar:hover span,
.usage-hour-bar.value-pinned span {
  opacity: 1;
}

.usage-hour-bar i {
  width: min(100%, 24px);
  min-height: 3px;
  display: block;
  border-radius: 8px 8px 3px 3px;
  background: #d8d0c0;
  box-shadow: inset 0 0 0 1px rgba(70, 58, 38, 0.08);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.usage-hour-bar.has-value i {
  background: #2563eb;
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.usage-hour-bar.empty i {
  opacity: 0.45;
}

.usage-month-bar i {
  width: 100%;
  max-width: 38px;
  min-height: 10px;
  display: block;
  border-radius: 10px 10px 4px 4px;
  background: #38bdf8;
  transition: background 160ms ease, transform 160ms ease;
}

.usage-month-bar:hover i,
.usage-month-bar.active i,
.usage-hour-bar:hover i,
.usage-hour-bar.active i {
  background: #2563eb;
  transform: translateY(-3px);
}

.usage-hour-bar b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.usage-month-bar em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.usage-day-candle {
  position: relative;
  width: 100%;
  max-width: 42px;
  height: 180px;
  display: block;
}

.usage-day-candle i {
  position: absolute;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #b8b1a3;
}

.usage-day-candle b {
  position: absolute;
  left: 50%;
  width: 18px;
  transform: translateX(-50%);
  border-radius: 4px;
}

.usage-day-candle b.rising {
  background: #0b7a39;
}

.usage-day-candle b.falling {
  background: #c0392b;
}

.usage-month-bar:hover .usage-day-candle i,
.usage-month-bar.active .usage-day-candle i {
  background: #5c5548;
}

.usage-month-bar:hover .usage-day-candle b,
.usage-month-bar.active .usage-day-candle b {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.usage-month-bar.active em {
  color: #050505;
  font-weight: 800;
}

.usage-hour-card {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.usage-hour-chart {
  min-height: 210px;
  overflow-x: auto;
}

.usage-hour-header h3 {
  font-size: 15px;
}

.usage-hour-bars {
  position: relative;
  z-index: 1;
  height: 206px;
  display: grid;
  grid-template-columns: repeat(24, minmax(26px, 1fr));
  align-items: end;
  gap: 5px;
}

.usage-hour-bar {
  min-width: 0;
  height: 206px;
  display: grid;
  grid-template-rows: 28px 1fr 22px;
  align-items: end;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.usage-month-bar.active b {
  color: #050505;
}

.usage-detail-title {
  margin: 18px 0 10px;
  font-size: 18px;
}

.usage-log-query-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: start;
  gap: 10px;
  margin: 0;
}

.usage-date-picker {
  position: relative;
}

.usage-date-picker-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.usage-date-picker[data-open="true"] .usage-date-picker-trigger {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.usage-date-picker-icon,
.usage-date-picker-chevron {
  color: #9ca3af;
  flex: 0 0 auto;
}

.usage-date-picker-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border: 1.6px solid currentColor;
  border-radius: 4px;
}

.usage-date-picker-icon::before {
  content: "";
  position: absolute;
  left: -1.6px;
  right: -1.6px;
  top: 3px;
  border-top: 1.6px solid currentColor;
}

.usage-date-picker-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.usage-date-picker-dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 80;
  min-width: 320px;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.usage-date-picker-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
}

.usage-date-picker-presets button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b5563;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.usage-date-picker-presets button:hover {
  background: #f3f4f6;
}

.usage-date-picker-presets button.active {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.usage-date-picker-divider {
  border-top: 1px solid #f3f4f6;
}

.usage-date-picker-custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  padding: 12px;
}

.usage-date-picker-custom label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.usage-date-picker-custom input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 6px 8px;
}

.usage-date-picker-arrow {
  padding-bottom: 9px;
  color: #9ca3af;
  font-weight: 700;
}

.usage-date-picker-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 8px 8px;
}

.usage-date-picker-actions button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: #0d9488;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 16px;
  cursor: pointer;
}

.usage-date-picker-actions button:hover {
  background: #0f766e;
}

.usage-log-query-form .ghost-button {
  min-width: 64px;
  justify-self: start;
}

.usage-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.usage-detail-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.usage-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.usage-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.usage-time-col {
  width: 16%;
}

.usage-type-col {
  width: 10%;
}

.usage-model-col {
  width: 18%;
}

.usage-official-cost-col {
  width: 28%;
}

.usage-rmb-col {
  width: 14%;
}

.usage-duration-col {
  width: 14%;
}

.usage-table th,
.usage-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.usage-table th {
  color: var(--muted);
  font-weight: 700;
  background: #f8fafc;
  white-space: nowrap;
}

.usage-table th,
.usage-table td,
.usage-table-note,
.usage-pagination {
  font-variant-numeric: tabular-nums;
}

.usage-table tr:last-child td {
  border-bottom: 0;
}

.usage-log-row {
  cursor: pointer;
}

.usage-time-cell,
.usage-type-cell,
.usage-duration-cell {
  white-space: nowrap;
}

.usage-model-cell {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.usage-model-stack {
  display: grid;
  gap: 4px;
}

.usage-model-stack strong {
  font-size: 13px;
}

.usage-model-stack small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.usage-type-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 700;
}

.usage-token-cell {
  display: grid;
  gap: 4px;
  align-content: start;
}

.usage-official-cost-head,
.usage-official-cost-cell {
  text-align: left;
}

.usage-money-cell,
.usage-duration-cell {
  text-align: right;
}

.usage-official-cost-cell .usage-token-cell {
  justify-items: start;
}

.usage-official-cost-cell .usage-billing-toggle {
  align-self: start;
}

.usage-token-cell strong {
  font-size: 14px;
}

.usage-token-cell small {
  color: var(--muted);
  font-size: 11px;
}

.usage-token-cell b {
  color: var(--ink);
  font-weight: 700;
}

.usage-subscription-deduction {
  display: inline-flex;
  justify-content: flex-end;
  width: 100%;
  color: #1f7a3b;
  font-size: 13px;
  font-weight: 700;
}

.usage-billing-toggle {
  align-self: end;
  margin-top: 2px;
  border: 0;
  background: transparent;
  color: #2f4f9f;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}

.usage-billing-toggle:hover {
  color: #17357c;
  text-decoration: underline;
}

.usage-billing-detail-row td {
  white-space: normal;
  background: #fcfaf4;
}

.usage-billing-popover {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.usage-table-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.usage-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-bottom: env(safe-area-inset-bottom);
  flex-wrap: wrap;
}

.usage-table-footer .usage-table-note {
  margin: 0;
}

.usage-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.usage-pagination button,
.usage-pagination-ellipsis {
  min-width: 38px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.usage-pagination button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.usage-pagination button:hover:not(:disabled) {
  border-color: #d4c8a8;
  background: #fffaf0;
}

.usage-pagination button.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.usage-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.usage-pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.usage-distribution-card {
  align-content: start;
}

.usage-distribution-list {
  display: grid;
  min-height: 246px;
}

.usage-distribution-table {
  width: 100%;
  align-self: start;
  overflow: auto;
  font-size: 12px;
}

.usage-distribution-table-head,
.usage-distribution-table-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.6fr) minmax(70px, 0.8fr) minmax(70px, 0.8fr) minmax(70px, 0.8fr);
  gap: 10px;
  align-items: center;
  min-width: 440px;
}

.usage-distribution-table-head {
  padding-bottom: 8px;
  color: #6b7280;
  font-weight: 600;
}

.usage-distribution-table-row {
  border-top: 1px solid #f3f4f6;
  padding: 8px 0;
  color: #4b5563;
}

.usage-distribution-table-row strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-distribution-table-head span:not(:first-child),
.usage-distribution-table-row span:not(:first-child) {
  text-align: right;
}

.usage-distribution-cost {
  color: #16a34a;
  font-weight: 600;
}

.usage-distribution-empty {
  min-height: 190px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  color: #64748b;
  text-align: center;
}

.usage-distribution-empty strong {
  color: #0f172a;
  font-size: 14px;
}

.code-block {
  margin: 14px 0 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  color: #f6f1e7;
  line-height: 1.55;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
}

.api-key-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
}

.key-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
}

.key-form label {
  margin-top: 0;
}

.key-form .primary {
  width: auto;
  min-width: 120px;
  margin-top: 0;
  padding: 0 18px;
}

#epayRechargeForm {
  grid-template-columns: auto minmax(170px, 240px) auto;
}

#rechargeRedeemForm {
  grid-template-columns: minmax(0, 1fr) auto;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.22);
}

.api-key-modal {
  width: min(365px, calc(100vw - 24px));
  gap: 18px;
  padding: 14px;
  border: 0;
  border-radius: 3px;
  background: #2b2b2d;
  color: #f5f5f5;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.modal-header p {
  margin: 18px 0 0;
  color: #b8b8bb;
  font-size: 15px;
  line-height: 1.7;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: transparent;
  color: #e7e7e7;
  font-size: 26px;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.account-modal {
  width: min(440px, calc(100vw - 28px));
  gap: 16px;
  border-radius: 18px;
}

.account-modal .modal-header p,
.account-modal .modal-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.account-modal .modal-close {
  color: #111;
}

.account-modal .modal-close:hover {
  background: #f1f0eb;
  color: #111;
}

.account-modal label {
  margin-top: 0;
}

.account-modal input {
  height: 46px;
  border-radius: 12px;
}

.account-modal select {
  height: 46px;
  border-radius: 12px;
}

.inline-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.inline-code-row .ghost-button {
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d7d2c7;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2933;
  font-weight: 700;
}

.inline-code-row .ghost-button:hover {
  border-color: #c8c1b3;
  background: #f6f3eb;
  color: #111111;
}

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

.account-result-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #f6f4ee;
}

.account-result-box div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.account-result-box span {
  color: var(--muted);
}

.account-result-box p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.account-bind-panel {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
}

.account-bind-panel label {
  margin-top: 0;
}

.marketing-hero-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.marketing-group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #e4dccf;
  border-radius: 999px;
  background: #faf6ee;
  color: #5e513f;
  font-size: 12px;
  font-weight: 700;
}

.marketing-summary-grid {
  margin-top: 0;
}

.marketing-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.marketing-link-row input {
  background: #fff;
}

.marketing-payout-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.marketing-payout-form input {
  min-width: 0;
  background: #fff;
}

.marketing-payout-form--compact {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.marketing-withdrawal-apply-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.marketing-withdrawal-apply-row input {
  min-width: 0;
  background: #fff;
}

.marketing-withdrawal-apply-row .inline-primary {
  height: 38px;
  white-space: nowrap;
}

.marketing-search-list {
  margin-top: 12px;
}

.marketing-claim-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.marketing-claim-row > span,
.marketing-claim-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.marketing-list {
  display: grid;
  gap: 12px;
}

.marketing-compact-list {
  margin-bottom: 14px;
}

.marketing-segment-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.marketing-segment-nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.marketing-segment-nav button.active {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(20, 184, 166, 0.1);
}

.marketing-segment-nav button[data-marketing-tab-group="data"]:first-of-type {
  margin-left: 0;
}

.marketing-segment-nav button[data-marketing-tab-group="data"] {
  background: #fbfaf6;
}

.marketing-segment-nav button[data-marketing-tab-group="data"]:nth-of-type(4) {
  flex-basis: 100%;
}

.marketing-segment-nav strong {
  font-size: 12px;
  line-height: 1.1;
}

.marketing-segment-nav span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.marketing-segment-nav em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.marketing-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.marketing-tab-nav button {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 8px;
  align-items: baseline;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.marketing-tab-nav button.active {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(20, 184, 166, 0.1);
}

.marketing-tab-nav span {
  font-size: 13px;
  font-weight: 800;
}

.marketing-tab-nav strong {
  font-size: 13px;
}

.marketing-tab-nav em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.marketing-list-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
}

.marketing-list-title strong {
  color: var(--text);
  font-size: 14px;
}

.marketing-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.marketing-table-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.marketing-table-toolbar em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.marketing-table-toolbar button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.marketing-table-toolbar button.active {
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(20, 184, 166, 0.1);
  color: #0f766e;
}

.marketing-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
}

.marketing-table-wrap--compact {
  background: #fff;
}

.marketing-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.marketing-table th,
.marketing-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.marketing-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: #f3f1ea;
  white-space: nowrap;
}

.marketing-table td strong {
  display: block;
  font-size: 13px;
}

.marketing-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.marketing-table tbody tr:last-child td {
  border-bottom: 0;
}

.marketing-table--compact {
  min-width: 820px;
}

.marketing-table--compact th,
.marketing-table--compact td {
  padding: 9px 10px;
  font-size: 12px;
}

.marketing-table--visits {
  min-width: 900px;
}

.marketing-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.marketing-pagination span {
  margin-right: auto;
}

.marketing-pagination button {
  min-width: 32px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.marketing-pagination button.active {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(20, 184, 166, 0.1);
  color: #0f766e;
}

.marketing-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.marketing-pagination--summary {
  justify-content: flex-end;
}

.marketing-pagination--summary span {
  margin-right: 0;
}

.marketing-pill {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 0 !important;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e !important;
  font-size: 11px !important;
  font-weight: 800;
  white-space: nowrap;
}

.marketing-pill--muted {
  background: #f3f1ea;
  color: var(--muted) !important;
}

.marketing-list-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf6;
}

.marketing-list-head {
  display: grid;
  gap: 4px;
}

.marketing-list-head strong {
  font-size: 15px;
}

.marketing-list-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.marketing-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.marketing-list-grid div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f1ea;
}

.marketing-list-grid span {
  color: var(--muted);
  font-size: 12px;
}

.marketing-list-grid strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.marketing-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  background: #fbfaf6;
}

.admin-marketing-withdrawals {
  margin-top: 10px;
}

.admin-marketing-withdrawal {
  background: #fff;
}

.admin-marketing-money-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}

.text-mini-button {
  margin-left: 4px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.text-mini-button:hover {
  background: #f3f1ea;
}

.text-mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.marketing-correction-row {
  display: grid;
  grid-template-columns: 135px 84px minmax(0, 1fr) minmax(120px, 220px);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

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

.marketing-correction-row strong {
  color: var(--text);
  font-size: 12px;
}

.marketing-correction-row em,
.marketing-correction-row small {
  overflow-wrap: anywhere;
  font-style: normal;
}

.marketing-withdrawal-row {
  display: grid;
  grid-template-columns: 88px 110px 72px minmax(150px, 1fr) 110px minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

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

.marketing-withdrawal-row strong {
  color: var(--text);
  font-size: 13px;
}

.marketing-withdrawal-row em,
.marketing-withdrawal-row small {
  overflow-wrap: anywhere;
  font-style: normal;
}

.admin-withdrawal-row {
  display: grid;
  grid-template-columns: 82px 110px 104px minmax(150px, 1fr) minmax(90px, 140px) minmax(80px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

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

.admin-withdrawal-row strong {
  color: var(--text);
  font-size: 13px;
}

.admin-withdrawal-row em,
.admin-withdrawal-row small {
  overflow-wrap: anywhere;
  font-style: normal;
}

.admin-withdrawal-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 120px minmax(160px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.admin-withdrawal-actions input {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.admin-withdrawal-panel {
  margin: 14px 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.admin-withdrawal-date-list {
  display: grid;
  gap: 10px;
}

.admin-withdrawal-date-group {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.admin-withdrawal-date-title {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-withdrawal-management-row {
  display: grid;
  grid-template-columns: minmax(96px, 1.2fr) minmax(120px, 1.3fr) repeat(3, minmax(86px, 0.9fr)) minmax(150px, 1.4fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.admin-withdrawal-management-row strong {
  color: var(--text);
  font-size: 13px;
}

.admin-withdrawal-management-row em,
.admin-withdrawal-management-row small {
  overflow-wrap: anywhere;
  font-style: normal;
}

.admin-withdrawal-management-row em,
.admin-withdrawal-management-row small,
.admin-withdrawal-management-actions {
  grid-column: 1 / -1;
}

.admin-withdrawal-management-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.admin-withdrawal-management-actions input {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.success-text {
  color: #167a3d !important;
}

.api-key-name-area label {
  margin-top: 0;
  gap: 10px;
  color: #b8b8bb;
  font-size: 15px;
}

.api-key-name-area input {
  height: 44px;
  border: 0;
  border-radius: 9px;
  background: #5a5a5a;
  color: #ffffff;
  font-size: 15px;
}

.api-key-name-area input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.api-key-secret-box {
  display: grid;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.api-key-secret-box textarea {
  max-height: 92px;
  min-height: 66px;
  overflow: auto;
  padding: 12px 14px;
  border: 0;
  border-radius: 9px;
  background: #5a5a5a;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  resize: none;
  white-space: pre-wrap;
}

.api-key-secret-box textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.api-key-modal .modal-actions {
  justify-content: center;
}

.modal-actions .primary {
  min-width: 126px;
  min-height: 44px;
  margin-top: 0;
  padding: 0 18px;
  border-radius: 11px;
  background: #111111;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);
}

.modal-actions .primary:hover {
  background: #2f2f2f;
}

.modal-actions .primary:disabled {
  opacity: 0.65;
  cursor: default;
}

.modal-actions .ghost-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.modal-actions .ghost-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
}

.account-modal .modal-actions .ghost-button {
  border-color: #d7d2c7;
  background: #ffffff;
  color: #1f2933;
  box-shadow: none;
}

.account-modal .modal-actions .ghost-button:hover {
  border-color: #c8c1b3;
  background: #f6f3eb;
  color: #111111;
}

.api-key-modal .page-error {
  min-height: 0;
  margin: -6px 0 0;
  color: #ff9b90;
}

.new-key-box,
.key-card {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
}

.new-key-box {
  display: grid;
  gap: 8px;
}

.new-key-box span {
  color: var(--danger);
  font-size: 12px;
}

.new-key-box code {
  overflow-wrap: anywhere;
  color: #111;
}

.payment-modal {
  width: min(680px, calc(100vw - 28px));
  border-radius: 14px;
}

.payment-modal .modal-header p {
  color: var(--muted);
}

.payment-modal .modal-close {
  color: #111111;
}

.payment-modal .modal-close:hover {
  background: #f1f0eb;
  color: #111111;
}

.alipay-cashier {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.alipay-cashier__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
}

.alipay-cashier__head > div:first-child {
  display: grid;
  gap: 6px;
}

.alipay-cashier__head span {
  color: #6b7280;
  font-size: 13px;
}

.alipay-cashier__head strong {
  color: #111827;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.alipay-method {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #111827;
  font-weight: 800;
}

.alipay-method i {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #1677ff;
  color: #ffffff;
  font-style: normal;
  font-size: 15px;
  font-weight: 900;
}

.alipay-cashier__main {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.alipay-cashier__summary,
.alipay-cashier__amount {
  display: grid;
  gap: 6px;
  text-align: center;
}

.alipay-cashier__summary span,
.alipay-cashier__amount span,
.alipay-cashier__meta span {
  color: #6b7280;
  font-size: 13px;
}

.alipay-cashier__summary strong {
  color: #111827;
  font-size: 18px;
}

.alipay-cashier__summary em {
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.alipay-cashier__amount strong {
  color: #111827;
  font-size: 38px;
  line-height: 1.1;
}

.alipay-cashier__qr {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  text-align: center;
}

.alipay-cashier__qr img {
  width: 230px;
  height: 230px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.alipay-cashier__qr strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 16px;
}

.alipay-cashier__qr span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.alipay-cashier__meta {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #f9fafb;
}

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

.alipay-cashier__meta code,
.alipay-cashier__meta strong {
  color: #111827;
  font-size: 13px;
}

.alipay-cashier__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.alipay-cashier__actions .primary {
  min-height: 42px;
  margin: 0;
}

.alipay-cashier__paid {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 34px 22px;
  text-align: center;
}

.alipay-cashier__paid strong {
  color: #111827;
  font-size: 26px;
}

.alipay-cashier__paid span {
  color: #6b7280;
  line-height: 1.7;
}

.alipay-cashier__paid code {
  max-width: 100%;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
}

.alipay-cashier__paid .primary {
  margin: 6px 0 0;
}

.alipay-cashier--paid .alipay-cashier__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #1677ff;
  color: #ffffff;
}

.alipay-cashier--paid .alipay-cashier__bar strong {
  font-size: 20px;
}

.key-list {
  margin-top: 12px;
}

.subscription-plan-list {
  display: grid;
  gap: 22px;
}

.subscription-plan-section {
  display: grid;
  gap: 12px;
}

.subscription-section-head {
  display: grid;
  gap: 4px;
}

.subscription-section-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.subscription-section-head p {
  margin: 0;
  color: #77756f;
  font-size: 13px;
}

.subscription-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.subscription-card {
  margin-top: 0;
  border-radius: 16px;
  border-color: #d9d3c7;
  background: linear-gradient(180deg, #fffef9 0%, #fffaf0 100%);
}

.subscription-card-general {
  border-color: #cbd8cc;
  background: linear-gradient(180deg, #fbfff9 0%, #f1faef 100%);
}

.subscription-card-locked {
  border-color: #e0e0dd;
  background: #f3f2ee;
  color: #77746d;
}

.subscription-card-locked .subscription-price,
.subscription-card-locked strong,
.subscription-card-locked code {
  color: #77746d;
}

.subscription-card-locked .subscription-compare,
.subscription-card-locked .subscription-shared-note {
  color: #8a8780;
}

.subscription-card-head p {
  margin-top: 4px;
}

.subscription-card-status {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.subscription-usage-ring {
  --usage-percent: 0;
  position: relative;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  padding: 5px;
  display: grid;
  place-items: center;
  color: #163c23;
  background:
    radial-gradient(circle at center, #fbfff9 0 57%, transparent 58%),
    conic-gradient(#2f8a48 calc(var(--usage-percent) * 1%), #e3d7bf 0);
  box-shadow: inset 0 0 0 1px rgba(48, 94, 55, 0.12), 0 8px 18px rgba(42, 91, 53, 0.12);
}

.subscription-usage-ring span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.subscription-usage-ring small {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #5e7761;
}

.subscription-locked-badge {
  border-color: #d8d5ce;
  background: #eceae5;
  color: #6f6a60;
}

.subscription-shared-note {
  max-width: 300px;
  color: #656565;
}

.subscription-price {
  margin-top: 12px;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  color: #141414;
}

.subscription-price small {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #7b7b7b;
}

.subscription-hint {
  margin-top: 10px;
  gap: 8px;
}

.subscription-usage-layout {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.subscription-usage-grid {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #383838;
}

.subscription-daily-usage span:first-child {
  font-weight: 700;
  color: #1d3b25;
}

.subscription-compare {
  margin-top: 12px;
  font-size: 13px;
  color: #7d7d7d;
}

.subscription-buy-button {
  min-width: 132px;
}

.subscription-buy-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.subscription-card-locked .subscription-buy-button:disabled {
  opacity: 0.7;
}

.subscribe-confirm-modal {
  width: min(460px, calc(100vw - 28px));
}

.subscribe-confirm-box {
  gap: 12px;
}

.subscribe-confirm-box div {
  align-items: baseline;
}

.subscribe-confirm-box strong {
  text-align: right;
}

.subscribe-confirm-box .subscribe-balance-ok strong {
  color: #167a3d;
}

.subscribe-confirm-box .subscribe-balance-short strong {
  color: #b42318;
}

.subscribe-payment-method {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  align-items: center;
  gap: 12px;
}

.subscribe-payment-method span {
  color: var(--muted);
}

.subscribe-payment-method select {
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.subscribe-confirm-note {
  padding-top: 8px;
  border-top: 1px solid #e5dfd3;
}

.api-key-empty {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.api-key-empty span {
  color: var(--muted);
  font-size: 13px;
}

.api-key-table {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.04);
}

.api-key-table-head,
.api-key-table-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.86fr) minmax(220px, 1.25fr) minmax(140px, 0.72fr) minmax(72px, auto);
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
}

.api-key-table-head {
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.api-key-table-row {
  min-height: 58px;
  border-bottom: 1px solid #eef2f7;
  color: var(--ink);
  font-size: 14px;
  transition: background-color 160ms ease;
}

.api-key-table-row:last-child {
  border-bottom: 0;
}

.api-key-table-row strong,
.api-key-table-row code,
.api-key-table-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-key-secret-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.api-key-table-row code {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.api-key-actions {
  display: grid;
  align-items: center;
  justify-items: stretch;
  min-width: 0;
}

.api-key-copy,
.api-key-doc,
.api-key-delete {
  width: auto;
  justify-self: stretch;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 10px;
  background: #ffffff;
  font-weight: 700;
  text-align: center;
}

.api-key-secret-inline .api-key-copy {
  flex: 0 0 auto;
  color: #0f766e;
}

.api-key-copy,
.api-key-doc {
  color: var(--ink);
}

.api-key-delete {
  color: var(--danger);
}

.config-help-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.config-help-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.config-help-card {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  text-align: left;
}

.config-help-card:hover {
  border-color: #d8cbb8;
  background: #fffaf0;
}

.config-help-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.config-help-card strong {
  font-size: 16px;
}

.config-help-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.config-help-card.disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
  width: 100%;
}

.doc-nav {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-right: 1px solid var(--line);
}

.doc-nav-item {
  width: calc(100% - 14px);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #4c4a45;
  text-align: left;
}

.doc-nav-item:hover {
  background: #f4f2ec;
  color: var(--ink);
}

.doc-nav-item.active {
  border-left-color: #111;
  background: #f4f2ec;
  color: #111;
}

.doc-nav-item:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.doc-nav-item span {
  color: inherit;
  opacity: 0.66;
  font-size: 12px;
}

.doc-panel {
  min-width: 0;
  max-width: 960px;
}

.doc-layout > .doc-panel {
  width: 100%;
}

@media (min-width: 1500px) {
  #openclawConfigView .page-content,
  #claudeCodeView .page-content {
    width: min(1440px, calc(100% - 64px));
  }

  .doc-layout {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1040px);
    justify-content: center;
  }

  .doc-panel {
    max-width: 1040px;
  }

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

}

.doc-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.doc-steps article,
.doc-steps li {
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.doc-steps li {
  list-style: none;
}

.doc-steps span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.doc-steps p {
  margin: 0;
}

.doc-steps code {
  color: var(--ink);
}

.claude-section {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  margin-top: 18px;
}

.model-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffefa;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.openclaw-command-list {
  display: grid;
  gap: 14px;
}

.openclaw-key-form {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.openclaw-key-form label {
  flex: 1;
}

.openclaw-key-form input {
  margin-top: 7px;
}

.openclaw-command-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.openclaw-command-card > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.openclaw-model-picker {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.openclaw-model-picker select {
  height: 38px;
  width: min(360px, 100%);
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  font: inherit;
}

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

.ghost-button.tiny {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.openclaw-model-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: min(560px, 100%);
}

.openclaw-model-check {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.openclaw-model-check.checked {
  border-color: #cdbf9e;
  background: #fff8e7;
}

.openclaw-model-check input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.openclaw-model-check span {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.openclaw-command-card strong {
  color: var(--ink);
  font-size: 14px;
}

.doc-card-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.doc-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.doc-list li::marker {
  color: #111;
  font-weight: 800;
}

.doc-tip {
  padding: 9px 10px;
  border: 1px solid #e7dfcc;
  border-radius: 8px;
  background: #fff8e7;
  color: #514633;
  font-size: 12px;
  line-height: 1.5;
}

.doc-screenshot {
  width: min(100%, 720px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111;
  box-shadow: 0 16px 42px rgba(20, 18, 12, 0.14);
}

.codex-config-repair {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.codex-config-upload {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.codex-config-upload input {
  width: 100%;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
}

.codex-config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.codex-config-actions .disabled {
  opacity: 0.48;
  pointer-events: none;
}

.codex-config-output {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1115;
  color: #f7f7f7;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.protocol-summary {
  display: grid;
  gap: 10px;
}

.protocol-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.protocol-label {
  color: #6a5c44;
  font-weight: 700;
  white-space: nowrap;
}

.protocol-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.protocol-summary code {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.protocol-note {
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.6;
}

.doc-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  font-size: 12px;
}

.doc-table th,
.doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}

.doc-table th {
  background: #f3f0e7;
  color: #35312b;
  font-weight: 800;
}

.doc-table th:first-child,
.doc-table td:first-child {
  width: 28%;
}

.doc-table th:last-child,
.doc-table td:last-child {
  width: 72%;
}

.doc-table-compare {
  table-layout: fixed;
}

.doc-table-compare th:first-child,
.doc-table-compare td:first-child {
  width: 20%;
}

.doc-table-compare th:nth-child(2),
.doc-table-compare td:nth-child(2) {
  width: 26%;
}

.doc-table-compare th:last-child,
.doc-table-compare td:last-child {
  width: 54%;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table td code,
.doc-table th code,
.doc-table code,
.doc-tip code {
  color: var(--ink);
}

.doc-table td code,
.doc-table th code {
  display: inline-flex;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  word-break: keep-all;
}

.openclaw-code-wrap {
  position: relative;
  min-width: 0;
}

.docs-reference-card .doc-table {
  width: 100%;
}

.unified-claude-doc {
  display: block;
}

.unified-claude-doc > .doc-nav {
  display: none;
}

.openclaw-code-actions {
  position: absolute;
  top: 24px;
  right: 10px;
  z-index: 2;
}

.copy-icon-button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 7px;
  background: rgba(255, 250, 240, 0.94);
  color: #111;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.copy-icon-button:hover {
  background: #ffffff;
}

.copy-icon-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.openclaw-code-wrap .code-block {
  padding-right: 88px;
}

.doc-panel .api-hero,
.doc-panel .doc-steps,
.doc-panel .openclaw-command-list,
.doc-panel .openclaw-command-card {
  width: 100%;
}

.danger-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f5e4df;
  color: var(--danger);
}

.admin-toolbar,
.admin-create-user {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.admin-toolbar input,
.admin-toolbar select,
.admin-create-user input,
.admin-create-user select,
.admin-plan-grid input,
.admin-plan-grid select {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.admin-toolbar {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  background: #f5f2ea;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-tabs button {
  border: 1px solid #dad3c2;
  background: #fbf8f1;
  color: #5a554a;
  border-radius: 8px;
  min-height: 30px;
  padding: 0 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-tabs button:hover {
  background: #efe8d9;
  color: #34302a;
}

.admin-tabs button.active,
.admin-tabs button[aria-current="page"] {
  border-color: #1f2937;
  background: #1f2937;
  color: #ffffff;
}

.support-layout {
  display: grid;
  gap: 10px;
  font-size: 13px;
}

.support-create-form,
.support-reply-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.support-create-form input,
.support-create-form textarea,
.support-reply-form textarea {
  font-size: 13px;
  line-height: 1.45;
}

.support-create-form textarea,
.support-reply-form textarea {
  width: 100%;
  min-height: 74px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}

.support-ticket-list {
  display: grid;
  gap: 8px;
}

.support-ticket-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  background: #ffffff;
}

.support-ticket-card.closed {
  border-left-color: #9ca3af;
  background: #fbfbfa;
}

.support-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.support-ticket-head h3 {
  margin: 0 0 2px;
  font-size: 13px;
  line-height: 1.35;
}

.support-ticket-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.support-ticket-status {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1d4ed8;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

.support-ticket-card.closed .support-ticket-status {
  background: #ececec;
  color: #555;
}

.support-ticket-messages {
  display: grid;
  gap: 6px;
}

.support-ticket-message {
  padding: 8px;
  border-radius: 8px;
  background: #f6f7fb;
}

.support-ticket-message.admin {
  background: #f0f7f1;
}

.support-ticket-message-meta,
.support-ticket-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.support-ticket-message-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.support-ticket-message p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.45;
}

.support-ticket-actions button,
.support-reply-form button {
  width: auto;
  justify-self: start;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-create-user {
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(100px, 0.7fr) auto;
  margin-top: 10px;
}

.admin-toolbar .inline-primary,
.admin-create-user .inline-primary {
  margin-top: 0;
}

.admin-toolbar button,
.admin-create-user button,
.admin-channel-toolbar-main button,
.admin-channel-actions button {
  width: auto;
  min-height: 30px;
  margin-top: 0;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  justify-self: start;
}

.admin-toolbar .inline-primary,
.admin-create-user .inline-primary,
.admin-channel-toolbar-main .inline-primary,
.admin-channel-actions .inline-primary {
  min-width: 0;
}

.admin-toolbar button.primary,
.admin-create-user button.primary,
.admin-channel-toolbar-main button.primary,
.admin-channel-actions button.primary {
  padding: 0 12px;
}

#modelConfigView .chat-title {
  font-size: 15px;
}

#modelConfigView .chat-subtitle {
  font-size: 11px;
}

#modelConfigView .page-content {
  padding-top: 18px;
}

#modelConfigView .admin-toolbar {
  gap: 6px;
  padding: 8px;
}

#modelConfigView .admin-toolbar input {
  height: 30px;
  font-size: 11px;
}

#modelConfigView .admin-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.admin-user-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
}

.admin-user-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-bottom: env(safe-area-inset-bottom);
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}

.admin-user-pagination:empty {
  display: none;
}

.admin-user-pagination-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#adminSubscriptionList {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 620px), 1fr));
  gap: 12px;
}

#adminSubscriptionToolbar {
  grid-template-columns: minmax(220px, 2fr) minmax(118px, 0.4fr) minmax(140px, 0.55fr) minmax(90px, 0.35fr) auto auto;
}

#adminSubscriptionCreateForm {
  grid-template-columns: minmax(220px, 1fr) minmax(110px, 0.3fr) minmax(185px, 0.55fr) auto;
}

#adminSubscriptionToolbar input,
#adminSubscriptionToolbar select,
#adminSubscriptionCreateForm input,
#adminSubscriptionCreateForm select {
  min-width: 0;
  width: 100%;
}

#adminSubscriptionToolbar button,
#adminSubscriptionCreateForm button {
  white-space: nowrap;
}

.admin-model-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.admin-model-provider-row {
  margin-top: 8px;
  padding: 4px 2px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-model-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefa;
}

.admin-model-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.admin-model-main input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.admin-model-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.admin-model-main span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-model-main strong,
.admin-model-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-model-main strong {
  font-size: 12px;
  line-height: 1.25;
}

.admin-model-main small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.admin-model-main small b {
  color: var(--ink);
  font-weight: 800;
}

.admin-model-weight {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
}

.admin-model-weight input {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
}

.admin-channel-toolbar {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-channel-toolbar-main {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
}

.admin-channel-toolbar-main input,
.admin-channel-form input,
.admin-channel-form textarea,
.admin-channel-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font-size: 12px;
}

.admin-channel-toolbar-main input {
  height: 30px;
  padding: 0 10px;
}

.admin-channel-toolbar-main select {
  min-width: 220px;
  min-height: 30px;
  max-height: 84px;
  padding: 4px 8px;
}

.admin-channel-config-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 12px;
}

.admin-channel-editor-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

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

.admin-channel-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-channel-form textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.45;
}

.channel-enabled-label {
  align-content: end;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
}

.channel-enabled-label input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.channel-inline-tip,
.channel-models-field,
.channel-kind-field,
.channel-remark-field,
.channel-discovered-model-list {
  grid-column: span 2;
}

.channel-inline-tip {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.channel-adapter-help {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px;
}

.channel-adapter-help strong {
  color: var(--ink);
  font-size: 12px;
}

.channel-adapter-help span {
  color: var(--muted);
}

.channel-video-field.is-muted {
  opacity: 0.55;
}

.channel-discovered-model-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-discovered-model-option {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 6px 8px;
  color: var(--ink) !important;
  font-size: 12px !important;
}

.channel-discovered-model-option input {
  width: 14px;
  height: 14px;
  padding: 0;
}

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

.admin-channel-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-channel-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.admin-channel-card.disabled {
  opacity: 0.62;
}

.admin-channel-card-main {
  min-width: 0;
}

.admin-channel-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-channel-card strong,
.admin-channel-card p {
  display: block;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-channel-card strong {
  font-size: 13px;
}

.admin-channel-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.admin-channel-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.admin-channel-status.on {
  background: #e9f9ef;
  color: #18794e;
}

.admin-channel-status.off {
  background: #f5f5f5;
  color: #6b7280;
}

.admin-channel-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.admin-channel-meta-grid span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-channel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-channel-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #e5ddc9;
  border-radius: 999px;
  background: #fff8e7;
  color: #55472d;
  font-size: 11px;
  font-weight: 700;
}

.admin-channel-token,
.admin-channel-remark {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.admin-channel-token code {
  display: inline-block;
  max-width: min(760px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: var(--ink);
}

.admin-channel-remark {
  white-space: normal;
}

.admin-channel-test-result {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.admin-channel-test-result.pending {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.admin-channel-test-result.ok {
  background: #eefaf3;
  border-color: #b8e3c5;
  color: #166534;
}

.admin-channel-test-result.fail {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b91c1c;
}

.admin-channel-card-actions {
  display: flex;
  gap: 6px;
}

.admin-channel-monitor-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.admin-channel-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-channel-range-tabs .active {
  border-color: #111827;
  color: #111827;
  background: #f8fafc;
}

.channel-monitor-metric-toggle {
  flex: 0 0 auto;
  border-color: #111827;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.channel-monitor-metric-toggle .metric-toggle-label {
  padding: 0 8px 0 10px;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.channel-monitor-metric-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f3f4f6;
  color: #374151;
}

.channel-monitor-metric-toggle .metric-icon {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  color: currentColor;
}

.channel-monitor-metric-toggle button.active .metric-icon {
  background: rgba(255, 255, 255, 0.22);
}

.channel-monitor-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.channel-monitor-chart-head > span {
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}

.channel-monitor-chart-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.channel-monitor-range-toggle {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid #111827;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.channel-monitor-range-toggle button {
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 11px;
  font-weight: 900;
}

.channel-monitor-range-toggle button.active {
  border-color: #050505;
  background: #050505;
  color: #ffffff;
}

.channel-monitor-metric-toggle.inside-chart {
  height: 30px;
  gap: 3px;
  padding: 3px;
}

.channel-monitor-metric-toggle.inside-chart .metric-toggle-label {
  display: none;
}

.channel-monitor-metric-toggle.inside-chart button {
  width: 24px;
  height: 24px;
  justify-content: center;
  padding: 0;
  font-size: 12px;
}

.channel-monitor-metric-toggle.inside-chart .metric-icon {
  width: 18px;
  height: 18px;
  background: transparent;
  font-size: 11px;
}

.admin-channel-monitor-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.channel-monitor-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.channel-monitor-card.disabled {
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
  opacity: 0.82;
}

.channel-monitor-card.disabled .channel-monitor-bars {
  opacity: 0.72;
}

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

.channel-monitor-head strong,
.channel-monitor-head p {
  display: block;
  margin: 0;
}

.channel-monitor-head strong {
  font-size: 13px;
}

.channel-monitor-disabled-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 8px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #e5e7eb;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

.channel-monitor-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.channel-monitor-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.channel-monitor-status.ok {
  background: #e9f9ef;
  color: #18794e;
}

.channel-monitor-status.quota {
  background: #fff7ed;
  color: #b45309;
}

.channel-monitor-status.fail {
  background: #fff5f5;
  color: #b91c1c;
}

.channel-monitor-metrics,
.channel-monitor-times {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

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

.channel-monitor-metrics span,
.channel-monitor-times span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-monitor-metrics strong {
  color: var(--ink);
}

.channel-monitor-event {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  line-height: 1.45;
}

.channel-monitor-event code {
  margin-right: 6px;
  color: #9a3412;
  font-weight: 800;
}

.channel-monitor-bars {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 50px;
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.channel-monitor-bars button {
  flex: 1 1 6px;
  min-width: 4px;
  border-radius: 2px 2px 0 0;
  border: 0;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
}

.channel-monitor-bars button.ok {
  background: #86efac;
}

.channel-monitor-bars button.quota {
  background: #fb923c;
}

.channel-monitor-bars button.fail {
  background: #f87171;
}

.channel-monitor-bars button.selected {
  outline: 2px solid #111827;
  outline-offset: 1px;
}

.channel-monitor-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 11px;
}

.channel-monitor-selected-events {
  flex-basis: 100%;
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.channel-monitor-selected-events div {
  display: grid;
  grid-template-columns: 132px minmax(150px, 220px) 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
}

.channel-monitor-selected-events code,
.channel-monitor-selected-events span,
.channel-monitor-selected-events small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.channel-monitor-empty-bars {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 980px) {
  .admin-channel-toolbar-main,
  .admin-channel-form,
  .admin-channel-meta-grid,
  .admin-channel-card,
  .admin-channel-monitor-toolbar,
  .channel-monitor-metrics,
  .channel-monitor-times {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-channel-card-actions {
    flex-wrap: wrap;
  }
}

.admin-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-section .api-hero {
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 6px;
}

.admin-section .api-hero h2 {
  margin-bottom: 3px;
  font-size: 15px;
}

.admin-section .api-hero p {
  font-size: 11px;
  line-height: 1.4;
}

.admin-plan-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.admin-plan-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.admin-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.admin-plan-head strong {
  font-size: 14px;
}

.admin-plan-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-plan-head code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.admin-plan-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #efede7;
  color: #111;
  font-size: 11px;
  line-height: 1.2;
}

.admin-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.75fr) minmax(120px, 0.55fr) minmax(150px, 0.7fr);
  gap: 8px;
}

.admin-plan-grid label {
  margin-top: 0;
}

.plan-toggle {
  align-content: start;
}

.plan-toggle span {
  color: #56544f;
  font-size: 12px;
}

.plan-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 11px;
}

.admin-plan-models {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-plan-models-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-plan-models-head strong {
  font-size: 12px;
}

.admin-plan-models-head span {
  color: var(--muted);
  font-size: 11px;
}

.admin-plan-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
}

.admin-plan-model-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #ece7dc;
  border-radius: 8px;
  background: #fffdfa;
  color: var(--ink);
  font-size: 12px;
}

.admin-plan-model-grid input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.admin-plan-model-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-plan-model-text {
  margin: 0;
}

.admin-plan-model-text textarea {
  min-height: 84px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.admin-plan-json-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.admin-plan-json-grid label {
  margin-top: 0;
}

.admin-plan-json-grid textarea {
  min-height: 150px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.admin-plan-actions {
  display: flex;
  justify-content: flex-end;
}

.admin-doc-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-doc-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.admin-doc-card h3 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

.admin-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.45;
}

.admin-doc-table th,
.admin-doc-table td {
  padding: 8px 8px;
  border-bottom: 1px solid #ece7dc;
  text-align: left;
  vertical-align: top;
}

.admin-doc-table th {
  color: #6b6458;
  font-weight: 700;
  background: #fbf8f1;
}

.admin-doc-table td code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.admin-doc-notes {
  display: grid;
  gap: 8px;
  color: #4b463d;
  font-size: 12px;
  line-height: 1.6;
}

.admin-doc-notes p {
  margin: 0;
}

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

}

.admin-rate-card {
  max-width: 640px;
}

.admin-rate-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.admin-rate-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-rate-form input {
  height: 38px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.admin-rate-form .inline-primary {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding: 0 14px;
  border-radius: 999px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(288px, 340px);
  gap: 12px;
  align-items: stretch;
  min-height: 176px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.admin-user-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.admin-user-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-user-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-user-email-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-user-email-field span {
  font-size: 12px;
}

.admin-user-email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-user-email-row input,
.admin-user-email-row select {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.admin-user-checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.admin-user-checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.admin-user-result {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-user-result.success-message {
  color: #0a7f43;
}

.admin-user-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-user-actions .mini-button {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.admin-user-actions [data-admin-open-usage],
.admin-user-actions [data-admin-action="reset_password"] {
  grid-column: 1 / -1;
}

.redeem-code-form {
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(260px, 1.6fr) minmax(130px, 0.8fr) minmax(160px, 1fr) auto;
  align-items: stretch;
}

.redeem-code-search {
  margin-top: 10px;
  grid-template-columns: minmax(120px, 0.5fr) minmax(220px, 1fr) auto auto;
}

.gift-pool-repeat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.gift-pool-repeat-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.gift-model-picker {
  min-height: 38px;
  max-height: 116px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gift-model-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.gift-model-option input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.redeem-code-summary {
  margin: 12px 0;
}

.redeem-code-list {
  display: grid;
  gap: 8px;
}

.redeem-code-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.redeem-code-card.used {
  background: #f5f3ed;
}

.redeem-code-card strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.redeem-code-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.gift-pool-group {
  display: grid;
  gap: 10px;
}

.gift-pool-card,
.gift-key-card,
.gift-user-card,
.gift-ledger-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.gift-pool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  background: #fffefa;
}

.gift-pool-card strong,
.gift-section-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.gift-pool-card small,
.gift-section-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.gift-pool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.gift-pool-meta span,
.gift-key-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eefbf8;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}

.gift-key-status.used {
  background: #f1f5f9;
  color: #475569;
}

.gift-key-status.disabled {
  background: #fff1f2;
  color: #be123c;
}

.gift-pool-actions,
.gift-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.gift-pool-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gift-key-table,
.gift-user-table {
  margin-top: 12px;
  overflow-x: auto;
}

.gift-key-row,
.gift-user-row,
.gift-ledger-row {
  display: grid;
  gap: 10px;
  align-items: center;
  min-width: 860px;
  padding: 9px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.75);
  color: var(--ink);
  font-size: 13px;
}

.gift-key-row {
  grid-template-columns: minmax(260px, 1.4fr) 90px 90px minmax(150px, 0.9fr) 160px 96px;
}

.gift-user-row {
  grid-template-columns: minmax(160px, 0.9fr) minmax(120px, 0.8fr) 110px 110px 110px 80px 96px;
}

.gift-ledger-row {
  grid-template-columns: 160px 100px 100px minmax(110px, 0.7fr) minmax(220px, 1.3fr);
}

.gift-key-row-head,
.gift-user-row-head,
.gift-ledger-row-head {
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.gift-key-row code,
.gift-user-row code,
.gift-ledger-row code {
  overflow-wrap: anywhere;
  color: var(--ink);
}

.gift-empty-row {
  padding: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-user-actions input {
  width: 100%;
  min-width: 0;
  height: 34px;
}

.admin-subscription-card {
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 0.82fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border-color: #ded7ca;
  background: linear-gradient(180deg, #fffefa 0%, #fff8ec 100%);
}

.admin-subscription-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

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

.admin-subscription-head > div:first-child {
  min-width: 0;
}

.admin-subscription-head strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.admin-subscription-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.admin-subscription-badges span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #ded7ca;
  border-radius: 999px;
  background: #ffffff;
  color: #27231c;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-subscription-badges .status-active {
  border-color: #b9d9c0;
  background: #eef8ef;
  color: #146126;
}

.admin-subscription-badges .status-expired,
.admin-subscription-badges .status-cancelled,
.admin-subscription-badges .status-canceled,
.admin-subscription-badges .status-none {
  border-color: #ead0cc;
  background: #fff1ef;
  color: #8b2119;
}

.admin-subscription-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-subscription-stats div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #eee5d6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-subscription-stats span,
.admin-subscription-card .admin-user-actions label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-subscription-stats strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.admin-subscription-stats small {
  display: block;
  margin-top: 4px;
  color: #55514a;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-subscription-card .admin-user-actions {
  display: grid;
  grid-template-columns: minmax(96px, 0.7fr) minmax(180px, 1.3fr);
  align-content: start;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eee5d6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.admin-subscription-card .admin-user-actions label {
  min-width: 0;
}

.admin-subscription-card .admin-user-actions select,
.admin-subscription-card .admin-user-actions input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border-radius: 8px;
}

.admin-subscription-date-field {
  grid-column: span 1;
}

.admin-subscription-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  padding-top: 2px;
}

.admin-subscription-actions .mini-button {
  flex: 0 1 auto;
}

@media (max-width: 1320px) {
  #adminSubscriptionToolbar,
  #adminSubscriptionCreateForm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #adminSubscriptionToolbar input,
  #adminSubscriptionCreateForm input {
    grid-column: 1 / -1;
  }

  .admin-subscription-card {
    grid-template-columns: 1fr;
  }

  .admin-subscription-head {
    flex-direction: column;
  }

  .admin-subscription-badges,
  .admin-subscription-actions {
    justify-content: flex-start;
  }

  .admin-subscription-card .admin-user-actions {
    grid-template-columns: minmax(120px, 0.7fr) minmax(220px, 1fr) minmax(90px, 0.45fr) minmax(90px, 0.45fr);
  }
}

.quota-money-hint {
  min-width: 74px;
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.recharge-form .quota-money-hint {
  display: block;
  min-height: 16px;
  margin-top: 6px;
}

#epayRechargeForm.recharge-payment-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 14px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fffefa;
}

#rechargeView .api-hero,
#rechargeView .usage-summary-grid,
#rechargeView #epayRechargeForm,
#rechargeView .new-key-box,
#rechargeView .recharge-form,
#rechargeView .usage-detail-title,
#rechargeView #rechargeLedgerError,
#rechargeView #rechargeLedgerList {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

#rechargeView .usage-summary-grid {
  width: 100%;
}

#rechargeView #epayRechargeForm {
  width: 100%;
}

.recharge-payment-section-wide {
  grid-row: auto;
}

.recharge-payment-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
}

.recharge-payment-section {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.recharge-payment-panel > .recharge-payment-section:last-child,
.recharge-payment-row .recharge-payment-section:last-child {
  border-bottom: 0;
}

.recharge-payment-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 46px;
}

#epayRechargeForm input,
#epayRechargeForm .primary {
  min-height: 46px;
}

#epayRechargeForm input {
  width: 100%;
  min-width: 0;
}

#epayRechargeForm .quota-money-hint {
  grid-column: 2;
  min-height: 16px;
  margin-top: 6px;
  line-height: 16px;
}

#epayRechargeForm .primary {
  width: min(320px, 100%);
  min-width: 240px;
  margin-top: 0;
  justify-self: center;
}

#epayRechargeForm .epay-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  background: #1677ff;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.22);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#epayRechargeForm .epay-submit:hover {
  background: #0f6bff;
  box-shadow: 0 10px 22px rgba(22, 119, 255, 0.28);
}

#epayRechargeForm .epay-submit:active {
  transform: translateY(1px);
  box-shadow: 0 5px 12px rgba(22, 119, 255, 0.22);
}

.alipay-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #ffffff;
  color: #1677ff;
  font-style: normal;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

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

.quick-amounts button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 7px 10px;
  min-height: 82px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #ded7ca;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.quick-amounts button strong {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.quick-amounts button span,
.quick-amounts button em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
}

.quick-amounts button em {
  justify-self: end;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0d6;
  color: #9a4d00;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

@media (min-width: 1500px) {
  #rechargeView .page-content {
    width: min(1320px, calc(100% - 64px));
  }

  #rechargeView .api-hero,
  #rechargeView .usage-summary-grid,
  #rechargeView #epayRechargeForm,
  #rechargeView .new-key-box,
  #rechargeView .recharge-form,
  #rechargeView .usage-detail-title,
  #rechargeView #rechargeLedgerError,
  #rechargeView #rechargeLedgerList {
    max-width: 1120px;
  }

  #epayRechargeForm.recharge-payment-panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  }

  .recharge-payment-section-wide {
    grid-row: span 2;
  }

  .recharge-payment-row {
    display: contents;
  }

  .recharge-payment-section {
    min-height: 100%;
  }

  .recharge-payment-panel > .recharge-payment-section:last-child,
  .recharge-payment-row .recharge-payment-section:last-child {
    border-bottom: 1px solid var(--line);
  }
}

.quick-amounts button .quick-amount-total {
  grid-column: 1 / -1;
  color: #6f6658;
}

.quick-amounts button.quick-amount-bonus {
  border-color: #e8c684;
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 68%);
}

.quick-amounts button:hover,
.quick-amounts button.active {
  border-color: #111111;
  background: #f6f3eb;
  transform: translateY(-1px);
}

.quick-amounts button.active {
  box-shadow: inset 0 0 0 1px #111111;
}

.quick-amounts button.quick-amount-bonus.active {
  background: #fff4dc;
  box-shadow: inset 0 0 0 1px #111111, 0 8px 18px rgba(154, 77, 0, 0.12);
}

.epay-amount-field {
  width: 100%;
}

.mini-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #efede7;
  color: #111;
  font-size: 12px;
}

.danger-mini {
  background: #f5e4df;
  color: var(--danger);
}

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

.admin-stats-layout {
  display: grid;
  gap: 14px;
}

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

.admin-stats-provider-chart {
  display: grid;
  gap: 12px;
}

.admin-stats-active-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-stats-active-chart-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffefa;
}

.admin-stats-active-donut {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.04);
}

.admin-stats-active-donut-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 54%;
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffefa, #f7f1e7);
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px rgba(64, 42, 23, 0.12);
}

.admin-stats-active-donut-hole strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.admin-stats-active-donut-hole span {
  color: var(--muted);
  font-size: 12px;
}

.admin-stats-active-total,
.admin-stats-active-note {
  margin: 0;
  text-align: center;
}

.admin-stats-active-total {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.admin-stats-active-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-stats-active-list {
  display: grid;
  gap: 10px;
}

.admin-stats-active-user {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffefa;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-stats-active-user:hover {
  border-color: #d3a177;
  box-shadow: 0 14px 28px rgba(64, 42, 23, 0.1);
  transform: translateY(-1px);
}

.admin-stats-active-user:focus-visible {
  outline: none;
  border-color: #c86f45;
  box-shadow: 0 0 0 3px rgba(200, 111, 69, 0.14);
}

.admin-stats-active-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(64, 42, 23, 0.16);
}

.admin-stats-active-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-stats-active-main strong {
  display: block;
  overflow-wrap: anywhere;
}

.admin-stats-active-main small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-stats-active-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.admin-stats-active-side strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.admin-stats-active-side small {
  color: var(--muted);
  font-size: 12px;
}

.admin-stats-provider-row {
  display: grid;
  gap: 8px;
}

.admin-stats-provider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-stats-provider-head strong {
  font-size: 14px;
}

.admin-stats-provider-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.admin-stats-provider-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #efebe1;
}

.admin-stats-provider-bar i {
  display: block;
  min-width: 6px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c86f45, #e8b25a);
}

.admin-stats-record-list {
  display: grid;
  gap: 10px;
}

.admin-stats-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
}

.admin-stats-record-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.admin-stats-record-main strong {
  display: block;
}

.admin-stats-user-link,
.admin-stats-inline-user {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: #b8613e;
  font: inherit;
  font-weight: 700;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
}

.admin-stats-user-link:hover,
.admin-stats-inline-user:hover {
  color: #8f4528;
}

.admin-stats-user-link:focus-visible,
.admin-stats-inline-user:focus-visible {
  outline: 2px solid rgba(200, 111, 69, 0.24);
  outline-offset: 2px;
  border-radius: 6px;
}

.admin-stats-inline-user {
  font-weight: 600;
}

.admin-stats-record-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-stats-record-main small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-stats-record-side {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 6px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.admin-stats-record-side strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.admin-stats-record-side time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.history-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
}

.history-card strong {
  display: block;
  margin-bottom: 6px;
}

.history-card p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .landing-pricing-intro {
    display: grid;
    justify-items: start;
  }

  .landing-pricing-cta {
    min-width: 0;
    justify-items: start;
  }
}

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

  .admin-stats-active-layout {
    grid-template-columns: 1fr;
  }

  .model-menu {
    width: min(480px, calc(100vw - 24px));
  }

  .model-option {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
  }

  .model-option-meter {
    grid-column: 2;
    justify-items: start;
  }

  .model-price-pills {
    justify-content: flex-start;
  }
}

@media (max-width: 740px) {
  .login-shell {
    padding: 0 16px 40px;
  }

  .landing-topbar {
    height: auto;
    min-height: 64px;
    align-items: center;
    gap: 12px;
  }

  .landing-brand {
    font-size: 18px;
  }

  .landing-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .landing-link-button,
  .landing-login-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .landing-hero {
    width: 100%;
    gap: 16px;
    padding: 84px 0 46px;
  }

  .landing-mesh {
    top: 16px;
    right: 0;
    width: 82vw;
    height: 48vw;
    transform: translateX(44%);
  }

  .landing-headline-rotator {
    min-height: 78px;
  }

  .landing-headline-rotator h1 {
    font-size: 22px;
    line-height: 1.35;
  }

  .landing-tool-row {
    gap: 8px;
  }

  .landing-tool-row span {
    min-height: 34px;
    padding: 0 11px;
    font-size: 13px;
  }

  .landing-composer {
    width: 100%;
    min-height: 58px;
    padding: 8px 8px 8px 16px;
    border-radius: 16px;
  }

  .landing-composer textarea {
    min-height: 32px;
    font-size: 15px;
  }

  .landing-composer-actions {
    flex-direction: row;
  }

  .landing-composer button {
    width: 42px;
    height: 42px;
  }

  #quickStartDialog,
  #landingLoginDialog,
  #landingPriceDialog {
    align-items: start;
    padding: 68px 18px 22px;
  }

  #quickStartDialog .account-modal,
  #landingLoginDialog .account-modal {
    width: min(100%, 332px);
    max-height: calc(100dvh - 92px);
    gap: 12px;
    padding: 20px 16px;
    border-radius: 8px;
  }

  .landing-price-modal {
    width: min(100%, 332px);
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    gap: 12px;
    padding: 18px 16px;
    border-radius: 12px;
  }

  .landing-price-modal .modal-header h2 {
    font-size: 24px;
  }

  .landing-price-offers {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .landing-price-offers article {
    min-height: 0;
    padding: 12px;
  }

  .landing-price-offers strong {
    font-size: 20px;
  }

  #quickStartDialog .modal-header h2,
  #landingLoginDialog .modal-header h2 {
    font-size: 24px;
  }

  #quickStartDialog .modal-header p,
  #landingLoginDialog .modal-header p {
    margin-top: 6px;
    font-size: 14px;
  }

  .auth-mode-tabs {
    height: 44px;
  }

  .auth-mode-tab {
    font-size: 14px;
  }

  #quickStartDialog .account-modal label,
  #landingLoginDialog .account-modal label {
    font-size: 14px;
  }

  #quickStartDialog .account-modal input,
  #landingLoginDialog .account-modal input {
    height: 44px;
    font-size: 15px;
  }

  #quickStartDialog .modal-actions .primary,
  #landingLoginDialog .modal-actions .primary {
    min-height: 44px;
  }

  #quickStartDialog .account-modal,
  #landingLoginDialog .account-modal {
    width: min(100%, 304px);
    max-height: calc(100dvh - 84px);
    gap: 8px;
    padding: 14px;
  }

  #quickStartDialog .modal-header h2,
  #landingLoginDialog .modal-header h2 {
    font-size: 18px;
  }

  #quickStartDialog .modal-header p,
  #landingLoginDialog .modal-header p {
    margin-top: 3px;
    font-size: 10px;
  }

  #quickStartDialog .auth-mode-tabs,
  #landingLoginDialog .auth-mode-tabs {
    height: 32px;
  }

  #quickStartDialog .account-modal input,
  #landingLoginDialog .account-modal input {
    height: 32px;
    font-size: 11px;
  }

  #quickStartDialog .modal-actions .primary,
  #landingLoginDialog .modal-actions .primary {
    min-height: 32px;
    font-size: 10px;
  }

  .simple-login-modal {
    width: min(100%, 350px);
  }

  .landing-tagline {
    font-size: 14px;
  }

  .landing-feature-intro {
    width: 100%;
    padding: 16px 0 28px;
    text-align: left;
    justify-items: start;
  }

  .landing-feature-intro h2 {
    font-size: 28px;
  }

  .landing-feature-intro p {
    font-size: 14px;
  }

  .landing-feature-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 14px;
    padding-bottom: 28px;
  }

  .landing-feature-card {
    min-height: 0;
    grid-template-rows: minmax(154px, auto) auto;
    gap: 18px;
    padding: 18px;
  }

  .landing-card-art {
    min-height: 154px;
  }

  .landing-feature-card h3 {
    font-size: 22px;
  }

  .landing-feature-card p {
    font-size: 14px;
  }

  .tool-logo-list span {
    min-height: 44px;
    font-size: 14px;
  }

  .landing-pricing-section {
    width: 100%;
    gap: 16px;
    padding: 4px 0 42px;
  }

  .landing-pricing-intro {
    padding: 20px 18px;
    border-radius: 18px;
  }

  .landing-pricing-intro h2 {
    font-size: 28px;
  }

  .landing-pricing-intro p,
  .landing-pricing-cta p,
  .landing-pricing-note p {
    font-size: 14px;
  }

  .pricing-company-head {
    align-items: center;
    padding: 12px 14px;
  }

  .pricing-company-head h3 {
    font-size: 16px;
  }

  .pricing-discount-badge {
    min-height: 26px;
    padding: 0 9px;
    font-size: 11px;
    white-space: normal;
  }

  .pricing-toolbar {
    gap: 6px;
  }

  .usage-toggle.pricing-mode-toggle {
    width: 100%;
    height: 30px;
  }

  .usage-toggle.pricing-mode-toggle button {
    flex: 1 1 0;
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }

  .pricing-company-nav {
    gap: 5px;
  }

  .pricing-company-nav-item {
    min-height: 26px;
    padding: 0 9px;
    font-size: 11px;
  }

  .pricing-company-group {
    border-radius: 14px;
  }

  .pricing-model-list {
    padding: 8px;
    grid-template-columns: 1fr;
  }

  .pricing-model-card {
    gap: 10px;
    min-height: 0;
    padding: 12px;
    border-radius: 14px;
  }

  .pricing-model-card-main {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .pricing-model-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .pricing-model-icon img {
    width: 28px;
    height: 28px;
  }

  .pricing-model-copy > strong {
    font-size: 15px;
  }

  .pricing-model-line-list p {
    font-size: 12px;
    line-height: 1.4;
  }

  .pricing-model-line-list .pricing-model-discount-line {
    font-size: 11px;
  }

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(306px, calc(100vw - 42px));
    display: grid;
    transform: translateX(-105%);
    border-right: 1px solid var(--line);
    box-shadow: 18px 0 60px rgba(0, 0, 0, 0.18);
    transition: transform 180ms ease;
  }

  .app.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0 0 0 min(306px, calc(100vw - 42px));
    z-index: 55;
    display: block;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.28);
    transition: opacity 180ms ease;
  }

  .app.sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .chat-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 12px;
  }

  .page-view .chat-header {
    min-height: 58px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  }

  .page-view .chat-header > div:first-child:not(.chat-meta):not(.top-skeleton) {
    grid-column: 2;
    min-width: 0;
  }

  .page-view .chat-header > button:not(.page-sidebar-button) {
    grid-column: 3;
  }

  .page-view .top-skeleton {
    display: none;
  }

  .page-view .chat-meta {
    grid-column: 2;
    display: block;
    min-width: 0;
    opacity: 1;
    pointer-events: auto;
  }

  .page-view .chat-title {
    overflow: hidden;
    font-size: 16px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-view .chat-subtitle {
    overflow: hidden;
    max-width: 100%;
    margin-top: 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-view .backChat,
  .page-view #backApiFromOpenClaw,
  .page-view #backApiFromClaude {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .page-view .backChat {
    display: none;
  }

  .page-sidebar-button {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    flex: 0 0 36px;
    justify-self: start;
  }

  .top-left {
    min-width: 0;
    gap: 8px;
  }

  .mobile-sidebar-button {
    display: grid;
    flex: 0 0 36px;
  }

  .top-actions {
    gap: 6px;
  }

  .model-button {
    max-width: min(240px, calc(100vw - 198px));
  }

  .model-menu {
    width: min(456px, calc(100vw - 24px));
  }

  .model-option {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
  }

  .model-option-meter {
    grid-column: 2;
    justify-items: start;
  }

  .top-skeleton i {
    width: 140px;
  }

  .chat-meta {
    display: none;
  }

  .messages {
    padding: 14px 14px max(132px, calc(var(--composer-height) + 18px));
  }

  body.chatgpt-theme .messages {
    padding: 14px 14px max(136px, calc(var(--composer-height) + 20px));
  }

  body.chatgpt-theme .message {
    max-width: 100%;
    margin-bottom: 18px;
  }

  body.chatgpt-theme .message.user .bubble {
    max-width: min(320px, 82vw);
    padding: 9px 13px;
    border-radius: 18px;
    background: #eef5ff;
    border-color: #eef5ff;
    color: #111827;
  }

  .message-attachment-grid {
    width: min(320px, 82vw);
  }

  .message-image-attachment {
    width: 92px;
    height: 92px;
  }

  .bubble {
    max-width: 84%;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
  }

  .markdown-body {
    font-size: 14px;
  }

  .markdown-body h1 {
    font-size: 19px;
  }

  .markdown-body h2 {
    font-size: 17px;
  }

  .markdown-body h3 {
    font-size: 16px;
  }

  .markdown-body p {
    margin-bottom: 9px;
  }

  .markdown-body table {
    font-size: 13px;
  }

  .markdown-body pre code,
  .thinking-panel,
  .thinking-content {
    font-size: 13px;
  }

  .message {
    gap: 8px;
    margin-bottom: 18px;
  }

  .avatar {
    display: none;
  }

  body.chatgpt-theme .avatar,
  body.deepseek-theme .avatar,
  body.chatgpt-theme .message.user .avatar {
    display: none;
  }

  .message-body,
  body.chatgpt-theme .message-body,
  body.chatgpt-theme .message.user .message-body {
    max-width: min(680px, 90%);
  }

  .message-actions {
    font-size: 11px;
  }

  .message-icon-button {
    width: 28px;
    height: 28px;
  }

  .user-message-actions time {
    font-size: 11px;
  }

  .search-result-list {
    grid-template-columns: 1fr;
  }

  .page-content {
    width: calc(100% - 24px);
    padding: 16px 0 calc(40px + env(safe-area-inset-bottom));
  }

  .pricing-page-content {
    width: calc(100% - 24px);
    padding-top: 12px;
    padding-bottom: 20px;
  }

  .api-hero {
    padding: 16px;
    border-radius: 10px;
  }

  .api-hero h2,
  .profile-card h2 {
    margin-bottom: 6px;
    font-size: 22px;
    line-height: 1.25;
  }

  .api-hero p {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .api-hero .inline-primary {
    width: 100%;
    margin-top: 14px;
  }

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

  .marketing-link-row,
  .marketing-payout-form,
  .marketing-withdrawal-apply-row,
  .marketing-list-grid {
    grid-template-columns: 1fr;
  }

  .usage-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .usage-summary-grid article {
    min-height: 96px;
    padding: 14px;
    border-radius: 16px;
  }

  .usage-summary-grid strong {
    font-size: 16px;
    letter-spacing: 0;
  }

  .usage-summary-grid span,
  .usage-summary-grid small,
  .usage-summary-grid em {
    font-size: 12px;
  }

  .usage-chart-card {
    padding: 14px;
  }

  .usage-analytics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
  }

  .usage-filter-card {
    margin-top: 12px;
    padding: 14px;
  }

  .usage-distribution-list {
    min-height: auto;
  }

  .usage-admin-tabs {
    width: 100%;
  }

  .usage-chart-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .usage-chart-actions {
    width: 100%;
    justify-content: space-between;
  }

  .usage-chart,
  .usage-hour-chart {
    overflow-x: hidden;
  }

  .usage-detail-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .usage-log-query-form {
    flex-direction: column;
  }

  .usage-date-picker,
  .usage-date-picker-trigger {
    width: 100%;
  }

  .usage-date-picker-dropdown {
    width: min(360px, calc(100vw - 28px));
  }

  .usage-date-picker-custom {
    grid-template-columns: 1fr;
  }

  .usage-date-picker-arrow {
    display: none;
  }

  .admin-usage-window-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-stats-provider-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-stats-provider-head span {
    text-align: left;
  }

  .admin-stats-active-user {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-stats-active-side {
    justify-items: start;
    text-align: left;
  }

  .admin-stats-record {
    grid-template-columns: 1fr;
  }

  .admin-stats-record-side {
    justify-items: start;
    text-align: left;
  }

  .usage-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .usage-table,
  .usage-table thead,
  .usage-table tbody,
  .usage-table tr,
  .usage-table td {
    display: block;
    width: 100%;
  }

  .usage-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  .usage-table colgroup,
  .usage-table thead {
    display: none;
  }

  .usage-table tbody {
    display: grid;
    gap: 10px;
  }

  .usage-table .usage-log-row {
    display: grid;
    gap: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fffefa;
  }

  .usage-table .usage-log-row.expanded {
    border-bottom-color: transparent;
    border-radius: 14px 14px 0 0;
  }

  .usage-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: right;
    white-space: normal;
  }

  .usage-table .usage-log-row td:last-child {
    border-bottom: 0;
  }

  .usage-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
  }

  .usage-table .usage-model-cell,
  .usage-table .usage-type-cell {
    text-align: right;
  }

  .usage-table .usage-official-cost-cell .usage-token-cell {
    justify-items: end;
  }

  .usage-type-pill {
    justify-self: end;
  }

  .usage-billing-detail-row {
    margin-top: -20px;
    padding: 0 12px 12px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #fffefa;
  }

  .usage-billing-detail-row td {
    display: block;
    width: 100%;
    padding: 0;
    border-bottom: 0;
    background: transparent;
  }

  .usage-billing-detail-row td::before {
    content: none;
  }

  .usage-billing-popover {
    max-height: 260px;
    max-width: 100%;
    overflow: auto;
    overflow-wrap: anywhere;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f6f4ee;
    font-size: 11px;
    line-height: 1.55;
    white-space: pre-wrap;
  }

  .usage-table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .usage-pagination {
    justify-content: flex-start;
  }

  .usage-pagination button,
  .usage-pagination-ellipsis {
    min-width: 34px;
    height: 32px;
    padding: 0 10px;
  }

  .usage-chart-frame {
    width: 100%;
    min-width: 0;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .usage-y-axis {
    height: 180px;
    padding-bottom: 24px;
    font-size: 9px;
    line-height: 1.15;
  }

  .usage-plot {
    min-height: 180px;
  }

  .usage-month-bars {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    height: 180px;
  }

  .usage-month-bar {
    height: 180px;
    grid-template-rows: 1fr 18px;
    gap: 4px;
    font-size: 10px;
  }

  .usage-bar-value,
  .usage-hour-bar span {
    display: block;
    max-width: 100%;
    padding: 1px 4px;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .usage-month-bar i {
    max-width: 28px;
  }

  .usage-day-candle {
    max-width: 28px;
    height: 140px;
  }

  .usage-day-candle b {
    width: 14px;
  }

  .usage-hour-chart {
    min-height: 220px;
  }

  .usage-hour-frame {
    width: 100%;
    min-width: 0;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .usage-hour-bars {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4px;
    height: 180px;
  }

  .usage-hour-bar {
    height: 180px;
    grid-template-rows: 1fr 18px;
    gap: 4px;
    font-size: 10px;
  }

  .usage-hour-bar b {
    font-size: 9px;
    white-space: nowrap;
  }

  .api-key-toolbar {
    justify-content: stretch;
  }

  .api-key-toolbar .primary {
    width: 100%;
  }

  .api-key-table {
    display: grid;
    gap: 12px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .api-key-table-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    font-size: 13px;
  }

  .api-key-table-head {
    display: none;
  }

  .api-key-table-row strong,
  .api-key-table-row > span {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .api-key-table-row strong {
    font-size: 14px;
    line-height: 1.35;
  }

  .api-key-table-row > span {
    color: #475569;
    line-height: 1.35;
  }

  .api-key-secret-inline {
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: stretch;
    column-gap: 8px;
    row-gap: 8px;
  }

  .api-key-secret-inline::before {
    content: "API Key";
  }

  .api-key-secret-inline code {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    line-height: 1.45;
    white-space: normal;
    word-break: break-all;
  }

  .api-key-secret-inline .api-key-copy {
    grid-column: 2;
    justify-self: start;
  }

  .api-key-table-row strong::before,
  .api-key-table-row > span::before {
    padding-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
  }

  .api-key-table-row strong::before {
    content: "名称";
  }

  .api-key-table-row > span:not(.api-key-secret-inline)::before {
    content: "创建时间";
  }

  .api-key-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 2px;
  }

  .api-key-copy,
  .api-key-doc,
  .api-key-delete {
    justify-self: start;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 12px;
  }

  .config-help-list,
  .doc-layout,
  .doc-steps {
    grid-template-columns: 1fr;
  }

  .doc-nav {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }

  .doc-nav-item {
    width: 100%;
  }

  .openclaw-key-form {
    display: grid;
  }

  .doc-table {
    table-layout: auto;
    font-size: 11px;
  }

  .protocol-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .protocol-label {
    font-size: 11px;
  }

  .doc-table th,
  .doc-table td,
  .doc-table th:first-child,
  .doc-table td:first-child,
  .doc-table th:last-child,
  .doc-table td:last-child {
    width: auto;
  }

  .key-form {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: 10px;
  }

  #epayRechargeForm {
    grid-template-columns: 1fr;
  }

  #epayRechargeForm.recharge-payment-panel,
  .recharge-payment-row {
    grid-template-columns: 1fr;
  }

  .recharge-payment-section {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 14px;
  }

  .recharge-payment-section-wide {
    grid-row: auto;
  }

  .recharge-payment-label {
    line-height: 1.2;
  }

  #epayRechargeForm .quota-money-hint {
    grid-column: 1;
    margin-top: 2px;
  }

  .epay-amount-field {
    grid-template-rows: auto 44px auto;
  }

  #epayRechargeForm #epayRechargeAmount {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 12px;
    font-size: 16px;
    line-height: 44px;
    -webkit-text-size-adjust: 100%;
  }

  .quick-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-amounts button {
    position: relative;
    min-height: 68px;
    align-content: center;
    gap: 4px 6px;
    padding: 10px 10px 9px;
    overflow: hidden;
    transform: none;
  }

  .quick-amounts button strong {
    font-size: 16px;
    line-height: 1;
  }

  .quick-amounts button em {
    position: absolute;
    top: 8px;
    right: 8px;
    max-width: 48px;
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1;
  }

  .quick-amounts button .quick-amount-total {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .quick-amounts button:hover,
  .quick-amounts button.active {
    transform: none;
  }

  .key-form .primary {
    width: 100%;
  }

  .recharge-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #rechargeRedeemForm,
  #giftRedeemForm {
    grid-template-columns: 1fr;
  }

  .recharge-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  #rechargeRedeemCode,
  #giftRedeemCode {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 12px;
    font-size: 16px;
    line-height: 44px;
    -webkit-text-size-adjust: 100%;
  }

  #epayRechargeForm .primary {
    width: 100%;
    margin-top: 0;
    min-width: 0;
  }

  .modal-layer {
    padding: 12px;
  }

  .modal-panel {
    padding: 18px;
  }

  .api-key-modal {
    padding: 14px;
  }

  .api-key-modal .modal-actions {
    flex-direction: row;
  }

  .api-key-modal .modal-actions .ghost-button,
  .api-key-modal .modal-actions .primary {
    width: auto;
  }

  .history-card {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 10px;
  }

  .history-card p,
  .history-card span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .subscription-plan-list {
    gap: 10px;
  }

  .subscription-plan-grid {
    grid-template-columns: 1fr;
  }

  .subscription-card {
    border-radius: 10px;
  }

  .subscription-card-head {
    display: grid;
    gap: 8px;
  }

  .subscription-usage-layout {
    align-items: flex-start;
  }

  .subscription-card-head p,
  .subscription-shared-note,
  .subscription-compare,
  .subscription-usage-grid span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .subscription-price {
    font-size: 24px;
  }

  .subscription-buy-button {
    width: 100%;
  }

  .subscribe-payment-method {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .account-result-box div {
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
  }

  .account-result-box strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .admin-toolbar,
  .admin-create-user,
  .admin-model-row,
  .admin-user-card {
    grid-template-columns: 1fr;
  }

  .marketing-correction-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .marketing-withdrawal-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-withdrawal-row,
  .admin-withdrawal-actions,
  .admin-withdrawal-management-row,
  .admin-withdrawal-management-actions {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-subscription-head,
  .admin-subscription-actions {
    justify-content: flex-start;
  }

  .admin-subscription-head {
    flex-direction: column;
  }

  .admin-subscription-stats,
  .admin-subscription-card .admin-user-actions {
    grid-template-columns: 1fr;
  }

  .admin-user-email-row {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    display: flex;
    grid-template-columns: none;
    gap: 6px;
    padding: 6px;
  }

  .admin-plan-grid,
  .admin-plan-json-grid,
  .admin-rate-form {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    justify-content: flex-start;
  }

  .composer {
    right: 10px;
    bottom: max(10px, calc(env(safe-area-inset-bottom) + 8px));
    left: 10px;
    width: auto;
    max-width: none;
    gap: 6px;
    padding: 8px 10px 8px;
    border-radius: 18px;
    grid-template-rows: auto minmax(40px, auto) 36px;
    max-height: min(124px, calc(var(--app-height) - 108px));
    overflow: hidden;
  }

  .composer .attachment-list:empty {
    display: none;
  }

  body.chatgpt-theme .composer {
    right: 10px;
    left: 10px;
    max-width: none;
    padding: 8px 10px;
    border-radius: 20px;
  }

  body.deepseek-theme .composer {
    right: 10px;
    left: 10px;
    max-width: none;
    padding: 8px 10px;
  }

  #imageView .page-content {
    width: calc(100% - 24px);
    padding-top: 16px;
    padding-bottom: max(220px, calc(env(safe-area-inset-bottom) + 180px));
  }

  .image-generation-panel {
    gap: 12px;
    padding-bottom: 0;
  }

  .image-generation-panel textarea {
    min-height: 116px;
    max-height: 42vh;
  }

  .image-generation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .image-generation-actions select,
  .image-generation-actions .primary {
    width: 100%;
    min-height: 42px;
  }

  .composer textarea,
  body.chatgpt-theme .composer textarea,
  body.deepseek-theme .composer textarea {
    min-height: 40px;
    height: 40px;
    max-height: 58px;
    min-width: 0;
    align-self: stretch;
    padding: 7px 4px 3px;
    font-size: 16px;
    line-height: 1.35;
    overflow-y: auto;
    -webkit-text-size-adjust: 100%;
  }

  .composer-toolbar {
    height: 36px;
    min-height: 36px;
    gap: 6px;
    overflow: visible;
  }

  .composer-tools,
  .composer-actions {
    min-width: 0;
    flex-wrap: nowrap;
  }

  .composer-tools {
    overflow: hidden;
  }

  .composer-actions {
    flex: 0 0 auto;
  }

  .tool-button,
  .send-button,
  body.chatgpt-theme .tool-button,
  body.chatgpt-theme .send-button,
  body.deepseek-theme .tool-button,
  body.deepseek-theme .send-button {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    min-width: 36px;
  }

  .tool-pill,
  body.chatgpt-theme .tool-pill,
  body.deepseek-theme .tool-pill {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .landing-brand {
    font-size: 16px;
  }

  .landing-actions {
    gap: 4px;
  }

  .usage-summary-grid {
    grid-template-columns: 1fr;
  }

  .page-view .chat-subtitle {
    display: none;
  }

  .model-button {
    max-width: calc(100vw - 176px);
  }

  .top-doc-button,
  .login-pill {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }
}

/* sub2api visual theme override */
:root {
  --paper: #f8fafc;
  --side: #ffffff;
  --hover: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #cbd5e1;
  --line: #e2e8f0;
  --card: #ffffff;
  --danger: #dc2626;
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;
  --primary-200: #99f6e4;
  --primary-400: #2dd4bf;
  --primary-500: #14b8a6;
  --primary-600: #0d9488;
  --primary-700: #0f766e;
  --accent-50: #f8fafc;
  --accent-100: #f1f5f9;
  --accent-200: #e2e8f0;
  --accent-500: #64748b;
  --accent-700: #334155;
  --accent-800: #1e293b;
  --accent-900: #0f172a;
}

body {
  background:
    radial-gradient(circle at 34% 8%, rgba(20, 184, 166, 0.1), transparent 32%),
    radial-gradient(circle at 92% 2%, rgba(6, 182, 212, 0.08), transparent 28%),
    #f8fafc;
  color: var(--ink);
}

body.chatgpt-theme,
body.deepseek-theme {
  --paper: #f8fafc;
  --side: #ffffff;
  --hover: #f1f5f9;
  --line: #e2e8f0;
  --card: #ffffff;
  --muted: #64748b;
  --ink: #0f172a;
}

::selection {
  background: rgba(20, 184, 166, 0.18);
  color: #134e4a;
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.login-shell {
  background:
    radial-gradient(circle at 40% 20%, rgba(20, 184, 166, 0.12) 0, transparent 34%),
    radial-gradient(circle at 80% 0%, rgba(6, 182, 212, 0.08) 0, transparent 32%),
    linear-gradient(135deg, #f8fafc 0%, #f0fdfa 44%, #f1f5f9 100%);
  color: var(--ink);
}

.landing-topbar {
  margin: 0 calc(clamp(18px, 4vw, 56px) * -1);
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.landing-brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.landing-brand img,
.brand-mark img,
.bai-logo img,
.top-skeleton span {
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.18);
}

.landing-link-button,
.landing-login-button,
.top-doc-button,
.login-pill,
.ghost-button,
.mini-button,
.api-key-copy,
.api-key-doc,
.api-key-delete {
  border-radius: 12px;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.landing-link-button,
.top-doc-button,
.ghost-button,
.mini-button,
.api-key-copy,
.api-key-doc {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.landing-link-button:hover,
.top-doc-button:hover,
.ghost-button:hover,
.mini-button:hover,
.api-key-copy:hover,
.api-key-doc:hover {
  border-color: rgba(20, 184, 166, 0.34);
  background: #f0fdfa;
  color: #0f766e;
}

.landing-login-button,
.login-pill,
.primary,
.inline-primary,
.modal-actions .primary,
.login-panel button,
.sidebar-logout-button,
.send-button,
body.chatgpt-theme .send-button,
body.deepseek-theme .send-button,
.subscription-buy-button,
.admin-tabs button.active,
.admin-tabs button[aria-current="page"],
.channel-monitor-range-toggle button.active {
  border: 0;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.24);
}

.landing-login-button:hover,
.login-pill:hover,
.primary:hover,
.inline-primary:hover,
.modal-actions .primary:hover,
.login-panel button:hover,
.sidebar-logout-button:hover,
.send-button:hover,
body.chatgpt-theme .send-button:hover,
body.deepseek-theme .send-button:hover,
.subscription-buy-button:hover {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  box-shadow: 0 14px 32px rgba(20, 184, 166, 0.28);
  transform: translateY(-1px);
}

.landing-hero {
  width: min(860px, 100%);
  padding-top: clamp(86px, 15vh, 150px);
}

.landing-mesh {
  inset: 16px auto auto 50%;
  width: min(760px, 76vw);
  height: min(520px, 58vw);
  opacity: 1;
  transform: translateX(-50%);
  background:
    linear-gradient(rgba(20, 184, 166, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 68% at 50% 44%, #000 0%, transparent 76%);
}

.landing-headline-rotator {
  min-height: 108px;
}

.landing-headline-rotator h1 {
  max-width: 860px;
  color: var(--ink);
  font-size: clamp(32px, 5.6vw, 56px);
  line-height: 1.08;
  font-weight: 800;
}

.landing-tagline,
.landing-feature-intro p,
.landing-feature-card p {
  color: var(--muted);
}

.landing-tool-row span {
  border-color: rgba(226, 232, 240, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.landing-composer,
.composer,
body.chatgpt-theme .composer,
body.deepseek-theme .composer {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 56px rgba(15, 23, 42, 0.12);
}

.landing-composer button {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  box-shadow: 0 10px 22px rgba(20, 184, 166, 0.24);
}

.landing-feature-intro span,
.landing-section-kicker {
  color: var(--primary-600);
}

.landing-feature-intro h2,
.landing-feature-card h3,
.landing-pricing-intro h2 {
  color: var(--ink);
  font-weight: 800;
}

.landing-feature-card,
.pricing-model-card,
.pricing-company-group,
.landing-pricing-intro,
.login-panel,
.api-hero,
.profile-card,
.usage-chart-card,
.key-card,
.openclaw-command-card,
.doc-panel,
.admin-plan-card,
.admin-user-card,
.admin-channel-card,
.channel-monitor-card,
.subscription-card,
.redeem-code-card,
.marketing-list-item,
.account-bind-panel,
.admin-doc-card,
.admin-rate-card,
.history-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.landing-feature-card:hover,
.pricing-model-card:hover,
.key-card:hover,
.openclaw-command-card:hover,
.admin-user-card:hover,
.admin-channel-card:hover,
.subscription-card:hover,
.redeem-code-card:hover {
  border-color: rgba(20, 184, 166, 0.28);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.landing-card-art {
  border: 1px solid rgba(20, 184, 166, 0.1);
  background:
    radial-gradient(circle at 40% 20%, rgba(20, 184, 166, 0.12) 0, transparent 52%),
    radial-gradient(circle at 80% 0%, rgba(6, 182, 212, 0.08) 0, transparent 50%),
    linear-gradient(rgba(20, 184, 166, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.04) 1px, transparent 1px),
    #f8fafc;
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
}

.terminal-art {
  background: linear-gradient(135deg, var(--accent-800), var(--accent-900));
}

#quickStartDialog .modal-backdrop,
#landingLoginDialog .modal-backdrop,
#landingPriceDialog .modal-backdrop {
  background:
    radial-gradient(circle at 40% 20%, rgba(20, 184, 166, 0.14), transparent 34%),
    radial-gradient(circle at 80% 0%, rgba(6, 182, 212, 0.1), transparent 32%),
    linear-gradient(135deg, #f8fafc 0%, #f0fdfa 48%, #f1f5f9 100%);
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}

.modal-panel,
.dialog-container,
.api-key-modal,
.payment-modal,
.subscribe-confirm-modal,
#quickStartDialog .account-modal,
#landingLoginDialog .account-modal,
.landing-price-modal {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

#quickStartDialog .account-modal,
#landingLoginDialog .account-modal {
  width: min(420px, calc(100vw - 28px));
  gap: 14px;
  padding: 30px;
}

#landingLoginDialog .account-modal {
  grid-template-columns: minmax(0, 1fr) auto;
}

#landingLoginDialog .modal-header,
#landingLoginDialog .auth-mode-tabs,
#landingLoginDialog .account-modal label:not(.remember-password-row),
#landingLoginDialog .error,
#landingLoginDialog .modal-actions {
  grid-column: 1 / -1;
}

#landingLoginDialog .account-modal .remember-password-row {
  grid-column: 1;
  margin-top: -2px;
}

#landingLoginDialog .modal-login-helper {
  grid-column: 2;
  align-self: center;
  justify-self: end;
  margin-top: -2px;
}

#quickStartDialog .modal-header h2,
#landingLoginDialog .modal-header h2 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
}

#quickStartDialog .modal-header p,
#landingLoginDialog .modal-header p,
.modal-header p,
.payment-modal .modal-header p {
  color: var(--muted);
}

.auth-mode-tabs,
#landingLoginDialog .auth-mode-tabs {
  height: 44px;
  border-radius: 14px;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.auth-mode-tab {
  border-radius: 11px;
  color: var(--muted);
}

.auth-mode-tab.active {
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

#quickStartDialog .account-modal input,
#landingLoginDialog .account-modal input {
  height: 46px;
  border-color: var(--line);
  border-radius: 12px;
  background: #ffffff;
  font-size: 14px;
}

#quickStartDialog .account-modal input:focus,
#landingLoginDialog .account-modal input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

#quickStartDialog .account-modal .remember-password-row input,
#landingLoginDialog .account-modal .remember-password-row input {
  accent-color: var(--primary-500);
}

#landingLoginDialog .modal-login-helper .ghost-button {
  color: var(--primary-600);
}

#quickStartDialog .modal-actions .primary,
#landingLoginDialog .modal-actions .primary {
  min-height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.24);
}

.app,
.chat-area,
.page-view {
  background:
    radial-gradient(circle at 34% 8%, rgba(20, 184, 166, 0.08), transparent 32%),
    #f8fafc;
}

.sidebar {
  grid-template-rows: auto auto 1fr auto;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 8px 0 30px rgba(15, 23, 42, 0.04);
}

.sidebar-spacer {
  min-height: 0;
}

.bai-logo {
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.bai-nav {
  gap: 5px;
}

.bai-nav-group-label {
  margin: 10px 12px 3px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.bai-nav-group-label:first-child {
  margin-top: 0;
}

.bai-nav-item,
.thread-row,
.thread-group-title,
.lang-button {
  border-radius: 12px;
}

.bai-nav-item {
  color: #475569;
  font-weight: 700;
}

.bai-nav-item span {
  color: #64748b;
}

.bai-nav-item span:first-child {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.bai-nav-item svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bai-nav-item.active,
.bai-nav-item:hover {
  background: #f0fdfa;
  color: #0f766e;
}

.bai-nav-item.active span:first-child,
.bai-nav-item:hover span:first-child {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.24);
}

.bai-nav-item.active span:not(:first-child),
.bai-nav-item:hover span:not(:first-child) {
  color: #0f766e;
}

.thread-group-title {
  background: #f1f5f9;
  color: #334155;
}

.thread-group-title:hover,
.thread-row.active,
.thread-row:hover,
.model-option:hover,
.model-option.active,
.thread-actions button:hover,
.message-icon-button:hover {
  background: #f0fdfa;
  color: #0f766e;
}

.thread-group-chevron,
.thread-group-count,
.model-icon,
.model-option-copy small,
.top-skeleton i,
.search-wrap input {
  background: #f1f5f9;
  color: #475569;
}

.chat-header,
.page-view .chat-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(14px);
}

.model-button,
.model-menu,
.model-pricing-switch,
.model-rate-badge,
.model-price-pills i,
.tool-button,
.tool-pill,
body.chatgpt-theme .tool-button,
body.chatgpt-theme .tool-pill,
body.deepseek-theme .tool-button,
body.deepseek-theme .tool-pill {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.model-button:hover,
.model-button[aria-expanded="true"],
.tool-button:hover,
.tool-pill:hover,
body.chatgpt-theme .tool-button:hover,
body.chatgpt-theme .tool-pill:hover,
body.deepseek-theme .tool-button:hover,
body.deepseek-theme .tool-pill:hover {
  border-color: rgba(20, 184, 166, 0.34);
  background: #f0fdfa;
  color: #0f766e;
}

.model-pricing-switch button,
.usage-toggle button,
.channel-monitor-range-toggle button,
.channel-monitor-metric-toggle button,
.pricing-company-nav-item,
.admin-tabs button {
  border-color: var(--line);
  background: #f8fafc;
  color: #475569;
}

.model-pricing-switch button.active,
.usage-toggle button.active,
.channel-monitor-metric-toggle button.active,
.pricing-company-nav-item:hover,
.pricing-company-nav-item.active {
  border-color: var(--primary-500);
  background: #f0fdfa;
  color: #0f766e;
}

.page-content {
  background: transparent;
}

.api-hero,
.landing-pricing-intro {
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 184, 166, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.92));
}

.api-hero h2,
.profile-card h2,
.subscription-price,
.pricing-model-card h3,
.admin-channel-card strong,
.admin-user-card strong,
.admin-plan-card strong {
  color: var(--ink);
}

.usage-summary-card,
.account-result-box,
.api-key-secret-box,
.alipay-cashier,
.payment-summary,
.subscribe-balance-ok,
.subscribe-balance-short,
.doc-tip,
.marketing-empty,
.channel-monitor-selected,
.channel-monitor-selected-events,
.admin-channel-test-result,
.pricing-empty {
  border-color: var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
}

.api-key-table,
.table-container {
  border-color: var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.api-key-table-head,
.api-key-table-row,
.table th,
.table td {
  border-color: #eef2f7;
}

.api-key-table-head,
.table th {
  background: #f8fafc;
  color: #64748b;
}

.api-key-table-row:hover,
.table tbody tr:hover {
  background: #f0fdfa;
}

.badge-primary,
.subscription-card-status,
.admin-plan-badge,
.pricing-discount-badge,
.channel-monitor-status.ok,
.admin-channel-status.on {
  background: #ccfbf1;
  color: #0f766e;
}

.badge-gray,
.admin-channel-status.off,
.support-ticket-card.closed .support-ticket-status {
  background: #f1f5f9;
  color: #64748b;
}

.message-body .bubble {
  color: var(--ink);
}

.message.user .bubble {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  color: #134e4a;
}

.avatar,
.bai-center-mark,
.brand-mark {
  color: #0f766e;
}

.message-icon-button,
.thread-actions button {
  color: #64748b;
}

.doc-nav-item:hover,
.doc-nav-item.active {
  border-left-color: var(--primary-500);
  background: #f0fdfa;
  color: #0f766e;
}

.copy-icon-button {
  background: rgba(255, 255, 255, 0.88);
}

.danger-button,
.danger-mini,
.api-key-delete {
  background: #fef2f2;
  color: var(--danger);
}

.danger-button:hover,
.danger-mini:hover,
.api-key-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.history-search {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 14px;
  padding: 0 0 8px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(248, 250, 252, 0));
}

.history-search input {
  height: 44px;
  border-color: rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.history-card:hover {
  border-color: rgba(20, 184, 166, 0.28);
  background: #f0fdfa;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.api-key-toolbar-top {
  justify-content: flex-start;
  margin-top: 0;
  margin-bottom: 0;
}

.api-key-toolbar-top .inline-primary {
  margin-top: 0;
}

.api-key-section {
  display: grid;
  gap: 0;
  margin-bottom: 18px;
}

.api-key-section .key-list {
  margin-top: 6px;
}

.protocol-compact-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.protocol-compact-head,
.protocol-compact-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}

.protocol-compact-head {
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.protocol-compact-row {
  border-bottom: 1px solid #eef2f7;
  color: var(--ink);
  font-size: 14px;
}

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

.protocol-compact-row code {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f766e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

@media (max-width: 720px) {
  .landing-topbar {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  #quickStartDialog .account-modal,
  #landingLoginDialog .account-modal {
    width: min(360px, calc(100vw - 24px));
    gap: 10px;
    padding: 20px;
  }

  #quickStartDialog .modal-header h2,
  #landingLoginDialog .modal-header h2 {
    font-size: 22px;
  }

  #quickStartDialog .modal-header p,
  #landingLoginDialog .modal-header p,
  #quickStartDialog .account-modal label,
  #landingLoginDialog .account-modal label,
  #quickStartDialog .modal-note,
  #landingLoginDialog .modal-login-helper {
    font-size: 12px;
  }

  #quickStartDialog .auth-mode-tab,
  #landingLoginDialog .auth-mode-tab,
  #quickStartDialog .modal-actions .primary,
  #landingLoginDialog .modal-actions .primary {
    font-size: 13px;
  }
}

/* Compact pricing page overrides */
body #pricingView .pricing-page-content,
body #pricingView .page-content {
  padding: 16px 18px 28px;
}

body #pricingView .pricing-company-list {
  gap: 12px;
}

body #pricingView .pricing-toolbar {
  gap: 10px;
  margin-bottom: 2px;
}

body #pricingView .usage-toggle.pricing-mode-toggle {
  height: 30px;
  border-radius: 8px;
}

body #pricingView .usage-toggle.pricing-mode-toggle button {
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

body #pricingView .pricing-company-nav {
  gap: 6px;
}

body #pricingView .pricing-company-nav-item {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

body #pricingView .pricing-company-group {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

body #pricingView .pricing-company-head {
  min-height: 42px;
  padding: 9px 12px;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-bottom-color: #e5e7eb;
}

body #pricingView .pricing-company-title-row {
  min-width: 0;
  display: grid;
  align-items: start;
  gap: 3px;
}

body #pricingView .pricing-company-head h3 {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
}

body #pricingView .pricing-discount-badge {
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  box-shadow: none;
}

body #pricingView .pricing-company-mode-toggle {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  body #pricingView .pricing-company-head {
    display: grid;
    justify-items: start;
  }
}

body #pricingView .pricing-model-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 8px;
  padding: 8px;
}

body #pricingView .pricing-model-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

body #pricingView .pricing-model-card:hover {
  border-color: #cbd5e1;
  box-shadow: none;
}

body #pricingView .pricing-model-card-main {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

body #pricingView .pricing-model-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: none;
}

body #pricingView .pricing-model-icon img {
  width: 22px;
  height: 22px;
}

body #pricingView .pricing-model-copy {
  gap: 5px;
}

body #pricingView .pricing-model-copy > strong {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
  color: #111827;
}

body #pricingView .pricing-model-line-list {
  gap: 1px;
}

body #pricingView .pricing-model-line-list p {
  font-size: 13px;
  line-height: 1.35;
  color: #374151;
}

body #pricingView .pricing-model-line-list span {
  margin-right: 4px;
  color: #64748b;
}

body #pricingView .pricing-model-line-list b {
  font-weight: 500;
  color: #111827;
}

body #pricingView .pricing-model-line-list .pricing-model-discount-line {
  margin: 0 0 3px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 720px) {
  body .composer textarea,
  body.chatgpt-theme .composer textarea,
  body.deepseek-theme .composer textarea {
    font-size: 16px;
  }
}

body.theme-dark {
  color-scheme: dark;
  --paper: #0f172a;
  --side: #111827;
  --hover: #1f2937;
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --soft: #334155;
  --line: #253244;
  --card: #111827;
  --danger: #f87171;
  background: #0b1120;
  color: var(--ink);
}

body.theme-dark .app,
body.theme-dark .chat-area,
body.theme-dark .page-view {
  background: #0b1120;
}

body.theme-dark .sidebar {
  background: #0f172a;
  border-right-color: #1e293b;
  box-shadow: none;
}

body.theme-dark .bai-logo,
body.theme-dark .chat-title,
body.theme-dark .usage-summary-grid strong,
body.theme-dark .usage-chart-header h3,
body.theme-dark .profile-card h2,
body.theme-dark .key-card strong,
body.theme-dark .usage-table td,
body.theme-dark .usage-model-stack strong {
  color: #f8fafc;
}

body.theme-dark .bai-nav-group-label,
body.theme-dark .chat-subtitle,
body.theme-dark .usage-summary-grid span,
body.theme-dark .usage-summary-grid small,
body.theme-dark .usage-chart-header p,
body.theme-dark .usage-table-note,
body.theme-dark .usage-model-stack small {
  color: #94a3b8;
}

body.theme-dark .bai-nav-item {
  color: #cbd5e1;
}

body.theme-dark .bai-nav-item span:first-child,
body.theme-dark .thread-group-chevron,
body.theme-dark .thread-group-count,
body.theme-dark .top-skeleton i,
body.theme-dark .search-wrap input {
  background: #1e293b;
  color: #94a3b8;
}

body.theme-dark .bai-nav-item.active,
body.theme-dark .bai-nav-item:hover,
body.theme-dark .thread-row.active,
body.theme-dark .thread-row:hover {
  background: rgba(20, 184, 166, 0.14);
  color: #5eead4;
}

body.theme-dark .bai-nav-item.active span:first-child,
body.theme-dark .bai-nav-item:hover span:first-child {
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  color: #ecfeff;
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.16);
}

body.theme-dark .chat-header,
body.theme-dark .page-view .chat-header {
  border-bottom-color: #1e293b;
  background: rgba(15, 23, 42, 0.9);
}

body.theme-dark #usageView .page-content,
body.theme-dark .page-content {
  background: transparent;
}

body.theme-dark .usage-summary-grid article,
body.theme-dark .usage-chart-card,
body.theme-dark .usage-filter-card,
body.theme-dark .key-card,
body.theme-dark .api-hero,
body.theme-dark .profile-card,
body.theme-dark .account-modal,
body.theme-dark .history-card {
  border-color: #243244;
  background: #111827;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

body.theme-dark .usage-stat-blue {
  background: rgba(37, 99, 235, 0.18);
  color: #60a5fa;
}

body.theme-dark .usage-stat-amber {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

body.theme-dark .usage-stat-green {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

body.theme-dark .usage-stat-purple {
  background: rgba(147, 51, 234, 0.18);
  color: #c084fc;
}

body.theme-dark .usage-toggle,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .ghost-button {
  border-color: #334155;
  background: #0f172a;
  color: #e5e7eb;
}

body.theme-dark .usage-date-picker-trigger,
body.theme-dark .usage-date-picker-dropdown {
  border-color: #334155;
  background: #111827;
  color: #e5e7eb;
}

body.theme-dark .usage-date-picker-divider {
  border-color: #1e293b;
}

body.theme-dark .usage-date-picker-presets button {
  color: #cbd5e1;
}

body.theme-dark .usage-date-picker-presets button:hover {
  background: #1f2937;
}

body.theme-dark .usage-date-picker-presets button.active {
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
}

body.theme-dark .usage-date-picker-custom input {
  border-color: #334155;
  background: #0f172a;
  color: #e5e7eb;
}

body.theme-dark .usage-toggle button {
  background: transparent;
  color: #94a3b8;
}

body.theme-dark .usage-toggle button.active,
body.theme-dark .ghost-button:hover {
  border-color: #14b8a6;
  background: rgba(20, 184, 166, 0.16);
  color: #5eead4;
}

body.theme-dark .usage-grid-lines i,
body.theme-dark .usage-filter-card .usage-chart-header,
body.theme-dark .usage-hour-card,
body.theme-dark .usage-table th,
body.theme-dark .usage-table td,
body.theme-dark .usage-distribution-table-row {
  border-color: #1e293b;
}

body.theme-dark .usage-y-axis,
body.theme-dark .usage-month-bar em,
body.theme-dark .usage-hour-bar b {
  color: #94a3b8;
}

body.theme-dark .usage-month-bar i,
body.theme-dark .usage-hour-bar.has-value i {
  background: #14b8a6;
  box-shadow: 0 7px 18px rgba(20, 184, 166, 0.18);
}

body.theme-dark .usage-hour-bar i {
  background: #334155;
}

body.theme-dark .usage-bar-value,
body.theme-dark .usage-hour-bar span {
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
}

body.theme-dark .usage-table-wrap,
body.theme-dark .api-key-table,
body.theme-dark .table-container {
  border-color: #243244;
  background: #111827;
}

body.theme-dark .usage-table th {
  background: #0f172a;
  color: #94a3b8;
}

body.theme-dark .usage-log-row:hover {
  background: rgba(20, 184, 166, 0.08);
}

body.theme-dark .usage-type-pill,
body.theme-dark .badge-gray {
  background: #1e293b;
  color: #cbd5e1;
}

body.theme-dark .sidebar-logout-button {
  background: #ef4444;
  color: #fff;
}

body.theme-dark .theme-toggle-button {
  border: 1px solid #334155;
  background: #0f172a;
}

body.theme-dark .floating-theme-toggle {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.9);
  color: #5eead4;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

body.theme-dark .landing-feature-card,
body.theme-dark .pricing-model-card,
body.theme-dark .pricing-company-group,
body.theme-dark .pricing-company-head,
body.theme-dark .pricing-toolbar,
body.theme-dark .landing-pricing-intro,
body.theme-dark .login-panel,
body.theme-dark .openclaw-command-card,
body.theme-dark .doc-panel,
body.theme-dark .doc-card,
body.theme-dark .doc-tip,
body.theme-dark .doc-nav-item,
body.theme-dark .admin-plan-card,
body.theme-dark .admin-user-card,
body.theme-dark .admin-channel-card,
body.theme-dark .channel-monitor-card,
body.theme-dark .subscription-card,
body.theme-dark .redeem-code-card,
body.theme-dark .marketing-list-item,
body.theme-dark .account-bind-panel,
body.theme-dark .admin-doc-card,
body.theme-dark .admin-rate-card,
body.theme-dark .gift-key-card,
body.theme-dark .gift-pool-card,
body.theme-dark .payment-summary,
body.theme-dark .alipay-cashier,
body.theme-dark .account-result-box,
body.theme-dark .api-key-secret-box,
body.theme-dark .inline-code-row,
body.theme-dark .modal,
body.theme-dark .modal-content,
body.theme-dark .account-modal,
body.theme-dark .landing-price-modal,
body.theme-dark .table-container,
body.theme-dark .api-key-table,
body.theme-dark .api-key-table-row,
body.theme-dark .api-key-table-head,
body.theme-dark .admin-channel-test-result,
body.theme-dark .channel-monitor-selected,
body.theme-dark .channel-monitor-selected-events,
body.theme-dark .subscribe-balance-ok,
body.theme-dark .subscribe-balance-short,
body.theme-dark .pricing-empty,
body.theme-dark .marketing-empty,
body.theme-dark .support-ticket-card,
body.theme-dark .support-create-form,
body.theme-dark .history-search,
body.theme-dark .history-list article,
body.theme-dark .profile-balance-card,
body.theme-dark .profile-card,
body.theme-dark .usage-account-summary article,
body.theme-dark .recharge-panel,
body.theme-dark .epay-cashier,
body.theme-dark .epay-payment-card {
  border-color: #243244 !important;
  background: #111827 !important;
  color: #e5e7eb !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark .pricing-company-head,
body.theme-dark .api-key-table-head,
body.theme-dark .table th,
body.theme-dark .usage-table th,
body.theme-dark .modal-footer,
body.theme-dark .modal-actions,
body.theme-dark .account-modal-footer,
body.theme-dark .admin-toolbar,
body.theme-dark .admin-channel-toolbar,
body.theme-dark .admin-tabs,
body.theme-dark .gift-pool-toolbar {
  border-color: #243244 !important;
  background: #0f172a !important;
  color: #cbd5e1 !important;
}

body.theme-dark .pricing-model-copy > strong,
body.theme-dark .pricing-model-line-list b,
body.theme-dark .pricing-company-head h3,
body.theme-dark .admin-channel-card strong,
body.theme-dark .admin-user-card strong,
body.theme-dark .admin-plan-card strong,
body.theme-dark .subscription-card h3,
body.theme-dark .redeem-code-card strong,
body.theme-dark .doc-panel h3,
body.theme-dark .modal h2,
body.theme-dark .modal-title,
body.theme-dark .account-modal h2,
body.theme-dark .profile-balance-card strong,
body.theme-dark .table td strong,
body.theme-dark .api-key-table-row strong,
body.theme-dark .key-card strong {
  color: #f8fafc !important;
}

body.theme-dark .pricing-model-line-list p,
body.theme-dark .pricing-model-line-list span,
body.theme-dark .pricing-discount-badge,
body.theme-dark .admin-channel-card small,
body.theme-dark .admin-user-card p,
body.theme-dark .admin-plan-card p,
body.theme-dark .subscription-card p,
body.theme-dark .doc-panel p,
body.theme-dark .modal-note,
body.theme-dark .account-modal label,
body.theme-dark .profile-balance-card span,
body.theme-dark .profile-balance-card em,
body.theme-dark .table th,
body.theme-dark .api-key-table-head,
body.theme-dark .api-key-table-row span,
body.theme-dark .key-card span,
body.theme-dark .key-card small {
  color: #94a3b8 !important;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .input,
body.theme-dark .search-wrap input,
body.theme-dark .history-search input,
body.theme-dark .admin-toolbar input,
body.theme-dark .admin-toolbar select,
body.theme-dark .admin-create-user input,
body.theme-dark .admin-create-user select,
body.theme-dark .admin-plan-grid input,
body.theme-dark .admin-plan-grid select,
body.theme-dark .admin-channel-form input,
body.theme-dark .admin-channel-form textarea,
body.theme-dark .admin-channel-form select,
body.theme-dark .marketing-link-row input,
body.theme-dark .marketing-payout-form input,
body.theme-dark .marketing-withdrawal-apply-row input,
body.theme-dark #epayRechargeForm input {
  border-color: #334155 !important;
  background: #0b1220 !important;
  color: #e5e7eb !important;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #64748b !important;
}

body.theme-dark .ghost-button,
body.theme-dark .mini-button,
body.theme-dark .inline-primary,
body.theme-dark .primary,
body.theme-dark .tool-button,
body.theme-dark .tool-pill,
body.theme-dark .model-button,
body.theme-dark .pricing-company-nav-item,
body.theme-dark .model-pricing-switch button,
body.theme-dark .admin-tabs button,
body.theme-dark .channel-monitor-range-toggle button,
body.theme-dark .channel-monitor-metric-toggle button {
  border-color: #334155 !important;
  background: #0f172a !important;
  color: #e5e7eb !important;
}

body.theme-dark .ghost-button:hover,
body.theme-dark .mini-button:hover,
body.theme-dark .pricing-company-nav-item:hover,
body.theme-dark .pricing-company-nav-item.active,
body.theme-dark .model-pricing-switch button.active,
body.theme-dark .admin-tabs button.active,
body.theme-dark .channel-monitor-range-toggle button.active,
body.theme-dark .channel-monitor-metric-toggle button.active {
  border-color: #14b8a6 !important;
  background: rgba(20, 184, 166, 0.16) !important;
  color: #5eead4 !important;
}

body.theme-dark .table td,
body.theme-dark .table th,
body.theme-dark .api-key-table-row,
body.theme-dark .usage-table td,
body.theme-dark .usage-table th {
  border-color: #243244 !important;
}

body.theme-dark .table tbody tr:hover,
body.theme-dark .api-key-table-row:hover {
  background: rgba(20, 184, 166, 0.08) !important;
}

body.theme-dark .badge-primary,
body.theme-dark .subscription-card-status,
body.theme-dark .admin-plan-badge,
body.theme-dark .pricing-discount-badge,
body.theme-dark .channel-monitor-status.ok,
body.theme-dark .admin-channel-status.on {
  background: rgba(20, 184, 166, 0.16) !important;
  color: #5eead4 !important;
}

body.theme-dark .badge-gray,
body.theme-dark .admin-channel-status.off,
body.theme-dark .support-ticket-card.closed .support-ticket-status {
  background: #1e293b !important;
  color: #cbd5e1 !important;
}

body.theme-dark .top-doc-button,
body.theme-dark .composer,
body.theme-dark.chatgpt-theme .composer,
body.theme-dark.deepseek-theme .composer,
body.theme-dark .codex-button,
body.theme-dark .model-button,
body.theme-dark .model-icon,
body.theme-dark .model-icon.selected,
body.theme-dark .message-body .bubble,
body.theme-dark .bubble,
body.theme-dark.chatgpt-theme .bubble,
body.theme-dark.chatgpt-theme .message.assistant .bubble,
body.theme-dark.chatgpt-theme .message.user .bubble,
body.theme-dark .message.assistant .bubble,
body.theme-dark .message.user .bubble,
body.theme-dark #epayRechargeForm.recharge-payment-panel,
body.theme-dark .quick-amounts button,
body.theme-dark .quick-amounts button.active,
body.theme-dark .quick-amounts button.quick-amount-bonus,
body.theme-dark .quick-amounts button.quick-amount-bonus.active,
body.theme-dark .alipay-icon,
body.theme-dark #pricingView .pricing-model-icon,
body.theme-dark .pricing-model-icon,
body.theme-dark #pricingView .pricing-model-line-list .pricing-model-discount-line,
body.theme-dark .pricing-model-line-list .pricing-model-discount-line,
body.theme-dark .profile-card article,
body.theme-dark .profile-card .info-grid article,
body.theme-dark .info-grid article,
body.theme-dark .protocol-compact-card,
body.theme-dark .protocol-compact-row,
body.theme-dark .api-key-empty,
body.theme-dark .key-card {
  border-color: #243244 !important;
  background: #111827 !important;
  color: #e5e7eb !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark .composer textarea,
body.theme-dark.chatgpt-theme .composer textarea,
body.theme-dark.deepseek-theme .composer textarea {
  background: transparent !important;
  color: #f8fafc !important;
}

body.theme-dark .quick-amounts button strong,
body.theme-dark .quick-amounts button .quick-amount-total,
body.theme-dark .profile-card article strong,
body.theme-dark .info-grid article strong,
body.theme-dark .protocol-compact-row code {
  color: #f8fafc !important;
}

body.theme-dark .quick-amounts button span,
body.theme-dark .quick-amounts button em,
body.theme-dark .pricing-model-line-list .pricing-model-discount-line span,
body.theme-dark .pricing-model-line-list .pricing-model-discount-line b,
body.theme-dark .profile-card article span,
body.theme-dark .profile-card article em,
body.theme-dark .info-grid article span,
body.theme-dark .info-grid article em,
body.theme-dark .protocol-compact-head,
body.theme-dark .protocol-compact-row span {
  color: #94a3b8 !important;
}

body.theme-dark .quick-amounts button:hover,
body.theme-dark .quick-amounts button.active,
body.theme-dark .top-doc-button:hover,
body.theme-dark .codex-button:hover,
body.theme-dark #pricingView .pricing-model-line-list .pricing-model-discount-line {
  border-color: #14b8a6 !important;
  background: rgba(20, 184, 166, 0.14) !important;
  color: #5eead4 !important;
}

body.theme-dark .alipay-icon {
  color: #60a5fa !important;
}

body.theme-dark .login-shell,
body.theme-dark .landing-topbar,
body.theme-dark .landing-composer,
body.theme-dark .landing-feature-card,
body.theme-dark .landing-card-art,
body.theme-dark .landing-tool-row span,
body.theme-dark .tool-logo-list span,
body.theme-dark .model-art span,
body.theme-dark .terminal-art span,
body.theme-dark .landing-link-button,
body.theme-dark .landing-login-button,
body.theme-dark .landing-brand-button {
  border-color: #243244 !important;
  background: #111827 !important;
  color: #e5e7eb !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark .landing-composer textarea {
  background: transparent !important;
  color: #f8fafc !important;
}

body.theme-dark .landing-feature-intro span,
body.theme-dark .landing-tagline,
body.theme-dark .landing-feature-card p,
body.theme-dark .landing-tool-row span {
  color: #94a3b8 !important;
}

body.theme-dark .landing-copy h1,
body.theme-dark .landing-feature-intro h2,
body.theme-dark .landing-feature-card h3,
body.theme-dark .landing-brand {
  color: #f8fafc !important;
}

body.theme-dark .landing-link-button:hover,
body.theme-dark .landing-login-button:hover,
body.theme-dark .landing-tool-row span:hover {
  border-color: #14b8a6 !important;
  background: rgba(20, 184, 166, 0.14) !important;
  color: #5eead4 !important;
}
