body {
  background: #f4f6f8;
}

.navbar-vertical {
  background: #182433;
}

.brand-link {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
}

.brand-link span {
  font-size: 11px;
  font-weight: 500;
  opacity: .78;
}

.topbar {
  border-bottom: 1px solid #dde3ea;
  background: #fff;
}

.login-bg {
  background: linear-gradient(135deg, #eef5f9 0%, #f7f2ec 100%);
}

.login-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: #182433;
  color: #fff;
  font-weight: 800;
  font-size: 24px;
}

.metric-card .avatar {
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.case-summary {
  border-top: 4px solid #206bc4;
}

.stage-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.stage-item {
  min-height: 92px;
  padding: 10px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
}

.stage-item.active {
  border-color: #206bc4;
  background: #edf6ff;
}

.stage-item.done {
  border-color: #2fb344;
  background: #eef9f1;
}

.stage-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dbe2ea;
  font-weight: 700;
}

.stage-item.active .stage-dot {
  background: #206bc4;
  color: #fff;
}

.stage-name {
  margin-top: 8px;
  font-weight: 700;
  font-size: 13px;
}

.stage-status {
  margin-top: 4px;
  font-size: 12px;
  color: #667382;
}

.upload-card {
  min-height: 360px;
}

.assistant-card {
  top: 88px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-block {
  padding: 14px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fff;
}

.json-box {
  max-height: 300px;
  overflow: auto;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  white-space: pre-wrap;
}

.business-text {
  white-space: pre-wrap;
  border-left: 3px solid #206bc4;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
}

.note-item {
  border-left: 3px solid #206bc4;
  background: #f8fafc;
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 0 8px 8px 0;
}

.chat-thread {
  max-height: 520px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.chat-message.user {
  text-align: right;
}

.chat-bubble {
  display: inline-block;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  white-space: pre-wrap;
  text-align: left;
}

.chat-message.user .chat-bubble {
  background: #e7f5ff;
}

.chat-message.assistant .chat-bubble {
  background: #f8fafc;
  border-left: 3px solid #206bc4;
}

.price-match-table th,
.price-match-table td {
  vertical-align: middle;
  white-space: nowrap;
}

.case-status-active,
.case-status-waiting { background: #e7f5ff; color: #1864ab; }
.case-status-blocked,
.case-status-cancelled { background: #ffe3e3; color: #b02a37; }
.case-status-sent,
.case-status-won,
.case-status-completed { background: #dff7e6; color: #206a38; }
.case-status-lost,
.case-status-archived { background: #e9ecef; color: #495057; }
.case-status-test { background: #fff3bf; color: #8a5a00; }

.risk-low { background: #dff7e6; color: #206a38; }
.risk-medium { background: #fff3bf; color: #8a5a00; }
.risk-high { background: #ffe3e3; color: #b02a37; }
.risk-unknown { background: #e9ecef; color: #495057; }

.conclusion-pass { background: #dff7e6; color: #206a38; }
.conclusion-need_revision { background: #fff3bf; color: #8a5a00; }
.conclusion-need_confirm { background: #e7f5ff; color: #1864ab; }
.conclusion-need_boss_review { background: #ffe8cc; color: #b35c00; }
.conclusion-reject { background: #ffe3e3; color: #b02a37; }
.conclusion-wait_file,
.conclusion-parse_failed,
.conclusion-wait_more_info,
.conclusion-none { background: #e7f5ff; color: #1864ab; }

@media (max-width: 991px) {
  .stage-flow {
    grid-template-columns: repeat(7, 140px);
  }
}
