:root {
  color-scheme: light;
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-soft: #eef3eb;
  --text: #1d2522;
  --muted: #68736e;
  --line: #dce3dc;
  --accent: #277a5b;
  --accent-strong: #185b43;
  --warning: #b25d24;
  --danger: #b9443d;
  --shadow: 0 18px 50px rgba(31, 47, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px;
  background: #13231c;
  color: #f8fbf7;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #9fd2b8;
  color: #13231c;
  font-weight: 800;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 3px;
  color: #b9c9c1;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  color: #c8d7d0;
  background: transparent;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-note p {
  margin: 8px 0 0;
  color: #c8d7d0;
  font-size: 13px;
  line-height: 1.7;
}

.main {
  padding: 30px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.topbar h1,
.section-head h2,
.wall-toolbar h2 {
  margin: 4px 0 0;
  letter-spacing: 0;
}

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

.topbar-actions,
.filter-row,
.poster-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.filter,
.danger-button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button,
.filter {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}

.filter.active {
  border-color: var(--accent);
  color: var(--accent);
}

.danger-button {
  background: #fff7f6;
  color: var(--danger);
  border-color: #f0c4c0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

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

.metric {
  padding: 18px;
}

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

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.split-grid,
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.panel {
  padding: 20px;
}

.narrow-panel {
  max-width: 680px;
}

.section-head,
.wall-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.step span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.step p {
  margin: 0;
  line-height: 1.6;
}

.compact-list,
.review-list {
  display: grid;
  gap: 12px;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: #fbfcfa;
}

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

label,
.select-label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(39, 122, 91, 0.14);
}

.ai-box {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #bfd9cc;
  border-radius: 8px;
  padding: 14px;
  background: #f1faf5;
}

.ai-box p,
.helper-text {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.public-form-preview,
.public-wall {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
}

.collect-hero,
.wall-hero {
  padding: 28px;
  color: #ffffff;
  background: var(--accent);
}

.collect-hero h3,
.wall-hero h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

.collect-hero p,
.wall-hero p {
  margin: 0;
  line-height: 1.7;
}

.preview-fields {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.fake-field {
  height: 44px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.fake-field.large {
  height: 120px;
}

.review-card,
.testimonial-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.review-card.hidden {
  opacity: 0.62;
}

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

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

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-soft);
}

.person strong {
  display: block;
}

.person span,
.meta-text {
  color: var(--muted);
  font-size: 13px;
}

.quote {
  margin: 0;
  color: #24302b;
  line-height: 1.8;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.testimonial-card.featured {
  border-color: var(--accent);
  background: #f6fbf8;
}

.wall-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 18px 22px;
}

.poster-panel {
  display: grid;
  place-items: center;
}

canvas {
  width: min(100%, 420px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.price-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.price-card h3 {
  margin: 16px 0 8px;
  font-size: 24px;
}

.price {
  margin: 6px 0 12px;
  color: var(--accent);
  font-size: 38px;
  font-weight: 900;
}

.price-card p {
  min-height: 52px;
  color: var(--muted);
  line-height: 1.7;
}

.pay-panel {
  max-width: 760px;
}

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

.qr-box {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-top: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}

.qr-box img {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
}

.feedback-shot {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 16px;
  border-radius: 8px;
  background: #14231c;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .split-grid,
  .form-layout,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .pricing-grid,
  .pay-qrs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .section-head,
  .wall-toolbar {
    display: grid;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }
}
