:root {
  color-scheme: light;
  --bg: #f3f7f4;
  --surface: #ffffff;
  --ink: #17211b;
  --muted: #68746d;
  --line: #dbe4de;
  --accent: #0f7c5a;
  --accent-strong: #0a5d44;
  --warn: #b45b12;
  --danger: #b23636;
  --shadow: 0 18px 60px rgba(23, 33, 27, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 124, 90, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(184, 91, 18, 0.08), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

.customer-page {
  background: #f6f7fb;
}

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

.app-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.workspace {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(219, 228, 222, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.customer-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 78px 18px 36px;
}

.customer-hero {
  margin-bottom: 28px;
}

.customer-hero h1 {
  color: #1d2833;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
}

.customer-hero p {
  margin: 20px 0 0;
  color: #737985;
  font-size: 19px;
  line-height: 1.55;
}

.customer-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(29, 40, 51, 0.06);
}

.service-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 20px;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.service-button strong {
  flex: 0 0 auto;
  font-size: 44px;
  line-height: 1;
}

.service-primary {
  background: #17794f;
}

.service-dark {
  background: #203127;
}

.service-gold {
  background: #9b6a1f;
}

.home-link {
  display: inline-block;
  margin-top: 28px;
  color: #19774e;
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
}

.beian {
  margin: 128px 0 0;
  color: #848994;
  text-align: center;
  font-size: 17px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  font-size: 19px;
}

.score-pill {
  min-width: 132px;
  padding: 16px 20px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.score-pill span {
  font-size: 36px;
  font-weight: 800;
}

.score-pill small {
  color: rgba(255, 255, 255, 0.72);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  gap: 0;
}

.form-panel,
.result-panel {
  padding: 30px 32px;
}

.form-panel {
  display: grid;
  gap: 18px;
  border-right: 1px solid var(--line);
}

.section-heading {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.section-heading:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

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

label {
  display: grid;
  gap: 8px;
  color: #27322c;
  font-size: 14px;
  font-weight: 700;
}

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

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 124, 90, 0.12);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.actions {
  display: flex;
  gap: 12px;
  padding-top: 6px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.save-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

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

.secondary {
  background: #e8eee9;
  color: var(--ink);
}

.secondary:hover {
  background: #dbe4de;
}

.result-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  background: rgba(243, 247, 244, 0.62);
}

.result-card,
.metric-list {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
}

.result-card p {
  color: var(--muted);
  line-height: 1.65;
}

.admin-layout {
  display: grid;
  gap: 18px;
  padding: 30px 32px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

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

th {
  background: #eef5f0;
  color: #27322c;
}

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

.metric-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.metric-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metric-list span {
  color: var(--muted);
}

.metric-list strong {
  color: var(--accent);
}

ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-button {
  min-width: 64px;
  padding: 8px 10px;
  background: #e8eee9;
  color: var(--ink);
}

.prompt-card textarea {
  margin-top: 10px;
  min-height: 260px;
  color: #27322c;
}

.danger {
  color: var(--danger);
}

.warn {
  color: var(--warn);
}

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

  .form-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 22px 18px;
  }

  h1 {
    font-size: 28px;
  }

  .form-panel,
  .result-panel {
    padding: 22px 18px;
  }

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

  .actions {
    flex-direction: column;
  }
}
