* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #F0F4FF;
  color: #1F2937;
  min-height: 100vh;
}

/* 顶部 */
.topbar {
  background: linear-gradient(135deg, #1A56DB, #0E3A8A);
  color: white;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 56px; height: 56px;
  background: white; color: #1A56DB;
  font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; letter-spacing: 1px;
}
.brand h1 { font-size: 22px; font-weight: 700; }
.brand p { font-size: 13px; opacity: .85; margin-top: 2px; }
.dashboard span { margin-left: 24px; font-size: 14px; opacity: .92; }
.dashboard b { color: #FFD800; font-weight: 700; margin: 0 4px; }

/* 主体两栏 */
.container {
  max-width: 1280px;
  margin: 28px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
}
@media (max-width: 960px){ .container { grid-template-columns: 1fr; } }

.panel {
  background: white;
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: 0 2px 10px rgba(26,86,219,.06);
}
.section-title {
  font-size: 16px;
  color: #1A56DB;
  border-left: 4px solid #1A56DB;
  padding-left: 10px;
  margin: 18px 0 14px;
  font-weight: 700;
}
.section-title:first-child { margin-top: 0; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 13px; color: #4B5563;
  margin-bottom: 6px; font-weight: 500;
}
.field label i { color: #EF4444; font-style: normal; margin-left: 2px; }
.field input, .field select {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid #D1D5DB; border-radius: 8px;
  font-size: 14px; background: white;
  transition: border-color .15s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: #1A56DB;
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* 搜索框 + 联想 */
.search-box { display: flex; gap: 8px; }
.search-box input { flex: 1; }
.search-box select { width: 130px; flex: none; }
.suggest {
  position: relative;
  margin-top: 6px;
  border-radius: 8px;
  background: white;
  max-height: 320px; overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.suggest:empty { display: none; }
.suggest .row {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #F3F4F6;
  display: flex; justify-content: space-between; align-items: center;
}
.suggest .row:hover { background: #F0F4FF; }
.suggest .row .left { display: flex; flex-direction: column; gap: 2px; }
.suggest .row .name { font-weight: 600; color: #1F2937; }
.suggest .row .meta { font-size: 12px; color: #6B7280; }
.suggest .row .price { color: #1A56DB; font-weight: 700; font-size: 15px; }
.suggest .row .price small { color: #6B7280; font-size: 11px; font-weight: 400; }

/* 已选小区卡片 */
.picked-card {
  background: linear-gradient(135deg, #F0F4FF, #E0E9FF);
  border: 1.5px solid #1A56DB;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.picked-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 4px 0;
  border-bottom: 1px dashed rgba(26,86,219,.15);
}
.picked-row:last-child { border-bottom: none; }
.picked-row span:first-child { color: #6B7280; }
.picked-row b { color: #1A56DB; font-weight: 700; }
.picked-row b.num { font-size: 16px; }

/* 高级折叠 */
.advanced { margin: 12px 0; padding: 8px 0; }
.advanced summary {
  cursor: pointer; color: #6B7280; font-size: 13px;
  padding: 6px 0; user-select: none;
}
.advanced summary:hover { color: #1A56DB; }

/* 主按钮 */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #1A56DB, #0E3A8A);
  color: white;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all .15s;
  box-shadow: 0 4px 12px rgba(26,86,219,.25);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26,86,219,.35);
}
.btn-primary:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-light {
  background: white; color: #1A56DB;
  border: 1.5px solid #1A56DB;
  padding: 8px 18px; border-radius: 8px;
  cursor: pointer; font-size: 14px;
  margin-right: 8px;
}
.btn-light:hover { background: #F0F4FF; }

.tip { font-size: 12px; color: #9CA3AF; margin-top: 8px; }

.hidden { display: none !important; }

/* 结果面板 */
.empty {
  text-align: center; padding: 60px 20px;
  color: #9CA3AF;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty .muted { font-size: 12px; margin-top: 6px; }

.big-numbers {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px;
  margin-bottom: 18px;
}
.big-card {
  background: linear-gradient(135deg, #1A56DB, #0E3A8A);
  color: white;
  padding: 22px 24px;
  border-radius: 12px;
}
.big-card.alt { background: linear-gradient(135deg, #0E7C66, #064E3B); }
.big-label { font-size: 13px; opacity: .9; }
.big-value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: -.5px; }
.big-sub { font-size: 12px; opacity: .8; margin-top: 4px; }

.confidence {
  background: #F0F4FF; padding: 12px 16px;
  border-radius: 8px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 13px;
}
.conf-grade {
  display: inline-block;
  width: 32px; height: 32px;
  background: #10B981; color: white;
  font-weight: 800; font-size: 18px;
  border-radius: 50%;
  text-align: center; line-height: 32px;
}
.conf-grade.B { background: #1A56DB; }
.conf-grade.C { background: #F59E0B; }
.conf-grade.D { background: #EF4444; }
.conf-score { color: #6B7280; margin-left: auto; }

.result-panel h3 {
  font-size: 14px; color: #1A56DB; margin: 18px 0 10px;
}

/* 修正表 */
.adj-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; margin-bottom: 14px;
}
.adj-table th, .adj-table td {
  padding: 9px 12px; border-bottom: 1px solid #E5E7EB;
  text-align: left;
}
.adj-table th {
  background: #F0F4FF; color: #1A56DB;
  font-weight: 600;
}
.adj-table td:last-child, .adj-table th:last-child { text-align: right; }
.adj-table tfoot th { background: #1A56DB; color: white; }
.rate-pos { color: #10B981; font-weight: 600; }
.rate-neg { color: #EF4444; font-weight: 600; }
.rate-zero { color: #6B7280; }

.formula {
  background: #F9FAFB;
  border-left: 3px solid #1A56DB;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.9;
  color: #4B5563;
  border-radius: 6px;
  margin-bottom: 16px;
}
.formula b { color: #1A56DB; }

.actions { display: flex; gap: 8px; }

footer {
  text-align: center; padding: 28px 16px;
  color: #6B7280; font-size: 12px; line-height: 1.7;
}

@media print {
  .topbar, .input-panel, .actions, .empty, footer { display: none !important; }
  body { background: white; }
  .container { display: block; max-width: 100%; }
  .panel { box-shadow: none; }
}
