* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  height: 68px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 15px;
}

.brand-copy span {
  font-size: 12px;
  color: var(--muted);
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  flex: 1;
}

.nav-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  color: var(--blue);
}

.nav-btn.active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: #bfdbfe;
  font-weight: 600;
}

.topbar-right {
  min-width: 100px;
  display: flex;
  justify-content: flex-end;
}

.user-pill {
  padding: 9px 14px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
}

.page {
  padding: 28px 20px 40px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.hero-card,
.status-card,
.summary-card,
.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 24px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.hero-title h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero-title p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 180px;
  gap: 16px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  color: #374151;
  font-weight: 600;
}

.field input {
  width: 100%;
  height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
}

.action-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.action-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.status-card,
.summary-card,
.result-card {
  padding: 18px 20px;
}

.hidden {
  display: none;
}

.status-text {
  font-size: 14px;
  line-height: 1.6;
}

.summary-head,
.result-head {
  margin-bottom: 16px;
}

.summary-head h2,
.result-head h2 {
  margin: 0;
  font-size: 18px;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
}

.customer-list {
  display: grid;
  gap: 14px;
}

.customer-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.customer-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  font-size: 14px;
}

.customer-grid div {
  color: #374151;
  word-break: break-all;
}

.customer-grid strong {
  color: var(--text);
}

.empty {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .form-grid,
  .summary-grid,
  .customer-grid {
    grid-template-columns: 1fr;
  }

  .hero-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    height: auto;
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-nav {
    justify-content: flex-start;
  }

  .topbar-right {
    justify-content: flex-start;
  }
}