:root {
  --ink: #142033;
  --muted: #667085;
  --line: #d9e2ec;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --blue: #276ef1;
  --green: #0e9f6e;
  --amber: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 18px 46px rgba(20, 32, 51, 0.12);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #eef3f8;
}

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

.hidden {
  display: none !important;
}

button,
.link-button,
.primary-cta,
.ghost-cta {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

button.secondary,
.ghost-cta {
  background: #e7edf6;
  color: var(--ink);
}

.link-button {
  background: #132238;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px);
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}

.app-header h1,
.sales-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

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

.header-actions,
.hero-actions,
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-switch {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}

.mode-panel {
  display: grid;
  gap: 10px;
}

.inline-field {
  display: grid;
  gap: 10px;
}

.auth-panel {
  max-width: 620px;
}

.login-note {
  margin: 4px 0 0;
  color: #556070;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.shell {
  padding: 24px clamp(16px, 4vw, 48px) 48px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

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

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar,
.main-panel {
  padding: 18px;
}

.panel-title h2,
.section-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.panel-title p,
.section-heading p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-stack,
.entry-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(39, 110, 241, 0.12);
}

.file-input {
  padding: 14px;
  border: 1px dashed #9fb1c7;
  border-radius: 8px;
  background: #f8fafc;
}

.list,
.report-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.list-item,
.report-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.list-item strong,
.report-item strong {
  display: block;
  margin-bottom: 4px;
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.item-actions button,
.item-actions a {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: -4px -4px 18px;
  padding: 0 0 12px;
}

.tab {
  background: #edf2f7;
  color: var(--ink);
}

.tab.active {
  background: var(--blue);
  color: #fff;
}

.tab-panel {
  display: none;
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #132238;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.sales-page {
  background: #f6f8fb;
}

.sales-hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(24px, 6vw, 72px);
  align-items: center;
  padding: clamp(32px, 6vw, 72px);
  background:
    linear-gradient(120deg, rgba(255,255,255,0.94), rgba(246,248,251,0.82)),
    url("data:image/svg+xml,%3Csvg width='1200' height='800' viewBox='0 0 1200 800' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1200' height='800' fill='%23edf4fb'/%3E%3Cg opacity='0.42'%3E%3Crect x='64' y='82' width='240' height='320' rx='10' fill='%23ffffff'/%3E%3Crect x='92' y='124' width='176' height='18' rx='4' fill='%23276ef1'/%3E%3Crect x='92' y='166' width='144' height='12' rx='4' fill='%2390a4b8'/%3E%3Crect x='92' y='198' width='188' height='12' rx='4' fill='%23bfd0df'/%3E%3Crect x='92' y='230' width='156' height='12' rx='4' fill='%23bfd0df'/%3E%3Crect x='92' y='286' width='84' height='72' rx='8' fill='%23dff4ed'/%3E%3Crect x='196' y='286' width='84' height='72' rx='8' fill='%23fff0cf'/%3E%3Crect x='820' y='130' width='280' height='420' rx='28' fill='%23142233'/%3E%3Crect x='840' y='172' width='240' height='330' rx='12' fill='%23ffffff'/%3E%3Crect x='864' y='204' width='132' height='16' rx='4' fill='%23276ef1'/%3E%3Crect x='864' y='244' width='184' height='10' rx='4' fill='%2390a4b8'/%3E%3Crect x='864' y='272' width='160' height='10' rx='4' fill='%23bfd0df'/%3E%3Crect x='864' y='326' width='54' height='54' rx='8' fill='%23e0efff'/%3E%3Crect x='932' y='326' width='54' height='54' rx='8' fill='%23dbf5e9'/%3E%3Crect x='1000' y='326' width='54' height='54' rx='8' fill='%23ffe9c2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

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

.hero-subtitle {
  color: #475569;
  font-size: 20px;
  line-height: 1.7;
  margin: 18px 0 26px;
}

.primary-cta {
  background: #0e9f6e;
}

.ghost-cta {
  background: #ffffff;
  border: 1px solid var(--line);
}

.report-preview {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.mail-topbar {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.mail-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}

.mail-topbar span:nth-child(2) {
  background: var(--amber);
}

.mail-topbar span:nth-child(3) {
  background: var(--green);
}

.preview-label {
  color: var(--blue);
  font-weight: 800;
  margin: 0 0 6px;
}

.report-preview h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

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

.preview-metrics div {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 12px;
}

.preview-metrics strong,
.preview-metrics span {
  display: block;
}

.preview-metrics span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.preview-summary,
.report-preview li {
  color: #334155;
  line-height: 1.7;
}

.band {
  padding: 56px clamp(18px, 6vw, 72px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.pain-grid,
.feature-table,
.steps,
.price-layout {
  display: grid;
  gap: 14px;
}

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

.pain-grid article,
.feature-table div,
.steps div,
.price-main,
.promise {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

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

.feature-table strong,
.feature-table span,
.steps strong,
.steps p {
  display: block;
}

.feature-table span,
.steps p,
.promise p,
.price-main p {
  color: var(--muted);
  line-height: 1.6;
}

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

.steps span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e0efff;
  color: var(--blue);
  font-weight: 900;
  margin-bottom: 12px;
}

.price-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.price {
  font-size: 22px;
  margin: 0;
}

.price strong {
  font-size: clamp(36px, 6vw, 58px);
  color: #0e9f6e;
}

@media (max-width: 920px) {
  .app-header,
  .sales-hero {
    grid-template-columns: 1fr;
    display: grid;
  }

  .workspace,
  .status-grid,
  .pain-grid,
  .feature-table,
  .steps,
  .price-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .app-header {
    align-items: stretch;
  }

  .header-actions,
  .hero-actions,
  .form-actions {
    flex-direction: column;
  }

  button,
  .link-button,
  .primary-cta,
  .ghost-cta {
    width: 100%;
  }

  .preview-metrics {
    grid-template-columns: 1fr;
  }
}
