:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f8fbfd;
  --surface-tint: #eef9fb;
  --text: #172033;
  --text-soft: #475467;
  --muted: #667085;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-2: #2563eb;
  --accent: #f59e0b;
  --success: #15803d;
  --danger: #b42318;
  --warning-bg: #ecfdf3;
  --warning-line: #bbf7d0;
  --shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 14% 0%, rgba(31, 138, 156, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbfd 0%, #eef5f8 100%);
}

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

a:hover {
  color: var(--primary-dark);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.35;
}

h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

p {
  line-height: 1.75;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.brand::before {
  content: "企";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #37b4a4);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 107, 135, 0.22);
}

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

.eyebrow.light {
  color: rgba(255, 255, 255, 0.86);
}

.muted,
.hint,
.form-footer {
  color: var(--muted);
}

.muted {
  font-size: 14px;
}

.hint {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.hint.ready {
  color: var(--success);
  font-weight: 700;
}

.field-feedback {
  min-height: 18px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.field-feedback.valid {
  color: var(--success);
  font-weight: 700;
}

.field-feedback.invalid {
  color: var(--danger);
  font-weight: 700;
}

.form-footer {
  margin: 18px 0 0;
  font-size: 14px;
}

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

label {
  display: block;
  margin: 15px 0 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
  min-height: 106px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.14);
}

input.is-valid,
textarea.is-valid,
select.is-valid {
  border-color: var(--success);
  background: #fbfffd;
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--danger);
  background: #fffafa;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  padding: 11px 17px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(23, 107, 135, 0.18);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover:not(:disabled),
.button-link:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(23, 107, 135, 0.2);
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

button.secondary,
.secondary-link {
  background: #edf7fa;
  color: var(--primary-dark);
  box-shadow: none;
}

button.secondary:hover:not(:disabled),
.secondary-link:hover {
  background: #dceff4;
  color: var(--primary-dark);
}

.ghost-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  box-shadow: none;
}

.ghost-link:hover {
  background: #f8fbfd;
  color: var(--primary-dark);
}

.button-link.compact {
  min-height: 36px;
  padding: 8px 13px;
}

.submit {
  width: 100%;
  margin-top: 18px;
}

.landing {
  min-height: 100vh;
}

.site-nav,
.register-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 min(6vw, 84px);
  border-bottom: 1px solid rgba(227, 235, 242, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.nav-actions,
.actions,
.status-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(380px, 1.03fr) minmax(420px, 0.97fr);
  gap: 28px;
  align-items: stretch;
  min-height: calc(82vh - 70px);
  padding: 44px min(6vw, 84px) 34px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 640px;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 84% 18%, rgba(245, 158, 11, 0.2), transparent 25%),
    linear-gradient(135deg, #ffffff 0%, #f3fbfd 100%);
  box-shadow: var(--shadow);
}

.hero h1 {
  max-width: 760px;
  color: var(--primary-dark);
  font-size: clamp(34px, 5vw, 56px);
}

.lead {
  margin-bottom: 16px;
  color: #334155;
  font-size: 21px;
  line-height: 1.65;
}

.notice,
.service-notice {
  border: 1px solid var(--warning-line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: #8a4b00;
  padding: 13px 15px;
  line-height: 1.65;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.hero-stats div,
.metric-grid div,
.side-card,
.scope-grid div,
.panel-card,
.welcome-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.hero-stats div {
  padding: 16px;
}

.hero-stats strong,
.hero-stats span,
.metric-grid span,
.metric-grid strong,
.side-card span,
.side-card strong {
  display: block;
}

.hero-stats strong {
  margin-bottom: 5px;
  color: #0f172a;
}

.hero-stats span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  min-height: 640px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 24px 24px auto auto;
  width: min(46%, 260px);
  aspect-ratio: 1.24;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    url("/static/assets/hero-match.png") center / cover no-repeat;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.16);
  z-index: 1;
}

.dark-card {
  position: relative;
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 107, 135, 0.96), rgba(31, 138, 156, 0.92)),
    #176b87;
  color: #fff;
}

.dark-card h2 {
  max-width: 420px;
  font-size: 28px;
}

.flow-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.flow-list div {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 4px 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.flow-list span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.flow-list strong {
  font-size: 15px;
}

.flow-list em {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.scope-grid div {
  padding: 18px;
}

.scope-grid strong,
.scope-grid span {
  display: block;
}

.scope-grid span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.process-strip,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px min(6vw, 84px);
  background: #142b35;
}

.process-strip div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.process-strip span {
  color: #8fe1e8;
  font-weight: 800;
}

.band {
  padding: 42px min(6vw, 84px) 60px;
}

.section-head {
  margin-bottom: 18px;
}

.grid,
.admin-grid,
.form-grid {
  display: grid;
  gap: 14px;
}

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

.feature-grid > div,
.flow-panel,
.panel,
.sessions,
.chat,
.admin-panel,
.status-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feature-grid > div {
  padding: 20px;
}

.feature-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
}

.feature-grid span {
  display: block;
  color: var(--muted);
  line-height: 1.65;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 500px);
  background: #f6f9fb;
}

.login-visual {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px min(6vw, 72px);
  background:
    linear-gradient(135deg, rgba(23, 107, 135, 0.96), rgba(31, 138, 156, 0.9)),
    url("/static/assets/hero-match.png") center right / cover no-repeat;
  color: #fff;
}

.login-nav,
.register-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-visual .brand {
  color: #fff;
}

.login-copy {
  max-width: 620px;
}

.login-copy h1 {
  max-width: 560px;
  margin-bottom: 18px;
  font-size: clamp(32px, 4vw, 46px);
}

.login-copy p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.login-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 820px;
}

.login-feature-strip div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.login-feature-strip strong,
.login-feature-strip span {
  display: block;
}

.login-feature-strip span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.45;
}

.login-panel {
  align-self: center;
  width: min(420px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.register-page {
  min-height: 100vh;
}

.register-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 28px;
  align-items: end;
  padding: 34px min(5vw, 72px) 26px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(240, 251, 253, 0.92)),
    url("/static/assets/hero-match.png") center right / cover no-repeat;
}

.register-hero h1 {
  font-size: 38px;
  color: var(--primary-dark);
}

.register-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--text-soft);
}

.register-layout {
  width: min(1180px, calc(100vw - 36px));
  margin: 24px auto 48px;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.register-guide {
  position: sticky;
  top: 88px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.register-guide ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  line-height: 1.75;
}

.warning-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.6;
}

.register-form-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.form-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.form-section:first-of-type {
  border-top: 0;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.form-section-head > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--surface-tint);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
}

.form-section-head h3 {
  margin-bottom: 4px;
}

.form-section-head p,
.register-submit-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.register-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 0;
}

.register-progress div {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.register-progress span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
}

.register-progress .active {
  border-color: #bfe6ec;
  background: var(--surface-tint);
  color: var(--primary-dark);
}

.register-progress .active span {
  background: var(--primary);
  color: #fff;
}

.register-submit-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -10px 30px rgba(23, 107, 135, 0.08);
  backdrop-filter: blur(12px);
}

.register-submit-bar button {
  flex: 0 0 auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
  display: none;
}

.agreement-modal {
  width: min(820px, 100%);
  max-height: min(780px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(219, 227, 238, 0.92);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #ffffff, #f7fbff);
}

.modal-header h2 {
  margin: 0;
}

.modal-close {
  flex: 0 0 auto;
}

.agreement-modal-scroll {
  overflow: auto;
  padding: 20px 22px 22px;
  background: var(--surface-soft);
}

.modal-note {
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.agreement-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.agreement-card + .agreement-card {
  margin-top: 16px;
}

.modal-agreement-content,
.agreement-content {
  min-height: 180px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #334155;
  line-height: 1.75;
  white-space: pre-wrap;
}

.agreement-content {
  height: 176px;
  overflow: auto;
  background: #fbfdff;
}

.confirm-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.final-confirm {
  margin-top: 18px;
}

.agreement-status {
  margin: 10px 0 0;
}

.agreement-status.ready,
#agreementGateStatus.ready {
  color: var(--success);
  font-weight: 700;
}

.workspace-shell {
  width: min(1440px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.shell {
  width: min(1120px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 30px 0 44px;
}

.narrow {
  width: min(820px, calc(100vw - 32px));
}

.page-shell {
  padding-top: 28px;
}

.page-header {
  margin-bottom: 18px;
}

.page-header .brand {
  margin-bottom: 28px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.app-header .brand {
  margin-bottom: 12px;
}

.app-header h1 {
  margin-bottom: 4px;
  font-size: 26px;
}

.chat-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}

.sessions {
  min-height: 680px;
  padding: 14px;
  background: #f8fbfd;
}

.side-card {
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #eef9fb, #f0fdf4);
}

.side-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.side-card strong {
  margin-top: 4px;
  color: #0f172a;
  font-size: 15px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
}

.panel-head button {
  min-height: 34px;
  padding: 7px 12px;
}

.session-item {
  width: 100%;
  justify-content: flex-start;
  margin-top: 8px;
  background: #fff;
  color: #243247;
  box-shadow: none;
  border: 1px solid var(--line);
  text-align: left;
}

.session-item:hover {
  background: var(--surface-tint);
  color: var(--primary-dark);
}

.chat {
  min-height: 680px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.chat-head h2 {
  margin: 0;
}

.chat-tags,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-tags span,
.chip {
  padding: 7px 9px;
  border: 1px solid #d7eef3;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.messages {
  overflow: auto;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfd 100%);
}

.welcome-card {
  margin-bottom: 18px;
  padding: 20px;
}

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

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.prompt-grid button {
  justify-content: flex-start;
  min-height: 64px;
  padding: 12px;
  background: #fff;
  color: #334155;
  box-shadow: none;
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 700;
}

.prompt-grid button:hover {
  background: var(--surface-tint);
  color: var(--primary-dark);
}

.msg {
  max-width: min(760px, 78%);
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  white-space: pre-wrap;
  line-height: 1.65;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
}

.msg.user {
  margin-left: auto;
  border-color: #bfe6ec;
  background: var(--surface-tint);
  color: #164e63;
}

.msg.assistant {
  color: #172033;
}

.msg.refusal {
  border-left: 4px solid var(--danger);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.composer textarea {
  min-height: 58px;
  max-height: 180px;
}

.insight-panel {
  min-height: 680px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.panel-card {
  padding: 18px;
}

.rule-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
}

.rule {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #edf2f7;
  border-radius: var(--radius);
  background: #f7fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.status-box {
  padding: 18px;
  color: #243247;
  font-size: 16px;
  line-height: 1.7;
}

.status-actions {
  margin-top: 16px;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(360px, 760px);
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 34px;
}

.auth-aside {
  min-height: min(760px, calc(100vh - 68px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.9));
  box-shadow: var(--shadow);
}

.auth-aside .brand {
  margin-bottom: 44px;
}

.auth-aside h1 {
  margin-bottom: 16px;
  font-size: 36px;
}

.auth-aside p {
  max-width: 360px;
  color: var(--text-soft);
  font-size: 16px;
}

.auth-art {
  width: 100%;
  height: 260px;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.58)),
    url("/static/assets/hero-match.png") center right / cover no-repeat;
  box-shadow: var(--shadow);
}

.panel {
  width: min(460px, 100%);
  padding: 30px;
  box-shadow: var(--shadow);
}

.auth-card {
  justify-self: stretch;
  min-height: min(760px, calc(100vh - 68px));
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left-color: rgba(219, 227, 238, 0.58);
  box-shadow: var(--shadow);
}

.wide,
.register-card {
  width: min(760px, 100%);
}

.register-card {
  max-height: calc(100vh - 68px);
  overflow: auto;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0;
  color: #334155;
  line-height: 1.55;
  font-weight: 560;
}

.check-row input {
  width: auto;
  flex: 0 0 auto;
  margin-top: 3px;
  accent-color: var(--primary);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.stepper div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stepper span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
}

.stepper .active {
  border-color: #bfe6ec;
  background: var(--surface-tint);
  color: var(--primary-dark);
}

.stepper .active span {
  background: var(--primary);
  color: #fff;
}

.admin-grid {
  grid-template-columns: minmax(320px, 1.15fr) minmax(260px, 0.85fr) minmax(300px, 0.9fr);
  align-items: start;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin: 0 0 16px;
  background: transparent;
}

.metric-grid div {
  padding: 16px;
}

.metric-grid span {
  color: var(--muted);
  font-size: 13px;
}

.metric-grid strong {
  margin-top: 5px;
  color: #0f172a;
  font-size: 21px;
}

.admin-panel {
  min-height: 420px;
  padding: 16px;
}

.users-panel {
  min-height: 520px;
}

.admin-row {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: #334155;
  line-height: 1.65;
}

.admin-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.admin-row span {
  display: inline-block;
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.admin-row button {
  min-height: 32px;
  margin: 4px 4px 0 0;
  padding: 6px 10px;
  box-shadow: none;
}

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

#agreementForm > * + * {
  margin-top: 10px;
}

#agreementForm button {
  margin-top: 12px;
}

@media (max-width: 1120px) {
  .hero,
  .login-page,
  .register-hero,
  .register-layout,
  .chat-layout,
  .admin-grid,
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel,
  .sessions,
  .chat,
  .insight-panel {
    min-height: auto;
  }

  .login-visual {
    min-height: 540px;
  }

  .login-panel {
    width: min(560px, calc(100% - 36px));
    margin: 24px auto 36px;
  }

  .register-guide {
    position: static;
  }

  .hero-stats,
  .process-strip,
  .stepper,
  .prompt-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .auth-wrap {
    gap: 18px;
    align-items: start;
    padding: 24px 18px;
  }

  .auth-aside,
  .auth-card {
    min-height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .register-card {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .site-nav,
  .app-header,
  .register-nav,
  .register-submit-bar,
  .chat-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav,
  .register-nav {
    position: static;
    padding: 16px 18px;
  }

  .nav-actions {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 22px 18px;
  }

  .hero-copy,
  .dark-card,
  .login-panel,
  .register-form-panel {
    padding: 22px;
  }

  .hero h1,
  .login-copy h1,
  .register-hero h1,
  .auth-aside h1 {
    font-size: 28px;
  }

  .scope-grid,
  .login-feature-strip,
  .register-progress,
  .form-grid,
  .composer {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 460px;
    padding: 20px 18px;
  }

  .register-hero {
    padding: 26px 18px;
  }

  .register-layout {
    width: min(100vw - 20px, 1180px);
    margin: 16px auto 32px;
  }

  .register-submit-bar button {
    width: 100%;
  }

  .shell,
  .workspace-shell,
  .narrow {
    width: min(100vw - 20px, 1120px);
    padding: 18px 0 30px;
  }

  .panel,
  .flow-panel,
  .admin-panel {
    padding: 18px;
  }

  .msg {
    max-width: 94%;
  }

  .auth-art {
    height: 170px;
  }
}

/* Homepage styles moved to landing.css */

/* =========================================================
   全站科技成果匹配主题覆盖
   功能说明：统一非聊天页面的基础配色、导航、按钮、卡片和表单状态。
   入参：无。
   返回值：无。
   异常说明：无。
   ========================================================= */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbfd;
  --surface-tint: #edf8fb;
  --text: #102033;
  --text-soft: #52657a;
  --muted: #8393a7;
  --line: #d9e4ef;
  --line-strong: #bfd0df;
  --primary: #0891b2;
  --primary-dark: #075d75;
  --primary-2: #2563eb;
  --accent: #d97706;
  --success: #13a06f;
  --danger: #b42318;
  --warning-bg: #fff7ed;
  --warning-line: #fed7aa;
  --shadow: 0 18px 42px rgba(20, 45, 76, 0.08);
  --shadow-soft: 0 10px 28px rgba(20, 45, 76, 0.06);
  --radius: 8px;
}

html,
body {
  background: var(--bg);
}

body {
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.07), transparent 240px),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 52%, #f7faf8 100%);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-dark);
}

.brand::before {
  background: linear-gradient(135deg, #19b7a4, #2f73ff);
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.24);
}

.eyebrow {
  color: var(--primary);
  letter-spacing: 0.08em;
}

input,
textarea,
select {
  border-color: var(--line-strong);
  border-radius: 8px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(8, 145, 178, 0.56);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

button,
.button-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

button:hover:not(:disabled),
.button-link:hover {
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.22);
}

button.secondary,
.secondary-link {
  background: #edf8fb;
  color: var(--primary-dark);
}

button.secondary:hover:not(:disabled),
.secondary-link:hover {
  background: #dff2f7;
}

.ghost-link:hover {
  color: var(--primary-dark);
}

.site-nav,
.register-nav,
.page-header,
.app-header {
  border-bottom-color: rgba(217, 228, 239, 0.9);
  background: rgba(255, 255, 255, 0.88);
}

.hero-copy,
.side-card,
.panel-card,
.welcome-card,
.auth-card,
.register-card,
.agreement-card,
.dark-card {
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.hero-copy,
.register-hero,
.auth-card,
.register-card,
.panel-card,
.agreement-card {
  background:
    radial-gradient(circle at 88% 8%, rgba(19, 160, 111, 0.1), transparent 260px),
    linear-gradient(135deg, #ffffff 0%, #f5fbfd 100%);
}

.hero h1,
.page-title,
.app-header h1 {
  color: #12213a;
}

.notice,
.service-notice {
  border-color: var(--warning-line);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, #fff7ed, #fffdfa);
  color: #9a4d00;
}

.dark-card {
  background:
    linear-gradient(120deg, rgba(15, 159, 143, 0.2), transparent 44%),
    linear-gradient(135deg, #101b31 0%, #183764 56%, #14505a 100%);
}

.side-card {
  background: linear-gradient(135deg, #edf8fb, #f0fdf4);
}

.modal-header {
  background: linear-gradient(90deg, #ffffff, #f3fbfd);
}
