:root {
  --bg: #e9fbf8;
  --panel: #ffffff;
  --primary: #00a889;
  --primary-dark: #007f71;
  --accent: #705cff;
  --text: #13233a;
  --muted: #6b7d93;
  --line: #d7ebe7;
  --danger: #ef4444;
  --soft: #f5fffd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #dff8ff 0, var(--bg) 45%, #d7f4ea 100%);
}

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

body.feedback-page {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

button, input, textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  padding: 10px 18px;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

.page {
  min-height: 100vh;
}

.phone-shell {
  width: min(860px, 92vw);
  height: min(920px, 94vh);
  margin: 3vh auto;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(0, 128, 117, .18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 34px;
  background: linear-gradient(135deg, #a7f3df, #dbe7ff);
}

.chat-brand-logo {
  width: 146px;
  flex-basis: 146px;
}

.chat-header-title {
  min-width: 0;
}

.avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00c2a8, #705cff);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 25px;
}

.chat-header h1, .admin-topbar h1 {
  margin: 0;
  font-size: 28px;
}

.chat-header p, .admin-topbar p {
  margin: 7px 0 0;
  color: #456077;
}

.status-dot {
  margin-left: auto;
  color: var(--primary-dark);
  background: rgba(255,255,255,.65);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.notice {
  padding: 22px 34px;
  border-bottom: 1px solid var(--line);
  color: #55708b;
  background: rgba(255,255,255,.7);
}

.compliance-notice {
  display: grid;
  gap: 8px;
  line-height: 1.7;
}

.compliance-notice strong {
  color: var(--text);
  font-size: 18px;
}

.compliance-panel {
  padding: 18px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 255, 253, .9);
}

.compliance-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}

.compliance-panel div {
  min-width: 0;
}

.compliance-panel dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.compliance-panel dd {
  margin: 0;
  color: var(--text);
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.compliance-panel p {
  margin: 14px 0 0;
  color: #55708b;
  line-height: 1.65;
}

.home-feedback-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 255, 253, .9);
}

.home-feedback-entry strong {
  display: block;
}

.home-feedback-entry span {
  color: var(--muted);
  font-size: 13px;
}

.home-feedback-entry a,
.feedback-invite a {
  display: inline-block;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  padding: 8px 14px;
  white-space: nowrap;
}

.messages {
  flex: 1;
  min-height: 0;
  padding: 28px 34px;
  overflow: auto;
}

.msg {
  max-width: 72%;
  padding: 15px 18px;
  margin-bottom: 18px;
  border-radius: 18px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg.bot {
  background: white;
  border: 1px solid var(--line);
  margin-right: auto;
}

.msg a {
  color: #0a7cff;
  text-decoration: underline;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.feedback-invite {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 82%;
}

.msg.user {
  background: linear-gradient(135deg, var(--primary), #0a7cff);
  color: white;
  margin-left: auto;
}

.quick {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 16px 34px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

.quick button {
  color: var(--primary-dark);
  background: #e6fbf7;
  border: 1px solid #b9ece2;
  flex: 0 0 auto;
}

.chat-input {
  display: flex;
  gap: 14px;
  padding: 18px 34px 22px;
  background: rgba(255,255,255,.8);
  flex-shrink: 0;
}

.chat-input input {
  flex: 1;
  border: 2px solid #cbece5;
  border-radius: 999px;
  padding: 0 20px;
  outline: none;
}

.chat-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  padding: 0 34px 20px;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1.5;
  font-size: 13px;
}

.chat-footer span:last-child {
  display: flex;
  gap: 14px;
}

.feedback-shell {
  width: min(760px, 92vw);
  margin: 5vh auto;
}

.feedback-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #a7f3df, #dbe7ff);
  border-radius: 24px 24px 0 0;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.75);
  border-bottom: 0;
}

.feedback-brand-logo {
  width: 142px;
  height: 54px;
  flex: 0 0 142px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.38);
  border: 1px solid rgba(255,255,255,.58);
}

.feedback-brand-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 36px;
  object-fit: contain;
}

.feedback-hero h1 {
  margin: 0;
  font-size: 26px;
}

.feedback-hero p {
  margin: 5px 0 0;
  color: #456077;
}

.feedback-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 0 0 24px 24px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 128, 117, .16);
}

.feedback-card label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 650;
}

.feedback-card .field-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.feedback-card .field-title em {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  font-style: normal;
}

.feedback-card .full {
  grid-column: 1 / -1;
}

.feedback-card input,
.feedback-card select,
.feedback-card textarea,
.feedback-status,
.inline-field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
  color: var(--text);
}

.feedback-card textarea {
  min-height: 240px;
  resize: vertical;
}

.feedback-textarea-wrap {
  position: relative;
  display: block;
}

.feedback-content textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 14px 14px 38px;
  font-size: 16px;
  line-height: 1.6;
}

.feedback-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  pointer-events: none;
}

.feedback-card .feedback-upload {
  display: block;
  cursor: pointer;
  color: #078b91;
  font-weight: 600;
}

.feedback-upload input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0 !important;
}

.feedback-upload em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
}

.feedback-files {
  min-height: 0;
  margin-top: -10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.feedback-files:empty {
  display: none;
}

.feedback-contact input {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
}

.feedback-contact input:focus::placeholder {
  color: transparent;
}

.feedback-promise {
  margin: -6px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.feedback-result {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.feedback-result.ok {
  color: var(--primary-dark);
  font-weight: 700;
}

.feedback-result.error {
  color: var(--danger);
}

@media (max-width: 760px) {
  body.feedback-page {
    background: #e9fbf8;
  }

  .feedback-shell {
    width: 100%;
    margin: 0;
    padding: 0 12px calc(24px + env(safe-area-inset-bottom));
  }

  .feedback-hero {
    align-items: center;
    gap: 14px;
    margin: 0 -12px;
    padding: calc(16px + env(safe-area-inset-top)) 18px 24px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .feedback-brand-logo {
    width: 112px;
    height: 44px;
    flex-basis: 112px;
    padding: 6px 7px;
    border-radius: 13px;
  }

  .feedback-brand-logo img {
    max-height: 31px;
  }

  .feedback-hero h1 {
    font-size: 24px;
    line-height: 1.15;
  }

  .feedback-hero p {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
  }

  .feedback-hero .eyebrow {
    font-size: 13px;
    line-height: 1.25;
  }

  .feedback-card {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: -12px;
    padding: 20px 16px 24px;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0, 128, 117, .12);
  }

  .feedback-card label {
    gap: 10px;
    font-size: 16px;
  }

  .feedback-card .field-title {
    min-height: auto;
    font-size: 18px;
    line-height: 1.3;
  }

  .feedback-card .field-title em {
    font-size: 14px;
  }

  .feedback-card input,
  .feedback-card select,
  .feedback-card textarea {
    width: 100%;
    min-width: 0;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 16px;
    line-height: 1.45;
  }

  .feedback-card select {
    min-height: 52px;
  }

  .feedback-card textarea {
    min-height: 220px;
  }

  .feedback-card .feedback-upload {
    padding: 0 4px 14px;
    border-bottom: 1px solid rgba(209, 226, 223, .75);
  }

  .feedback-card button.full {
    min-height: 52px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
  }
}

html.mobile-feedback body.feedback-page {
  background: #e9fbf8;
}

html.mobile-feedback .feedback-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 12px calc(24px + env(safe-area-inset-bottom));
}

html.mobile-feedback .feedback-hero {
  align-items: center;
  gap: 14px;
  margin: 0 -12px;
  padding: calc(16px + env(safe-area-inset-top)) 18px 24px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

html.mobile-feedback .feedback-brand-logo {
  width: 112px;
  height: 44px;
  flex-basis: 112px;
  padding: 6px 7px;
  border-radius: 13px;
}

html.mobile-feedback .feedback-brand-logo img {
  max-height: 31px;
}

html.mobile-feedback .feedback-hero h1 {
  font-size: 24px;
  line-height: 1.15;
}

html.mobile-feedback .feedback-hero p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
}

html.mobile-feedback .feedback-hero .eyebrow {
  font-size: 13px;
  line-height: 1.25;
}

html.mobile-feedback .feedback-card {
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: -12px;
  padding: 20px 16px 24px;
  border-radius: 18px;
  box-shadow: 0 16px 45px rgba(0, 128, 117, .12);
}

html.mobile-feedback .feedback-card label {
  gap: 10px;
  font-size: 16px;
}

html.mobile-feedback .feedback-card .field-title {
  min-height: auto;
  font-size: 18px;
  line-height: 1.3;
}

html.mobile-feedback .feedback-card .field-title em {
  font-size: 14px;
}

html.mobile-feedback .feedback-card input,
html.mobile-feedback .feedback-card select,
html.mobile-feedback .feedback-card textarea {
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.45;
}

html.mobile-feedback .feedback-card select {
  min-height: 52px;
}

html.mobile-feedback .feedback-card textarea {
  min-height: 220px;
}

html.mobile-feedback .feedback-card .feedback-upload {
  padding: 0 4px 14px;
  border-bottom: 1px solid rgba(209, 226, 223, .75);
}

html.mobile-feedback .feedback-card button.full {
  min-height: 52px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
}

/* --- 官网式首页：保留备案信息，同时让首屏像正常产品页 --- */
body.chat-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(36, 178, 159, .18), transparent 34%),
    radial-gradient(circle at 84% 8%, rgba(33, 118, 255, .10), transparent 30%),
    linear-gradient(180deg, #f5fbfa 0%, #eef8f5 48%, #f8fbff 100%);
}

.chat-page .home-shell {
  width: min(1180px, calc(100vw - 48px));
  height: auto;
  min-height: auto;
  margin: 28px auto;
  overflow: visible;
  border: 1px solid rgba(191, 226, 220, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 28px 80px rgba(18, 78, 89, .14);
}

.chat-page .home-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(215, 235, 231, .9);
  background: rgba(255, 255, 255, .84);
  border-radius: 24px 24px 0 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  color: var(--text);
}

.chat-page .chat-brand-logo {
  width: 132px;
  height: 48px;
  flex: 0 0 132px;
  border-radius: 14px;
  background: #f7fffd;
  border: 1px solid #d7ebe7;
}

.brand-lockup strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.brand-lockup small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.home-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-nav-links a,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 650;
}

.home-nav-links a {
  color: #315266;
  background: transparent;
}

.home-nav-links a:hover,
.secondary-action:hover {
  background: #eefaf7;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 36px;
  align-items: center;
  padding: 54px 56px 40px;
}

.hero-copy {
  max-width: 610px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy h1 {
  margin: 0;
  color: #102338;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
}

.hero-lede {
  margin: 22px 0 0;
  color: #526b82;
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action {
  color: #fff;
  background: #008f7c;
  box-shadow: 0 12px 28px rgba(0, 143, 124, .22);
}

.primary-action:hover {
  background: #007f71;
}

.secondary-action {
  color: #315266;
  background: #fff;
  border: 1px solid #d7ebe7;
}

.chat-demo {
  min-width: 0;
  border: 1px solid #d8ece8;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(18, 78, 89, .12);
}

.chat-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #eefcf8, #f3f7ff);
  border-bottom: 1px solid #d8ece8;
}

.chat-demo-head strong {
  display: block;
  font-size: 17px;
}

.chat-demo-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.chat-demo .status-dot {
  margin-left: 0;
  flex: 0 0 auto;
  color: #007f71;
  background: #e4f8f2;
}

.chat-demo .messages {
  height: 240px;
  min-height: 240px;
  padding: 20px;
  background: linear-gradient(180deg, #fbfffe 0%, #f7fbfa 100%);
}

.chat-demo .msg {
  max-width: 88%;
  margin-bottom: 12px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.75;
}

.chat-demo .quick {
  gap: 10px;
  padding: 14px 18px;
  background: #ffffff;
  border-top: 1px solid #e6f1ef;
}

.chat-demo .quick button {
  padding: 8px 13px;
  border-radius: 999px;
  color: #007f71;
  background: #effaf7;
  border: 1px solid #cdece4;
  font-size: 14px;
}

.chat-demo .chat-input {
  gap: 10px;
  padding: 16px 18px 18px;
  background: #ffffff;
  border-top: 1px solid #e6f1ef;
}

.chat-demo .chat-input input {
  height: 44px;
  border: 1px solid #cdece4;
  background: #fbfffe;
}

.chat-demo .chat-input button {
  min-width: 72px;
  height: 44px;
  padding: 0 18px;
  background: #008f7c;
}

.home-service-note {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 56px;
  padding: 18px 20px;
  border: 1px solid #d8ece8;
  border-radius: 16px;
  background: #f7fffd;
  color: #526b82;
  line-height: 1.7;
}

.home-service-note strong {
  flex: 0 0 auto;
  color: var(--text);
}

.company-panel {
  margin: 22px 56px 0;
  padding: 26px;
  border: 1px solid #d8ece8;
  border-radius: 20px;
  background: #ffffff;
}

.company-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.company-panel h2 {
  margin: 0;
  font-size: 24px;
}

.company-panel dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.company-panel div {
  min-width: 0;
  padding: 16px;
  border-radius: 14px;
  background: #f7fbfa;
  border: 1px solid #e2f1ee;
}

.company-panel dt {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.company-panel dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-page .chat-footer {
  justify-content: flex-start;
  margin-top: 20px;
  padding: 22px 56px 28px;
  border-top: 1px solid rgba(215, 235, 231, .9);
  color: #6b7d93;
  background: rgba(247, 251, 250, .72);
  border-radius: 0 0 24px 24px;
}

.chat-page .chat-footer a {
  font-weight: 700;
}

@media (max-width: 640px) {
  body.chat-page {
    background: #ededed;
    overflow: hidden;
  }

  .chat-page .phone-shell {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #f6f6f6;
  }

  .chat-page .chat-header {
    gap: 10px;
    padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
    background: #ffffff;
    border-bottom: 1px solid #e6e6e6;
  }

  .chat-page .chat-brand-logo {
    width: 96px;
    height: 38px;
    flex: 0 0 96px;
    padding: 5px 6px;
    border-radius: 11px;
  }

  .chat-page .chat-brand-logo img {
    max-height: 26px;
  }

  .chat-page .chat-header h1 {
    font-size: 17px;
    line-height: 1.2;
  }

  .chat-page .chat-header p {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.25;
    color: #6b7280;
  }

  .chat-page .status-dot {
    padding: 5px 8px;
    font-size: 12px;
    background: #eefaf7;
  }

  .chat-page .notice {
    padding: 9px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #667085;
    background: #ffffff;
  }

  .chat-page .compliance-notice {
    gap: 6px;
  }

  .chat-page .compliance-notice strong {
    font-size: 15px;
  }

  .chat-page .compliance-panel {
    padding: 12px 14px;
    background: #ffffff;
  }

  .chat-page .compliance-panel dl {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .chat-page .compliance-panel dt {
    font-size: 12px;
  }

  .chat-page .compliance-panel dd,
  .chat-page .compliance-panel p {
    font-size: 13px;
  }

  .chat-page .compliance-panel p {
    margin-top: 10px;
  }

  .chat-page .messages {
    padding: 14px 12px;
    background: #f6f6f6;
  }

  .chat-page .msg {
    max-width: 82%;
    padding: 10px 13px;
    margin-bottom: 11px;
    border-radius: 13px;
    font-size: 15px;
    line-height: 1.55;
  }

  .chat-page .msg.bot {
    border-color: #ececec;
    border-bottom-left-radius: 4px;
  }

  .chat-page .msg.user {
    background: #09b083;
    border-bottom-right-radius: 4px;
  }

  .chat-page .quick {
    gap: 8px;
    padding: 9px 12px;
    background: #ffffff;
    border-top: 1px solid #e9e9e9;
    scrollbar-width: none;
  }

  .chat-page .quick::-webkit-scrollbar {
    display: none;
  }

  .chat-page .quick button {
    max-width: 11em;
    padding: 7px 12px;
    font-size: 13px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-page .chat-input {
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #e6e6e6;
  }

  .chat-page .chat-input input {
    min-width: 0;
    height: 42px;
    border: 1px solid #dddddd;
    border-radius: 21px;
    padding: 0 14px;
    font-size: 15px;
    background: #f9fafb;
  }

  .chat-page .chat-input button {
    width: 58px;
    height: 42px;
    flex: 0 0 58px;
    padding: 0;
    border-radius: 21px;
    font-size: 15px;
  }

  .chat-page .chat-footer {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 5px;
    padding: 0 14px calc(12px + env(safe-area-inset-bottom));
    background: #ffffff;
    font-size: 12px;
  }
}

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

  .chat-page .home-shell {
    width: min(100% - 24px, 720px);
    margin: 12px auto;
    border-radius: 20px;
  }

  .chat-page .home-nav {
    align-items: flex-start;
    padding: 18px;
    border-radius: 20px 20px 0 0;
  }

  .home-nav-links {
    display: none;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 20px 24px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-lede {
    font-size: 16px;
    line-height: 1.75;
  }

  .home-service-note {
    display: block;
    margin: 0 20px;
  }

  .home-service-note span {
    display: block;
    margin-top: 6px;
  }

  .company-panel {
    margin: 18px 20px 0;
    padding: 20px;
  }

  .company-panel-head {
    display: block;
  }

  .company-panel h2 {
    font-size: 21px;
  }

  .company-panel dl {
    grid-template-columns: 1fr;
  }

  .chat-page .chat-footer {
    padding: 18px 20px 22px;
    border-radius: 0 0 20px 20px;
  }
}

@media (max-width: 640px) {
  body.chat-page {
    background:
      radial-gradient(circle at 18% 8%, rgba(36, 178, 159, .15), transparent 34%),
      linear-gradient(180deg, #f5fbfa 0%, #eef8f5 100%);
    overflow: auto;
  }

  .chat-page .home-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .chat-page .home-nav {
    padding: calc(16px + env(safe-area-inset-top)) 16px 14px;
    border-radius: 0;
    background: #ffffff;
  }

  .chat-page .chat-brand-logo {
    width: 106px;
    height: 40px;
    flex-basis: 106px;
  }

  .brand-lockup strong {
    font-size: 16px;
  }

  .brand-lockup small {
    font-size: 12px;
  }

  .home-hero {
    padding: 26px 16px 20px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .primary-action,
  .secondary-action {
    min-height: 40px;
    padding: 0 15px;
  }

  .chat-demo {
    border-radius: 18px;
  }

  .chat-demo .messages {
    height: 220px;
    min-height: 220px;
    padding: 16px;
  }

  .chat-demo .quick {
    padding: 12px 14px;
  }

  .chat-demo .chat-input {
    padding: 14px;
  }

  .home-service-note {
    margin: 0 16px;
    padding: 16px;
  }

  .company-panel {
    margin: 16px;
    padding: 18px;
  }

  .chat-page .chat-footer {
    margin-top: 0;
    padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-radius: 0;
  }
}

/* --- 极简品牌工作台首页 --- */
body.chat-page {
  min-height: 100vh;
  color: #f5f7fb;
  background:
    radial-gradient(circle at 16% 12%, rgba(0, 168, 137, .20), transparent 26%),
    radial-gradient(circle at 78% 18%, rgba(112, 92, 255, .18), transparent 26%),
    linear-gradient(180deg, #11161f 0%, #0a0d12 62%, #050608 100%);
}

.home-stage {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto auto;
}

.simple-hero {
  display: grid;
  align-content: center;
  width: min(1120px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 9vh 0 7vh;
}

.simple-brand {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.simple-logo {
  display: inline-grid;
  place-items: center;
  width: 236px;
  height: 72px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
}

.simple-logo img {
  width: 190px;
  height: auto;
  max-height: 46px;
  object-fit: contain;
}

.simple-divider {
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, .34);
}

.simple-title {
  color: #ffffff;
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 760;
  line-height: 1;
}

.simple-subtitle {
  margin: 34px 0 0;
  color: #ffffff;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.25;
}

.simple-summary {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(245, 247, 251, .70);
  font-size: 18px;
  line-height: 1.9;
}

.simple-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.simple-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
}

.simple-actions a:first-child {
  color: #06110f;
  background: #7ff3dd;
  border-color: #7ff3dd;
}

.simple-actions a:hover {
  transform: translateY(-1px);
}

.simple-consult {
  width: min(760px, calc(100vw - 64px));
  margin: 0 auto 56px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
}

.simple-consult .messages {
  min-height: 130px;
  max-height: 260px;
  padding: 22px;
  background: rgba(255, 255, 255, .04);
}

.simple-consult .msg {
  max-width: 88%;
  margin: 0 0 12px;
  color: #f5f7fb;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

.simple-consult .msg.user {
  color: #06110f;
  background: #7ff3dd;
  border-color: #7ff3dd;
}

.simple-consult .quick {
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .12);
}

.simple-consult .quick button {
  color: #dffdf8;
  background: rgba(127, 243, 221, .10);
  border: 1px solid rgba(127, 243, 221, .28);
}

.simple-consult .chat-input {
  gap: 12px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .18);
}

.simple-consult .chat-input input {
  height: 46px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
}

.simple-consult .chat-input input::placeholder {
  color: rgba(245, 247, 251, .48);
}

.simple-consult .chat-input button {
  min-width: 76px;
  height: 46px;
  padding: 0 20px;
  color: #06110f;
  background: #7ff3dd;
}

.simple-footer {
  display: grid;
  gap: 18px;
  padding: 30px min(7vw, 96px) 34px;
  color: rgba(245, 247, 251, .52);
  background: rgba(0, 0, 0, .44);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.simple-footer-main,
.simple-footer-records {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.simple-footer strong {
  color: rgba(255, 255, 255, .82);
}

.simple-footer a {
  color: rgba(127, 243, 221, .92);
  font-weight: 700;
}

/* --- 备案版视觉微调：更亮、更紧凑、更有内容量 --- */
body.chat-page {
  background:
    radial-gradient(circle at 14% 10%, rgba(54, 219, 189, .24), transparent 28%),
    radial-gradient(circle at 75% 8%, rgba(91, 118, 255, .24), transparent 30%),
    linear-gradient(180deg, #17212e 0%, #101720 56%, #07090c 100%);
}

.home-stage {
  grid-template-rows: 1fr auto;
}

.simple-hero {
  width: min(1180px, calc(100vw - 64px));
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
  column-gap: 74px;
  align-items: center;
  padding: 54px 0 46px;
}

.simple-brand,
.simple-subtitle,
.simple-summary,
.simple-actions {
  grid-column: 1;
}

.simple-brand {
  align-self: end;
}

.simple-logo {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.simple-title,
.simple-subtitle {
  text-shadow: 0 14px 40px rgba(0, 0, 0, .28);
}

.simple-subtitle {
  margin-top: 28px;
}

.simple-summary {
  color: rgba(245, 247, 251, .78);
}

.simple-actions {
  margin-top: 30px;
}

.simple-actions a:first-child {
  color: #06201c;
  background: #83f6e2;
  border-color: #83f6e2;
  box-shadow: 0 14px 36px rgba(127, 243, 221, .18);
}

.simple-consult {
  grid-column: 2;
  width: 100%;
  margin: 0;
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .10);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .34);
}

.simple-consult::before {
  content: "咨询演示";
  display: block;
  padding: 18px 22px;
  color: rgba(255, 255, 255, .80);
  font-weight: 750;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  background: rgba(255, 255, 255, .06);
}

.simple-consult .messages {
  min-height: 174px;
  max-height: 260px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
}

.simple-consult .msg {
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}

.simple-consult .quick,
.simple-consult .chat-input {
  background: rgba(8, 12, 18, .35);
}

.simple-consult .quick button {
  color: #bffcf1;
  background: rgba(127, 243, 221, .13);
  border-color: rgba(127, 243, 221, .34);
}

.simple-footer {
  background: rgba(2, 4, 7, .78);
}

.simple-footer-records span:last-child {
  color: rgba(245, 247, 251, .62);
}

@media (max-width: 760px) {
  .home-stage {
    grid-template-rows: auto auto auto;
  }

  .simple-hero {
    width: calc(100vw - 32px);
    display: block;
    padding: calc(36px + env(safe-area-inset-top)) 0 28px;
  }

  .simple-brand {
    gap: 14px;
  }

  .simple-logo {
    width: 170px;
    height: 58px;
  }

  .simple-logo img {
    width: 136px;
  }

  .simple-divider {
    height: 42px;
  }

  .simple-title {
    font-size: 34px;
  }

  .simple-subtitle {
    margin-top: 28px;
    font-size: 25px;
  }

  .simple-summary {
    font-size: 15px;
    line-height: 1.8;
  }

  .simple-consult {
    width: calc(100vw - 32px);
    margin: 26px auto 0;
  }

  .simple-consult .messages {
    min-height: 112px;
    padding: 16px;
  }

  .simple-consult .quick {
    padding: 12px 14px;
  }

  .simple-consult .quick button {
    padding: 8px 12px;
    font-size: 13px;
  }

  .simple-consult .chat-input {
    padding: 14px;
  }

  .simple-footer {
    justify-items: start;
    padding: 24px 18px calc(28px + env(safe-area-inset-bottom));
    font-size: 13px;
  }

  .simple-footer-main,
  .simple-footer-records {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px 16px;
  }
}

/* --- Premium SaaS homepage: clean, glassy, international product feel --- */
body.chat-page {
  min-height: 100vh;
  color: #101214;
  background:
    radial-gradient(circle at 50% -10%, rgba(78, 125, 255, .14), transparent 28%),
    radial-gradient(circle at 12% 18%, rgba(80, 226, 199, .16), transparent 26%),
    linear-gradient(180deg, #f7f8fa 0%, #ffffff 42%, #f5f7fb 100%);
  overflow-x: hidden;
}

.saas-page {
  min-height: 100vh;
  padding: 28px 28px 0;
}

.saas-nav {
  position: sticky;
  top: 18px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  width: min(760px, calc(100vw - 56px));
  min-height: 62px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 18px 60px rgba(25, 33, 61, .12);
  backdrop-filter: blur(24px);
}

.saas-brand,
.saas-nav-links,
.saas-nav-action {
  display: flex;
  align-items: center;
}

.saas-brand {
  min-width: 0;
  gap: 10px;
  padding-left: 10px;
  color: #151719;
  font-weight: 760;
}

.saas-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #eef2f7);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .07);
  overflow: hidden;
}

.saas-avatar img {
  width: 34px;
  height: auto;
  object-fit: contain;
}

.saas-nav-links {
  justify-content: center;
  gap: 4px;
}

.saas-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #6b6f76;
  font-weight: 650;
}

.saas-nav-links a:hover {
  color: #151719;
  background: rgba(15, 23, 42, .05);
}

.saas-nav-action {
  justify-self: end;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  color: #151719;
  font-weight: 720;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 28px rgba(25, 33, 61, .10);
}

.saas-hero {
  width: min(1060px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 88px 0 46px;
  text-align: center;
}

.saas-kicker {
  margin: 0 0 18px;
  color: #777d88;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.saas-hero h1 {
  max-width: 1040px;
  margin: 0 auto;
  color: #101214;
  font-size: clamp(52px, 7vw, 86px);
  font-weight: 820;
  line-height: 1.02;
}

.saas-lede {
  max-width: 760px;
  margin: 28px auto 0;
  color: #5d626b;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.saas-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.saas-primary,
.saas-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 750;
}

.saas-primary {
  color: #fff;
  background: #2563ff;
  box-shadow: 0 16px 36px rgba(37, 99, 255, .28);
}

.saas-secondary {
  color: #2f343b;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 12px 34px rgba(25, 33, 61, .08);
}

.product-frame {
  width: min(1080px, calc(100vw - 56px));
  margin: 0 auto 104px;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 34px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.58)),
    radial-gradient(circle at 32% 18%, rgba(94, 139, 255, .30), transparent 32%),
    radial-gradient(circle at 76% 22%, rgba(80, 226, 199, .24), transparent 30%);
  box-shadow: 0 42px 110px rgba(25, 33, 61, .18);
  backdrop-filter: blur(18px);
}

.product-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.product-chrome span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d8dde7;
}

.product-chrome span:nth-child(1) {
  background: #ff6b6b;
}

.product-chrome span:nth-child(2) {
  background: #ffca55;
}

.product-chrome span:nth-child(3) {
  background: #47d18c;
}

.product-canvas {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 480px;
  padding: 22px;
  gap: 18px;
}

.product-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  background: rgba(255, 255, 255, .50);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.product-sidebar strong {
  margin-bottom: 8px;
  color: #151719;
  font-size: 18px;
}

.product-sidebar span {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: #606671;
  background: rgba(255, 255, 255, .48);
}

.product-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, .66);
  box-shadow: 0 24px 70px rgba(25, 33, 61, .10);
}

.product-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.product-chat-head strong {
  display: block;
  color: #151719;
  font-size: 18px;
}

.product-chat-head span {
  display: block;
  margin-top: 4px;
  color: #777d88;
  font-size: 13px;
}

.product-chat-head em {
  padding: 8px 13px;
  border-radius: 999px;
  color: #047c67;
  font-style: normal;
  font-weight: 750;
  background: #dffaf4;
}

.product-chat .messages {
  min-height: 220px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(247, 249, 252, .74), rgba(255,255,255,.66));
}

.product-chat .msg {
  max-width: 72%;
  margin-bottom: 14px;
  color: #2c323a;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 16px 36px rgba(25, 33, 61, .08);
}

.product-chat .msg.user {
  color: #fff;
  background: #2563ff;
  border-color: #2563ff;
}

.product-chat .quick {
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid rgba(15, 23, 42, .06);
  background: rgba(255, 255, 255, .52);
}

.product-chat .quick button {
  color: #245262;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(15, 23, 42, .08);
}

.product-chat .chat-input {
  gap: 12px;
  padding: 18px 20px 20px;
  border-top: 1px solid rgba(15, 23, 42, .06);
  background: rgba(255, 255, 255, .64);
}

.product-chat .chat-input input {
  height: 48px;
  color: #151719;
  border: 1px solid rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .88);
}

.product-chat .chat-input button {
  min-width: 78px;
  height: 48px;
  padding: 0 20px;
  background: #2563ff;
}

.saas-footer {
  margin: 0 -28px;
  padding: 24px 28px 28px;
  color: #7a808a;
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, .08);
}

.saas-footer-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  font-size: 14px;
  line-height: 1.45;
  white-space: nowrap;
}

.saas-footer strong {
  color: #2e333a;
  font-size: 15px;
}

.saas-footer a {
  color: #2563ff;
  font-weight: 750;
}

.police-record {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.police-record img {
  display: block;
  width: 15px;
  height: auto;
  flex: 0 0 auto;
}

@media (max-width: 820px) {
  .saas-page {
    padding: 16px 16px 0;
  }

  .saas-nav {
    position: static;
    width: 100%;
    grid-template-columns: 1fr auto;
    border-radius: 28px;
  }

  .saas-nav-links {
    display: none;
  }

  .saas-hero {
    width: 100%;
    padding: 64px 0 34px;
  }

  .product-frame {
    width: 100%;
    margin-bottom: 64px;
    border-radius: 26px;
  }

  .product-canvas {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 14px;
  }

  .product-sidebar {
    display: none;
  }

  .product-chat .messages {
    min-height: 210px;
  }

  .saas-footer {
    margin: 0 -16px;
    text-align: center;
  }

  .saas-footer-meta {
    flex-wrap: wrap;
    gap: 8px 16px;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .saas-nav-action {
    padding: 0 16px;
  }

  .saas-hero h1 {
    font-size: 43px;
  }

  .saas-lede {
    font-size: 16px;
  }

  .product-chat .msg {
    max-width: 88%;
  }
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 36px;
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid var(--line);
}

/* --- 后台工作台：参考旧版布局，只换新引擎颜色 --- */
.admin-workbench {
  background: #f7f8fa;
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(78, 125, 255, .14), transparent 28%),
    radial-gradient(circle at 12% 18%, rgba(80, 226, 199, .16), transparent 26%),
    linear-gradient(180deg, #f7f8fa 0%, #ffffff 42%, #f5f7fb 100%);
}

.admin-login-page[hidden],
.app-shell[hidden] {
  display: none;
}

.admin-login-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .20;
}

.admin-login-orb.orb-left {
  left: 6%;
  top: 10%;
  background: #50e2c7;
}

.admin-login-orb.orb-right {
  right: 8%;
  top: 4%;
  background: #4e7dff;
}

.admin-login-card {
  width: min(520px, 92vw);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 28px;
  box-shadow: 0 42px 110px rgba(25, 33, 61, .18);
  padding: 32px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(18px);
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.admin-login-mark {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffffff, #eef2f7);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .07);
  overflow: hidden;
}

.admin-login-mark img {
  width: 52px;
  height: auto;
  object-fit: contain;
}

.admin-login-brand h1 {
  margin: 0;
  color: #101214;
  font-size: 30px;
  font-weight: 820;
}

.admin-login-brand p {
  margin: 6px 0 0;
  color: #6b6f76;
  font-size: 16px;
}

.admin-login-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #5d626b;
  font-weight: 650;
}

.admin-login-field input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  padding: 15px 16px;
  outline: none;
  color: #101214;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.admin-login-field input:focus {
  border-color: #50e2c7;
  box-shadow: 0 0 0 4px rgba(80, 226, 199, .18);
}

.admin-login-error {
  margin: 8px 0 14px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #b91c1c;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.admin-login-submit {
  width: 100%;
  border-radius: 16px;
  color: #fff;
  background: #2563ff;
  padding: 15px 18px;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(37, 99, 255, .28);
}

.admin-login-submit:hover {
  background: #1d56e5;
}

.admin-login-submit:disabled {
  opacity: .7;
  cursor: wait;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, #0f2734 0%, #063b40 100%);
  color: #fff;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  margin-bottom: 14px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  font-weight: 800;
}

.brand h1 {
  font-size: 16px;
  line-height: 1.2;
  margin: 0;
}

.brand p {
  font-size: 12px;
  color: rgba(255,255,255,.65);
  margin: 3px 0 0;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tab {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.72);
  text-align: left;
  cursor: pointer;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.tab:hover {
  color: white;
  background: rgba(255,255,255,.08);
}

.tab.active {
  color: white;
  background: rgba(0,168,137,.34);
  box-shadow: inset 3px 0 0 #8df5df;
}

.main-content {
  min-width: 0;
  padding: 24px 28px 36px;
}

.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 4px;
}

.page-top h2 {
  font-size: 24px;
  font-weight: 750;
  margin: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-badge {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.btn, .btn-link {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.btn-danger {
  border-color: #fecaca;
  background: #fff5f5;
  color: #b91c1c;
}

.btn-link {
  display: inline-block;
}

.header-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,.06);
}

.stat-button {
  text-align: left;
  cursor: pointer;
  color: var(--text);
  background: white;
}

.stat-button:hover {
  border-color: #8ddfd3;
  background: white;
  box-shadow: 0 10px 24px rgba(0,128,117,.12);
  transform: translateY(-1px);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-num {
  display: block;
  color: var(--text);
  font-size: 28px;
  font-weight: 760;
  line-height: 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 4px 0 14px;
}

.section-title h3 {
  font-size: 18px;
  margin: 0;
}

.section-title p {
  color: var(--muted);
  margin: 4px 0 0;
}

.conversation-layout {
  min-width: 0;
}

.table-wrap, .detail-panel, .settings-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-data-table {
  table-layout: fixed;
}

th {
  background: #f7faf9;
  color: #475467;
  text-align: left;
  font-weight: 650;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f4;
  vertical-align: top;
}

.admin-data-table td {
  min-width: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-data-table small {
  color: var(--muted);
  line-height: 1.45;
}

.table-copy-cell {
  white-space: pre-wrap;
}

.table-action-cell {
  overflow: visible;
}

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

.table-attachments {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-data-table :is(input, select, textarea) {
  max-width: 100%;
}

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

.loading, .empty-row {
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.conversation-table {
  width: 100%;
  min-width: 0;
}

.conversation-table table {
  table-layout: fixed;
}

.conversation-col-id {
  width: 72px;
}

.conversation-col-source {
  width: 230px;
}

.conversation-col-content {
  width: auto;
}

.conversation-col-time {
  width: 112px;
}

.conversation-col-actions {
  width: 154px;
}

.conversation-source {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.conversation-source strong {
  font-size: 14px;
}

.conversation-source span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-preview {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.6;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.conversation-time {
  display: block;
  line-height: 1.45;
  white-space: normal;
}

.conversation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.conversation-actions .btn {
  flex: 0 0 auto;
}

body.conversation-drawer-open {
  overflow: hidden;
}

.conversation-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 25, 35, .42);
}

.conversation-drawer-backdrop[hidden],
.conversation-drawer[hidden] {
  display: none;
}

.conversation-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 81;
  width: min(500px, calc(100vw - 24px));
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -18px 0 48px rgba(8, 25, 35, .18);
}

.conversation-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.conversation-drawer-head p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.conversation-drawer-head h3 {
  margin: 0;
  font-size: 20px;
}

.conversation-drawer-close {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
}

.conversation-drawer-close:hover {
  background: #f2faf8;
}

.conversation-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 22px 32px;
}

.detail-empty {
  color: var(--muted);
}

.message-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid #eef2f4;
  padding: 14px 0;
  line-height: 1.55;
}

.message-line:last-child {
  border-bottom: 0;
}

.sender {
  display: inline-block;
  color: #526b82;
  font-size: 12px;
  font-weight: 700;
}

.message-content {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.conversation-detail-summary {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f4faf8;
  color: #526b82;
  font-size: 13px;
  line-height: 1.5;
}

.conversation-detail-summary span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.conversation-detail-summary > strong {
  color: var(--text);
  font-size: 16px;
}

.conversation-technical-info {
  margin-top: 4px;
}

.conversation-technical-info summary {
  width: fit-content;
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 650;
}

.conversation-technical-info span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.inline-form {
  display: grid;
  grid-template-columns: 120px 180px 240px minmax(220px, 1fr) 80px;
  gap: 8px;
  width: 100%;
}

.inline-form input,
.inline-form textarea,
.takeover-input,
.evaluation-revise-input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.inline-form textarea {
  min-height: 42px;
  resize: vertical;
}

.takeover-cell {
  display: flex;
  gap: 8px;
}

.takeover-input {
  flex: 1;
}

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

.evaluation-revise-input {
  flex: 1 1 320px;
  width: auto;
  min-width: 0;
}

.admission-note {
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #52677d;
  background: #f5fffd;
}

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

.admission-revise-input {
  flex: 1 1 320px;
  width: auto;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.admission-reasons {
  color: var(--muted);
  line-height: 1.55;
}

.settings-card {
  padding: 18px;
}

/* 信息密集的审核板块使用分区卡片，避免八列内容互相挤压。 */
.review-data-table,
.review-data-table tbody {
  display: block;
}

.review-data-table thead,
.review-data-table colgroup {
  display: none;
}

.review-data-table tbody {
  padding: 12px;
  background: #f7faf9;
}

.review-data-table tbody > tr {
  display: grid;
  gap: 0;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.review-data-table tbody > tr:last-child {
  margin-bottom: 0;
}

.review-data-table td {
  min-width: 0;
  border-bottom: 0;
  padding: 12px 14px;
}

.review-data-table td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.review-data-table td:not([data-label])::before {
  display: none;
}

.review-data-table .loading,
.review-data-table .empty-row {
  grid-column: 1 / -1 !important;
  padding: 28px;
}

.evaluation-data-table tbody > tr {
  grid-template-columns: 72px 110px 72px minmax(160px, .8fr) minmax(240px, 1.2fr);
}

.evaluation-data-table td:nth-child(6) {
  grid-column: 4;
  border-top: 1px solid #eef2f4;
}

.evaluation-data-table td:nth-child(7) {
  grid-column: 5;
  border-top: 1px solid #eef2f4;
}

.evaluation-data-table td:nth-child(8) {
  grid-column: 1 / -1;
  border-top: 1px solid #eef2f4;
  background: #fbfdfc;
}

.admission-data-table tbody > tr {
  grid-template-columns: 100px 120px 120px minmax(200px, .85fr) minmax(260px, 1.15fr);
}

.admission-data-table td:nth-child(6) {
  grid-column: 4;
  border-top: 1px solid #eef2f4;
}

.admission-data-table td:nth-child(7) {
  grid-column: 5;
  border-top: 1px solid #eef2f4;
  background: #fbfdfc;
}

.feedback-data-table tbody > tr {
  grid-template-columns: 100px 140px minmax(240px, 1fr) minmax(150px, .65fr) 150px 120px;
}

.feedback-data-table td:nth-child(7) {
  grid-column: 1 / 6;
  border-top: 1px solid #eef2f4;
}

.feedback-data-table td:nth-child(8) {
  grid-column: 6;
  border-top: 1px solid #eef2f4;
  background: #fbfdfc;
}

.feedback-status {
  width: 100%;
}

.feedback-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mini-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.mini-stat.wide {
  grid-column: span 1;
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.mini-stat strong {
  font-size: 18px;
}

.ok {
  color: var(--primary-dark);
}

.maintenance-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.inline-field input {
  width: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.badge-pass {
  color: #047857;
  background: #d1fae5;
}

.badge-review {
  color: #b45309;
  background: #fef3c7;
}

.badge-fail {
  color: #b91c1c;
  background: #fee2e2;
}

.model-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.model-role {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #f8fbfb;
  display: grid;
  gap: 4px;
}

.model-role span,
.model-role em {
  color: var(--muted);
  font-style: normal;
}

.model-role .ok {
  color: #047857;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 92vw);
  background: white;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.modal-head h3 {
  margin: 0;
}

.icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
}

.modal-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.modal-card input,
.modal-card textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
}

.modal-card textarea {
  min-height: 130px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: static;
    height: auto;
    min-width: 0;
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-workbench .main-content {
    min-width: 0;
  }

  .admin-workbench .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-data-table,
  .admin-data-table tbody {
    display: block;
  }

  .admin-data-table thead,
  .admin-data-table colgroup {
    display: none;
  }

  .admin-data-table tbody {
    padding: 0;
    background: transparent;
  }

  .admin-data-table tbody > tr,
  .review-data-table tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  }

  .admin-data-table td,
  .review-data-table td,
  .evaluation-data-table td:nth-child(n),
  .admission-data-table td:nth-child(n),
  .feedback-data-table td:nth-child(n) {
    display: grid;
    grid-column: 1 !important;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    padding: 11px 14px;
    border-top: 0;
    border-bottom: 1px solid #eef2f4;
    background: #fff;
  }

  .admin-data-table td:last-child {
    border-bottom: 0;
    background: #fbfdfc;
  }

  .admin-data-table td::before {
    content: attr(data-label);
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
  }

  .admin-data-table td:not([data-label])::before {
    display: none;
  }

  .admin-data-table .loading,
  .admin-data-table .empty-row {
    display: block;
    padding: 28px 16px;
  }

  .takeover-cell,
  .evaluation-actions,
  .admission-actions,
  .maintenance-actions {
    min-width: 0;
    flex-wrap: wrap;
  }

  .takeover-input,
  .evaluation-revise-input,
  .admission-revise-input {
    flex: 1 1 100%;
    width: 100%;
  }

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

  .feedback-summary .wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .admin-workbench .sidebar {
    padding: 14px 12px 10px;
  }

  .admin-workbench .brand {
    padding: 2px 4px 12px;
    margin-bottom: 10px;
  }

  .admin-workbench .tabs {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .admin-workbench .tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-workbench .tab {
    width: auto;
    flex: 0 0 auto;
    padding: 9px 12px;
    white-space: nowrap;
  }

  .admin-workbench .main-content {
    padding: 18px 14px 28px;
  }

  .admin-workbench .page-top {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
  }

  .admin-workbench .top-actions {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .admin-workbench .top-actions > * {
    flex: 0 0 auto;
  }

  .admin-workbench .header-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
  }

  .admin-workbench .stat-item {
    min-width: 0;
    padding: 12px 14px;
  }

  .admin-workbench .stat-label {
    margin-bottom: 6px;
  }

  .admin-workbench .stat-num {
    font-size: 23px;
  }

  .admin-workbench .section-title {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .admin-workbench .section-title > .top-actions {
    width: 100%;
  }

  .admin-workbench .section-title p {
    line-height: 1.55;
  }

  .conversation-table {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .conversation-table table,
  .conversation-table tbody {
    display: block;
  }

  .conversation-table colgroup,
  .conversation-table thead {
    display: none;
  }

  .conversation-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .conversation-table td {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 14px;
  }

  .conversation-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
  }

  .conversation-source span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .conversation-actions {
    flex-wrap: wrap;
  }

  .conversation-drawer {
    width: 100vw;
  }
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 24px;
}

.panel {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  min-height: 260px;
  box-shadow: 0 14px 36px rgba(0, 128, 117, .08);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel h2 {
  margin: 0 0 14px;
}

.stack {
  display: grid;
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--soft);
}

.card small {
  color: var(--muted);
}

.admin-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-form input, .admin-form textarea {
  width: 100%;
  border: 1px solid #cde5df;
  border-radius: 12px;
  padding: 10px 12px;
}

.admin-form textarea {
  min-height: 90px;
}

.knowledge-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.manual-box {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.manual-box input {
  flex: 1;
  border: 1px solid #cde5df;
  border-radius: 12px;
  padding: 8px 10px;
}

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