:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --line: #e5eaf2;
  --line-strong: #d8e0ea;
  --text: #172033;
  --muted: #667085;
  --faint: #98a2b3;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #059669;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

[v-cloak] {
  display: none;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 750;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
}

.product-pill {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  background: #f8fbff;
  font-size: 13px;
  font-weight: 650;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--primary);
}

.workspace {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 22px 28px 36px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.filter-panel,
.content-panel,
.summary-card,
.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.filter-panel {
  position: sticky;
  top: 90px;
  overflow: hidden;
}

.panel-head {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}

.panel-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 750;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
}

.panel-head p {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.quote-form {
  padding: 18px;
}

.scope-selector {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scope-selector .el-radio-button,
.scope-selector .el-radio-button__inner {
  width: 100%;
}

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

.benefit-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
}

.helper-link {
  display: inline-flex;
  margin-top: 6px;
  color: var(--primary);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  font-weight: 650;
}

.helper-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.field-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.section-label {
  margin: 14px 0 9px;
  padding-top: 12px;
  border-top: 1px solid #edf1f6;
  color: var(--faint);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.section-label.in-box {
  margin: 0 0 10px;
  padding-top: 0;
  border-top: 0;
}

.condition-box {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

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

.compare-button {
  width: 100%;
  margin-top: 6px;
  border-radius: 8px;
  font-weight: 750;
}

.content-panel {
  min-width: 0;
  min-height: calc(100vh - 126px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.disclaimer-banner {
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
}

.empty-state {
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 52px 24px;
}

.empty-visual {
  width: 86px;
  height: 86px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
  color: var(--primary);
  font-size: 30px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 #fff, 0 18px 35px rgba(37, 99, 235, 0.12);
}

.empty-state h2 {
  margin: 24px 0 8px;
  font-size: 22px;
}

.empty-state p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.empty-metrics {
  width: min(620px, 100%);
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.empty-metrics div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  text-align: left;
}

.empty-metrics strong {
  display: block;
  font-size: 18px;
  color: var(--text);
}

.empty-metrics span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.summary-card {
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.summary-card h2 {
  margin: 0;
  font-size: 18px;
}

.summary-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.summary-card p strong {
  color: var(--primary);
}

.summary-card p .muted-count {
  color: var(--warning);
}

.summary-stats {
  display: flex;
  gap: 10px;
}

.summary-stats div {
  min-width: 96px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.summary-stats span {
  display: block;
  color: var(--faint);
  font-size: 12px;
}

.summary-stats strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
}

.table-card {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.quote-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.quote-table th,
.quote-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.quote-table th {
  background: #fbfcfe;
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.quote-table tr:hover td {
  background: #f8fbff;
}

.quote-table tr:last-child td {
  border-bottom: 0;
}

.product-col {
  width: 260px;
}

.commission-col {
  width: 280px;
}

.quote-table strong {
  display: block;
  color: var(--text);
  font-weight: 750;
  line-height: 1.35;
}

.quote-table small {
  display: block;
  margin-top: 5px;
  color: var(--faint);
}

.money {
  color: var(--success);
  font-weight: 800;
  white-space: nowrap;
  font-size: 14px;
}

.muted-money {
  color: #0f766e;
  font-weight: 700;
}

.plan-chip {
  display: inline-block;
  max-width: 280px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: #344054;
  line-height: 1.4;
}

.commission-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #475467;
  line-height: 1.5;
}

.warning-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.warning-chip {
  max-width: 260px;
  padding: 6px 8px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: var(--warning-bg);
  color: var(--warning);
  line-height: 1.45;
}

.empty-mark {
  color: #cbd5e1;
}

.ineligible {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.collapse-title {
  color: #475467;
  font-size: 13px;
  font-weight: 650;
}

.bad-item {
  padding: 11px 2px;
  border-bottom: 1px solid #edf1f6;
}

.bad-item:last-child {
  border-bottom: 0;
}

.bad-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.bad-item span {
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.el-form-item {
  margin-bottom: 9px;
}

.el-form-item__label {
  color: #475467;
  font-weight: 650;
}

.el-select,
.el-input-number {
  width: 100%;
}

.el-input-number .el-input__inner {
  text-align: center;
}

.el-checkbox {
  height: auto;
  margin-right: 0;
}

.el-checkbox__label {
  color: #475467;
  font-size: 13px;
}

.el-collapse {
  --el-collapse-header-height: 46px;
  border-top: 0;
  border-bottom: 0;
}

.el-collapse-item__header {
  padding: 0 16px;
  border-bottom: 0;
  background: #fbfcfe;
}

.el-collapse-item__wrap {
  padding: 0 16px 8px;
  border-bottom: 0;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .filter-panel {
    position: static;
  }

  .content-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 14px 16px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .form-grid,
  .switch-grid,
  .empty-metrics {
    grid-template-columns: 1fr;
  }

  .summary-card {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-stats {
    width: 100%;
  }

  .summary-stats div {
    flex: 1;
  }
}
