* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #0f1115;
  color: #e6e8ec;
}
header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 22px; background: #161922; border-bottom: 1px solid #242838;
}
header h1 { font-size: 18px; margin: 0; font-weight: 600; }
.status { font-size: 13px; padding: 3px 10px; border-radius: 20px; }
.status.idle { background: #2a2f3d; color: #9aa3b2; }
.status.connecting { background: #4a3a12; color: #f0c14b; }
.status.connected { background: #163d28; color: #4ade80; }
.status.ended { background: #3d1620; color: #f87171; }

.bar {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 22px; background: #12151c; border-bottom: 1px solid #1d212c; flex-wrap: wrap;
}
input[type=tel], select {
  background: #1b1f29; border: 1px solid #2a2f3d; color: #e6e8ec;
  padding: 9px 12px; border-radius: 8px; font-size: 14px;
}
input[type=tel] { min-width: 240px; }
button {
  background: #232838; border: 1px solid #313748; color: #e6e8ec;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; cursor: pointer;
}
button:hover:not(:disabled) { background: #2c3346; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: #2563eb; border-color: #2563eb; }
button.danger { background: #b91c1c; border-color: #b91c1c; }
button.live { background: #166534; border-color: #16a34a; }
.chk { font-size: 13px; color: #9aa3b2; display: flex; align-items: center; gap: 6px; }

main { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 18px 22px; }
.col h2 { font-size: 14px; color: #8b93a4; margin: 4px 0 10px; font-weight: 600; }

.transcript {
  height: 62vh; overflow-y: auto; background: #12151c;
  border: 1px solid #1d212c; border-radius: 12px; padding: 14px;
}
.line { margin-bottom: 12px; line-height: 1.5; }
.line .orig { font-size: 13px; color: #7c8597; }
.line .zh { font-size: 16px; }
.line.customer .zh { color: #93c5fd; }
.line.operator .zh { color: #86efac; }
.line.system { font-size: 12px; color: #6b7280; text-align: center; }

.suggestions { min-height: 120px; margin-bottom: 18px; }
.chip {
  display: block; width: 100%; text-align: left; margin-bottom: 8px;
  background: #17202e; border: 1px solid #24405e; color: #cfe3ff;
  padding: 10px 12px; border-radius: 10px; font-size: 15px;
}
.chip:hover { background: #1d2d44; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick button { text-align: left; font-size: 13.5px; line-height: 1.4; }

/* login overlay */
.hidden { display: none !important; }
.overlay {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #0f1115; z-index: 50;
}
.login-box {
  background: #161922; border: 1px solid #242838; border-radius: 14px;
  padding: 32px 36px; width: 340px; text-align: center;
}
.login-box h1 { font-size: 20px; margin: 0 0 6px; }
.login-box p { color: #8b93a4; font-size: 13px; margin: 0 0 18px; }
.login-box input {
  width: 100%; margin-bottom: 14px; background: #1b1f29;
  border: 1px solid #2a2f3d; color: #e6e8ec; padding: 11px 12px;
  border-radius: 8px; font-size: 15px;
}
.login-box button { width: 100%; padding: 11px; }
.login-err { color: #f87171; font-size: 13px; margin-top: 12px; min-height: 16px; }

/* header extras */
.timer { font-size: 14px; color: #cbd5e1; font-variant-numeric: tabular-nums; }
.health { display: flex; gap: 8px; margin-left: auto; }
.dot { font-size: 11px; padding: 3px 8px; border-radius: 12px; }
.dot.ok { background: #14321f; color: #4ade80; }
.dot.bad { background: #3a1620; color: #f87171; }
